From fa112be6826debe8848223888b3d23746a6ede8f Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 24 Mar 2023 19:37:08 -0300 Subject: [PATCH 001/167] Add AccessManager contracts (#4121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hadrien Croubois Co-authored-by: Ernesto García --- .changeset/quiet-trainers-kick.md | 5 + contracts/access/README.adoc | 10 + contracts/access/manager/AccessManaged.sol | 75 +++ contracts/access/manager/AccessManager.sol | 341 ++++++++++++ .../access/manager/AccessManagerAdapter.sol | 54 ++ contracts/access/manager/IAuthority.sol | 13 + contracts/mocks/AccessManagerMocks.sol | 34 ++ hardhat.config.js | 2 +- test/access/manager/AccessManaged.test.js | 55 ++ test/access/manager/AccessManager.test.js | 506 ++++++++++++++++++ test/helpers/enums.js | 1 + 11 files changed, 1095 insertions(+), 1 deletion(-) create mode 100644 .changeset/quiet-trainers-kick.md create mode 100644 contracts/access/manager/AccessManaged.sol create mode 100644 contracts/access/manager/AccessManager.sol create mode 100644 contracts/access/manager/AccessManagerAdapter.sol create mode 100644 contracts/access/manager/IAuthority.sol create mode 100644 contracts/mocks/AccessManagerMocks.sol create mode 100644 test/access/manager/AccessManaged.test.js create mode 100644 test/access/manager/AccessManager.test.js diff --git a/.changeset/quiet-trainers-kick.md b/.changeset/quiet-trainers-kick.md new file mode 100644 index 000000000..5de96467d --- /dev/null +++ b/.changeset/quiet-trainers-kick.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': minor +--- + +`AccessManager`: Added a new contract for managing access control of complex systems in a consolidated location. diff --git a/contracts/access/README.adoc b/contracts/access/README.adoc index 80ca0020f..59d5d86a3 100644 --- a/contracts/access/README.adoc +++ b/contracts/access/README.adoc @@ -25,3 +25,13 @@ This directory provides ways to restrict who can access the functions of a contr {{AccessControlEnumerable}} {{AccessControlDefaultAdminRules}} + +== AccessManager + +{{IAuthority}} + +{{AccessManager}} + +{{AccessManaged}} + +{{AccessManagerAdapter}} diff --git a/contracts/access/manager/AccessManaged.sol b/contracts/access/manager/AccessManaged.sol new file mode 100644 index 000000000..2dcdeb7aa --- /dev/null +++ b/contracts/access/manager/AccessManaged.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "../../utils/Context.sol"; +import "./IAuthority.sol"; + +/** + * @dev This contract module makes available a {restricted} modifier. Functions decorated with this modifier will be + * permissioned according to an "authority": a contract like {AccessManager} that follows the {IAuthority} interface, + * implementing a policy that allows certain callers access to certain functions. + * + * IMPORTANT: The `restricted` modifier should never be used on `internal` functions, judiciously used in `public` + * functions, and ideally only used in `external` functions. See {restricted}. + */ +contract AccessManaged is Context { + event AuthorityUpdated(address indexed sender, IAuthority indexed newAuthority); + + IAuthority private _authority; + + /** + * @dev Restricts access to a function as defined by the connected Authority for this contract and the + * caller and selector of the function that entered the contract. + * + * [IMPORTANT] + * ==== + * In general, this modifier should only be used on `external` functions. It is okay to use it on `public` functions + * that are used as external entry points and are not called internally. Unless you know what you're doing, it + * should never be used on `internal` functions. Failure to follow these rules can have critical security + * implications! This is because the permissions are determined by the function that entered the contract, i.e. the + * function at the bottom of the call stack, and not the function where the modifier is visible in the source code. + * ==== + */ + modifier restricted() { + _checkCanCall(_msgSender(), msg.sig); + _; + } + + /** + * @dev Initializes the contract connected to an initial authority. + */ + constructor(IAuthority initialAuthority) { + _setAuthority(initialAuthority); + } + + /** + * @dev Returns the current authority. + */ + function authority() public view virtual returns (IAuthority) { + return _authority; + } + + /** + * @dev Transfers control to a new authority. The caller must be the current authority. + */ + function setAuthority(IAuthority newAuthority) public virtual { + require(_msgSender() == address(_authority), "AccessManaged: not current authority"); + _setAuthority(newAuthority); + } + + /** + * @dev Transfers control to a new authority. Internal function with no access restriction. + */ + function _setAuthority(IAuthority newAuthority) internal virtual { + _authority = newAuthority; + emit AuthorityUpdated(_msgSender(), newAuthority); + } + + /** + * @dev Reverts if the caller is not allowed to call the function identified by a selector. + */ + function _checkCanCall(address caller, bytes4 selector) internal view virtual { + require(_authority.canCall(caller, address(this), selector), "AccessManaged: authority rejected"); + } +} diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol new file mode 100644 index 000000000..8820ef4a0 --- /dev/null +++ b/contracts/access/manager/AccessManager.sol @@ -0,0 +1,341 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.13; + +import "../AccessControl.sol"; +import "../AccessControlDefaultAdminRules.sol"; +import "./IAuthority.sol"; +import "./AccessManaged.sol"; + +interface IAccessManager is IAuthority, IAccessControlDefaultAdminRules { + enum AccessMode { + Custom, + Closed, + Open + } + + event GroupUpdated(uint8 indexed group, string name); + + event GroupAllowed(address indexed target, bytes4 indexed selector, uint8 indexed group, bool allowed); + + event AccessModeUpdated(address indexed target, AccessMode indexed mode); + + function createGroup(uint8 group, string calldata name) external; + + function updateGroupName(uint8 group, string calldata name) external; + + function hasGroup(uint8 group) external view returns (bool); + + function getUserGroups(address user) external view returns (bytes32 groups); + + function grantGroup(uint8 group, address user) external; + + function revokeGroup(uint8 group, address user) external; + + function renounceGroup(uint8 group, address user) external; + + function getFunctionAllowedGroups(address target, bytes4 selector) external view returns (bytes32 groups); + + function setFunctionAllowedGroup(address target, bytes4[] calldata selectors, uint8 group, bool allowed) external; + + function getContractMode(address target) external view returns (AccessMode); + + function setContractModeCustom(address target) external; + + function setContractModeOpen(address target) external; + + function setContractModeClosed(address target) external; + + function transferContractAuthority(address target, address newAuthority) external; +} + +/** + * @dev AccessManager is a central contract to store the permissions of a system. + * + * The smart contracts under the control of an AccessManager instance will have a set of "restricted" functions, and the + * exact details of how access is restricted for each of those functions is configurable by the admins of the instance. + * These restrictions are expressed in terms of "groups". + * + * An AccessManager instance will define a set of groups. Each of them must be created before they can be granted, with + * a maximum of 255 created groups. Users can be added into any number of these groups. Each of them defines an + * AccessControl role, and may confer access to some of the restricted functions in the system, as configured by admins + * through the use of {setFunctionAllowedGroup}. + * + * Note that a function in a target contract may become permissioned in this way only when: 1) said contract is + * {AccessManaged} and is connected to this contract as its manager, and 2) said function is decorated with the + * `restricted` modifier. + * + * There is a special group defined by default named "public" which all accounts automatically have. + * + * Contracts can also be configured in two special modes: 1) the "open" mode, where all functions are allowed to the + * "public" group, and 2) the "closed" mode, where no function is allowed to any group. + * + * Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that + * it will be highly secured (e.g., a multisig or a well-configured DAO). Additionally, {AccessControlDefaultAdminRules} + * is included to enforce security rules on this account. + * + * NOTE: Some of the functions in this contract, such as {getUserGroups}, return a `bytes32` bitmap to succintly + * represent a set of groups. In a bitmap, bit `n` (counting from the least significant bit) will be 1 if and only if + * the group with number `n` is in the set. For example, the hex value `0x05` represents the set of the two groups + * numbered 0 and 2 from its binary equivalence `0b101` + */ +contract AccessManager is IAccessManager, AccessControlDefaultAdminRules { + bytes32 _createdGroups; + + // user -> groups + mapping(address => bytes32) private _userGroups; + + // target -> selector -> groups + mapping(address => mapping(bytes4 => bytes32)) private _allowedGroups; + + // target -> mode + mapping(address => AccessMode) private _contractMode; + + uint8 private constant _GROUP_PUBLIC = type(uint8).max; + + /** + * @dev Initializes an AccessManager with initial default admin and transfer delay. + */ + constructor( + uint48 initialDefaultAdminDelay, + address initialDefaultAdmin + ) AccessControlDefaultAdminRules(initialDefaultAdminDelay, initialDefaultAdmin) { + _createGroup(_GROUP_PUBLIC, "public"); + } + + /** + * @dev Returns true if the caller can invoke on a target the function identified by a function selector. + * Entrypoint for {AccessManaged} contracts. + */ + function canCall(address caller, address target, bytes4 selector) public view virtual returns (bool) { + bytes32 allowedGroups = getFunctionAllowedGroups(target, selector); + bytes32 callerGroups = getUserGroups(caller); + return callerGroups & allowedGroups != 0; + } + + /** + * @dev Creates a new group with a group number that can be chosen arbitrarily but must be unused, and gives it a + * human-readable name. The caller must be the default admin. + * + * Group numbers are not auto-incremented in order to avoid race conditions, but administrators can safely use + * sequential numbers. + * + * Emits {GroupUpdated}. + */ + function createGroup(uint8 group, string memory name) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _createGroup(group, name); + } + + /** + * @dev Updates an existing group's name. The caller must be the default admin. + */ + function updateGroupName(uint8 group, string memory name) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + require(group != _GROUP_PUBLIC, "AccessManager: built-in group"); + require(hasGroup(group), "AccessManager: unknown group"); + emit GroupUpdated(group, name); + } + + /** + * @dev Returns true if the group has already been created via {createGroup}. + */ + function hasGroup(uint8 group) public view virtual returns (bool) { + return _getGroup(_createdGroups, group); + } + + /** + * @dev Returns a bitmap of the groups the user has. See note on bitmaps above. + */ + function getUserGroups(address user) public view virtual returns (bytes32) { + return _userGroups[user] | _groupMask(_GROUP_PUBLIC); + } + + /** + * @dev Grants a user a group. + * + * Emits {RoleGranted} with the role id of the group, if wasn't already held by the user. + */ + function grantGroup(uint8 group, address user) public virtual { + grantRole(_encodeGroupRole(group), user); // will check msg.sender + } + + /** + * @dev Removes a group from a user. + * + * Emits {RoleRevoked} with the role id of the group, if previously held by the user. + */ + function revokeGroup(uint8 group, address user) public virtual { + revokeRole(_encodeGroupRole(group), user); // will check msg.sender + } + + /** + * @dev Allows a user to renounce a group. + * + * Emits {RoleRevoked} with the role id of the group, if previously held by the user. + */ + function renounceGroup(uint8 group, address user) public virtual { + renounceRole(_encodeGroupRole(group), user); // will check msg.sender + } + + /** + * @dev Returns a bitmap of the groups that are allowed to call a function of a target contract. If the target + * contract is in open or closed mode it will be reflected in the return value. + */ + function getFunctionAllowedGroups(address target, bytes4 selector) public view virtual returns (bytes32) { + AccessMode mode = getContractMode(target); + if (mode == AccessMode.Open) { + return _groupMask(_GROUP_PUBLIC); + } else if (mode == AccessMode.Closed) { + return 0; + } else { + return _allowedGroups[target][selector]; + } + } + + /** + * @dev Changes whether a group is allowed to call a function of a contract, according to the `allowed` argument. + * The caller must be the default admin. + */ + function setFunctionAllowedGroup( + address target, + bytes4[] calldata selectors, + uint8 group, + bool allowed + ) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + for (uint256 i = 0; i < selectors.length; i++) { + bytes4 selector = selectors[i]; + _allowedGroups[target][selector] = _withUpdatedGroup(_allowedGroups[target][selector], group, allowed); + emit GroupAllowed(target, selector, group, allowed); + } + } + + /** + * @dev Returns the mode of the target contract, which may be custom (`0`), closed (`1`), or open (`2`). + */ + function getContractMode(address target) public view virtual returns (AccessMode) { + return _contractMode[target]; + } + + /** + * @dev Sets the target contract to be in custom restricted mode. All restricted functions in the target contract + * will follow the group-based restrictions defined by the AccessManager. The caller must be the default admin. + */ + function setContractModeCustom(address target) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _setContractMode(target, AccessMode.Custom); + } + + /** + * @dev Sets the target contract to be in "open" mode. All restricted functions in the target contract will become + * callable by anyone. The caller must be the default admin. + */ + function setContractModeOpen(address target) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _setContractMode(target, AccessMode.Open); + } + + /** + * @dev Sets the target contract to be in "closed" mode. All restricted functions in the target contract will be + * closed down and disallowed to all. The caller must be the default admin. + */ + function setContractModeClosed(address target) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _setContractMode(target, AccessMode.Closed); + } + + /** + * @dev Transfers a target contract onto a new authority. The caller must be the default admin. + */ + function transferContractAuthority( + address target, + address newAuthority + ) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + AccessManaged(target).setAuthority(IAuthority(newAuthority)); + } + + /** + * @dev Creates a new group. + * + * Emits {GroupUpdated}. + */ + function _createGroup(uint8 group, string memory name) internal virtual { + require(!hasGroup(group), "AccessManager: existing group"); + _createdGroups = _withUpdatedGroup(_createdGroups, group, true); + emit GroupUpdated(group, name); + } + + /** + * @dev Augmented version of {AccessControl-_grantRole} that keeps track of user group bitmaps. + */ + function _grantRole(bytes32 role, address user) internal virtual override { + super._grantRole(role, user); + (bool isGroup, uint8 group) = _decodeGroupRole(role); + if (isGroup) { + require(hasGroup(group), "AccessManager: unknown group"); + _userGroups[user] = _withUpdatedGroup(_userGroups[user], group, true); + } + } + + /** + * @dev Augmented version of {AccessControl-_revokeRole} that keeps track of user group bitmaps. + */ + function _revokeRole(bytes32 role, address user) internal virtual override { + super._revokeRole(role, user); + (bool isGroup, uint8 group) = _decodeGroupRole(role); + if (isGroup) { + require(hasGroup(group), "AccessManager: unknown group"); + require(group != _GROUP_PUBLIC, "AccessManager: irrevocable group"); + _userGroups[user] = _withUpdatedGroup(_userGroups[user], group, false); + } + } + + /** + * @dev Sets the restricted mode of a target contract. + */ + function _setContractMode(address target, AccessMode mode) internal virtual { + _contractMode[target] = mode; + emit AccessModeUpdated(target, mode); + } + + /** + * @dev Returns the {AccessControl} role id that corresponds to a group. + * + * This role id starts with the ASCII characters `group:`, followed by zeroes, and ends with the single byte + * corresponding to the group number. + */ + function _encodeGroupRole(uint8 group) internal pure virtual returns (bytes32) { + return bytes32("group:") | bytes32(uint256(group)); + } + + /** + * @dev Decodes a role id into a group, if it is a role id of the kind returned by {_encodeGroupRole}. + */ + function _decodeGroupRole(bytes32 role) internal pure virtual returns (bool isGroup, uint8 group) { + bytes32 tagMask = ~bytes32(uint256(0xff)); + bytes32 tag = role & tagMask; + isGroup = tag == bytes32("group:"); + group = uint8(role[31]); + } + + /** + * @dev Returns a bit mask where the only non-zero bit is the group number bit. + */ + function _groupMask(uint8 group) private pure returns (bytes32) { + return bytes32(1 << group); + } + + /** + * @dev Returns the value of the group number bit in a bitmap. + */ + function _getGroup(bytes32 bitmap, uint8 group) private pure returns (bool) { + return bitmap & _groupMask(group) > 0; + } + + /** + * @dev Returns a new group bitmap where a specific group was updated. + */ + function _withUpdatedGroup(bytes32 bitmap, uint8 group, bool value) private pure returns (bytes32) { + bytes32 mask = _groupMask(group); + if (value) { + return bitmap | mask; + } else { + return bitmap & ~mask; + } + } +} diff --git a/contracts/access/manager/AccessManagerAdapter.sol b/contracts/access/manager/AccessManagerAdapter.sol new file mode 100644 index 000000000..afa92264a --- /dev/null +++ b/contracts/access/manager/AccessManagerAdapter.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "./AccessManager.sol"; +import "./AccessManaged.sol"; + +/** + * @dev This contract can be used to migrate existing {Ownable} or {AccessControl} contracts into an {AccessManager} + * system. + * + * Ownable contracts can have their ownership transferred to an instance of this adapter. AccessControl contracts can + * grant all roles to the adapter, while ideally revoking them from all other accounts. Subsequently, the permissions + * for those contracts can be managed centrally and with function granularity in the {AccessManager} instance the + * adapter is connected to. + * + * Permissioned interactions with thus migrated contracts must go through the adapter's {relay} function and will + * proceed if the function is allowed for the caller in the AccessManager instance. + */ +contract AccessManagerAdapter is AccessManaged { + bytes32 private constant _DEFAULT_ADMIN_ROLE = 0; + + /** + * @dev Initializes an adapter connected to an AccessManager instance. + */ + constructor(AccessManager manager) AccessManaged(manager) {} + + /** + * @dev Relays a function call to the target contract. The call will be relayed if the AccessManager allows the + * caller access to this function in the target contract, i.e. if the caller is in a team that is allowed for the + * function, or if the caller is the default admin for the AccessManager. The latter is meant to be used for + * ad hoc operations such as asset recovery. + */ + function relay(address target, bytes memory data) external payable { + bytes4 sig = bytes4(data); + AccessManager manager = AccessManager(address(authority())); + require( + manager.canCall(msg.sender, target, sig) || manager.hasRole(_DEFAULT_ADMIN_ROLE, msg.sender), + "AccessManagerAdapter: caller not allowed" + ); + (bool ok, bytes memory result) = target.call{value: msg.value}(data); + assembly { + let result_pointer := add(32, result) + let result_size := mload(result) + switch ok + case true { + return(result_pointer, result_size) + } + default { + revert(result_pointer, result_size) + } + } + } +} diff --git a/contracts/access/manager/IAuthority.sol b/contracts/access/manager/IAuthority.sol new file mode 100644 index 000000000..61a85d2f9 --- /dev/null +++ b/contracts/access/manager/IAuthority.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @dev Standard interface for permissioning originally defined in Dappsys. + */ +interface IAuthority { + /** + * @dev Returns true if the caller can invoke on a target the function identified by a function selector. + */ + function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed); +} diff --git a/contracts/mocks/AccessManagerMocks.sol b/contracts/mocks/AccessManagerMocks.sol new file mode 100644 index 000000000..caf81366e --- /dev/null +++ b/contracts/mocks/AccessManagerMocks.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.13; + +import "../access/manager/IAuthority.sol"; +import "../access/manager/AccessManaged.sol"; + +contract SimpleAuthority is IAuthority { + address _allowedCaller; + address _allowedTarget; + bytes4 _allowedSelector; + + function setAllowed(address allowedCaller, address allowedTarget, bytes4 allowedSelector) public { + _allowedCaller = allowedCaller; + _allowedTarget = allowedTarget; + _allowedSelector = allowedSelector; + } + + function canCall(address caller, address target, bytes4 selector) external view override returns (bool) { + return caller == _allowedCaller && target == _allowedTarget && selector == _allowedSelector; + } +} + +abstract contract AccessManagedMock is AccessManaged { + event RestrictedRan(); + + function restrictedFunction() external restricted { + emit RestrictedRan(); + } + + function otherRestrictedFunction() external restricted { + emit RestrictedRan(); + } +} diff --git a/hardhat.config.js b/hardhat.config.js index 32f721b65..8edddd2f6 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -3,7 +3,7 @@ // - COVERAGE: enable coverage report // - ENABLE_GAS_REPORT: enable gas report // - COMPILE_MODE: production modes enables optimizations (default: development) -// - COMPILE_VERSION: compiler version (default: 0.8.9) +// - COMPILE_VERSION: compiler version // - COINMARKETCAP: coinmarkercat api key for USD value in gas report const fs = require('fs'); diff --git a/test/access/manager/AccessManaged.test.js b/test/access/manager/AccessManaged.test.js new file mode 100644 index 000000000..caf1eea7e --- /dev/null +++ b/test/access/manager/AccessManaged.test.js @@ -0,0 +1,55 @@ +const { + expectEvent, + expectRevert, + constants: { ZERO_ADDRESS }, +} = require('@openzeppelin/test-helpers'); + +const AccessManaged = artifacts.require('$AccessManagedMock'); +const SimpleAuthority = artifacts.require('SimpleAuthority'); + +contract('AccessManaged', function (accounts) { + const [authority, other, user] = accounts; + it('construction', async function () { + const managed = await AccessManaged.new(authority); + expectEvent.inConstruction(managed, 'AuthorityUpdated', { + oldAuthority: ZERO_ADDRESS, + newAuthority: authority, + }); + expect(await managed.authority()).to.equal(authority); + }); + + describe('setAuthority', function () { + it(`current authority can change managed's authority`, async function () { + const managed = await AccessManaged.new(authority); + const set = await managed.setAuthority(other, { from: authority }); + expectEvent(set, 'AuthorityUpdated', { + sender: authority, + newAuthority: other, + }); + expect(await managed.authority()).to.equal(other); + }); + + it(`other account cannot change managed's authority`, async function () { + const managed = await AccessManaged.new(authority); + await expectRevert(managed.setAuthority(other, { from: other }), 'AccessManaged: not current authority'); + }); + }); + + describe('restricted', function () { + const selector = web3.eth.abi.encodeFunctionSignature('restrictedFunction()'); + + it('allows if authority returns true', async function () { + const authority = await SimpleAuthority.new(); + const managed = await AccessManaged.new(authority.address); + await authority.setAllowed(user, managed.address, selector); + const restricted = await managed.restrictedFunction({ from: user }); + expectEvent(restricted, 'RestrictedRan'); + }); + + it('reverts if authority returns false', async function () { + const authority = await SimpleAuthority.new(); + const managed = await AccessManaged.new(authority.address); + await expectRevert(managed.restrictedFunction({ from: user }), 'AccessManaged: authority rejected'); + }); + }); +}); diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js new file mode 100644 index 000000000..bf194d388 --- /dev/null +++ b/test/access/manager/AccessManager.test.js @@ -0,0 +1,506 @@ +const { + expectEvent, + expectRevert, + time: { duration }, +} = require('@openzeppelin/test-helpers'); +const { AccessMode } = require('../../helpers/enums'); + +const AccessManager = artifacts.require('AccessManager'); +const AccessManagerAdapter = artifacts.require('AccessManagerAdapter'); +const AccessManaged = artifacts.require('$AccessManagedMock'); + +const Ownable = artifacts.require('$Ownable'); +const AccessControl = artifacts.require('$AccessControl'); + +const groupUtils = { + mask: group => 1n << BigInt(group), + decodeBitmap: hexBitmap => { + const m = BigInt(hexBitmap); + const allGroups = new Array(256).fill().map((_, i) => i.toString()); + return allGroups.filter(i => (m & groupUtils.mask(i)) !== 0n); + }, + role: group => web3.utils.asciiToHex('group:').padEnd(64, '0') + group.toString(16).padStart(2, '0'), +}; + +const PUBLIC_GROUP = '255'; + +contract('AccessManager', function (accounts) { + const [admin, nonAdmin, user1, user2, otherAuthority] = accounts; + beforeEach('deploy', async function () { + this.delay = duration.days(1); + this.manager = await AccessManager.new(this.delay, admin); + }); + + it('configures default admin rules', async function () { + expect(await this.manager.defaultAdmin()).to.equal(admin); + expect(await this.manager.defaultAdminDelay()).to.be.bignumber.equal(this.delay); + }); + + describe('groups', function () { + const group = '0'; + const name = 'dao'; + const otherGroup = '1'; + const otherName = 'council'; + + describe('public group', function () { + it('is created automatically', async function () { + await expectEvent.inConstruction(this.manager, 'GroupUpdated', { + group: PUBLIC_GROUP, + name: 'public', + }); + }); + + it('includes all users automatically', async function () { + const groups = groupUtils.decodeBitmap(await this.manager.getUserGroups(user1)); + expect(groups).to.include(PUBLIC_GROUP); + }); + }); + + describe('creating', function () { + it('admin can create groups', async function () { + const created = await this.manager.createGroup(group, name, { from: admin }); + expectEvent(created, 'GroupUpdated', { group, name }); + expect(await this.manager.hasGroup(group)).to.equal(true); + expect(await this.manager.hasGroup(otherGroup)).to.equal(false); + }); + + it('non-admin cannot create groups', async function () { + await expectRevert(this.manager.createGroup(group, name, { from: nonAdmin }), 'missing role'); + }); + + it('cannot recreate a group', async function () { + await this.manager.createGroup(group, name, { from: admin }); + await expectRevert(this.manager.createGroup(group, name, { from: admin }), 'AccessManager: existing group'); + }); + }); + + describe('updating', function () { + beforeEach('create group', async function () { + await this.manager.createGroup(group, name, { from: admin }); + }); + + it('admin can update group', async function () { + const updated = await this.manager.updateGroupName(group, otherName, { from: admin }); + expectEvent(updated, 'GroupUpdated', { group, name: otherName }); + }); + + it('non-admin cannot update group', async function () { + await expectRevert(this.manager.updateGroupName(group, name, { from: nonAdmin }), 'missing role'); + }); + + it('cannot update built in group', async function () { + await expectRevert( + this.manager.updateGroupName(PUBLIC_GROUP, name, { from: admin }), + 'AccessManager: built-in group', + ); + }); + + it('cannot update nonexistent group', async function () { + await expectRevert( + this.manager.updateGroupName(otherGroup, name, { from: admin }), + 'AccessManager: unknown group', + ); + }); + }); + + describe('granting', function () { + beforeEach('create group', async function () { + await this.manager.createGroup(group, name, { from: admin }); + }); + + it('admin can grant group', async function () { + const granted = await this.manager.grantGroup(group, user1, { from: admin }); + expectEvent(granted, 'RoleGranted', { account: user1, role: groupUtils.role(group) }); + const groups = groupUtils.decodeBitmap(await this.manager.getUserGroups(user1)); + expect(groups).to.include(group); + }); + + it('non-admin cannot grant group', async function () { + await expectRevert(this.manager.grantGroup(group, user1, { from: nonAdmin }), 'missing role'); + }); + + it('cannot grant nonexistent group', async function () { + await expectRevert(this.manager.grantGroup(otherGroup, user1, { from: admin }), 'AccessManager: unknown group'); + }); + }); + + describe('revoking & renouncing', function () { + beforeEach('create and grant group', async function () { + await this.manager.createGroup(group, name, { from: admin }); + await this.manager.grantGroup(group, user1, { from: admin }); + }); + + it('admin can revoke group', async function () { + await this.manager.revokeGroup(group, user1, { from: admin }); + const groups = groupUtils.decodeBitmap(await this.manager.getUserGroups(user1)); + expect(groups).to.not.include(group); + }); + + it('non-admin cannot revoke group', async function () { + await expectRevert(this.manager.revokeGroup(group, user1, { from: nonAdmin }), 'missing role'); + }); + + it('user can renounce group', async function () { + await this.manager.renounceGroup(group, user1, { from: user1 }); + const groups = groupUtils.decodeBitmap(await this.manager.getUserGroups(user1)); + expect(groups).to.not.include(group); + }); + + it(`user cannot renounce other user's groups`, async function () { + await expectRevert( + this.manager.renounceGroup(group, user1, { from: user2 }), + 'can only renounce roles for self', + ); + await expectRevert( + this.manager.renounceGroup(group, user2, { from: user1 }), + 'can only renounce roles for self', + ); + }); + + it('cannot revoke public group', async function () { + await expectRevert( + this.manager.revokeGroup(PUBLIC_GROUP, user1, { from: admin }), + 'AccessManager: irrevocable group', + ); + }); + + it('cannot revoke nonexistent group', async function () { + await expectRevert( + this.manager.revokeGroup(otherGroup, user1, { from: admin }), + 'AccessManager: unknown group', + ); + await expectRevert( + this.manager.renounceGroup(otherGroup, user1, { from: user1 }), + 'AccessManager: unknown group', + ); + }); + }); + + describe('querying', function () { + it('returns expected groups', async function () { + const getGroups = () => this.manager.getUserGroups(user1); + + // only public group initially + expect(await getGroups()).to.equal('0x8000000000000000000000000000000000000000000000000000000000000000'); + + await this.manager.createGroup('0', '0', { from: admin }); + await this.manager.grantGroup('0', user1, { from: admin }); + expect(await getGroups()).to.equal('0x8000000000000000000000000000000000000000000000000000000000000001'); + + await this.manager.createGroup('1', '1', { from: admin }); + await this.manager.grantGroup('1', user1, { from: admin }); + expect(await getGroups()).to.equal('0x8000000000000000000000000000000000000000000000000000000000000003'); + + await this.manager.createGroup('16', '16', { from: admin }); + await this.manager.grantGroup('16', user1, { from: admin }); + expect(await getGroups()).to.equal('0x8000000000000000000000000000000000000000000000000000000000010003'); + }); + }); + }); + + describe('allowing', function () { + const group = '1'; + const groupMember = user1; + const selector = web3.eth.abi.encodeFunctionSignature('restrictedFunction()'); + const otherSelector = web3.eth.abi.encodeFunctionSignature('otherRestrictedFunction()'); + + beforeEach('deploying managed contract', async function () { + await this.manager.createGroup(group, '', { from: admin }); + await this.manager.grantGroup(group, groupMember, { from: admin }); + this.managed = await AccessManaged.new(this.manager.address); + }); + + it('non-admin cannot change allowed groups', async function () { + await expectRevert( + this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, true, { from: nonAdmin }), + 'missing role', + ); + }); + + it('single selector', async function () { + const receipt = await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, true, { + from: admin, + }); + + expectEvent(receipt, 'GroupAllowed', { + target: this.managed.address, + selector: selector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4 + group, + allowed: true, + }); + + const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); + expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([group]); + + const otherAllowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, otherSelector); + expect(groupUtils.decodeBitmap(otherAllowedGroups)).to.deep.equal([]); + + const restricted = await this.managed.restrictedFunction({ from: groupMember }); + expectEvent(restricted, 'RestrictedRan'); + + await expectRevert( + this.managed.otherRestrictedFunction({ from: groupMember }), + 'AccessManaged: authority rejected', + ); + }); + + it('multiple selectors', async function () { + const receipt = await this.manager.setFunctionAllowedGroup( + this.managed.address, + [selector, otherSelector], + group, + true, + { from: admin }, + ); + + expectEvent(receipt, 'GroupAllowed', { + target: this.managed.address, + selector: selector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4 + group, + allowed: true, + }); + + expectEvent(receipt, 'GroupAllowed', { + target: this.managed.address, + selector: otherSelector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4 + group, + allowed: true, + }); + + const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); + expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([group]); + + const otherAllowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, otherSelector); + expect(groupUtils.decodeBitmap(otherAllowedGroups)).to.deep.equal([group]); + + const restricted = await this.managed.restrictedFunction({ from: groupMember }); + expectEvent(restricted, 'RestrictedRan'); + + await this.managed.otherRestrictedFunction({ from: groupMember }); + expectEvent(restricted, 'RestrictedRan'); + }); + + it('works on open target', async function () { + await this.manager.setContractModeOpen(this.managed.address, { from: admin }); + await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { from: admin }); + }); + + it('works on closed target', async function () { + await this.manager.setContractModeClosed(this.managed.address, { from: admin }); + await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { from: admin }); + }); + }); + + describe('disallowing', function () { + const group = '1'; + const groupMember = user1; + const selector = web3.eth.abi.encodeFunctionSignature('restrictedFunction()'); + const otherSelector = web3.eth.abi.encodeFunctionSignature('otherRestrictedFunction()'); + + beforeEach('deploying managed contract', async function () { + await this.manager.createGroup(group, '', { from: admin }); + await this.manager.grantGroup(group, groupMember, { from: admin }); + this.managed = await AccessManaged.new(this.manager.address); + await this.manager.setFunctionAllowedGroup(this.managed.address, [selector, otherSelector], group, true, { + from: admin, + }); + }); + + it('non-admin cannot change disallowed groups', async function () { + await expectRevert( + this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { from: nonAdmin }), + 'missing role', + ); + }); + + it('single selector', async function () { + const receipt = await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { + from: admin, + }); + + expectEvent(receipt, 'GroupAllowed', { + target: this.managed.address, + selector: selector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4, + group, + allowed: false, + }); + + const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); + expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([]); + + const otherAllowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, otherSelector); + expect(groupUtils.decodeBitmap(otherAllowedGroups)).to.deep.equal([group]); + + await expectRevert(this.managed.restrictedFunction({ from: groupMember }), 'AccessManaged: authority rejected'); + + const otherRestricted = await this.managed.otherRestrictedFunction({ from: groupMember }); + expectEvent(otherRestricted, 'RestrictedRan'); + }); + + it('multiple selectors', async function () { + const receipt = await this.manager.setFunctionAllowedGroup( + this.managed.address, + [selector, otherSelector], + group, + false, + { from: admin }, + ); + + expectEvent(receipt, 'GroupAllowed', { + target: this.managed.address, + selector: selector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4 + group, + allowed: false, + }); + + expectEvent(receipt, 'GroupAllowed', { + target: this.managed.address, + selector: otherSelector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4 + group, + allowed: false, + }); + + const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); + expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([]); + + const otherAllowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, otherSelector); + expect(groupUtils.decodeBitmap(otherAllowedGroups)).to.deep.equal([]); + + await expectRevert(this.managed.restrictedFunction({ from: groupMember }), 'AccessManaged: authority rejected'); + await expectRevert( + this.managed.otherRestrictedFunction({ from: groupMember }), + 'AccessManaged: authority rejected', + ); + }); + + it('works on open target', async function () { + await this.manager.setContractModeOpen(this.managed.address, { from: admin }); + await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { from: admin }); + }); + + it('works on closed target', async function () { + await this.manager.setContractModeClosed(this.managed.address, { from: admin }); + await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { from: admin }); + }); + }); + + describe('modes', function () { + const group = '1'; + const selector = web3.eth.abi.encodeFunctionSignature('restrictedFunction()'); + + beforeEach('deploying managed contract', async function () { + this.managed = await AccessManaged.new(this.manager.address); + await this.manager.createGroup('1', 'a group', { from: admin }); + await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, true, { from: admin }); + }); + + it('custom mode is default', async function () { + expect(await this.manager.getContractMode(this.managed.address)).to.bignumber.equal(AccessMode.Custom); + const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); + expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([group]); + }); + + it('open mode', async function () { + const receipt = await this.manager.setContractModeOpen(this.managed.address, { from: admin }); + expectEvent(receipt, 'AccessModeUpdated', { + target: this.managed.address, + mode: AccessMode.Open, + }); + expect(await this.manager.getContractMode(this.managed.address)).to.bignumber.equal(AccessMode.Open); + const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); + expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([PUBLIC_GROUP]); + }); + + it('closed mode', async function () { + const receipt = await this.manager.setContractModeClosed(this.managed.address, { from: admin }); + expectEvent(receipt, 'AccessModeUpdated', { + target: this.managed.address, + mode: AccessMode.Closed, + }); + expect(await this.manager.getContractMode(this.managed.address)).to.bignumber.equal(AccessMode.Closed); + const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); + expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([]); + }); + + it('mode cycle', async function () { + await this.manager.setContractModeOpen(this.managed.address, { from: admin }); + await this.manager.setContractModeClosed(this.managed.address, { from: admin }); + await this.manager.setContractModeCustom(this.managed.address, { from: admin }); + expect(await this.manager.getContractMode(this.managed.address)).to.bignumber.equal(AccessMode.Custom); + const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); + expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([group]); + }); + + it('non-admin cannot change mode', async function () { + await expectRevert(this.manager.setContractModeCustom(this.managed.address), 'missing role'); + await expectRevert(this.manager.setContractModeOpen(this.managed.address), 'missing role'); + await expectRevert(this.manager.setContractModeClosed(this.managed.address), 'missing role'); + }); + }); + + describe('transfering authority', function () { + beforeEach('deploying managed contract', async function () { + this.managed = await AccessManaged.new(this.manager.address); + }); + + it('admin can transfer authority', async function () { + await this.manager.transferContractAuthority(this.managed.address, otherAuthority, { from: admin }); + expect(await this.managed.authority()).to.equal(otherAuthority); + }); + + it('non-admin cannot transfer authority', async function () { + await expectRevert( + this.manager.transferContractAuthority(this.managed.address, otherAuthority, { from: nonAdmin }), + 'missing role', + ); + }); + }); + + describe('adapter', function () { + const group = '0'; + + beforeEach('deploying adapter', async function () { + await this.manager.createGroup(group, 'a group', { from: admin }); + await this.manager.grantGroup(group, user1, { from: admin }); + this.adapter = await AccessManagerAdapter.new(this.manager.address); + }); + + it('with ownable', async function () { + const target = await Ownable.new(); + await target.transferOwnership(this.adapter.address); + + const { data } = await target.$_checkOwner.request(); + const selector = data.slice(0, 10); + + await expectRevert( + this.adapter.relay(target.address, data, { from: user1 }), + 'AccessManagerAdapter: caller not allowed', + ); + + await this.manager.setFunctionAllowedGroup(target.address, [selector], group, true, { from: admin }); + await this.adapter.relay(target.address, data, { from: user1 }); + }); + + it('with access control', async function () { + const ROLE = web3.utils.soliditySha3('ROLE'); + const target = await AccessControl.new(); + await target.$_grantRole(ROLE, this.adapter.address); + + const { data } = await target.$_checkRole.request(ROLE); + const selector = data.slice(0, 10); + + await expectRevert( + this.adapter.relay(target.address, data, { from: user1 }), + 'AccessManagerAdapter: caller not allowed', + ); + + await this.manager.setFunctionAllowedGroup(target.address, [selector], group, true, { from: admin }); + await this.adapter.relay(target.address, data, { from: user1 }); + }); + + it('transfer authority', async function () { + await this.manager.transferContractAuthority(this.adapter.address, otherAuthority, { from: admin }); + expect(await this.adapter.authority()).to.equal(otherAuthority); + }); + }); +}); diff --git a/test/helpers/enums.js b/test/helpers/enums.js index ced6c3858..874d8375f 100644 --- a/test/helpers/enums.js +++ b/test/helpers/enums.js @@ -9,4 +9,5 @@ module.exports = { ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), VoteType: Enum('Against', 'For', 'Abstain'), Rounding: Enum('Down', 'Up', 'Zero'), + AccessMode: Enum('Custom', 'Closed', 'Open'), }; From a522187b50e3edd190a2ace74cd519b94b4dbcbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Sat, 22 Apr 2023 20:40:49 +0200 Subject: [PATCH 002/167] Implement suggestions from audit of AccessManager (#4178) Co-authored-by: Francisco Giordano --- contracts/access/manager/AccessManaged.sol | 14 +++++++++++++- contracts/access/manager/AccessManager.sol | 11 ++++++----- test/access/manager/AccessManager.test.js | 8 ++++++++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/contracts/access/manager/AccessManaged.sol b/contracts/access/manager/AccessManaged.sol index 2dcdeb7aa..08da07c58 100644 --- a/contracts/access/manager/AccessManaged.sol +++ b/contracts/access/manager/AccessManaged.sol @@ -8,7 +8,7 @@ import "./IAuthority.sol"; /** * @dev This contract module makes available a {restricted} modifier. Functions decorated with this modifier will be * permissioned according to an "authority": a contract like {AccessManager} that follows the {IAuthority} interface, - * implementing a policy that allows certain callers access to certain functions. + * implementing a policy that allows certain callers to access certain functions. * * IMPORTANT: The `restricted` modifier should never be used on `internal` functions, judiciously used in `public` * functions, and ideally only used in `external` functions. See {restricted}. @@ -30,6 +30,18 @@ contract AccessManaged is Context { * implications! This is because the permissions are determined by the function that entered the contract, i.e. the * function at the bottom of the call stack, and not the function where the modifier is visible in the source code. * ==== + * + * [NOTE] + * ==== + * Selector collisions are mitigated by scoping permissions per contract, but some edge cases must be considered: + * + * * If the https://docs.soliditylang.org/en/latest/contracts.html#receive-ether-function[`receive()`] function is restricted, + * any other function with a `0x00000000` selector will share permissions with `receive()`. + * * Similarly, if there's no `receive()` function but a `fallback()` instead, the fallback might be called with empty `calldata`, + * sharing the `0x00000000` selector permissions as well. + * * For any other selector, if the restricted function is set on an upgradeable contract, an upgrade may remove the restricted + * function and replace it with a new method whose selector replaces the last one, keeping the previous permissions. + * ==== */ modifier restricted() { _checkCanCall(_msgSender(), msg.sig); diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 8820ef4a0..2efa667f2 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.13; -import "../AccessControl.sol"; import "../AccessControlDefaultAdminRules.sol"; import "./IAuthority.sol"; import "./AccessManaged.sol"; @@ -18,7 +17,7 @@ interface IAccessManager is IAuthority, IAccessControlDefaultAdminRules { event GroupAllowed(address indexed target, bytes4 indexed selector, uint8 indexed group, bool allowed); - event AccessModeUpdated(address indexed target, AccessMode indexed mode); + event AccessModeUpdated(address indexed target, AccessMode previousMode, AccessMode indexed mode); function createGroup(uint8 group, string calldata name) external; @@ -74,13 +73,13 @@ interface IAccessManager is IAuthority, IAccessControlDefaultAdminRules { * it will be highly secured (e.g., a multisig or a well-configured DAO). Additionally, {AccessControlDefaultAdminRules} * is included to enforce security rules on this account. * - * NOTE: Some of the functions in this contract, such as {getUserGroups}, return a `bytes32` bitmap to succintly + * NOTE: Some of the functions in this contract, such as {getUserGroups}, return a `bytes32` bitmap to succinctly * represent a set of groups. In a bitmap, bit `n` (counting from the least significant bit) will be 1 if and only if * the group with number `n` is in the set. For example, the hex value `0x05` represents the set of the two groups * numbered 0 and 2 from its binary equivalence `0b101` */ contract AccessManager is IAccessManager, AccessControlDefaultAdminRules { - bytes32 _createdGroups; + bytes32 private _createdGroups; // user -> groups mapping(address => bytes32) private _userGroups; @@ -201,6 +200,7 @@ contract AccessManager is IAccessManager, AccessControlDefaultAdminRules { uint8 group, bool allowed ) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + require(hasGroup(group), "AccessManager: unknown group"); for (uint256 i = 0; i < selectors.length; i++) { bytes4 selector = selectors[i]; _allowedGroups[target][selector] = _withUpdatedGroup(_allowedGroups[target][selector], group, allowed); @@ -289,8 +289,9 @@ contract AccessManager is IAccessManager, AccessControlDefaultAdminRules { * @dev Sets the restricted mode of a target contract. */ function _setContractMode(address target, AccessMode mode) internal virtual { + AccessMode previousMode = _contractMode[target]; _contractMode[target] = mode; - emit AccessModeUpdated(target, mode); + emit AccessModeUpdated(target, previousMode, mode); } /** diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index bf194d388..13c14e6e0 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -200,6 +200,7 @@ contract('AccessManager', function (accounts) { describe('allowing', function () { const group = '1'; + const otherGroup = '2'; const groupMember = user1; const selector = web3.eth.abi.encodeFunctionSignature('restrictedFunction()'); const otherSelector = web3.eth.abi.encodeFunctionSignature('otherRestrictedFunction()'); @@ -289,6 +290,13 @@ contract('AccessManager', function (accounts) { await this.manager.setContractModeClosed(this.managed.address, { from: admin }); await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { from: admin }); }); + + it('cannot allow nonexistent group', async function () { + await expectRevert( + this.manager.setFunctionAllowedGroup(this.managed.address, [selector], otherGroup, true, { from: admin }), + 'AccessManager: unknown group', + ); + }); }); describe('disallowing', function () { From 9bb8008c2334e669aeea576620a53fe0cba763c3 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Mon, 7 Aug 2023 06:57:10 +0200 Subject: [PATCH 003/167] Access Manager (#4416) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto García Co-authored-by: Francisco Giordano --- contracts/access/manager/AccessManaged.sol | 93 +- contracts/access/manager/AccessManager.sol | 865 ++++++++--- .../access/manager/AccessManagerAdapter.sol | 54 - contracts/access/manager/AuthorityUtils.sol | 31 + contracts/access/manager/IAccessManaged.sol | 17 + contracts/access/manager/IAccessManager.sol | 110 ++ contracts/access/manager/IAuthority.sol | 2 +- contracts/mocks/AccessManagedTarget.sol | 18 + contracts/mocks/AccessManagerMocks.sol | 34 - contracts/utils/types/Time.sol | 139 ++ package-lock.json | 14 +- test/access/manager/AccessManaged.test.js | 55 - test/access/manager/AccessManager.test.js | 1358 ++++++++++++----- test/helpers/enums.js | 1 - test/helpers/methods.js | 5 + 15 files changed, 2051 insertions(+), 745 deletions(-) delete mode 100644 contracts/access/manager/AccessManagerAdapter.sol create mode 100644 contracts/access/manager/AuthorityUtils.sol create mode 100644 contracts/access/manager/IAccessManaged.sol create mode 100644 contracts/access/manager/IAccessManager.sol create mode 100644 contracts/mocks/AccessManagedTarget.sol delete mode 100644 contracts/mocks/AccessManagerMocks.sol create mode 100644 contracts/utils/types/Time.sol delete mode 100644 test/access/manager/AccessManaged.test.js create mode 100644 test/helpers/methods.js diff --git a/contracts/access/manager/AccessManaged.sol b/contracts/access/manager/AccessManaged.sol index 08da07c58..087aee4c4 100644 --- a/contracts/access/manager/AccessManaged.sol +++ b/contracts/access/manager/AccessManaged.sol @@ -1,9 +1,12 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "../../utils/Context.sol"; -import "./IAuthority.sol"; +import {IAuthority} from "./IAuthority.sol"; +import {AuthorityUtils} from "./AuthorityUtils.sol"; +import {IAccessManager} from "./IAccessManager.sol"; +import {IAccessManaged} from "./IAccessManaged.sol"; +import {Context} from "../../utils/Context.sol"; /** * @dev This contract module makes available a {restricted} modifier. Functions decorated with this modifier will be @@ -13,10 +16,17 @@ import "./IAuthority.sol"; * IMPORTANT: The `restricted` modifier should never be used on `internal` functions, judiciously used in `public` * functions, and ideally only used in `external` functions. See {restricted}. */ -contract AccessManaged is Context { - event AuthorityUpdated(address indexed sender, IAuthority indexed newAuthority); +abstract contract AccessManaged is Context, IAccessManaged { + address private _authority; - IAuthority private _authority; + bool private _consumingSchedule; + + /** + * @dev Initializes the contract connected to an initial authority. + */ + constructor(address initialAuthority) { + _setAuthority(initialAuthority); + } /** * @dev Restricts access to a function as defined by the connected Authority for this contract and the @@ -24,9 +34,9 @@ contract AccessManaged is Context { * * [IMPORTANT] * ==== - * In general, this modifier should only be used on `external` functions. It is okay to use it on `public` functions - * that are used as external entry points and are not called internally. Unless you know what you're doing, it - * should never be used on `internal` functions. Failure to follow these rules can have critical security + * In general, this modifier should only be used on `external` functions. It is okay to use it on `public` + * functions that are used as external entry points and are not called internally. Unless you know what you're + * doing, it should never be used on `internal` functions. Failure to follow these rules can have critical security * implications! This is because the permissions are determined by the function that entered the contract, i.e. the * function at the bottom of the call stack, and not the function where the modifier is visible in the source code. * ==== @@ -35,53 +45,76 @@ contract AccessManaged is Context { * ==== * Selector collisions are mitigated by scoping permissions per contract, but some edge cases must be considered: * - * * If the https://docs.soliditylang.org/en/latest/contracts.html#receive-ether-function[`receive()`] function is restricted, - * any other function with a `0x00000000` selector will share permissions with `receive()`. - * * Similarly, if there's no `receive()` function but a `fallback()` instead, the fallback might be called with empty `calldata`, - * sharing the `0x00000000` selector permissions as well. - * * For any other selector, if the restricted function is set on an upgradeable contract, an upgrade may remove the restricted - * function and replace it with a new method whose selector replaces the last one, keeping the previous permissions. + * * If the https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`] function + * is restricted, any other function with a `0x00000000` selector will share permissions with `receive()`. + * * Similarly, if there's no `receive()` function but a `fallback()` instead, the fallback might be called with + * empty `calldata`, sharing the `0x00000000` selector permissions as well. + * * For any other selector, if the restricted function is set on an upgradeable contract, an upgrade may remove + * the restricted function and replace it with a new method whose selector replaces the last one, keeping the + * previous permissions. * ==== */ modifier restricted() { - _checkCanCall(_msgSender(), msg.sig); + _checkCanCall(_msgSender(), _msgData()); _; } - /** - * @dev Initializes the contract connected to an initial authority. - */ - constructor(IAuthority initialAuthority) { - _setAuthority(initialAuthority); - } - /** * @dev Returns the current authority. */ - function authority() public view virtual returns (IAuthority) { + function authority() public view virtual returns (address) { return _authority; } /** * @dev Transfers control to a new authority. The caller must be the current authority. */ - function setAuthority(IAuthority newAuthority) public virtual { - require(_msgSender() == address(_authority), "AccessManaged: not current authority"); + function setAuthority(address newAuthority) public virtual { + address caller = _msgSender(); + if (caller != authority()) { + revert AccessManagedUnauthorized(caller); + } + if (newAuthority.code.length == 0) { + revert AccessManagedInvalidAuthority(newAuthority); + } _setAuthority(newAuthority); } + /** + * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is + * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs + * attacker controlled calls. + */ + function isConsumingScheduledOp() public view returns (bool) { + return _consumingSchedule; + } + /** * @dev Transfers control to a new authority. Internal function with no access restriction. */ - function _setAuthority(IAuthority newAuthority) internal virtual { + function _setAuthority(address newAuthority) internal virtual { _authority = newAuthority; - emit AuthorityUpdated(_msgSender(), newAuthority); + emit AuthorityUpdated(newAuthority); } /** * @dev Reverts if the caller is not allowed to call the function identified by a selector. */ - function _checkCanCall(address caller, bytes4 selector) internal view virtual { - require(_authority.canCall(caller, address(this), selector), "AccessManaged: authority rejected"); + function _checkCanCall(address caller, bytes calldata data) internal virtual { + (bool allowed, uint32 delay) = AuthorityUtils.canCallWithDelay( + authority(), + caller, + address(this), + bytes4(data) + ); + if (!allowed) { + if (delay > 0) { + _consumingSchedule = true; + IAccessManager(authority()).consumeScheduledOp(caller, data); + _consumingSchedule = false; + } else { + revert AccessManagedUnauthorized(caller); + } + } } } diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 2efa667f2..d3b65b0e2 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -1,52 +1,13 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.13; +pragma solidity ^0.8.20; -import "../AccessControlDefaultAdminRules.sol"; -import "./IAuthority.sol"; -import "./AccessManaged.sol"; - -interface IAccessManager is IAuthority, IAccessControlDefaultAdminRules { - enum AccessMode { - Custom, - Closed, - Open - } - - event GroupUpdated(uint8 indexed group, string name); - - event GroupAllowed(address indexed target, bytes4 indexed selector, uint8 indexed group, bool allowed); - - event AccessModeUpdated(address indexed target, AccessMode previousMode, AccessMode indexed mode); - - function createGroup(uint8 group, string calldata name) external; - - function updateGroupName(uint8 group, string calldata name) external; - - function hasGroup(uint8 group) external view returns (bool); - - function getUserGroups(address user) external view returns (bytes32 groups); - - function grantGroup(uint8 group, address user) external; - - function revokeGroup(uint8 group, address user) external; - - function renounceGroup(uint8 group, address user) external; - - function getFunctionAllowedGroups(address target, bytes4 selector) external view returns (bytes32 groups); - - function setFunctionAllowedGroup(address target, bytes4[] calldata selectors, uint8 group, bool allowed) external; - - function getContractMode(address target) external view returns (AccessMode); - - function setContractModeCustom(address target) external; - - function setContractModeOpen(address target) external; - - function setContractModeClosed(address target) external; - - function transferContractAuthority(address target, address newAuthority) external; -} +import {IAccessManager} from "./IAccessManager.sol"; +import {IAccessManaged} from "./IAccessManaged.sol"; +import {Address} from "../../utils/Address.sol"; +import {Context} from "../../utils/Context.sol"; +import {Multicall} from "../../utils/Multicall.sol"; +import {Time} from "../../utils/types/Time.sol"; /** * @dev AccessManager is a central contract to store the permissions of a system. @@ -55,9 +16,8 @@ interface IAccessManager is IAuthority, IAccessControlDefaultAdminRules { * exact details of how access is restricted for each of those functions is configurable by the admins of the instance. * These restrictions are expressed in terms of "groups". * - * An AccessManager instance will define a set of groups. Each of them must be created before they can be granted, with - * a maximum of 255 created groups. Users can be added into any number of these groups. Each of them defines an - * AccessControl role, and may confer access to some of the restricted functions in the system, as configured by admins + * An AccessManager instance will define a set of groups. Accounts can be added into any number of these groups. Each of + * them defines a role, and may confer access to some of the restricted functions in the system, as configured by admins * through the use of {setFunctionAllowedGroup}. * * Note that a function in a target contract may become permissioned in this way only when: 1) said contract is @@ -66,277 +26,784 @@ interface IAccessManager is IAuthority, IAccessControlDefaultAdminRules { * * There is a special group defined by default named "public" which all accounts automatically have. * - * Contracts can also be configured in two special modes: 1) the "open" mode, where all functions are allowed to the - * "public" group, and 2) the "closed" mode, where no function is allowed to any group. + * Contracts where functions are mapped to groups are said to be in a "custom" mode, but contracts can also be + * configured in two special modes: 1) the "open" mode, where all functions are allowed to the "public" group, and 2) + * the "closed" mode, where no function is allowed to any group. * * Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that - * it will be highly secured (e.g., a multisig or a well-configured DAO). Additionally, {AccessControlDefaultAdminRules} - * is included to enforce security rules on this account. + * they will be highly secured (e.g., a multisig or a well-configured DAO). + * + * NOTE: This contract implements a form of the {IAuthority} interface, but {canCall} has additional return data so it + * doesn't inherit `IAuthority`. It is however compatible with the `IAuthority` interface since the first 32 bytes of + * the return data are a boolean as expected by that interface. + * + * NOTE: Systems that implement other access control mechanisms (for example using {Ownable}) can be paired with an + * {AccessManager} by transferring permissions (ownership in the case of {Ownable}) directly to the {AccessManager}. + * Users will be able to interact with these contracts through the {relay} function, following the access rules + * registered in the {AccessManager}. Keep in mind that in that context, the msg.sender seen by restricted functions + * will be {AccessManager} itself. * - * NOTE: Some of the functions in this contract, such as {getUserGroups}, return a `bytes32` bitmap to succinctly - * represent a set of groups. In a bitmap, bit `n` (counting from the least significant bit) will be 1 if and only if - * the group with number `n` is in the set. For example, the hex value `0x05` represents the set of the two groups - * numbered 0 and 2 from its binary equivalence `0b101` + * WARNING: When granting permissions over an {Ownable} or {AccessControl} contract to an {AccessManager}, be very + * mindful of the danger associated with functions such as {{Ownable-renounceOwnership}} or + * {{AccessControl-renounceRole}}. */ -contract AccessManager is IAccessManager, AccessControlDefaultAdminRules { - bytes32 private _createdGroups; +contract AccessManager is Context, Multicall, IAccessManager { + using Time for *; - // user -> groups - mapping(address => bytes32) private _userGroups; + struct AccessMode { + uint64 familyId; + bool closed; + } + + // Structure that stores the details for a group/account pair. This structures fit into a single slot. + struct Access { + // Timepoint at which the user gets the permission. If this is either 0, or in the future, the group permission + // are not available. Should be checked using {Time-isSetAndPast} + uint48 since; + // delay for execution. Only applies to restricted() / relay() calls. This does not restrict access to + // functions that use the `onlyGroup` modifier. + Time.Delay delay; + } + + // Structure that stores the details of a group, including: + // - the members of the group + // - the admin group (that can grant or revoke permissions) + // - the guardian group (that can cancel operations targeting functions that need this group + // - the grand delay + struct Group { + mapping(address user => Access access) members; + uint64 admin; + uint64 guardian; + Time.Delay delay; // delay for granting + } + + struct Family { + mapping(bytes4 selector => uint64 groupId) allowedGroups; + Time.Delay adminDelay; + } - // target -> selector -> groups - mapping(address => mapping(bytes4 => bytes32)) private _allowedGroups; + uint64 public constant ADMIN_GROUP = type(uint64).min; // 0 + uint64 public constant PUBLIC_GROUP = type(uint64).max; // 2**64-1 - // target -> mode - mapping(address => AccessMode) private _contractMode; + mapping(address target => AccessMode mode) private _contractMode; + mapping(uint64 familyId => Family) private _families; + mapping(uint64 groupId => Group) private _groups; + mapping(bytes32 operationId => uint48 schedule) private _schedules; + mapping(bytes4 selector => Time.Delay delay) private _adminDelays; - uint8 private constant _GROUP_PUBLIC = type(uint8).max; + // This should be transcient storage when supported by the EVM. + bytes32 private _relayIdentifier; /** - * @dev Initializes an AccessManager with initial default admin and transfer delay. + * @dev Check that the caller has a given permission level (`groupId`). Note that this does NOT consider execution + * delays that may be associated to that group. */ - constructor( - uint48 initialDefaultAdminDelay, - address initialDefaultAdmin - ) AccessControlDefaultAdminRules(initialDefaultAdminDelay, initialDefaultAdmin) { - _createGroup(_GROUP_PUBLIC, "public"); + modifier onlyGroup(uint64 groupId) { + _checkGroup(groupId); + _; } /** - * @dev Returns true if the caller can invoke on a target the function identified by a function selector. - * Entrypoint for {AccessManaged} contracts. + * @dev Check that the caller is an admin and that the top-level function currently executing has been scheduled + * sufficiently ahead of time, if necessary according to admin delays. */ - function canCall(address caller, address target, bytes4 selector) public view virtual returns (bool) { - bytes32 allowedGroups = getFunctionAllowedGroups(target, selector); - bytes32 callerGroups = getUserGroups(caller); - return callerGroups & allowedGroups != 0; + modifier withFamilyDelay(uint64 familyId) { + _checkFamilyDelay(familyId); + _; } + constructor(address initialAdmin) { + // admin is active immediately and without any execution delay. + _grantGroup(ADMIN_GROUP, initialAdmin, 0, 0); + } + + // =================================================== GETTERS ==================================================== /** - * @dev Creates a new group with a group number that can be chosen arbitrarily but must be unused, and gives it a - * human-readable name. The caller must be the default admin. + * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with + * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule} + * & {relay} workflow. * - * Group numbers are not auto-incremented in order to avoid race conditions, but administrators can safely use - * sequential numbers. + * This function is usually called by the targeted contract to control immediate execution of restricted functions. + * Therefore we only return true is the call can be performed without any delay. If the call is subject to a delay, + * then the function should return false, and the caller should schedule the operation for future execution. * - * Emits {GroupUpdated}. + * We may be able to hash the operation, and check if the call was scheduled, but we would not be able to cleanup + * the schedule, leaving the possibility of multiple executions. Maybe this function should not be view? + * + * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that + * is backward compatible. Some contract may thus ignore the second return argument. In that case they will fail + * to identify the indirect workflow, and will consider call that require a delay to be forbidden. + */ + function canCall(address caller, address target, bytes4 selector) public view virtual returns (bool, uint32) { + (uint64 familyId, bool closed) = getContractFamily(target); + if (closed) { + return (false, 0); + } else if (caller == address(this)) { + // Caller is AccessManager => call was relayed. In that case the relay already checked permissions. We + // verify that the call "identifier", which is set during the relay call, is correct. + return (_relayIdentifier == _hashRelayIdentifier(target, selector), 0); + } else { + uint64 groupId = getFamilyFunctionGroup(familyId, selector); + (bool inGroup, uint32 currentDelay) = hasGroup(groupId, caller); + return (inGroup && currentDelay == 0, currentDelay); + } + } + + /** + * @dev Expiration delay for scheduled proposals. Defaults to 1 week. */ - function createGroup(uint8 group, string memory name) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { - _createGroup(group, name); + function expiration() public view virtual returns (uint32) { + return 1 weeks; } /** - * @dev Updates an existing group's name. The caller must be the default admin. + * @dev Minimum setback for delay updates. Defaults to 1 day. */ - function updateGroupName(uint8 group, string memory name) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { - require(group != _GROUP_PUBLIC, "AccessManager: built-in group"); - require(hasGroup(group), "AccessManager: unknown group"); - emit GroupUpdated(group, name); + function minSetback() public view virtual returns (uint32) { + return 0; // TODO: set to 1 day } /** - * @dev Returns true if the group has already been created via {createGroup}. + * @dev Get the mode under which a contract is operating. */ - function hasGroup(uint8 group) public view virtual returns (bool) { - return _getGroup(_createdGroups, group); + function getContractFamily(address target) public view virtual returns (uint64, bool) { + AccessMode storage mode = _contractMode[target]; + return (mode.familyId, mode.closed); } /** - * @dev Returns a bitmap of the groups the user has. See note on bitmaps above. + * @dev Get the permission level (group) required to call a function. This only applies for contract that are + * operating under the `Custom` mode. */ - function getUserGroups(address user) public view virtual returns (bytes32) { - return _userGroups[user] | _groupMask(_GROUP_PUBLIC); + function getFamilyFunctionGroup(uint64 familyId, bytes4 selector) public view virtual returns (uint64) { + return _families[familyId].allowedGroups[selector]; + } + + function getFamilyAdminDelay(uint64 familyId) public view virtual returns (uint32) { + return _families[familyId].adminDelay.get(); } /** - * @dev Grants a user a group. + * @dev Get the id of the group that acts as an admin for given group. * - * Emits {RoleGranted} with the role id of the group, if wasn't already held by the user. + * The admin permission is required to grant the group, revoke the group and update the execution delay to execute + * an operation that is restricted to this group. */ - function grantGroup(uint8 group, address user) public virtual { - grantRole(_encodeGroupRole(group), user); // will check msg.sender + function getGroupAdmin(uint64 groupId) public view virtual returns (uint64) { + return _groups[groupId].admin; } /** - * @dev Removes a group from a user. + * @dev Get the group that acts as a guardian for a given group. * - * Emits {RoleRevoked} with the role id of the group, if previously held by the user. + * The guardian permission allows canceling operations that have been scheduled under the group. + */ + function getGroupGuardian(uint64 groupId) public view virtual returns (uint64) { + return _groups[groupId].guardian; + } + + /** + * @dev Get the group current grant delay, that value may change at any point, without an event emitted, following + * a call to {setGrantDelay}. Changes to this value, including effect timepoint are notified by the + * {GroupGrantDelayChanged} event. */ - function revokeGroup(uint8 group, address user) public virtual { - revokeRole(_encodeGroupRole(group), user); // will check msg.sender + function getGroupGrantDelay(uint64 groupId) public view virtual returns (uint32) { + return _groups[groupId].delay.get(); } /** - * @dev Allows a user to renounce a group. + * @dev Get the access details for a given account in a given group. These details include the timepoint at which + * membership becomes active, and the delay applied to all operation by this user that require this permission + * level. * - * Emits {RoleRevoked} with the role id of the group, if previously held by the user. + * Returns: + * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted. + * [1] Current execution delay for the account. + * [2] Pending execution delay for the account. + * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled. */ - function renounceGroup(uint8 group, address user) public virtual { - renounceRole(_encodeGroupRole(group), user); // will check msg.sender + function getAccess(uint64 groupId, address account) public view virtual returns (uint48, uint32, uint32, uint48) { + Access storage access = _groups[groupId].members[account]; + + uint48 since = access.since; + (uint32 currentDelay, uint32 pendingDelay, uint48 effect) = access.delay.getFull(); + + return (since, currentDelay, pendingDelay, effect); } /** - * @dev Returns a bitmap of the groups that are allowed to call a function of a target contract. If the target - * contract is in open or closed mode it will be reflected in the return value. + * @dev Check if a given account currently had the permission level corresponding to a given group. Note that this + * permission might be associated with a delay. {getAccess} can provide more details. */ - function getFunctionAllowedGroups(address target, bytes4 selector) public view virtual returns (bytes32) { - AccessMode mode = getContractMode(target); - if (mode == AccessMode.Open) { - return _groupMask(_GROUP_PUBLIC); - } else if (mode == AccessMode.Closed) { - return 0; + function hasGroup(uint64 groupId, address account) public view virtual returns (bool, uint32) { + if (groupId == PUBLIC_GROUP) { + return (true, 0); } else { - return _allowedGroups[target][selector]; + (uint48 inGroupSince, uint32 currentDelay, , ) = getAccess(groupId, account); + return (inGroupSince.isSetAndPast(Time.timestamp()), currentDelay); } } + // =============================================== GROUP MANAGEMENT =============================================== /** - * @dev Changes whether a group is allowed to call a function of a contract, according to the `allowed` argument. - * The caller must be the default admin. + * @dev Give a label to a group, for improved group discoverabily by UIs. + * + * Emits a {GroupLabel} event. */ - function setFunctionAllowedGroup( - address target, + function labelGroup(uint64 groupId, string calldata label) public virtual onlyGroup(ADMIN_GROUP) { + if (groupId == ADMIN_GROUP || groupId == PUBLIC_GROUP) { + revert AccessManagerLockedGroup(groupId); + } + emit GroupLabel(groupId, label); + } + + /** + * @dev Add `account` to `groupId`. This gives him the authorization to call any function that is restricted to + * this group. An optional execution delay (in seconds) can be set. If that delay is non 0, the user is required + * to schedule any operation that is restricted to members this group. The user will only be able to execute the + * operation after the delay expires. During this delay, admin and guardians can cancel the operation (see + * {cancel}). + * + * Requirements: + * + * - the caller must be in the group's admins + * + * Emits a {GroupGranted} event + */ + function grantGroup( + uint64 groupId, + address account, + uint32 executionDelay + ) public virtual onlyGroup(getGroupAdmin(groupId)) { + _grantGroup(groupId, account, getGroupGrantDelay(groupId), executionDelay); + } + + /** + * @dev Remove an account for a group, with immediate effect. + * + * Requirements: + * + * - the caller must be in the group's admins + * + * Emits a {GroupRevoked} event + */ + function revokeGroup(uint64 groupId, address account) public virtual onlyGroup(getGroupAdmin(groupId)) { + _revokeGroup(groupId, account); + } + + /** + * @dev Renounce group permissions for the calling account, with immediate effect. + * + * Requirements: + * + * - the caller must be `callerConfirmation`. + * + * Emits a {GroupRevoked} event + */ + function renounceGroup(uint64 groupId, address callerConfirmation) public virtual { + if (callerConfirmation != _msgSender()) { + revert AccessManagerBadConfirmation(); + } + _revokeGroup(groupId, callerConfirmation); + } + + /** + * @dev Set the execution delay for a given account in a given group. This update is not immediate and follows the + * delay rules. For example, If a user currently has a delay of 3 hours, and this is called to reduce that delay to + * 1 hour, the new delay will take some time to take effect, enforcing that any operation executed in the 3 hours + * that follows this update was indeed scheduled before this update. + * + * Requirements: + * + * - the caller must be in the group's admins + * + * Emits a {GroupExecutionDelayUpdated} event + */ + function setExecuteDelay( + uint64 groupId, + address account, + uint32 newDelay + ) public virtual onlyGroup(getGroupAdmin(groupId)) { + _setExecuteDelay(groupId, account, newDelay); + } + + /** + * @dev Change admin group for a given group. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {GroupAdminChanged} event + */ + function setGroupAdmin(uint64 groupId, uint64 admin) public virtual onlyGroup(ADMIN_GROUP) { + _setGroupAdmin(groupId, admin); + } + + /** + * @dev Change guardian group for a given group. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {GroupGuardianChanged} event + */ + function setGroupGuardian(uint64 groupId, uint64 guardian) public virtual onlyGroup(ADMIN_GROUP) { + _setGroupGuardian(groupId, guardian); + } + + /** + * @dev Update the delay for granting a `groupId`. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {GroupGrantDelayChanged} event + */ + function setGrantDelay(uint64 groupId, uint32 newDelay) public virtual onlyGroup(ADMIN_GROUP) { + _setGrantDelay(groupId, newDelay); + } + + /** + * @dev Internal version of {grantGroup} without access control. + * + * Emits a {GroupGranted} event + */ + function _grantGroup(uint64 groupId, address account, uint32 grantDelay, uint32 executionDelay) internal virtual { + if (groupId == PUBLIC_GROUP) { + revert AccessManagerLockedGroup(groupId); + } else if (_groups[groupId].members[account].since != 0) { + revert AccessManagerAccountAlreadyInGroup(groupId, account); + } + + uint48 since = Time.timestamp() + grantDelay; + _groups[groupId].members[account] = Access({since: since, delay: executionDelay.toDelay()}); + + emit GroupGranted(groupId, account, since, executionDelay); + } + + /** + * @dev Internal version of {revokeGroup} without access control. This logic is also used by {renounceGroup}. + * + * Emits a {GroupRevoked} event + */ + function _revokeGroup(uint64 groupId, address account) internal virtual { + if (groupId == PUBLIC_GROUP) { + revert AccessManagerLockedGroup(groupId); + } else if (_groups[groupId].members[account].since == 0) { + revert AccessManagerAccountNotInGroup(groupId, account); + } + + delete _groups[groupId].members[account]; + + emit GroupRevoked(groupId, account); + } + + /** + * @dev Internal version of {setExecuteDelay} without access control. + * + * Emits a {GroupExecutionDelayUpdated} event. + */ + function _setExecuteDelay(uint64 groupId, address account, uint32 newDuration) internal virtual { + if (groupId == PUBLIC_GROUP || groupId == ADMIN_GROUP) { + revert AccessManagerLockedGroup(groupId); + } else if (_groups[groupId].members[account].since == 0) { + revert AccessManagerAccountNotInGroup(groupId, account); + } + + Time.Delay updated = _groups[groupId].members[account].delay.withUpdate(newDuration, minSetback()); + _groups[groupId].members[account].delay = updated; + + (, , uint48 effect) = updated.unpack(); + emit GroupExecutionDelayUpdated(groupId, account, newDuration, effect); + } + + /** + * @dev Internal version of {setGroupAdmin} without access control. + * + * Emits a {GroupAdminChanged} event + */ + function _setGroupAdmin(uint64 groupId, uint64 admin) internal virtual { + if (groupId == ADMIN_GROUP || groupId == PUBLIC_GROUP) { + revert AccessManagerLockedGroup(groupId); + } + + _groups[groupId].admin = admin; + + emit GroupAdminChanged(groupId, admin); + } + + /** + * @dev Internal version of {setGroupGuardian} without access control. + * + * Emits a {GroupGuardianChanged} event + */ + function _setGroupGuardian(uint64 groupId, uint64 guardian) internal virtual { + if (groupId == ADMIN_GROUP || groupId == PUBLIC_GROUP) { + revert AccessManagerLockedGroup(groupId); + } + + _groups[groupId].guardian = guardian; + + emit GroupGuardianChanged(groupId, guardian); + } + + /** + * @dev Internal version of {setGrantDelay} without access control. + * + * Emits a {GroupGrantDelayChanged} event + */ + function _setGrantDelay(uint64 groupId, uint32 newDelay) internal virtual { + if (groupId == PUBLIC_GROUP) { + revert AccessManagerLockedGroup(groupId); + } + + Time.Delay updated = _groups[groupId].delay.withUpdate(newDelay, minSetback()); + _groups[groupId].delay = updated; + + (, , uint48 effect) = updated.unpack(); + emit GroupGrantDelayChanged(groupId, newDelay, effect); + } + + // ============================================= FUNCTION MANAGEMENT ============================================== + /** + * @dev Set the level of permission (`group`) required to call functions identified by the `selectors` in the + * `target` contract. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {FunctionAllowedGroupUpdated} event per selector + */ + function setFamilyFunctionGroup( + uint64 familyId, bytes4[] calldata selectors, - uint8 group, - bool allowed - ) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { - require(hasGroup(group), "AccessManager: unknown group"); - for (uint256 i = 0; i < selectors.length; i++) { - bytes4 selector = selectors[i]; - _allowedGroups[target][selector] = _withUpdatedGroup(_allowedGroups[target][selector], group, allowed); - emit GroupAllowed(target, selector, group, allowed); + uint64 groupId + ) public virtual onlyGroup(ADMIN_GROUP) withFamilyDelay(familyId) { + for (uint256 i = 0; i < selectors.length; ++i) { + _setFamilyFunctionGroup(familyId, selectors[i], groupId); } } /** - * @dev Returns the mode of the target contract, which may be custom (`0`), closed (`1`), or open (`2`). + * @dev Internal version of {setFunctionAllowedGroup} without access control. + * + * Emits a {FunctionAllowedGroupUpdated} event */ - function getContractMode(address target) public view virtual returns (AccessMode) { - return _contractMode[target]; + function _setFamilyFunctionGroup(uint64 familyId, bytes4 selector, uint64 groupId) internal virtual { + _checkValidFamilyId(familyId); + _families[familyId].allowedGroups[selector] = groupId; + emit FamilyFunctionGroupUpdated(familyId, selector, groupId); } /** - * @dev Sets the target contract to be in custom restricted mode. All restricted functions in the target contract - * will follow the group-based restrictions defined by the AccessManager. The caller must be the default admin. + * @dev Set the delay for management operations on a given family of contract. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {FunctionAllowedGroupUpdated} event per selector */ - function setContractModeCustom(address target) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { - _setContractMode(target, AccessMode.Custom); + function setFamilyAdminDelay(uint64 familyId, uint32 newDelay) public virtual onlyGroup(ADMIN_GROUP) { + _setFamilyAdminDelay(familyId, newDelay); } /** - * @dev Sets the target contract to be in "open" mode. All restricted functions in the target contract will become - * callable by anyone. The caller must be the default admin. + * @dev Internal version of {setFamilyAdminDelay} without access control. + * + * Emits a {FamilyAdminDelayUpdated} event */ - function setContractModeOpen(address target) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { - _setContractMode(target, AccessMode.Open); + function _setFamilyAdminDelay(uint64 familyId, uint32 newDelay) internal virtual { + _checkValidFamilyId(familyId); + Time.Delay updated = _families[familyId].adminDelay.withUpdate(newDelay, minSetback()); + _families[familyId].adminDelay = updated; + (, , uint48 effect) = updated.unpack(); + emit FamilyAdminDelayUpdated(familyId, newDelay, effect); } /** - * @dev Sets the target contract to be in "closed" mode. All restricted functions in the target contract will be - * closed down and disallowed to all. The caller must be the default admin. + * @dev Reverts if `familyId` is 0. */ - function setContractModeClosed(address target) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { - _setContractMode(target, AccessMode.Closed); + function _checkValidFamilyId(uint64 familyId) private pure { + if (familyId == 0) { + revert AccessManagerInvalidFamily(familyId); + } } + // =============================================== MODE MANAGEMENT ================================================ /** - * @dev Transfers a target contract onto a new authority. The caller must be the default admin. + * @dev Set the family of a contract. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {ContractFamilyUpdated} event. */ - function transferContractAuthority( + function setContractFamily( address target, - address newAuthority - ) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { - AccessManaged(target).setAuthority(IAuthority(newAuthority)); + uint64 familyId + ) public virtual onlyGroup(ADMIN_GROUP) withFamilyDelay(_getContractFamilyId(target)) { + _setContractFamily(target, familyId); } /** - * @dev Creates a new group. + * @dev Set the family of a contract. This is an internal setter with no access restrictions. * - * Emits {GroupUpdated}. + * Emits a {ContractFamilyUpdated} event. */ - function _createGroup(uint8 group, string memory name) internal virtual { - require(!hasGroup(group), "AccessManager: existing group"); - _createdGroups = _withUpdatedGroup(_createdGroups, group, true); - emit GroupUpdated(group, name); + function _setContractFamily(address target, uint64 familyId) internal virtual { + _contractMode[target].familyId = familyId; + emit ContractFamilyUpdated(target, familyId); } /** - * @dev Augmented version of {AccessControl-_grantRole} that keeps track of user group bitmaps. + * @dev Set the closed flag for a contract. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {ContractClosed} event. */ - function _grantRole(bytes32 role, address user) internal virtual override { - super._grantRole(role, user); - (bool isGroup, uint8 group) = _decodeGroupRole(role); - if (isGroup) { - require(hasGroup(group), "AccessManager: unknown group"); - _userGroups[user] = _withUpdatedGroup(_userGroups[user], group, true); - } + function setContractClosed(address target, bool closed) public virtual onlyGroup(ADMIN_GROUP) { + _setContractClosed(target, closed); + } + + /** + * @dev Set the closed flag for a contract. This is an internal setter with no access restrictions. + * + * Emits a {ContractClosed} event. + */ + function _setContractClosed(address target, bool closed) internal virtual { + _contractMode[target].closed = closed; + emit ContractClosed(target, closed); + } + + // ============================================== DELAYED OPERATIONS ============================================== + /** + * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the + * operation is not yet scheduled, has expired, was executed, or was canceled. + */ + function getSchedule(bytes32 id) public view virtual returns (uint48) { + uint48 timepoint = _schedules[id]; + return _isExpired(timepoint) ? 0 : timepoint; } /** - * @dev Augmented version of {AccessControl-_revokeRole} that keeps track of user group bitmaps. + * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to + * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays + * required for the caller. The special value zero will automatically set the earliest possible time. + * + * Emits a {OperationScheduled} event. */ - function _revokeRole(bytes32 role, address user) internal virtual override { - super._revokeRole(role, user); - (bool isGroup, uint8 group) = _decodeGroupRole(role); - if (isGroup) { - require(hasGroup(group), "AccessManager: unknown group"); - require(group != _GROUP_PUBLIC, "AccessManager: irrevocable group"); - _userGroups[user] = _withUpdatedGroup(_userGroups[user], group, false); + function schedule(address target, bytes calldata data, uint48 when) public virtual returns (bytes32) { + address caller = _msgSender(); + + // Fetch restriction to that apply to the caller on the targeted function + (bool allowed, uint32 setback) = _canCallExtended(caller, target, data); + + uint48 minWhen = Time.timestamp() + setback; + + // If caller is not authorised, revert + if (!allowed && (setback == 0 || when.isSetAndPast(minWhen - 1))) { + revert AccessManagerUnauthorizedCall(caller, target, bytes4(data[0:4])); } + + // If caller is authorised, schedule operation + bytes32 operationId = _hashOperation(caller, target, data); + + // Cannot reschedule unless the operation has expired + uint48 prevTimepoint = _schedules[operationId]; + if (prevTimepoint != 0 && !_isExpired(prevTimepoint)) { + revert AccessManagerAlreadyScheduled(operationId); + } + + uint48 timepoint = when == 0 ? minWhen : when; + _schedules[operationId] = timepoint; + emit OperationScheduled(operationId, timepoint, caller, target, data); + + return operationId; } /** - * @dev Sets the restricted mode of a target contract. + * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the + * execution delay is 0. + * + * Emits an {OperationExecuted} event only if the call was scheduled and delayed. */ - function _setContractMode(address target, AccessMode mode) internal virtual { - AccessMode previousMode = _contractMode[target]; - _contractMode[target] = mode; - emit AccessModeUpdated(target, previousMode, mode); + function relay(address target, bytes calldata data) public payable virtual { + address caller = _msgSender(); + + // Fetch restriction to that apply to the caller on the targeted function + (bool allowed, uint32 setback) = _canCallExtended(caller, target, data); + + // If caller is not authorised, revert + if (!allowed && setback == 0) { + revert AccessManagerUnauthorizedCall(caller, target, bytes4(data)); + } + + // If caller is authorised, check operation was scheduled early enough + bytes32 operationId = _hashOperation(caller, target, data); + + if (setback != 0) { + _consumeScheduledOp(operationId); + } + + // Mark the target and selector as authorised + bytes32 relayIdentifierBefore = _relayIdentifier; + _relayIdentifier = _hashRelayIdentifier(target, bytes4(data)); + + // Perform call + Address.functionCallWithValue(target, data, msg.value); + + // Reset relay identifier + _relayIdentifier = relayIdentifierBefore; } /** - * @dev Returns the {AccessControl} role id that corresponds to a group. + * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed + * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error. + * + * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager, + * with all the verifications that it implies. * - * This role id starts with the ASCII characters `group:`, followed by zeroes, and ends with the single byte - * corresponding to the group number. + * Emit a {OperationExecuted} event */ - function _encodeGroupRole(uint8 group) internal pure virtual returns (bytes32) { - return bytes32("group:") | bytes32(uint256(group)); + function consumeScheduledOp(address caller, bytes calldata data) public virtual { + address target = _msgSender(); + require(IAccessManaged(target).isConsumingScheduledOp()); + _consumeScheduledOp(_hashOperation(caller, target, data)); } /** - * @dev Decodes a role id into a group, if it is a role id of the kind returned by {_encodeGroupRole}. + * @dev Internal variant of {consumeScheduledOp} that operates on bytes32 operationId. */ - function _decodeGroupRole(bytes32 role) internal pure virtual returns (bool isGroup, uint8 group) { - bytes32 tagMask = ~bytes32(uint256(0xff)); - bytes32 tag = role & tagMask; - isGroup = tag == bytes32("group:"); - group = uint8(role[31]); + function _consumeScheduledOp(bytes32 operationId) internal virtual { + uint48 timepoint = _schedules[operationId]; + + if (timepoint == 0) { + revert AccessManagerNotScheduled(operationId); + } else if (timepoint > Time.timestamp()) { + revert AccessManagerNotReady(operationId); + } else if (_isExpired(timepoint)) { + revert AccessManagerExpired(operationId); + } + + delete _schedules[operationId]; + emit OperationExecuted(operationId, timepoint); } /** - * @dev Returns a bit mask where the only non-zero bit is the group number bit. + * @dev Cancel a scheduled (delayed) operation. + * + * Requirements: + * + * - the caller must be the proposer, or a guardian of the targeted function + * + * Emits a {OperationCanceled} event. + */ + function cancel(address caller, address target, bytes calldata data) public virtual { + address msgsender = _msgSender(); + bytes4 selector = bytes4(data[0:4]); + + bytes32 operationId = _hashOperation(caller, target, data); + if (_schedules[operationId] == 0) { + revert AccessManagerNotScheduled(operationId); + } else if (caller != msgsender) { + // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required group. + (bool isAdmin, ) = hasGroup(ADMIN_GROUP, msgsender); + (bool isGuardian, ) = hasGroup( + getGroupGuardian(getFamilyFunctionGroup(_getContractFamilyId(target), selector)), + msgsender + ); + if (!isAdmin && !isGuardian) { + revert AccessManagerCannotCancel(msgsender, caller, target, selector); + } + } + + uint48 timepoint = _schedules[operationId]; + delete _schedules[operationId]; + emit OperationCanceled(operationId, timepoint); + } + + /** + * @dev Hashing function for delayed operations */ - function _groupMask(uint8 group) private pure returns (bytes32) { - return bytes32(1 << group); + function _hashOperation(address caller, address target, bytes calldata data) private pure returns (bytes32) { + return keccak256(abi.encode(caller, target, data)); } /** - * @dev Returns the value of the group number bit in a bitmap. + * @dev Hashing function for relay protection */ - function _getGroup(bytes32 bitmap, uint8 group) private pure returns (bool) { - return bitmap & _groupMask(group) > 0; + function _hashRelayIdentifier(address target, bytes4 selector) private pure returns (bytes32) { + return keccak256(abi.encode(target, selector)); } + // ==================================================== OTHERS ==================================================== /** - * @dev Returns a new group bitmap where a specific group was updated. + * @dev Change the AccessManager instance used by a contract that correctly uses this instance. + * + * Requirements: + * + * - the caller must be a global admin */ - function _withUpdatedGroup(bytes32 bitmap, uint8 group, bool value) private pure returns (bytes32) { - bytes32 mask = _groupMask(group); - if (value) { - return bitmap | mask; + function updateAuthority( + address target, + address newAuthority + ) public virtual onlyGroup(ADMIN_GROUP) withFamilyDelay(_getContractFamilyId(target)) { + IAccessManaged(target).setAuthority(newAuthority); + } + + // =================================================== HELPERS ==================================================== + function _checkGroup(uint64 groupId) internal view virtual { + address account = _msgSender(); + (bool inGroup, ) = hasGroup(groupId, account); + if (!inGroup) { + revert AccessManagerUnauthorizedAccount(account, groupId); + } + } + + function _checkFamilyDelay(uint64 familyId) internal virtual { + uint32 delay = getFamilyAdminDelay(familyId); + if (delay > 0) { + _consumeScheduledOp(_hashOperation(_msgSender(), address(this), _msgData())); + } + } + + function _getContractFamilyId(address target) private view returns (uint64 familyId) { + (familyId, ) = getContractFamily(target); + } + + function _parseFamilyOperation(bytes calldata data) private view returns (bool, uint64) { + bytes4 selector = bytes4(data); + if (selector == this.updateAuthority.selector || selector == this.setContractFamily.selector) { + return (true, _getContractFamilyId(abi.decode(data[0x04:0x24], (address)))); + } else if (selector == this.setFamilyFunctionGroup.selector) { + return (true, abi.decode(data[0x04:0x24], (uint64))); } else { - return bitmap & ~mask; + return (false, 0); } } + + function _canCallExtended(address caller, address target, bytes calldata data) private view returns (bool, uint32) { + if (target == address(this)) { + (bool isFamilyOperation, uint64 familyId) = _parseFamilyOperation(data); + uint32 delay = getFamilyAdminDelay(familyId); + (bool inGroup, ) = hasGroup(ADMIN_GROUP, caller); + return (inGroup && isFamilyOperation && delay == 0, delay); + } else { + bytes4 selector = bytes4(data); + return canCall(caller, target, selector); + } + } + + function _isExpired(uint48 timepoint) private view returns (bool) { + return timepoint + expiration() <= Time.timestamp(); + } } diff --git a/contracts/access/manager/AccessManagerAdapter.sol b/contracts/access/manager/AccessManagerAdapter.sol deleted file mode 100644 index afa92264a..000000000 --- a/contracts/access/manager/AccessManagerAdapter.sol +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.0; - -import "./AccessManager.sol"; -import "./AccessManaged.sol"; - -/** - * @dev This contract can be used to migrate existing {Ownable} or {AccessControl} contracts into an {AccessManager} - * system. - * - * Ownable contracts can have their ownership transferred to an instance of this adapter. AccessControl contracts can - * grant all roles to the adapter, while ideally revoking them from all other accounts. Subsequently, the permissions - * for those contracts can be managed centrally and with function granularity in the {AccessManager} instance the - * adapter is connected to. - * - * Permissioned interactions with thus migrated contracts must go through the adapter's {relay} function and will - * proceed if the function is allowed for the caller in the AccessManager instance. - */ -contract AccessManagerAdapter is AccessManaged { - bytes32 private constant _DEFAULT_ADMIN_ROLE = 0; - - /** - * @dev Initializes an adapter connected to an AccessManager instance. - */ - constructor(AccessManager manager) AccessManaged(manager) {} - - /** - * @dev Relays a function call to the target contract. The call will be relayed if the AccessManager allows the - * caller access to this function in the target contract, i.e. if the caller is in a team that is allowed for the - * function, or if the caller is the default admin for the AccessManager. The latter is meant to be used for - * ad hoc operations such as asset recovery. - */ - function relay(address target, bytes memory data) external payable { - bytes4 sig = bytes4(data); - AccessManager manager = AccessManager(address(authority())); - require( - manager.canCall(msg.sender, target, sig) || manager.hasRole(_DEFAULT_ADMIN_ROLE, msg.sender), - "AccessManagerAdapter: caller not allowed" - ); - (bool ok, bytes memory result) = target.call{value: msg.value}(data); - assembly { - let result_pointer := add(32, result) - let result_size := mload(result) - switch ok - case true { - return(result_pointer, result_size) - } - default { - revert(result_pointer, result_size) - } - } - } -} diff --git a/contracts/access/manager/AuthorityUtils.sol b/contracts/access/manager/AuthorityUtils.sol new file mode 100644 index 000000000..49ba74ea2 --- /dev/null +++ b/contracts/access/manager/AuthorityUtils.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {IAuthority} from "./IAuthority.sol"; + +library AuthorityUtils { + /** + * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility + * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data. + * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting. + */ + function canCallWithDelay( + address authority, + address caller, + address target, + bytes4 selector + ) internal view returns (bool allowed, uint32 delay) { + (bool success, bytes memory data) = authority.staticcall( + abi.encodeCall(IAuthority.canCall, (caller, target, selector)) + ); + if (success) { + if (data.length >= 0x40) { + (allowed, delay) = abi.decode(data, (bool, uint32)); + } else if (data.length >= 0x20) { + allowed = abi.decode(data, (bool)); + } + } + return (allowed, delay); + } +} diff --git a/contracts/access/manager/IAccessManaged.sol b/contracts/access/manager/IAccessManaged.sol new file mode 100644 index 000000000..947e5bf5d --- /dev/null +++ b/contracts/access/manager/IAccessManaged.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +interface IAccessManaged { + event AuthorityUpdated(address authority); + + error AccessManagedUnauthorized(address caller); + error AccessManagedRequiredDelay(address caller, uint32 delay); + error AccessManagedInvalidAuthority(address authority); + + function authority() external view returns (address); + + function setAuthority(address) external; + + function isConsumingScheduledOp() external view returns (bool); +} diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol new file mode 100644 index 000000000..659b4c5cd --- /dev/null +++ b/contracts/access/manager/IAccessManager.sol @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {IAccessManaged} from "./IAccessManaged.sol"; +import {Time} from "../../utils/types/Time.sol"; + +interface IAccessManager { + /** + * @dev A delayed operation was scheduled. + */ + event OperationScheduled(bytes32 indexed operationId, uint48 schedule, address caller, address target, bytes data); + + /** + * @dev A scheduled operation was executed. + */ + event OperationExecuted(bytes32 indexed operationId, uint48 schedule); + + /** + * @dev A scheduled operation was canceled. + */ + event OperationCanceled(bytes32 indexed operationId, uint48 schedule); + + event GroupLabel(uint64 indexed groupId, string label); + event GroupGranted(uint64 indexed groupId, address indexed account, uint48 since, uint32 delay); + event GroupRevoked(uint64 indexed groupId, address indexed account); + event GroupExecutionDelayUpdated(uint64 indexed groupId, address indexed account, uint32 delay, uint48 from); + event GroupAdminChanged(uint64 indexed groupId, uint64 indexed admin); + event GroupGuardianChanged(uint64 indexed groupId, uint64 indexed guardian); + event GroupGrantDelayChanged(uint64 indexed groupId, uint32 delay, uint48 from); + + event ContractFamilyUpdated(address indexed target, uint64 indexed familyId); + event ContractClosed(address indexed target, bool closed); + + event FamilyFunctionGroupUpdated(uint64 indexed familyId, bytes4 selector, uint64 indexed groupId); + event FamilyAdminDelayUpdated(uint64 indexed familyId, uint32 delay, uint48 from); + + error AccessManagerAlreadyScheduled(bytes32 operationId); + error AccessManagerNotScheduled(bytes32 operationId); + error AccessManagerNotReady(bytes32 operationId); + error AccessManagerExpired(bytes32 operationId); + error AccessManagerLockedGroup(uint64 groupId); + error AccessManagerInvalidFamily(uint64 familyId); + error AccessManagerAccountAlreadyInGroup(uint64 groupId, address account); + error AccessManagerAccountNotInGroup(uint64 groupId, address account); + error AccessManagerBadConfirmation(); + error AccessManagerUnauthorizedAccount(address msgsender, uint64 groupId); + error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector); + error AccessManagerCannotCancel(address msgsender, address caller, address target, bytes4 selector); + + function canCall( + address caller, + address target, + bytes4 selector + ) external view returns (bool allowed, uint32 delay); + + function expiration() external returns (uint32); + + function getContractFamily(address target) external view returns (uint64 familyId, bool closed); + + function getFamilyFunctionGroup(uint64 familyId, bytes4 selector) external view returns (uint64); + + function getFamilyAdminDelay(uint64 familyId) external view returns (uint32); + + function getGroupAdmin(uint64 groupId) external view returns (uint64); + + function getGroupGuardian(uint64 groupId) external view returns (uint64); + + function getGroupGrantDelay(uint64 groupId) external view returns (uint32); + + function getAccess(uint64 groupId, address account) external view returns (uint48, uint32, uint32, uint48); + + function hasGroup(uint64 groupId, address account) external view returns (bool, uint32); + + function labelGroup(uint64 groupId, string calldata label) external; + + function grantGroup(uint64 groupId, address account, uint32 executionDelay) external; + + function revokeGroup(uint64 groupId, address account) external; + + function renounceGroup(uint64 groupId, address callerConfirmation) external; + + function setExecuteDelay(uint64 groupId, address account, uint32 newDelay) external; + + function setGroupAdmin(uint64 groupId, uint64 admin) external; + + function setGroupGuardian(uint64 groupId, uint64 guardian) external; + + function setGrantDelay(uint64 groupId, uint32 newDelay) external; + + function setFamilyFunctionGroup(uint64 familyId, bytes4[] calldata selectors, uint64 groupId) external; + + function setFamilyAdminDelay(uint64 familyId, uint32 newDelay) external; + + function setContractFamily(address target, uint64 familyId) external; + + function setContractClosed(address target, bool closed) external; + + function getSchedule(bytes32 id) external returns (uint48); + + function schedule(address target, bytes calldata data, uint48 when) external returns (bytes32); + + function relay(address target, bytes calldata data) external payable; + + function cancel(address caller, address target, bytes calldata data) external; + + function consumeScheduledOp(address caller, bytes calldata data) external; + + function updateAuthority(address target, address newAuthority) external; +} diff --git a/contracts/access/manager/IAuthority.sol b/contracts/access/manager/IAuthority.sol index 61a85d2f9..175b967f8 100644 --- a/contracts/access/manager/IAuthority.sol +++ b/contracts/access/manager/IAuthority.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; /** * @dev Standard interface for permissioning originally defined in Dappsys. diff --git a/contracts/mocks/AccessManagedTarget.sol b/contracts/mocks/AccessManagedTarget.sol new file mode 100644 index 000000000..305c989f6 --- /dev/null +++ b/contracts/mocks/AccessManagedTarget.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {AccessManaged} from "../access/manager/AccessManaged.sol"; + +abstract contract AccessManagedTarget is AccessManaged { + event CalledRestricted(address caller); + event CalledUnrestricted(address caller); + + function fnRestricted() public restricted { + emit CalledRestricted(msg.sender); + } + + function fnUnrestricted() public { + emit CalledUnrestricted(msg.sender); + } +} diff --git a/contracts/mocks/AccessManagerMocks.sol b/contracts/mocks/AccessManagerMocks.sol deleted file mode 100644 index caf81366e..000000000 --- a/contracts/mocks/AccessManagerMocks.sol +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.13; - -import "../access/manager/IAuthority.sol"; -import "../access/manager/AccessManaged.sol"; - -contract SimpleAuthority is IAuthority { - address _allowedCaller; - address _allowedTarget; - bytes4 _allowedSelector; - - function setAllowed(address allowedCaller, address allowedTarget, bytes4 allowedSelector) public { - _allowedCaller = allowedCaller; - _allowedTarget = allowedTarget; - _allowedSelector = allowedSelector; - } - - function canCall(address caller, address target, bytes4 selector) external view override returns (bool) { - return caller == _allowedCaller && target == _allowedTarget && selector == _allowedSelector; - } -} - -abstract contract AccessManagedMock is AccessManaged { - event RestrictedRan(); - - function restrictedFunction() external restricted { - emit RestrictedRan(); - } - - function otherRestrictedFunction() external restricted { - emit RestrictedRan(); - } -} diff --git a/contracts/utils/types/Time.sol b/contracts/utils/types/Time.sol new file mode 100644 index 000000000..07a3a68b1 --- /dev/null +++ b/contracts/utils/types/Time.sol @@ -0,0 +1,139 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {Math} from "../math/Math.sol"; +import {SafeCast} from "../math/SafeCast.sol"; + +/** + * @dev This library provides helpers for manipulating time-related objects. + * + * It uses the following types: + * - `uint48` for timepoints + * - `uint32` for durations + * + * While the library doesn't provide specific types for timepoints and duration, it does provide: + * - a `Delay` type to represent duration that can be programmed to change value automatically at a given point + * - additional helper functions + */ +library Time { + using Time for *; + + /** + * @dev Get the block timestamp as a Timepoint. + */ + function timestamp() internal view returns (uint48) { + return SafeCast.toUint48(block.timestamp); + } + + /** + * @dev Get the block number as a Timepoint. + */ + function blockNumber() internal view returns (uint48) { + return SafeCast.toUint48(block.number); + } + + /** + * @dev Check if a timepoint is set, and in the past. + */ + function isSetAndPast(uint48 timepoint, uint48 ref) internal pure returns (bool) { + return timepoint != 0 && timepoint <= ref; + } + + // ==================================================== Delay ===================================================== + /** + * @dev A `Delay` is a uint32 duration that can be programmed to change value automatically at a given point in the + * future. The "effect" timepoint describes when the transitions happens from the "old" value to the "new" value. + * This allows updating the delay applied to some operation while keeping so guarantees. + * + * In particular, the {update} function guarantees that is the delay is reduced, the old delay still applies for + * some time. For example if the delay is currently 7 days to do an upgrade, the admin should not be able to set + * the delay to 0 and upgrade immediately. If the admin wants to reduce the delay, the old delay (7 days) should + * still apply for some time. + * + * + * The `Delay` type is 128 bits long, and packs the following: + * [000:031] uint32 for the current value (duration) + * [032:063] uint32 for the pending value (duration) + * [064:111] uint48 for the effect date (timepoint) + * + * NOTE: The {get} and {update} function operate using timestamps. Block number based delays should use the + * {getAt} and {withUpdateAt} variants of these functions. + */ + type Delay is uint112; + + /** + * @dev Wrap a duration into a Delay to add the one-step "update in the future" feature + */ + function toDelay(uint32 duration) internal pure returns (Delay) { + return Delay.wrap(duration); + } + + /** + * @dev Get the value at a given timepoint plus the pending value and effect timepoint if there is a scheduled + * change after this timepoint. If the effect timepoint is 0, then the pending value should not be considered. + */ + function getFullAt(Delay self, uint48 timepoint) internal pure returns (uint32, uint32, uint48) { + (uint32 oldValue, uint32 newValue, uint48 effect) = self.unpack(); + return effect.isSetAndPast(timepoint) ? (newValue, 0, 0) : (oldValue, newValue, effect); + } + + /** + * @dev Get the current value plus the pending value and effect timepoint if there is a scheduled change. If the + * effect timepoint is 0, then the pending value should not be considered. + */ + function getFull(Delay self) internal view returns (uint32, uint32, uint48) { + return self.getFullAt(timestamp()); + } + + /** + * @dev Get the value the Delay will be at a given timepoint. + */ + function getAt(Delay self, uint48 timepoint) internal pure returns (uint32) { + (uint32 delay, , ) = getFullAt(self, timepoint); + return delay; + } + + /** + * @dev Get the current value. + */ + function get(Delay self) internal view returns (uint32) { + return self.getAt(timestamp()); + } + + /** + * @dev Update a Delay object so that a new duration takes effect at a given timepoint. + */ + function withUpdateAt(Delay self, uint32 newValue, uint48 effect) internal view returns (Delay) { + return pack(self.get(), newValue, effect); + } + + /** + * @dev Update a Delay object so that it takes a new duration after at a timepoint that is automatically computed + * to enforce the old delay at the moment of the update. + */ + function withUpdate(Delay self, uint32 newValue, uint32 minSetback) internal view returns (Delay) { + uint32 value = self.get(); + uint32 setback = uint32(Math.max(minSetback, value > newValue ? value - newValue : 0)); + return self.withUpdateAt(newValue, timestamp() + setback); + } + + /** + * @dev Split a delay into its components: oldValue, newValue and effect (transition timepoint). + */ + function unpack(Delay self) internal pure returns (uint32, uint32, uint48) { + uint112 raw = Delay.unwrap(self); + return ( + uint32(raw), // oldValue + uint32(raw >> 32), // newValue + uint48(raw >> 64) // effect + ); + } + + /** + * @dev pack the components into a Delay object. + */ + function pack(uint32 oldValue, uint32 newValue, uint48 effect) internal pure returns (Delay) { + return Delay.wrap(uint112(oldValue) | (uint112(newValue) << 32) | (uint112(effect) << 64)); + } +} diff --git a/package-lock.json b/package-lock.json index 22fe93cb7..60fa391df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "solhint": "^3.3.6", "solhint-plugin-openzeppelin": "file:scripts/solhint-custom", "solidity-ast": "^0.4.25", - "solidity-coverage": "^0.8.0", + "solidity-coverage": "^0.8.4", "solidity-docgen": "^0.6.0-beta.29", "undici": "^5.22.1", "web3": "^1.3.0", @@ -12796,9 +12796,9 @@ } }, "node_modules/solidity-coverage/node_modules/@solidity-parser/parser": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.0.tgz", - "integrity": "sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q==", + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", "dev": true, "dependencies": { "antlr4ts": "^0.5.0-alpha.4" @@ -25272,9 +25272,9 @@ }, "dependencies": { "@solidity-parser/parser": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.0.tgz", - "integrity": "sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q==", + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", "dev": true, "requires": { "antlr4ts": "^0.5.0-alpha.4" diff --git a/test/access/manager/AccessManaged.test.js b/test/access/manager/AccessManaged.test.js deleted file mode 100644 index caf1eea7e..000000000 --- a/test/access/manager/AccessManaged.test.js +++ /dev/null @@ -1,55 +0,0 @@ -const { - expectEvent, - expectRevert, - constants: { ZERO_ADDRESS }, -} = require('@openzeppelin/test-helpers'); - -const AccessManaged = artifacts.require('$AccessManagedMock'); -const SimpleAuthority = artifacts.require('SimpleAuthority'); - -contract('AccessManaged', function (accounts) { - const [authority, other, user] = accounts; - it('construction', async function () { - const managed = await AccessManaged.new(authority); - expectEvent.inConstruction(managed, 'AuthorityUpdated', { - oldAuthority: ZERO_ADDRESS, - newAuthority: authority, - }); - expect(await managed.authority()).to.equal(authority); - }); - - describe('setAuthority', function () { - it(`current authority can change managed's authority`, async function () { - const managed = await AccessManaged.new(authority); - const set = await managed.setAuthority(other, { from: authority }); - expectEvent(set, 'AuthorityUpdated', { - sender: authority, - newAuthority: other, - }); - expect(await managed.authority()).to.equal(other); - }); - - it(`other account cannot change managed's authority`, async function () { - const managed = await AccessManaged.new(authority); - await expectRevert(managed.setAuthority(other, { from: other }), 'AccessManaged: not current authority'); - }); - }); - - describe('restricted', function () { - const selector = web3.eth.abi.encodeFunctionSignature('restrictedFunction()'); - - it('allows if authority returns true', async function () { - const authority = await SimpleAuthority.new(); - const managed = await AccessManaged.new(authority.address); - await authority.setAllowed(user, managed.address, selector); - const restricted = await managed.restrictedFunction({ from: user }); - expectEvent(restricted, 'RestrictedRan'); - }); - - it('reverts if authority returns false', async function () { - const authority = await SimpleAuthority.new(); - const managed = await AccessManaged.new(authority.address); - await expectRevert(managed.restrictedFunction({ from: user }), 'AccessManaged: authority rejected'); - }); - }); -}); diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 13c14e6e0..2d2f61d3e 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -1,514 +1,1144 @@ -const { - expectEvent, - expectRevert, - time: { duration }, -} = require('@openzeppelin/test-helpers'); -const { AccessMode } = require('../../helpers/enums'); +const { web3 } = require('hardhat'); +const { expectEvent, time } = require('@openzeppelin/test-helpers'); +const { expectRevertCustomError } = require('../../helpers/customError'); +const { selector } = require('../../helpers/methods'); +const { clockFromReceipt } = require('../../helpers/time'); + +const AccessManager = artifacts.require('$AccessManager'); +const AccessManagedTarget = artifacts.require('$AccessManagedTarget'); +const Ownable = artifacts.require('$Ownable'); -const AccessManager = artifacts.require('AccessManager'); -const AccessManagerAdapter = artifacts.require('AccessManagerAdapter'); -const AccessManaged = artifacts.require('$AccessManagedMock'); +const MAX_UINT64 = web3.utils.toBN((2n ** 64n - 1n).toString()); -const Ownable = artifacts.require('$Ownable'); -const AccessControl = artifacts.require('$AccessControl'); - -const groupUtils = { - mask: group => 1n << BigInt(group), - decodeBitmap: hexBitmap => { - const m = BigInt(hexBitmap); - const allGroups = new Array(256).fill().map((_, i) => i.toString()); - return allGroups.filter(i => (m & groupUtils.mask(i)) !== 0n); - }, - role: group => web3.utils.asciiToHex('group:').padEnd(64, '0') + group.toString(16).padStart(2, '0'), +const GROUPS = { + ADMIN: web3.utils.toBN(0), + SOME_ADMIN: web3.utils.toBN(17), + SOME: web3.utils.toBN(42), + PUBLIC: MAX_UINT64, }; +Object.assign(GROUPS, Object.fromEntries(Object.entries(GROUPS).map(([key, value]) => [value, key]))); + +const familyId = web3.utils.toBN(1); +const executeDelay = web3.utils.toBN(10); +const grantDelay = web3.utils.toBN(10); -const PUBLIC_GROUP = '255'; +const formatAccess = access => [access[0], access[1].toString()]; contract('AccessManager', function (accounts) { - const [admin, nonAdmin, user1, user2, otherAuthority] = accounts; - beforeEach('deploy', async function () { - this.delay = duration.days(1); - this.manager = await AccessManager.new(this.delay, admin); + const [admin, manager, member, user, other] = accounts; + + beforeEach(async function () { + this.manager = await AccessManager.new(admin); + + // add member to group + await this.manager.$_setGroupAdmin(GROUPS.SOME, GROUPS.SOME_ADMIN); + await this.manager.$_setGroupGuardian(GROUPS.SOME, GROUPS.SOME_ADMIN); + await this.manager.$_grantGroup(GROUPS.SOME_ADMIN, manager, 0, 0); + await this.manager.$_grantGroup(GROUPS.SOME, member, 0, 0); }); - it('configures default admin rules', async function () { - expect(await this.manager.defaultAdmin()).to.equal(admin); - expect(await this.manager.defaultAdminDelay()).to.be.bignumber.equal(this.delay); + it('groups are correctly initialized', async function () { + // group admin + expect(await this.manager.getGroupAdmin(GROUPS.ADMIN)).to.be.bignumber.equal(GROUPS.ADMIN); + expect(await this.manager.getGroupAdmin(GROUPS.SOME_ADMIN)).to.be.bignumber.equal(GROUPS.ADMIN); + expect(await this.manager.getGroupAdmin(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.SOME_ADMIN); + expect(await this.manager.getGroupAdmin(GROUPS.PUBLIC)).to.be.bignumber.equal(GROUPS.ADMIN); + // group guardian + expect(await this.manager.getGroupGuardian(GROUPS.ADMIN)).to.be.bignumber.equal(GROUPS.ADMIN); + expect(await this.manager.getGroupGuardian(GROUPS.SOME_ADMIN)).to.be.bignumber.equal(GROUPS.ADMIN); + expect(await this.manager.getGroupGuardian(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.SOME_ADMIN); + expect(await this.manager.getGroupGuardian(GROUPS.PUBLIC)).to.be.bignumber.equal(GROUPS.ADMIN); + // group members + expect(await this.manager.hasGroup(GROUPS.ADMIN, admin).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasGroup(GROUPS.ADMIN, manager).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasGroup(GROUPS.ADMIN, member).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasGroup(GROUPS.ADMIN, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasGroup(GROUPS.SOME_ADMIN, admin).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasGroup(GROUPS.SOME_ADMIN, manager).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasGroup(GROUPS.SOME_ADMIN, member).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasGroup(GROUPS.SOME_ADMIN, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasGroup(GROUPS.SOME, admin).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasGroup(GROUPS.SOME, manager).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasGroup(GROUPS.PUBLIC, admin).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasGroup(GROUPS.PUBLIC, manager).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasGroup(GROUPS.PUBLIC, member).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasGroup(GROUPS.PUBLIC, user).then(formatAccess)).to.be.deep.equal([true, '0']); }); - describe('groups', function () { - const group = '0'; - const name = 'dao'; - const otherGroup = '1'; - const otherName = 'council'; + describe('Groups management', function () { + describe('label group', function () { + it('admin can emit a label event', async function () { + expectEvent(await this.manager.labelGroup(GROUPS.SOME, 'Some label', { from: admin }), 'GroupLabel', { + groupId: GROUPS.SOME, + label: 'Some label', + }); + }); + + it('admin can re-emit a label event', async function () { + await this.manager.labelGroup(GROUPS.SOME, 'Some label', { from: admin }); - describe('public group', function () { - it('is created automatically', async function () { - await expectEvent.inConstruction(this.manager, 'GroupUpdated', { - group: PUBLIC_GROUP, - name: 'public', + expectEvent(await this.manager.labelGroup(GROUPS.SOME, 'Updated label', { from: admin }), 'GroupLabel', { + groupId: GROUPS.SOME, + label: 'Updated label', }); }); - it('includes all users automatically', async function () { - const groups = groupUtils.decodeBitmap(await this.manager.getUserGroups(user1)); - expect(groups).to.include(PUBLIC_GROUP); + it('emitting a label is restricted', async function () { + await expectRevertCustomError( + this.manager.labelGroup(GROUPS.SOME, 'Invalid label', { from: other }), + 'AccessManagerUnauthorizedAccount', + [other, GROUPS.ADMIN], + ); }); }); - describe('creating', function () { - it('admin can create groups', async function () { - const created = await this.manager.createGroup(group, name, { from: admin }); - expectEvent(created, 'GroupUpdated', { group, name }); - expect(await this.manager.hasGroup(group)).to.equal(true); - expect(await this.manager.hasGroup(otherGroup)).to.equal(false); - }); + describe('grant group', function () { + describe('without a grant delay', function () { + it('without an execute delay', async function () { + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + + const { receipt } = await this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + expectEvent(receipt, 'GroupGranted', { groupId: GROUPS.SOME, account: user, since: timestamp, delay: '0' }); + + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([true, '0']); + + const access = await this.manager.getAccess(GROUPS.SOME, user); + expect(access[0]).to.be.bignumber.equal(timestamp); // inGroupSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect + }); + + it('with an execute delay', async function () { + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + + const { receipt } = await this.manager.grantGroup(GROUPS.SOME, user, executeDelay, { from: manager }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + expectEvent(receipt, 'GroupGranted', { + groupId: GROUPS.SOME, + account: user, + since: timestamp, + delay: executeDelay, + }); + + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([ + true, + executeDelay.toString(), + ]); + + const access = await this.manager.getAccess(GROUPS.SOME, user); + expect(access[0]).to.be.bignumber.equal(timestamp); // inGroupSince + expect(access[1]).to.be.bignumber.equal(executeDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect + }); + + it('to a user that is already in the group', async function () { + expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); + + await expectRevertCustomError( + this.manager.grantGroup(GROUPS.SOME, member, 0, { from: manager }), + 'AccessManagerAccountAlreadyInGroup', + [GROUPS.SOME, member], + ); + }); + + it('to a user that is scheduled for joining the group', async function () { + await this.manager.$_grantGroup(GROUPS.SOME, user, 10, 0); // grant delay 10 + + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + + await expectRevertCustomError( + this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }), + 'AccessManagerAccountAlreadyInGroup', + [GROUPS.SOME, user], + ); + }); - it('non-admin cannot create groups', async function () { - await expectRevert(this.manager.createGroup(group, name, { from: nonAdmin }), 'missing role'); + it('grant group is restricted', async function () { + await expectRevertCustomError( + this.manager.grantGroup(GROUPS.SOME, user, 0, { from: other }), + 'AccessManagerUnauthorizedAccount', + [other, GROUPS.SOME_ADMIN], + ); + }); }); - it('cannot recreate a group', async function () { - await this.manager.createGroup(group, name, { from: admin }); - await expectRevert(this.manager.createGroup(group, name, { from: admin }), 'AccessManager: existing group'); + describe('with a grant delay', function () { + beforeEach(async function () { + await this.manager.$_setGrantDelay(GROUPS.SOME, grantDelay); + }); + + it('granted group is not active immediatly', async function () { + const { receipt } = await this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + expectEvent(receipt, 'GroupGranted', { + groupId: GROUPS.SOME, + account: user, + since: timestamp.add(grantDelay), + delay: '0', + }); + + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + + const access = await this.manager.getAccess(GROUPS.SOME, user); + expect(access[0]).to.be.bignumber.equal(timestamp.add(grantDelay)); // inGroupSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect + }); + + it('granted group is active after the delay', async function () { + const { receipt } = await this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + expectEvent(receipt, 'GroupGranted', { + groupId: GROUPS.SOME, + account: user, + since: timestamp.add(grantDelay), + delay: '0', + }); + + await time.increase(grantDelay); + + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([true, '0']); + + const access = await this.manager.getAccess(GROUPS.SOME, user); + expect(access[0]).to.be.bignumber.equal(timestamp.add(grantDelay)); // inGroupSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect + }); }); }); - describe('updating', function () { - beforeEach('create group', async function () { - await this.manager.createGroup(group, name, { from: admin }); - }); + describe('revoke group', function () { + it('from a user that is already in the group', async function () { + expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); + + const { receipt } = await this.manager.revokeGroup(GROUPS.SOME, member, { from: manager }); + expectEvent(receipt, 'GroupRevoked', { groupId: GROUPS.SOME, account: member }); + + expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([false, '0']); - it('admin can update group', async function () { - const updated = await this.manager.updateGroupName(group, otherName, { from: admin }); - expectEvent(updated, 'GroupUpdated', { group, name: otherName }); + const access = await this.manager.getAccess(GROUPS.SOME, user); + expect(access[0]).to.be.bignumber.equal('0'); // inGroupSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect }); - it('non-admin cannot update group', async function () { - await expectRevert(this.manager.updateGroupName(group, name, { from: nonAdmin }), 'missing role'); + it('from a user that is scheduled for joining the group', async function () { + await this.manager.$_grantGroup(GROUPS.SOME, user, 10, 0); // grant delay 10 + + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + + const { receipt } = await this.manager.revokeGroup(GROUPS.SOME, user, { from: manager }); + expectEvent(receipt, 'GroupRevoked', { groupId: GROUPS.SOME, account: user }); + + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + + const access = await this.manager.getAccess(GROUPS.SOME, user); + expect(access[0]).to.be.bignumber.equal('0'); // inGroupSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect }); - it('cannot update built in group', async function () { - await expectRevert( - this.manager.updateGroupName(PUBLIC_GROUP, name, { from: admin }), - 'AccessManager: built-in group', + it('from a user that is not in the group', async function () { + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + + await expectRevertCustomError( + this.manager.revokeGroup(GROUPS.SOME, user, { from: manager }), + 'AccessManagerAccountNotInGroup', + [GROUPS.SOME, user], ); }); - it('cannot update nonexistent group', async function () { - await expectRevert( - this.manager.updateGroupName(otherGroup, name, { from: admin }), - 'AccessManager: unknown group', + it('revoke group is restricted', async function () { + await expectRevertCustomError( + this.manager.revokeGroup(GROUPS.SOME, member, { from: other }), + 'AccessManagerUnauthorizedAccount', + [other, GROUPS.SOME_ADMIN], ); }); }); - describe('granting', function () { - beforeEach('create group', async function () { - await this.manager.createGroup(group, name, { from: admin }); - }); + describe('renounce group', function () { + it('for a user that is already in the group', async function () { + expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); - it('admin can grant group', async function () { - const granted = await this.manager.grantGroup(group, user1, { from: admin }); - expectEvent(granted, 'RoleGranted', { account: user1, role: groupUtils.role(group) }); - const groups = groupUtils.decodeBitmap(await this.manager.getUserGroups(user1)); - expect(groups).to.include(group); - }); + const { receipt } = await this.manager.renounceGroup(GROUPS.SOME, member, { from: member }); + expectEvent(receipt, 'GroupRevoked', { groupId: GROUPS.SOME, account: member }); - it('non-admin cannot grant group', async function () { - await expectRevert(this.manager.grantGroup(group, user1, { from: nonAdmin }), 'missing role'); - }); + expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([false, '0']); - it('cannot grant nonexistent group', async function () { - await expectRevert(this.manager.grantGroup(otherGroup, user1, { from: admin }), 'AccessManager: unknown group'); + const access = await this.manager.getAccess(GROUPS.SOME, member); + expect(access[0]).to.be.bignumber.equal('0'); // inGroupSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect }); - }); - describe('revoking & renouncing', function () { - beforeEach('create and grant group', async function () { - await this.manager.createGroup(group, name, { from: admin }); - await this.manager.grantGroup(group, user1, { from: admin }); + it('for a user that is schedule for joining the group', async function () { + await this.manager.$_grantGroup(GROUPS.SOME, user, 10, 0); // grant delay 10 + + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + + const { receipt } = await this.manager.renounceGroup(GROUPS.SOME, user, { from: user }); + expectEvent(receipt, 'GroupRevoked', { groupId: GROUPS.SOME, account: user }); + + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + + const access = await this.manager.getAccess(GROUPS.SOME, user); + expect(access[0]).to.be.bignumber.equal('0'); // inGroupSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect }); - it('admin can revoke group', async function () { - await this.manager.revokeGroup(group, user1, { from: admin }); - const groups = groupUtils.decodeBitmap(await this.manager.getUserGroups(user1)); - expect(groups).to.not.include(group); + it('for a user that is not in the group', async function () { + await expectRevertCustomError( + this.manager.renounceGroup(GROUPS.SOME, user, { from: user }), + 'AccessManagerAccountNotInGroup', + [GROUPS.SOME, user], + ); }); - it('non-admin cannot revoke group', async function () { - await expectRevert(this.manager.revokeGroup(group, user1, { from: nonAdmin }), 'missing role'); + it('bad user confirmation', async function () { + await expectRevertCustomError( + this.manager.renounceGroup(GROUPS.SOME, member, { from: user }), + 'AccessManagerBadConfirmation', + [], + ); }); + }); - it('user can renounce group', async function () { - await this.manager.renounceGroup(group, user1, { from: user1 }); - const groups = groupUtils.decodeBitmap(await this.manager.getUserGroups(user1)); - expect(groups).to.not.include(group); + describe('change group admin', function () { + it("admin can set any group's admin", async function () { + expect(await this.manager.getGroupAdmin(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.SOME_ADMIN); + + const { receipt } = await this.manager.setGroupAdmin(GROUPS.SOME, GROUPS.ADMIN, { from: admin }); + expectEvent(receipt, 'GroupAdminChanged', { groupId: GROUPS.SOME, admin: GROUPS.ADMIN }); + + expect(await this.manager.getGroupAdmin(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.ADMIN); }); - it(`user cannot renounce other user's groups`, async function () { - await expectRevert( - this.manager.renounceGroup(group, user1, { from: user2 }), - 'can only renounce roles for self', - ); - await expectRevert( - this.manager.renounceGroup(group, user2, { from: user1 }), - 'can only renounce roles for self', + it("setting a group's admin is restricted", async function () { + await expectRevertCustomError( + this.manager.setGroupAdmin(GROUPS.SOME, GROUPS.SOME, { from: manager }), + 'AccessManagerUnauthorizedAccount', + [manager, GROUPS.ADMIN], ); }); + }); - it('cannot revoke public group', async function () { - await expectRevert( - this.manager.revokeGroup(PUBLIC_GROUP, user1, { from: admin }), - 'AccessManager: irrevocable group', - ); + describe('change group guardian', function () { + it("admin can set any group's admin", async function () { + expect(await this.manager.getGroupGuardian(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.SOME_ADMIN); + + const { receipt } = await this.manager.setGroupGuardian(GROUPS.SOME, GROUPS.ADMIN, { from: admin }); + expectEvent(receipt, 'GroupGuardianChanged', { groupId: GROUPS.SOME, guardian: GROUPS.ADMIN }); + + expect(await this.manager.getGroupGuardian(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.ADMIN); }); - it('cannot revoke nonexistent group', async function () { - await expectRevert( - this.manager.revokeGroup(otherGroup, user1, { from: admin }), - 'AccessManager: unknown group', - ); - await expectRevert( - this.manager.renounceGroup(otherGroup, user1, { from: user1 }), - 'AccessManager: unknown group', + it("setting a group's admin is restricted", async function () { + await expectRevertCustomError( + this.manager.setGroupGuardian(GROUPS.SOME, GROUPS.SOME, { from: other }), + 'AccessManagerUnauthorizedAccount', + [other, GROUPS.ADMIN], ); }); }); - describe('querying', function () { - it('returns expected groups', async function () { - const getGroups = () => this.manager.getUserGroups(user1); + describe('change execution delay', function () { + it('increassing the delay has immediate effect', async function () { + const oldDelay = web3.utils.toBN(10); + const newDelay = web3.utils.toBN(100); - // only public group initially - expect(await getGroups()).to.equal('0x8000000000000000000000000000000000000000000000000000000000000000'); + await this.manager.$_setExecuteDelay(GROUPS.SOME, member, oldDelay); - await this.manager.createGroup('0', '0', { from: admin }); - await this.manager.grantGroup('0', user1, { from: admin }); - expect(await getGroups()).to.equal('0x8000000000000000000000000000000000000000000000000000000000000001'); + const accessBefore = await this.manager.getAccess(GROUPS.SOME, member); + expect(accessBefore[1]).to.be.bignumber.equal(oldDelay); // currentDelay + expect(accessBefore[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(accessBefore[3]).to.be.bignumber.equal('0'); // effect - await this.manager.createGroup('1', '1', { from: admin }); - await this.manager.grantGroup('1', user1, { from: admin }); - expect(await getGroups()).to.equal('0x8000000000000000000000000000000000000000000000000000000000000003'); + const { receipt } = await this.manager.setExecuteDelay(GROUPS.SOME, member, newDelay, { + from: manager, + }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - await this.manager.createGroup('16', '16', { from: admin }); - await this.manager.grantGroup('16', user1, { from: admin }); - expect(await getGroups()).to.equal('0x8000000000000000000000000000000000000000000000000000000000010003'); + expectEvent(receipt, 'GroupExecutionDelayUpdated', { + groupId: GROUPS.SOME, + account: member, + delay: newDelay, + from: timestamp, + }); + + // immediate effect + const accessAfter = await this.manager.getAccess(GROUPS.SOME, member); + expect(accessAfter[1]).to.be.bignumber.equal(newDelay); // currentDelay + expect(accessAfter[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(accessAfter[3]).to.be.bignumber.equal('0'); // effect }); - }); - }); - describe('allowing', function () { - const group = '1'; - const otherGroup = '2'; - const groupMember = user1; - const selector = web3.eth.abi.encodeFunctionSignature('restrictedFunction()'); - const otherSelector = web3.eth.abi.encodeFunctionSignature('otherRestrictedFunction()'); - - beforeEach('deploying managed contract', async function () { - await this.manager.createGroup(group, '', { from: admin }); - await this.manager.grantGroup(group, groupMember, { from: admin }); - this.managed = await AccessManaged.new(this.manager.address); - }); + it('decreassing the delay takes time', async function () { + const oldDelay = web3.utils.toBN(100); + const newDelay = web3.utils.toBN(10); - it('non-admin cannot change allowed groups', async function () { - await expectRevert( - this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, true, { from: nonAdmin }), - 'missing role', - ); - }); + await this.manager.$_setExecuteDelay(GROUPS.SOME, member, oldDelay); + + const accessBefore = await this.manager.getAccess(GROUPS.SOME, member); + expect(accessBefore[1]).to.be.bignumber.equal(oldDelay); // currentDelay + expect(accessBefore[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(accessBefore[3]).to.be.bignumber.equal('0'); // effect - it('single selector', async function () { - const receipt = await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, true, { - from: admin, + const { receipt } = await this.manager.setExecuteDelay(GROUPS.SOME, member, newDelay, { + from: manager, + }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + + expectEvent(receipt, 'GroupExecutionDelayUpdated', { + groupId: GROUPS.SOME, + account: member, + delay: newDelay, + from: timestamp.add(oldDelay).sub(newDelay), + }); + + // delayed effect + const accessAfter = await this.manager.getAccess(GROUPS.SOME, member); + expect(accessAfter[1]).to.be.bignumber.equal(oldDelay); // currentDelay + expect(accessAfter[2]).to.be.bignumber.equal(newDelay); // pendingDelay + expect(accessAfter[3]).to.be.bignumber.equal(timestamp.add(oldDelay).sub(newDelay)); // effect }); - expectEvent(receipt, 'GroupAllowed', { - target: this.managed.address, - selector: selector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4 - group, - allowed: true, + it('cannot set the delay of a non member', async function () { + await expectRevertCustomError( + this.manager.setExecuteDelay(GROUPS.SOME, other, executeDelay, { from: manager }), + 'AccessManagerAccountNotInGroup', + [GROUPS.SOME, other], + ); }); - const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); - expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([group]); + it('cannot set the delay of public and admin groups', async function () { + for (const group of [GROUPS.PUBLIC, GROUPS.ADMIN]) { + await expectRevertCustomError( + this.manager.$_setExecuteDelay(group, other, executeDelay, { from: manager }), + 'AccessManagerLockedGroup', + [group], + ); + } + }); - const otherAllowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, otherSelector); - expect(groupUtils.decodeBitmap(otherAllowedGroups)).to.deep.equal([]); + it('can set a user execution delay during the grant delay', async function () { + await this.manager.$_grantGroup(GROUPS.SOME, other, 10, 0); - const restricted = await this.managed.restrictedFunction({ from: groupMember }); - expectEvent(restricted, 'RestrictedRan'); + const { receipt } = await this.manager.setExecuteDelay(GROUPS.SOME, other, executeDelay, { from: manager }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - await expectRevert( - this.managed.otherRestrictedFunction({ from: groupMember }), - 'AccessManaged: authority rejected', - ); + expectEvent(receipt, 'GroupExecutionDelayUpdated', { + groupId: GROUPS.SOME, + account: other, + delay: executeDelay, + from: timestamp, + }); + }); + + it('changing the execution delay is restricted', async function () { + await expectRevertCustomError( + this.manager.setExecuteDelay(GROUPS.SOME, member, executeDelay, { from: other }), + 'AccessManagerUnauthorizedAccount', + [GROUPS.SOME_ADMIN, other], + ); + }); }); - it('multiple selectors', async function () { - const receipt = await this.manager.setFunctionAllowedGroup( - this.managed.address, - [selector, otherSelector], - group, - true, - { from: admin }, - ); + describe('change grant delay', function () { + it('increassing the delay has immediate effect', async function () { + const oldDelay = web3.utils.toBN(10); + const newDelay = web3.utils.toBN(100); + await this.manager.$_setGrantDelay(GROUPS.SOME, oldDelay); - expectEvent(receipt, 'GroupAllowed', { - target: this.managed.address, - selector: selector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4 - group, - allowed: true, - }); + expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); - expectEvent(receipt, 'GroupAllowed', { - target: this.managed.address, - selector: otherSelector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4 - group, - allowed: true, + const { receipt } = await this.manager.setGrantDelay(GROUPS.SOME, newDelay, { from: admin }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + + expectEvent(receipt, 'GroupGrantDelayChanged', { groupId: GROUPS.SOME, delay: newDelay, from: timestamp }); + + expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(newDelay); }); - const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); - expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([group]); + it('increassing the delay has delay effect', async function () { + const oldDelay = web3.utils.toBN(100); + const newDelay = web3.utils.toBN(10); + await this.manager.$_setGrantDelay(GROUPS.SOME, oldDelay); - const otherAllowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, otherSelector); - expect(groupUtils.decodeBitmap(otherAllowedGroups)).to.deep.equal([group]); + expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); - const restricted = await this.managed.restrictedFunction({ from: groupMember }); - expectEvent(restricted, 'RestrictedRan'); + const { receipt } = await this.manager.setGrantDelay(GROUPS.SOME, newDelay, { from: admin }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - await this.managed.otherRestrictedFunction({ from: groupMember }); - expectEvent(restricted, 'RestrictedRan'); - }); + expectEvent(receipt, 'GroupGrantDelayChanged', { + groupId: GROUPS.SOME, + delay: newDelay, + from: timestamp.add(oldDelay).sub(newDelay), + }); - it('works on open target', async function () { - await this.manager.setContractModeOpen(this.managed.address, { from: admin }); - await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { from: admin }); - }); + expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); + + await time.increase(oldDelay.sub(newDelay)); - it('works on closed target', async function () { - await this.manager.setContractModeClosed(this.managed.address, { from: admin }); - await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { from: admin }); + expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(newDelay); + }); + + it('changing the grant delay is restricted', async function () { + await expectRevertCustomError( + this.manager.setGrantDelay(GROUPS.SOME, grantDelay, { from: other }), + 'AccessManagerUnauthorizedAccount', + [GROUPS.ADMIN, other], + ); + }); }); + }); - it('cannot allow nonexistent group', async function () { - await expectRevert( - this.manager.setFunctionAllowedGroup(this.managed.address, [selector], otherGroup, true, { from: admin }), - 'AccessManager: unknown group', + describe('with AccessManaged target contract', function () { + beforeEach('deploy target contract', async function () { + this.target = await AccessManagedTarget.new(this.manager.address); + // helpers for indirect calls + this.callData = selector('fnRestricted()'); + this.call = [this.target.address, this.callData]; + this.opId = web3.utils.keccak256( + web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], [user, ...this.call]), ); + this.direct = (opts = {}) => this.target.fnRestricted({ from: user, ...opts }); + this.schedule = (opts = {}) => this.manager.schedule(...this.call, 0, { from: user, ...opts }); + this.relay = (opts = {}) => this.manager.relay(...this.call, { from: user, ...opts }); + this.cancel = (opts = {}) => this.manager.cancel(user, ...this.call, { from: user, ...opts }); }); - }); - describe('disallowing', function () { - const group = '1'; - const groupMember = user1; - const selector = web3.eth.abi.encodeFunctionSignature('restrictedFunction()'); - const otherSelector = web3.eth.abi.encodeFunctionSignature('otherRestrictedFunction()'); + describe('Change function permissions', function () { + const sigs = ['someFunction()', 'someOtherFunction(uint256)', 'oneMoreFunction(address,uint8)'].map(selector); + + it('admin can set function group', async function () { + for (const sig of sigs) { + expect(await this.manager.getFamilyFunctionGroup(familyId, sig)).to.be.bignumber.equal(GROUPS.ADMIN); + } + + const { receipt: receipt1 } = await this.manager.setFamilyFunctionGroup(familyId, sigs, GROUPS.SOME, { + from: admin, + }); + + for (const sig of sigs) { + expectEvent(receipt1, 'FamilyFunctionGroupUpdated', { + familyId, + selector: sig, + groupId: GROUPS.SOME, + }); + expect(await this.manager.getFamilyFunctionGroup(familyId, sig)).to.be.bignumber.equal(GROUPS.SOME); + } + + const { receipt: receipt2 } = await this.manager.setFamilyFunctionGroup( + familyId, + [sigs[1]], + GROUPS.SOME_ADMIN, + { from: admin }, + ); + expectEvent(receipt2, 'FamilyFunctionGroupUpdated', { + familyId, + selector: sigs[1], + groupId: GROUPS.SOME_ADMIN, + }); + + for (const sig of sigs) { + expect(await this.manager.getFamilyFunctionGroup(familyId, sig)).to.be.bignumber.equal( + sig == sigs[1] ? GROUPS.SOME_ADMIN : GROUPS.SOME, + ); + } + }); - beforeEach('deploying managed contract', async function () { - await this.manager.createGroup(group, '', { from: admin }); - await this.manager.grantGroup(group, groupMember, { from: admin }); - this.managed = await AccessManaged.new(this.manager.address); - await this.manager.setFunctionAllowedGroup(this.managed.address, [selector, otherSelector], group, true, { - from: admin, + it('non-admin cannot set function group', async function () { + await expectRevertCustomError( + this.manager.setFamilyFunctionGroup(familyId, sigs, GROUPS.SOME, { from: other }), + 'AccessManagerUnauthorizedAccount', + [other, GROUPS.ADMIN], + ); }); }); - it('non-admin cannot change disallowed groups', async function () { - await expectRevert( - this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { from: nonAdmin }), - 'missing role', - ); + // WIP + describe('Calling restricted & unrestricted functions', function () { + const product = (...arrays) => arrays.reduce((a, b) => a.flatMap(ai => b.map(bi => [...ai, bi])), [[]]); + + for (const [callerGroups, fnGroup, closed, delay] of product( + [[], [GROUPS.SOME]], + [undefined, GROUPS.ADMIN, GROUPS.SOME, GROUPS.PUBLIC], + [false, true], + [null, executeDelay], + )) { + // can we call with a delay ? + const indirectSuccess = (fnGroup == GROUPS.PUBLIC || callerGroups.includes(fnGroup)) && !closed; + + // can we call without a delay ? + const directSuccess = (fnGroup == GROUPS.PUBLIC || (callerGroups.includes(fnGroup) && !delay)) && !closed; + + const description = [ + 'Caller in groups', + '[' + (callerGroups ?? []).map(groupId => GROUPS[groupId]).join(', ') + ']', + delay ? 'with a delay' : 'without a delay', + '+', + 'functions open to groups', + '[' + (GROUPS[fnGroup] ?? '') + ']', + closed ? `(closed)` : '', + ].join(' '); + + describe(description, function () { + beforeEach(async function () { + // setup + await Promise.all([ + this.manager.$_setContractClosed(this.target.address, closed), + this.manager.$_setContractFamily(this.target.address, familyId), + fnGroup && this.manager.$_setFamilyFunctionGroup(familyId, selector('fnRestricted()'), fnGroup), + fnGroup && this.manager.$_setFamilyFunctionGroup(familyId, selector('fnUnrestricted()'), fnGroup), + ...callerGroups + .filter(groupId => groupId != GROUPS.PUBLIC) + .map(groupId => this.manager.$_grantGroup(groupId, user, 0, delay ?? 0)), + ]); + + // post setup checks + const result = await this.manager.getContractFamily(this.target.address); + expect(result[0]).to.be.bignumber.equal(familyId); + expect(result[1]).to.be.equal(closed); + + if (fnGroup) { + expect( + await this.manager.getFamilyFunctionGroup(familyId, selector('fnRestricted()')), + ).to.be.bignumber.equal(fnGroup); + expect( + await this.manager.getFamilyFunctionGroup(familyId, selector('fnUnrestricted()')), + ).to.be.bignumber.equal(fnGroup); + } + + for (const groupId of callerGroups) { + const access = await this.manager.getAccess(groupId, user); + if (groupId == GROUPS.PUBLIC) { + expect(access[0]).to.be.bignumber.equal('0'); // inGroupSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect + } else { + expect(access[0]).to.be.bignumber.gt('0'); // inGroupSince + expect(access[1]).to.be.bignumber.eq(String(delay ?? 0)); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect + } + } + }); + + it('canCall', async function () { + const result = await this.manager.canCall(user, this.target.address, selector('fnRestricted()')); + expect(result[0]).to.be.equal(directSuccess); + expect(result[1]).to.be.bignumber.equal(!directSuccess && indirectSuccess ? delay ?? '0' : '0'); + }); + + it('Calling a non restricted function never revert', async function () { + expectEvent(await this.target.fnUnrestricted({ from: user }), 'CalledUnrestricted', { + caller: user, + }); + }); + + it(`Calling a restricted function directly should ${ + directSuccess ? 'succeed' : 'revert' + }`, async function () { + const promise = this.direct(); + + if (directSuccess) { + expectEvent(await promise, 'CalledRestricted', { caller: user }); + } else if (indirectSuccess) { + await expectRevertCustomError(promise, 'AccessManagerNotScheduled', [this.opId]); + } else { + await expectRevertCustomError(promise, 'AccessManagedUnauthorized', [user]); + } + }); + + it('Calling indirectly: only relay', async function () { + // relay without schedule + if (directSuccess) { + const { receipt, tx } = await this.relay(); + expectEvent.notEmitted(receipt, 'OperationExecuted', { operationId: this.opId }); + await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); + } else if (indirectSuccess) { + await expectRevertCustomError(this.relay(), 'AccessManagerNotScheduled', [this.opId]); + } else { + await expectRevertCustomError(this.relay(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); + } + }); + + it('Calling indirectly: schedule and relay', async function () { + if (directSuccess || indirectSuccess) { + const { receipt } = await this.schedule(); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + + expectEvent(receipt, 'OperationScheduled', { + operationId: this.opId, + caller: user, + target: this.call[0], + data: this.call[1], + }); + + // if can call directly, delay should be 0. Otherwise, the delay should be applied + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal( + timestamp.add(directSuccess ? web3.utils.toBN(0) : delay), + ); + + // execute without wait + if (directSuccess) { + const { receipt, tx } = await this.relay(); + await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); + if (delay && fnGroup !== GROUPS.PUBLIC) { + expectEvent(receipt, 'OperationExecuted', { operationId: this.opId }); + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); + } + } else if (indirectSuccess) { + await expectRevertCustomError(this.relay(), 'AccessManagerNotReady', [this.opId]); + } else { + await expectRevertCustomError(this.relay(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); + } + } else { + await expectRevertCustomError(this.schedule(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); + } + }); + + it('Calling indirectly: schedule wait and relay', async function () { + if (directSuccess || indirectSuccess) { + const { receipt } = await this.schedule(); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + + expectEvent(receipt, 'OperationScheduled', { + operationId: this.opId, + caller: user, + target: this.call[0], + data: this.call[1], + }); + + // if can call directly, delay should be 0. Otherwise, the delay should be applied + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal( + timestamp.add(directSuccess ? web3.utils.toBN(0) : delay), + ); + + // wait + await time.increase(delay ?? 0); + + // execute without wait + if (directSuccess || indirectSuccess) { + const { receipt, tx } = await this.relay(); + await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); + if (delay && fnGroup !== GROUPS.PUBLIC) { + expectEvent(receipt, 'OperationExecuted', { operationId: this.opId }); + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); + } + } else { + await expectRevertCustomError(this.relay(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); + } + } else { + await expectRevertCustomError(this.schedule(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); + } + }); + + it('Calling directly: schedule and call', async function () { + if (directSuccess || indirectSuccess) { + const { receipt } = await this.schedule(); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + + expectEvent(receipt, 'OperationScheduled', { + operationId: this.opId, + caller: user, + target: this.call[0], + data: this.call[1], + }); + + // if can call directly, delay should be 0. Otherwise, the delay should be applied + const schedule = timestamp.add(directSuccess ? web3.utils.toBN(0) : delay); + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); + + // execute without wait + const promise = this.direct(); + if (directSuccess) { + expectEvent(await promise, 'CalledRestricted', { caller: user }); + + // schedule is not reset + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); + } else if (indirectSuccess) { + await expectRevertCustomError(promise, 'AccessManagerNotReady', [this.opId]); + } else { + await expectRevertCustomError(promise, 'AccessManagerUnauthorizedCall', [user, ...this.call]); + } + } else { + await expectRevertCustomError(this.schedule(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); + } + }); + + it('Calling directly: schedule wait and call', async function () { + if (directSuccess || indirectSuccess) { + const { receipt } = await this.schedule(); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + + expectEvent(receipt, 'OperationScheduled', { + operationId: this.opId, + caller: user, + target: this.call[0], + data: this.call[1], + }); + + // if can call directly, delay should be 0. Otherwise, the delay should be applied + const schedule = timestamp.add(directSuccess ? web3.utils.toBN(0) : delay); + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); + + // wait + await time.increase(delay ?? 0); + + // execute without wait + const promise = await this.direct(); + if (directSuccess) { + expectEvent(await promise, 'CalledRestricted', { caller: user }); + + // schedule is not reset + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); + } else if (indirectSuccess) { + const receipt = await promise; + + expectEvent(receipt, 'CalledRestricted', { caller: user }); + await expectEvent.inTransaction(receipt.tx, this.manager, 'OperationExecuted', { + operationId: this.opId, + }); + + // schedule is reset + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); + } else { + await expectRevertCustomError(this.direct(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); + } + } else { + await expectRevertCustomError(this.schedule(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); + } + }); + + it('Scheduling for later than needed'); // TODO + }); + } }); - it('single selector', async function () { - const receipt = await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { - from: admin, + describe('Indirect execution corner-cases', async function () { + beforeEach(async function () { + await this.manager.$_setContractFamily(this.target.address, familyId); + await this.manager.$_setFamilyFunctionGroup(familyId, this.callData, GROUPS.SOME); + await this.manager.$_grantGroup(GROUPS.SOME, user, 0, executeDelay); }); - expectEvent(receipt, 'GroupAllowed', { - target: this.managed.address, - selector: selector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4, - group, - allowed: false, + it('Checking canCall when caller is the manager depend on the _relayIdentifier', async function () { + const result = await this.manager.canCall(this.manager.address, this.target.address, '0x00000000'); + expect(result[0]).to.be.false; + expect(result[1]).to.be.bignumber.equal('0'); }); - const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); - expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([]); + it('Cannot execute earlier', async function () { + const { receipt } = await this.schedule(); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - const otherAllowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, otherSelector); - expect(groupUtils.decodeBitmap(otherAllowedGroups)).to.deep.equal([group]); + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(timestamp.add(executeDelay)); - await expectRevert(this.managed.restrictedFunction({ from: groupMember }), 'AccessManaged: authority rejected'); + // we need to set the clock 2 seconds before the value, because the increaseTo "consumes" the timestamp + // and the next transaction will be one after that (see check below) + await time.increaseTo(timestamp.add(executeDelay).subn(2)); - const otherRestricted = await this.managed.otherRestrictedFunction({ from: groupMember }); - expectEvent(otherRestricted, 'RestrictedRan'); - }); + // too early + await expectRevertCustomError(this.relay(), 'AccessManagerNotReady', [this.opId]); - it('multiple selectors', async function () { - const receipt = await this.manager.setFunctionAllowedGroup( - this.managed.address, - [selector, otherSelector], - group, - false, - { from: admin }, - ); + // the revert happened one second before the execution delay expired + expect(await time.latest()).to.be.bignumber.equal(timestamp.add(executeDelay).subn(1)); + + // ok + await this.relay(); - expectEvent(receipt, 'GroupAllowed', { - target: this.managed.address, - selector: selector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4 - group, - allowed: false, + // the success happened when the delay was reached (earliest possible) + expect(await time.latest()).to.be.bignumber.equal(timestamp.add(executeDelay)); }); - expectEvent(receipt, 'GroupAllowed', { - target: this.managed.address, - selector: otherSelector.padEnd(66, '0'), // there seems to be a bug in decoding the indexed bytes4 - group, - allowed: false, + it('Cannot schedule an already scheduled operation', async function () { + const { receipt } = await this.schedule(); + expectEvent(receipt, 'OperationScheduled', { + operationId: this.opId, + caller: user, + target: this.call[0], + data: this.call[1], + }); + + await expectRevertCustomError(this.schedule(), 'AccessManagerAlreadyScheduled', [this.opId]); }); - const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); - expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([]); + it('Cannot cancel an operation that is not scheduled', async function () { + await expectRevertCustomError(this.cancel(), 'AccessManagerNotScheduled', [this.opId]); + }); - const otherAllowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, otherSelector); - expect(groupUtils.decodeBitmap(otherAllowedGroups)).to.deep.equal([]); + it('Cannot cancel an operation that is not already relayed', async function () { + await this.schedule(); + await time.increase(executeDelay); + await this.relay(); - await expectRevert(this.managed.restrictedFunction({ from: groupMember }), 'AccessManaged: authority rejected'); - await expectRevert( - this.managed.otherRestrictedFunction({ from: groupMember }), - 'AccessManaged: authority rejected', - ); - }); + await expectRevertCustomError(this.cancel(), 'AccessManagerNotScheduled', [this.opId]); + }); - it('works on open target', async function () { - await this.manager.setContractModeOpen(this.managed.address, { from: admin }); - await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { from: admin }); - }); + it('Scheduler can cancel', async function () { + await this.schedule(); + + expect(await this.manager.getSchedule(this.opId)).to.not.be.bignumber.equal('0'); - it('works on closed target', async function () { - await this.manager.setContractModeClosed(this.managed.address, { from: admin }); - await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, false, { from: admin }); + expectEvent(await this.cancel({ from: manager }), 'OperationCanceled', { operationId: this.opId }); + + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); + }); + + it('Guardian can cancel', async function () { + await this.schedule(); + + expect(await this.manager.getSchedule(this.opId)).to.not.be.bignumber.equal('0'); + + expectEvent(await this.cancel({ from: manager }), 'OperationCanceled', { operationId: this.opId }); + + expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); + }); + + it('Cancel is restricted', async function () { + await this.schedule(); + + expect(await this.manager.getSchedule(this.opId)).to.not.be.bignumber.equal('0'); + + await expectRevertCustomError(this.cancel({ from: other }), 'AccessManagerCannotCancel', [ + other, + user, + ...this.call, + ]); + + expect(await this.manager.getSchedule(this.opId)).to.not.be.bignumber.equal('0'); + }); + + it('Can re-schedule after execution', async function () { + await this.schedule(); + await time.increase(executeDelay); + await this.relay(); + + // reschedule + const { receipt } = await this.schedule(); + expectEvent(receipt, 'OperationScheduled', { + operationId: this.opId, + caller: user, + target: this.call[0], + data: this.call[1], + }); + }); + + it('Can re-schedule after cancel', async function () { + await this.schedule(); + await this.cancel(); + + // reschedule + const { receipt } = await this.schedule(); + expectEvent(receipt, 'OperationScheduled', { + operationId: this.opId, + caller: user, + target: this.call[0], + data: this.call[1], + }); + }); }); }); - describe('modes', function () { - const group = '1'; - const selector = web3.eth.abi.encodeFunctionSignature('restrictedFunction()'); + describe('with Ownable target contract', function () { + const groupId = web3.utils.toBN(1); + + beforeEach(async function () { + this.ownable = await Ownable.new(this.manager.address); - beforeEach('deploying managed contract', async function () { - this.managed = await AccessManaged.new(this.manager.address); - await this.manager.createGroup('1', 'a group', { from: admin }); - await this.manager.setFunctionAllowedGroup(this.managed.address, [selector], group, true, { from: admin }); + // add user to group + await this.manager.$_grantGroup(groupId, user, 0, 0); }); - it('custom mode is default', async function () { - expect(await this.manager.getContractMode(this.managed.address)).to.bignumber.equal(AccessMode.Custom); - const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); - expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([group]); + it('initial state', async function () { + expect(await this.ownable.owner()).to.be.equal(this.manager.address); }); - it('open mode', async function () { - const receipt = await this.manager.setContractModeOpen(this.managed.address, { from: admin }); - expectEvent(receipt, 'AccessModeUpdated', { - target: this.managed.address, - mode: AccessMode.Open, + describe('Contract is closed', function () { + beforeEach(async function () { + await this.manager.$_setContractClosed(this.ownable.address, true); }); - expect(await this.manager.getContractMode(this.managed.address)).to.bignumber.equal(AccessMode.Open); - const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); - expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([PUBLIC_GROUP]); - }); - it('closed mode', async function () { - const receipt = await this.manager.setContractModeClosed(this.managed.address, { from: admin }); - expectEvent(receipt, 'AccessModeUpdated', { - target: this.managed.address, - mode: AccessMode.Closed, + it('directly call: reverts', async function () { + await expectRevertCustomError(this.ownable.$_checkOwner({ from: user }), 'OwnableUnauthorizedAccount', [user]); }); - expect(await this.manager.getContractMode(this.managed.address)).to.bignumber.equal(AccessMode.Closed); - const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); - expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([]); - }); - it('mode cycle', async function () { - await this.manager.setContractModeOpen(this.managed.address, { from: admin }); - await this.manager.setContractModeClosed(this.managed.address, { from: admin }); - await this.manager.setContractModeCustom(this.managed.address, { from: admin }); - expect(await this.manager.getContractMode(this.managed.address)).to.bignumber.equal(AccessMode.Custom); - const allowedGroups = await this.manager.getFunctionAllowedGroups(this.managed.address, selector); - expect(groupUtils.decodeBitmap(allowedGroups)).to.deep.equal([group]); + it('relayed call (with group): reverts', async function () { + await expectRevertCustomError( + this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: user }), + 'AccessManagerUnauthorizedCall', + [user, this.ownable.address, selector('$_checkOwner()')], + ); + }); + + it('relayed call (without group): reverts', async function () { + await expectRevertCustomError( + this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: other }), + 'AccessManagerUnauthorizedCall', + [other, this.ownable.address, selector('$_checkOwner()')], + ); + }); }); - it('non-admin cannot change mode', async function () { - await expectRevert(this.manager.setContractModeCustom(this.managed.address), 'missing role'); - await expectRevert(this.manager.setContractModeOpen(this.managed.address), 'missing role'); - await expectRevert(this.manager.setContractModeClosed(this.managed.address), 'missing role'); + describe('Contract is managed', function () { + beforeEach('add contract to family', async function () { + await this.manager.$_setContractFamily(this.ownable.address, familyId); + }); + + describe('function is open to specific group', function () { + beforeEach(async function () { + await this.manager.$_setFamilyFunctionGroup(familyId, selector('$_checkOwner()'), groupId); + }); + + it('directly call: reverts', async function () { + await expectRevertCustomError(this.ownable.$_checkOwner({ from: user }), 'OwnableUnauthorizedAccount', [ + user, + ]); + }); + + it('relayed call (with group): success', async function () { + await this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: user }); + }); + + it('relayed call (without group): reverts', async function () { + await expectRevertCustomError( + this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: other }), + 'AccessManagerUnauthorizedCall', + [other, this.ownable.address, selector('$_checkOwner()')], + ); + }); + }); + + describe('function is open to public group', function () { + beforeEach(async function () { + await this.manager.$_setFamilyFunctionGroup(familyId, selector('$_checkOwner()'), GROUPS.PUBLIC); + }); + + it('directly call: reverts', async function () { + await expectRevertCustomError(this.ownable.$_checkOwner({ from: user }), 'OwnableUnauthorizedAccount', [ + user, + ]); + }); + + it('relayed call (with group): success', async function () { + await this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: user }); + }); + + it('relayed call (without group): success', async function () { + await this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: other }); + }); + }); }); }); - describe('transfering authority', function () { - beforeEach('deploying managed contract', async function () { - this.managed = await AccessManaged.new(this.manager.address); + describe('authority update', function () { + beforeEach(async function () { + this.newManager = await AccessManager.new(admin); + this.target = await AccessManagedTarget.new(this.manager.address); }); - it('admin can transfer authority', async function () { - await this.manager.transferContractAuthority(this.managed.address, otherAuthority, { from: admin }); - expect(await this.managed.authority()).to.equal(otherAuthority); + it('admin can change authority', async function () { + expect(await this.target.authority()).to.be.equal(this.manager.address); + + const { tx } = await this.manager.updateAuthority(this.target.address, this.newManager.address, { from: admin }); + await expectEvent.inTransaction(tx, this.target, 'AuthorityUpdated', { authority: this.newManager.address }); + + expect(await this.target.authority()).to.be.equal(this.newManager.address); }); - it('non-admin cannot transfer authority', async function () { - await expectRevert( - this.manager.transferContractAuthority(this.managed.address, otherAuthority, { from: nonAdmin }), - 'missing role', + it('cannot set an address without code as the authority', async function () { + await expectRevertCustomError( + this.manager.updateAuthority(this.target.address, user, { from: admin }), + 'AccessManagedInvalidAuthority', + [user], ); }); - }); - describe('adapter', function () { - const group = '0'; + it('updateAuthority is restricted on manager', async function () { + await expectRevertCustomError( + this.manager.updateAuthority(this.target.address, this.newManager.address, { from: other }), + 'AccessManagerUnauthorizedAccount', + [other, GROUPS.ADMIN], + ); + }); - beforeEach('deploying adapter', async function () { - await this.manager.createGroup(group, 'a group', { from: admin }); - await this.manager.grantGroup(group, user1, { from: admin }); - this.adapter = await AccessManagerAdapter.new(this.manager.address); + it('setAuthority is restricted on AccessManaged', async function () { + await expectRevertCustomError( + this.target.setAuthority(this.newManager.address, { from: admin }), + 'AccessManagedUnauthorized', + [admin], + ); }); + }); - it('with ownable', async function () { - const target = await Ownable.new(); - await target.transferOwnership(this.adapter.address); + // TODO: test all admin functions + describe('family delays', function () { + const otherFamilyId = '2'; + const delay = '1000'; - const { data } = await target.$_checkOwner.request(); - const selector = data.slice(0, 10); + beforeEach('set contract family', async function () { + this.target = await AccessManagedTarget.new(this.manager.address); + await this.manager.setContractFamily(this.target.address, familyId, { from: admin }); - await expectRevert( - this.adapter.relay(target.address, data, { from: user1 }), - 'AccessManagerAdapter: caller not allowed', - ); + this.call = () => this.manager.setContractFamily(this.target.address, otherFamilyId, { from: admin }); + this.data = this.manager.contract.methods.setContractFamily(this.target.address, otherFamilyId).encodeABI(); + }); - await this.manager.setFunctionAllowedGroup(target.address, [selector], group, true, { from: admin }); - await this.adapter.relay(target.address, data, { from: user1 }); + it('without delay: succeeds', async function () { + await this.call(); }); - it('with access control', async function () { - const ROLE = web3.utils.soliditySha3('ROLE'); - const target = await AccessControl.new(); - await target.$_grantRole(ROLE, this.adapter.address); + // TODO: here we need to check increase and decrease. + // - Increasing should have immediate effect + // - Decreassing should take time. + describe('with delay', function () { + beforeEach('set admin delay', async function () { + this.tx = await this.manager.setFamilyAdminDelay(familyId, delay, { from: admin }); + this.opId = web3.utils.keccak256( + web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], [admin, this.manager.address, this.data]), + ); + }); + + it('emits event and sets delay', async function () { + const from = await clockFromReceipt.timestamp(this.tx.receipt).then(web3.utils.toBN); + expectEvent(this.tx.receipt, 'FamilyAdminDelayUpdated', { familyId, delay, from }); - const { data } = await target.$_checkRole.request(ROLE); - const selector = data.slice(0, 10); + expect(await this.manager.getFamilyAdminDelay(familyId)).to.be.bignumber.equal(delay); + }); - await expectRevert( - this.adapter.relay(target.address, data, { from: user1 }), - 'AccessManagerAdapter: caller not allowed', - ); + it('without prior scheduling: reverts', async function () { + await expectRevertCustomError(this.call(), 'AccessManagerNotScheduled', [this.opId]); + }); - await this.manager.setFunctionAllowedGroup(target.address, [selector], group, true, { from: admin }); - await this.adapter.relay(target.address, data, { from: user1 }); - }); + describe('with prior scheduling', async function () { + beforeEach('schedule', async function () { + await this.manager.schedule(this.manager.address, this.data, 0, { from: admin }); + }); + + it('without delay: reverts', async function () { + await expectRevertCustomError(this.call(), 'AccessManagerNotReady', [this.opId]); + }); - it('transfer authority', async function () { - await this.manager.transferContractAuthority(this.adapter.address, otherAuthority, { from: admin }); - expect(await this.adapter.authority()).to.equal(otherAuthority); + it('with delay: succeeds', async function () { + await time.increase(delay); + await this.call(); + }); + }); }); }); }); diff --git a/test/helpers/enums.js b/test/helpers/enums.js index 95857ec09..6280e0f31 100644 --- a/test/helpers/enums.js +++ b/test/helpers/enums.js @@ -7,6 +7,5 @@ module.exports = { ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), VoteType: Enum('Against', 'For', 'Abstain'), Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), - AccessMode: Enum('Custom', 'Closed', 'Open'), OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), }; diff --git a/test/helpers/methods.js b/test/helpers/methods.js new file mode 100644 index 000000000..cb30d8727 --- /dev/null +++ b/test/helpers/methods.js @@ -0,0 +1,5 @@ +const { soliditySha3 } = require('web3-utils'); + +module.exports = { + selector: signature => soliditySha3(signature).substring(0, 10), +}; From 736091afc4c5f1cb88c4f766e713bbbbb70fa83e Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 8 Aug 2023 01:21:46 +0200 Subject: [PATCH 004/167] Refactor restriction mechanism in AccessManager to enable enforce executionDelay (#4518) Co-authored-by: Francisco Giordano --- .github/workflows/checks.yml | 2 + contracts/access/manager/AccessManager.sol | 160 ++++++++++++--------- 2 files changed, 93 insertions(+), 69 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 122d39564..41719b142 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -42,6 +42,7 @@ jobs: run: npm run test:generation - name: Compare gas costs uses: ./.github/actions/gas-compare + if: github.base_ref == 'master' with: token: ${{ github.token }} @@ -63,6 +64,7 @@ jobs: run: npm run test:inheritance - name: Check storage layout uses: ./.github/actions/storage-layout + if: github.base_ref == 'master' with: token: ${{ github.token }} diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index d3b65b0e2..6ecad9921 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -7,6 +7,7 @@ import {IAccessManaged} from "./IAccessManaged.sol"; import {Address} from "../../utils/Address.sol"; import {Context} from "../../utils/Context.sol"; import {Multicall} from "../../utils/Multicall.sol"; +import {Math} from "../../utils/math/Math.sol"; import {Time} from "../../utils/types/Time.sol"; /** @@ -95,20 +96,11 @@ contract AccessManager is Context, Multicall, IAccessManager { bytes32 private _relayIdentifier; /** - * @dev Check that the caller has a given permission level (`groupId`). Note that this does NOT consider execution - * delays that may be associated to that group. + * @dev Check that the caller is authorized to perform the operation, following the restrictions encoded in + * {_getAdminRestrictions}. */ - modifier onlyGroup(uint64 groupId) { - _checkGroup(groupId); - _; - } - - /** - * @dev Check that the caller is an admin and that the top-level function currently executing has been scheduled - * sufficiently ahead of time, if necessary according to admin delays. - */ - modifier withFamilyDelay(uint64 familyId) { - _checkFamilyDelay(familyId); + modifier onlyAuthorized() { + _checkAuthorized(); _; } @@ -145,7 +137,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } else { uint64 groupId = getFamilyFunctionGroup(familyId, selector); (bool inGroup, uint32 currentDelay) = hasGroup(groupId, caller); - return (inGroup && currentDelay == 0, currentDelay); + return inGroup ? (currentDelay == 0, currentDelay) : (false, 0); } } @@ -250,7 +242,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {GroupLabel} event. */ - function labelGroup(uint64 groupId, string calldata label) public virtual onlyGroup(ADMIN_GROUP) { + function labelGroup(uint64 groupId, string calldata label) public virtual onlyAuthorized { if (groupId == ADMIN_GROUP || groupId == PUBLIC_GROUP) { revert AccessManagerLockedGroup(groupId); } @@ -270,11 +262,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {GroupGranted} event */ - function grantGroup( - uint64 groupId, - address account, - uint32 executionDelay - ) public virtual onlyGroup(getGroupAdmin(groupId)) { + function grantGroup(uint64 groupId, address account, uint32 executionDelay) public virtual onlyAuthorized { _grantGroup(groupId, account, getGroupGrantDelay(groupId), executionDelay); } @@ -287,7 +275,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {GroupRevoked} event */ - function revokeGroup(uint64 groupId, address account) public virtual onlyGroup(getGroupAdmin(groupId)) { + function revokeGroup(uint64 groupId, address account) public virtual onlyAuthorized { _revokeGroup(groupId, account); } @@ -319,11 +307,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {GroupExecutionDelayUpdated} event */ - function setExecuteDelay( - uint64 groupId, - address account, - uint32 newDelay - ) public virtual onlyGroup(getGroupAdmin(groupId)) { + function setExecuteDelay(uint64 groupId, address account, uint32 newDelay) public virtual onlyAuthorized { _setExecuteDelay(groupId, account, newDelay); } @@ -336,7 +320,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {GroupAdminChanged} event */ - function setGroupAdmin(uint64 groupId, uint64 admin) public virtual onlyGroup(ADMIN_GROUP) { + function setGroupAdmin(uint64 groupId, uint64 admin) public virtual onlyAuthorized { _setGroupAdmin(groupId, admin); } @@ -349,7 +333,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {GroupGuardianChanged} event */ - function setGroupGuardian(uint64 groupId, uint64 guardian) public virtual onlyGroup(ADMIN_GROUP) { + function setGroupGuardian(uint64 groupId, uint64 guardian) public virtual onlyAuthorized { _setGroupGuardian(groupId, guardian); } @@ -362,7 +346,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {GroupGrantDelayChanged} event */ - function setGrantDelay(uint64 groupId, uint32 newDelay) public virtual onlyGroup(ADMIN_GROUP) { + function setGrantDelay(uint64 groupId, uint32 newDelay) public virtual onlyAuthorized { _setGrantDelay(groupId, newDelay); } @@ -482,7 +466,7 @@ contract AccessManager is Context, Multicall, IAccessManager { uint64 familyId, bytes4[] calldata selectors, uint64 groupId - ) public virtual onlyGroup(ADMIN_GROUP) withFamilyDelay(familyId) { + ) public virtual onlyAuthorized { for (uint256 i = 0; i < selectors.length; ++i) { _setFamilyFunctionGroup(familyId, selectors[i], groupId); } @@ -508,7 +492,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {FunctionAllowedGroupUpdated} event per selector */ - function setFamilyAdminDelay(uint64 familyId, uint32 newDelay) public virtual onlyGroup(ADMIN_GROUP) { + function setFamilyAdminDelay(uint64 familyId, uint32 newDelay) public virtual onlyAuthorized { _setFamilyAdminDelay(familyId, newDelay); } @@ -544,10 +528,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {ContractFamilyUpdated} event. */ - function setContractFamily( - address target, - uint64 familyId - ) public virtual onlyGroup(ADMIN_GROUP) withFamilyDelay(_getContractFamilyId(target)) { + function setContractFamily(address target, uint64 familyId) public virtual onlyAuthorized { _setContractFamily(target, familyId); } @@ -570,7 +551,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {ContractClosed} event. */ - function setContractClosed(address target, bool closed) public virtual onlyGroup(ADMIN_GROUP) { + function setContractClosed(address target, bool closed) public virtual onlyAuthorized { _setContractClosed(target, closed); } @@ -636,6 +617,9 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits an {OperationExecuted} event only if the call was scheduled and delayed. */ + // Reentrancy is not an issue because permissions are checked on msg.sender. Additionally, + // _consumeScheduledOp guarantees a scheduled operation is only executed once. + // slither-disable-next-line reentrancy-no-eth function relay(address target, bytes calldata data) public payable virtual { address caller = _msgSender(); @@ -716,11 +700,9 @@ contract AccessManager is Context, Multicall, IAccessManager { revert AccessManagerNotScheduled(operationId); } else if (caller != msgsender) { // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required group. + (uint64 familyId, ) = getContractFamily(target); (bool isAdmin, ) = hasGroup(ADMIN_GROUP, msgsender); - (bool isGuardian, ) = hasGroup( - getGroupGuardian(getFamilyFunctionGroup(_getContractFamilyId(target), selector)), - msgsender - ); + (bool isGuardian, ) = hasGroup(getGroupGuardian(getFamilyFunctionGroup(familyId, selector)), msgsender); if (!isAdmin && !isGuardian) { revert AccessManagerCannotCancel(msgsender, caller, target, selector); } @@ -753,56 +735,96 @@ contract AccessManager is Context, Multicall, IAccessManager { * * - the caller must be a global admin */ - function updateAuthority( - address target, - address newAuthority - ) public virtual onlyGroup(ADMIN_GROUP) withFamilyDelay(_getContractFamilyId(target)) { + function updateAuthority(address target, address newAuthority) public virtual onlyAuthorized { IAccessManaged(target).setAuthority(newAuthority); } - // =================================================== HELPERS ==================================================== - function _checkGroup(uint64 groupId) internal view virtual { - address account = _msgSender(); - (bool inGroup, ) = hasGroup(groupId, account); - if (!inGroup) { - revert AccessManagerUnauthorizedAccount(account, groupId); - } - } - - function _checkFamilyDelay(uint64 familyId) internal virtual { - uint32 delay = getFamilyAdminDelay(familyId); - if (delay > 0) { - _consumeScheduledOp(_hashOperation(_msgSender(), address(this), _msgData())); + // ================================================= ADMIN LOGIC ================================================== + /** + * @dev Check if the current call is authorized according to admin logic. + */ + function _checkAuthorized() private { + address caller = _msgSender(); + (bool allowed, uint32 delay) = _canCallExtended(caller, address(this), _msgData()); + if (!allowed) { + if (delay == 0) { + (, uint64 requiredGroup, ) = _getAdminRestrictions(_msgData()); + revert AccessManagerUnauthorizedAccount(caller, requiredGroup); + } else { + _consumeScheduledOp(_hashOperation(caller, address(this), _msgData())); + } } } - function _getContractFamilyId(address target) private view returns (uint64 familyId) { - (familyId, ) = getContractFamily(target); - } - - function _parseFamilyOperation(bytes calldata data) private view returns (bool, uint64) { + /** + * @dev Get the admin restrictions of a given function call based on the function and arguments involved. + */ + function _getAdminRestrictions(bytes calldata data) private view returns (bool, uint64, uint32) { bytes4 selector = bytes4(data); + if (selector == this.updateAuthority.selector || selector == this.setContractFamily.selector) { - return (true, _getContractFamilyId(abi.decode(data[0x04:0x24], (address)))); + // First argument is a target. Restricted to ADMIN with the family delay corresponding to the target's family + address target = abi.decode(data[0x04:0x24], (address)); + (uint64 familyId, ) = getContractFamily(target); + uint32 delay = getFamilyAdminDelay(familyId); + return (true, ADMIN_GROUP, delay); } else if (selector == this.setFamilyFunctionGroup.selector) { - return (true, abi.decode(data[0x04:0x24], (uint64))); + // First argument is a family. Restricted to ADMIN with the family delay corresponding to the family + uint64 familyId = abi.decode(data[0x04:0x24], (uint64)); + uint32 delay = getFamilyAdminDelay(familyId); + return (true, ADMIN_GROUP, delay); + } else if ( + selector == this.labelGroup.selector || + selector == this.setGroupAdmin.selector || + selector == this.setGroupGuardian.selector || + selector == this.setGrantDelay.selector || + selector == this.setFamilyAdminDelay.selector || + selector == this.setContractClosed.selector + ) { + // Restricted to ADMIN with no delay beside any execution delay the caller may have + return (true, ADMIN_GROUP, 0); + } else if ( + selector == this.grantGroup.selector || + selector == this.revokeGroup.selector || + selector == this.setExecuteDelay.selector + ) { + // First argument is a groupId. Restricted to that group's admin with no delay beside any execution delay the caller may have. + uint64 groupId = abi.decode(data[0x04:0x24], (uint64)); + uint64 groupAdminId = getGroupAdmin(groupId); + return (true, groupAdminId, 0); } else { - return (false, 0); + return (false, 0, 0); } } + // =================================================== HELPERS ==================================================== + /** + * @dev An extended version of {canCall} for internal use that considers restrictions for admin functions. + */ function _canCallExtended(address caller, address target, bytes calldata data) private view returns (bool, uint32) { if (target == address(this)) { - (bool isFamilyOperation, uint64 familyId) = _parseFamilyOperation(data); - uint32 delay = getFamilyAdminDelay(familyId); - (bool inGroup, ) = hasGroup(ADMIN_GROUP, caller); - return (inGroup && isFamilyOperation && delay == 0, delay); + (bool enabled, uint64 groupId, uint32 operationDelay) = _getAdminRestrictions(data); + if (!enabled) { + return (false, 0); + } + + (bool inGroup, uint32 executionDelay) = hasGroup(groupId, caller); + if (!inGroup) { + return (false, 0); + } + + // downcast is safe because both options are uint32 + uint32 delay = uint32(Math.max(operationDelay, executionDelay)); + return (delay == 0, delay); } else { bytes4 selector = bytes4(data); return canCall(caller, target, selector); } } + /** + * @dev Returns true if a schedule timepoint is past its expiration deadline. + */ function _isExpired(uint48 timepoint) private view returns (bool) { return timepoint + expiration() <= Time.timestamp(); } From b5a3e693e7eeca8d5f608460fd8beeee8e332b03 Mon Sep 17 00:00:00 2001 From: Francisco Date: Tue, 8 Aug 2023 03:22:59 -0300 Subject: [PATCH 005/167] Improve AccessManager (#4520) --- contracts/access/manager/AccessManaged.sol | 3 +- contracts/access/manager/AccessManager.sol | 219 ++++++++++---------- contracts/access/manager/IAccessManager.sol | 30 ++- contracts/utils/types/Time.sol | 18 +- test/access/manager/AccessManager.test.js | 176 ++++++---------- 5 files changed, 203 insertions(+), 243 deletions(-) diff --git a/contracts/access/manager/AccessManaged.sol b/contracts/access/manager/AccessManaged.sol index 087aee4c4..59265017a 100644 --- a/contracts/access/manager/AccessManaged.sol +++ b/contracts/access/manager/AccessManaged.sol @@ -90,7 +90,8 @@ abstract contract AccessManaged is Context, IAccessManaged { } /** - * @dev Transfers control to a new authority. Internal function with no access restriction. + * @dev Transfers control to a new authority. Internal function with no access restriction. Allows bypassing the + * permissions set by the current authority. */ function _setAuthority(address newAuthority) internal virtual { _authority = newAuthority; diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 6ecad9921..929a6736b 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -52,7 +52,7 @@ contract AccessManager is Context, Multicall, IAccessManager { using Time for *; struct AccessMode { - uint64 familyId; + uint64 classId; bool closed; } @@ -78,7 +78,7 @@ contract AccessManager is Context, Multicall, IAccessManager { Time.Delay delay; // delay for granting } - struct Family { + struct Class { mapping(bytes4 selector => uint64 groupId) allowedGroups; Time.Delay adminDelay; } @@ -87,7 +87,7 @@ contract AccessManager is Context, Multicall, IAccessManager { uint64 public constant PUBLIC_GROUP = type(uint64).max; // 2**64-1 mapping(address target => AccessMode mode) private _contractMode; - mapping(uint64 familyId => Family) private _families; + mapping(uint64 classId => Class) private _classes; mapping(uint64 groupId => Group) private _groups; mapping(bytes32 operationId => uint48 schedule) private _schedules; mapping(bytes4 selector => Time.Delay delay) private _adminDelays; @@ -127,7 +127,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * to identify the indirect workflow, and will consider call that require a delay to be forbidden. */ function canCall(address caller, address target, bytes4 selector) public view virtual returns (bool, uint32) { - (uint64 familyId, bool closed) = getContractFamily(target); + (uint64 classId, bool closed) = getContractClass(target); if (closed) { return (false, 0); } else if (caller == address(this)) { @@ -135,7 +135,7 @@ contract AccessManager is Context, Multicall, IAccessManager { // verify that the call "identifier", which is set during the relay call, is correct. return (_relayIdentifier == _hashRelayIdentifier(target, selector), 0); } else { - uint64 groupId = getFamilyFunctionGroup(familyId, selector); + uint64 groupId = getClassFunctionGroup(classId, selector); (bool inGroup, uint32 currentDelay) = hasGroup(groupId, caller); return inGroup ? (currentDelay == 0, currentDelay) : (false, 0); } @@ -158,21 +158,21 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Get the mode under which a contract is operating. */ - function getContractFamily(address target) public view virtual returns (uint64, bool) { + function getContractClass(address target) public view virtual returns (uint64, bool) { AccessMode storage mode = _contractMode[target]; - return (mode.familyId, mode.closed); + return (mode.classId, mode.closed); } /** * @dev Get the permission level (group) required to call a function. This only applies for contract that are * operating under the `Custom` mode. */ - function getFamilyFunctionGroup(uint64 familyId, bytes4 selector) public view virtual returns (uint64) { - return _families[familyId].allowedGroups[selector]; + function getClassFunctionGroup(uint64 classId, bytes4 selector) public view virtual returns (uint64) { + return _classes[classId].allowedGroups[selector]; } - function getFamilyAdminDelay(uint64 familyId) public view virtual returns (uint32) { - return _families[familyId].adminDelay.get(); + function getClassAdminDelay(uint64 classId) public view virtual returns (uint32) { + return _classes[classId].adminDelay.get(); } /** @@ -250,11 +250,17 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Add `account` to `groupId`. This gives him the authorization to call any function that is restricted to - * this group. An optional execution delay (in seconds) can be set. If that delay is non 0, the user is required - * to schedule any operation that is restricted to members this group. The user will only be able to execute the - * operation after the delay expires. During this delay, admin and guardians can cancel the operation (see - * {cancel}). + * @dev Add `account` to `groupId`, or change its execution delay. + * + * This gives the account the authorization to call any function that is restricted to this group. An optional + * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation + * that is restricted to members this group. The user will only be able to execute the operation after the delay has + * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}). + * + * If the account has already been granted this group, the execution delay will be updated. This update is not + * immediate and follows the delay rules. For example, If a user currently has a delay of 3 hours, and this is + * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any + * operation executed in the 3 hours that follows this update was indeed scheduled before this update. * * Requirements: * @@ -267,7 +273,8 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Remove an account for a group, with immediate effect. + * @dev Remove an account for a group, with immediate effect. If the sender is not in the group, this call has no + * effect. * * Requirements: * @@ -280,7 +287,8 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Renounce group permissions for the calling account, with immediate effect. + * @dev Renounce group permissions for the calling account, with immediate effect. If the sender is not in + * the group, this call has no effect. * * Requirements: * @@ -295,22 +303,6 @@ contract AccessManager is Context, Multicall, IAccessManager { _revokeGroup(groupId, callerConfirmation); } - /** - * @dev Set the execution delay for a given account in a given group. This update is not immediate and follows the - * delay rules. For example, If a user currently has a delay of 3 hours, and this is called to reduce that delay to - * 1 hour, the new delay will take some time to take effect, enforcing that any operation executed in the 3 hours - * that follows this update was indeed scheduled before this update. - * - * Requirements: - * - * - the caller must be in the group's admins - * - * Emits a {GroupExecutionDelayUpdated} event - */ - function setExecuteDelay(uint64 groupId, address account, uint32 newDelay) public virtual onlyAuthorized { - _setExecuteDelay(groupId, account, newDelay); - } - /** * @dev Change admin group for a given group. * @@ -351,57 +343,57 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Internal version of {grantGroup} without access control. + * @dev Internal version of {grantGroup} without access control. Returns true if the group was newly granted. * * Emits a {GroupGranted} event */ - function _grantGroup(uint64 groupId, address account, uint32 grantDelay, uint32 executionDelay) internal virtual { + function _grantGroup( + uint64 groupId, + address account, + uint32 grantDelay, + uint32 executionDelay + ) internal virtual returns (bool) { if (groupId == PUBLIC_GROUP) { revert AccessManagerLockedGroup(groupId); - } else if (_groups[groupId].members[account].since != 0) { - revert AccessManagerAccountAlreadyInGroup(groupId, account); } - uint48 since = Time.timestamp() + grantDelay; - _groups[groupId].members[account] = Access({since: since, delay: executionDelay.toDelay()}); + bool inGroup = _groups[groupId].members[account].since != 0; + + uint48 since; + + if (inGroup) { + (_groups[groupId].members[account].delay, since) = _groups[groupId].members[account].delay.withUpdate( + executionDelay, + minSetback() + ); + } else { + since = Time.timestamp() + grantDelay; + _groups[groupId].members[account] = Access({since: since, delay: executionDelay.toDelay()}); + } - emit GroupGranted(groupId, account, since, executionDelay); + emit GroupGranted(groupId, account, executionDelay, since); + return !inGroup; } /** * @dev Internal version of {revokeGroup} without access control. This logic is also used by {renounceGroup}. + * Returns true if the group was previously granted. * * Emits a {GroupRevoked} event */ - function _revokeGroup(uint64 groupId, address account) internal virtual { + function _revokeGroup(uint64 groupId, address account) internal virtual returns (bool) { if (groupId == PUBLIC_GROUP) { revert AccessManagerLockedGroup(groupId); - } else if (_groups[groupId].members[account].since == 0) { - revert AccessManagerAccountNotInGroup(groupId, account); } - delete _groups[groupId].members[account]; - - emit GroupRevoked(groupId, account); - } - - /** - * @dev Internal version of {setExecuteDelay} without access control. - * - * Emits a {GroupExecutionDelayUpdated} event. - */ - function _setExecuteDelay(uint64 groupId, address account, uint32 newDuration) internal virtual { - if (groupId == PUBLIC_GROUP || groupId == ADMIN_GROUP) { - revert AccessManagerLockedGroup(groupId); - } else if (_groups[groupId].members[account].since == 0) { - revert AccessManagerAccountNotInGroup(groupId, account); + if (_groups[groupId].members[account].since == 0) { + return false; } - Time.Delay updated = _groups[groupId].members[account].delay.withUpdate(newDuration, minSetback()); - _groups[groupId].members[account].delay = updated; + delete _groups[groupId].members[account]; - (, , uint48 effect) = updated.unpack(); - emit GroupExecutionDelayUpdated(groupId, account, newDuration, effect); + emit GroupRevoked(groupId, account); + return true; } /** @@ -444,10 +436,9 @@ contract AccessManager is Context, Multicall, IAccessManager { revert AccessManagerLockedGroup(groupId); } - Time.Delay updated = _groups[groupId].delay.withUpdate(newDelay, minSetback()); + (Time.Delay updated, uint48 effect) = _groups[groupId].delay.withUpdate(newDelay, minSetback()); _groups[groupId].delay = updated; - (, , uint48 effect) = updated.unpack(); emit GroupGrantDelayChanged(groupId, newDelay, effect); } @@ -462,13 +453,13 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {FunctionAllowedGroupUpdated} event per selector */ - function setFamilyFunctionGroup( - uint64 familyId, + function setClassFunctionGroup( + uint64 classId, bytes4[] calldata selectors, uint64 groupId ) public virtual onlyAuthorized { for (uint256 i = 0; i < selectors.length; ++i) { - _setFamilyFunctionGroup(familyId, selectors[i], groupId); + _setClassFunctionGroup(classId, selectors[i], groupId); } } @@ -477,14 +468,14 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {FunctionAllowedGroupUpdated} event */ - function _setFamilyFunctionGroup(uint64 familyId, bytes4 selector, uint64 groupId) internal virtual { - _checkValidFamilyId(familyId); - _families[familyId].allowedGroups[selector] = groupId; - emit FamilyFunctionGroupUpdated(familyId, selector, groupId); + function _setClassFunctionGroup(uint64 classId, bytes4 selector, uint64 groupId) internal virtual { + _checkValidClassId(classId); + _classes[classId].allowedGroups[selector] = groupId; + emit ClassFunctionGroupUpdated(classId, selector, groupId); } /** - * @dev Set the delay for management operations on a given family of contract. + * @dev Set the delay for management operations on a given class of contract. * * Requirements: * @@ -492,54 +483,57 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {FunctionAllowedGroupUpdated} event per selector */ - function setFamilyAdminDelay(uint64 familyId, uint32 newDelay) public virtual onlyAuthorized { - _setFamilyAdminDelay(familyId, newDelay); + function setClassAdminDelay(uint64 classId, uint32 newDelay) public virtual onlyAuthorized { + _setClassAdminDelay(classId, newDelay); } /** - * @dev Internal version of {setFamilyAdminDelay} without access control. + * @dev Internal version of {setClassAdminDelay} without access control. * - * Emits a {FamilyAdminDelayUpdated} event + * Emits a {ClassAdminDelayUpdated} event */ - function _setFamilyAdminDelay(uint64 familyId, uint32 newDelay) internal virtual { - _checkValidFamilyId(familyId); - Time.Delay updated = _families[familyId].adminDelay.withUpdate(newDelay, minSetback()); - _families[familyId].adminDelay = updated; - (, , uint48 effect) = updated.unpack(); - emit FamilyAdminDelayUpdated(familyId, newDelay, effect); + function _setClassAdminDelay(uint64 classId, uint32 newDelay) internal virtual { + _checkValidClassId(classId); + (Time.Delay updated, uint48 effect) = _classes[classId].adminDelay.withUpdate(newDelay, minSetback()); + _classes[classId].adminDelay = updated; + emit ClassAdminDelayUpdated(classId, newDelay, effect); } /** - * @dev Reverts if `familyId` is 0. + * @dev Reverts if `classId` is 0. This is the default class id given to contracts and it should not have any + * configurations. */ - function _checkValidFamilyId(uint64 familyId) private pure { - if (familyId == 0) { - revert AccessManagerInvalidFamily(familyId); + function _checkValidClassId(uint64 classId) private pure { + if (classId == 0) { + revert AccessManagerInvalidClass(classId); } } // =============================================== MODE MANAGEMENT ================================================ /** - * @dev Set the family of a contract. + * @dev Set the class of a contract. * * Requirements: * * - the caller must be a global admin * - * Emits a {ContractFamilyUpdated} event. + * Emits a {ContractClassUpdated} event. */ - function setContractFamily(address target, uint64 familyId) public virtual onlyAuthorized { - _setContractFamily(target, familyId); + function setContractClass(address target, uint64 classId) public virtual onlyAuthorized { + _setContractClass(target, classId); } /** - * @dev Set the family of a contract. This is an internal setter with no access restrictions. + * @dev Set the class of a contract. This is an internal setter with no access restrictions. * - * Emits a {ContractFamilyUpdated} event. + * Emits a {ContractClassUpdated} event. */ - function _setContractFamily(address target, uint64 familyId) internal virtual { - _contractMode[target].familyId = familyId; - emit ContractFamilyUpdated(target, familyId); + function _setContractClass(address target, uint64 classId) internal virtual { + if (target == address(this)) { + revert AccessManagerLockedAccount(target); + } + _contractMode[target].classId = classId; + emit ContractClassUpdated(target, classId); } /** @@ -561,6 +555,9 @@ contract AccessManager is Context, Multicall, IAccessManager { * Emits a {ContractClosed} event. */ function _setContractClosed(address target, bool closed) internal virtual { + if (target == address(this)) { + revert AccessManagerLockedAccount(target); + } _contractMode[target].closed = closed; emit ContractClosed(target, closed); } @@ -700,9 +697,9 @@ contract AccessManager is Context, Multicall, IAccessManager { revert AccessManagerNotScheduled(operationId); } else if (caller != msgsender) { // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required group. - (uint64 familyId, ) = getContractFamily(target); + (uint64 classId, ) = getContractClass(target); (bool isAdmin, ) = hasGroup(ADMIN_GROUP, msgsender); - (bool isGuardian, ) = hasGroup(getGroupGuardian(getFamilyFunctionGroup(familyId, selector)), msgsender); + (bool isGuardian, ) = hasGroup(getGroupGuardian(getClassFunctionGroup(classId, selector)), msgsender); if (!isAdmin && !isGuardian) { revert AccessManagerCannotCancel(msgsender, caller, target, selector); } @@ -762,32 +759,30 @@ contract AccessManager is Context, Multicall, IAccessManager { function _getAdminRestrictions(bytes calldata data) private view returns (bool, uint64, uint32) { bytes4 selector = bytes4(data); - if (selector == this.updateAuthority.selector || selector == this.setContractFamily.selector) { - // First argument is a target. Restricted to ADMIN with the family delay corresponding to the target's family + if (data.length < 4) { + return (false, 0, 0); + } else if (selector == this.updateAuthority.selector || selector == this.setContractClass.selector) { + // First argument is a target. Restricted to ADMIN with the class delay corresponding to the target's class address target = abi.decode(data[0x04:0x24], (address)); - (uint64 familyId, ) = getContractFamily(target); - uint32 delay = getFamilyAdminDelay(familyId); + (uint64 classId, ) = getContractClass(target); + uint32 delay = getClassAdminDelay(classId); return (true, ADMIN_GROUP, delay); - } else if (selector == this.setFamilyFunctionGroup.selector) { - // First argument is a family. Restricted to ADMIN with the family delay corresponding to the family - uint64 familyId = abi.decode(data[0x04:0x24], (uint64)); - uint32 delay = getFamilyAdminDelay(familyId); + } else if (selector == this.setClassFunctionGroup.selector) { + // First argument is a class. Restricted to ADMIN with the class delay corresponding to the class + uint64 classId = abi.decode(data[0x04:0x24], (uint64)); + uint32 delay = getClassAdminDelay(classId); return (true, ADMIN_GROUP, delay); } else if ( selector == this.labelGroup.selector || selector == this.setGroupAdmin.selector || selector == this.setGroupGuardian.selector || selector == this.setGrantDelay.selector || - selector == this.setFamilyAdminDelay.selector || + selector == this.setClassAdminDelay.selector || selector == this.setContractClosed.selector ) { // Restricted to ADMIN with no delay beside any execution delay the caller may have return (true, ADMIN_GROUP, 0); - } else if ( - selector == this.grantGroup.selector || - selector == this.revokeGroup.selector || - selector == this.setExecuteDelay.selector - ) { + } else if (selector == this.grantGroup.selector || selector == this.revokeGroup.selector) { // First argument is a groupId. Restricted to that group's admin with no delay beside any execution delay the caller may have. uint64 groupId = abi.decode(data[0x04:0x24], (uint64)); uint64 groupAdminId = getGroupAdmin(groupId); diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index 659b4c5cd..312b4da74 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -22,27 +22,25 @@ interface IAccessManager { event OperationCanceled(bytes32 indexed operationId, uint48 schedule); event GroupLabel(uint64 indexed groupId, string label); - event GroupGranted(uint64 indexed groupId, address indexed account, uint48 since, uint32 delay); + event GroupGranted(uint64 indexed groupId, address indexed account, uint32 delay, uint48 since); event GroupRevoked(uint64 indexed groupId, address indexed account); - event GroupExecutionDelayUpdated(uint64 indexed groupId, address indexed account, uint32 delay, uint48 from); event GroupAdminChanged(uint64 indexed groupId, uint64 indexed admin); event GroupGuardianChanged(uint64 indexed groupId, uint64 indexed guardian); - event GroupGrantDelayChanged(uint64 indexed groupId, uint32 delay, uint48 from); + event GroupGrantDelayChanged(uint64 indexed groupId, uint32 delay, uint48 since); - event ContractFamilyUpdated(address indexed target, uint64 indexed familyId); + event ContractClassUpdated(address indexed target, uint64 indexed classId); event ContractClosed(address indexed target, bool closed); - event FamilyFunctionGroupUpdated(uint64 indexed familyId, bytes4 selector, uint64 indexed groupId); - event FamilyAdminDelayUpdated(uint64 indexed familyId, uint32 delay, uint48 from); + event ClassFunctionGroupUpdated(uint64 indexed classId, bytes4 selector, uint64 indexed groupId); + event ClassAdminDelayUpdated(uint64 indexed classId, uint32 delay, uint48 since); error AccessManagerAlreadyScheduled(bytes32 operationId); error AccessManagerNotScheduled(bytes32 operationId); error AccessManagerNotReady(bytes32 operationId); error AccessManagerExpired(bytes32 operationId); + error AccessManagerLockedAccount(address account); error AccessManagerLockedGroup(uint64 groupId); - error AccessManagerInvalidFamily(uint64 familyId); - error AccessManagerAccountAlreadyInGroup(uint64 groupId, address account); - error AccessManagerAccountNotInGroup(uint64 groupId, address account); + error AccessManagerInvalidClass(uint64 classId); error AccessManagerBadConfirmation(); error AccessManagerUnauthorizedAccount(address msgsender, uint64 groupId); error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector); @@ -56,11 +54,11 @@ interface IAccessManager { function expiration() external returns (uint32); - function getContractFamily(address target) external view returns (uint64 familyId, bool closed); + function getContractClass(address target) external view returns (uint64 classId, bool closed); - function getFamilyFunctionGroup(uint64 familyId, bytes4 selector) external view returns (uint64); + function getClassFunctionGroup(uint64 classId, bytes4 selector) external view returns (uint64); - function getFamilyAdminDelay(uint64 familyId) external view returns (uint32); + function getClassAdminDelay(uint64 classId) external view returns (uint32); function getGroupAdmin(uint64 groupId) external view returns (uint64); @@ -80,19 +78,17 @@ interface IAccessManager { function renounceGroup(uint64 groupId, address callerConfirmation) external; - function setExecuteDelay(uint64 groupId, address account, uint32 newDelay) external; - function setGroupAdmin(uint64 groupId, uint64 admin) external; function setGroupGuardian(uint64 groupId, uint64 guardian) external; function setGrantDelay(uint64 groupId, uint32 newDelay) external; - function setFamilyFunctionGroup(uint64 familyId, bytes4[] calldata selectors, uint64 groupId) external; + function setClassFunctionGroup(uint64 classId, bytes4[] calldata selectors, uint64 groupId) external; - function setFamilyAdminDelay(uint64 familyId, uint32 newDelay) external; + function setClassAdminDelay(uint64 classId, uint32 newDelay) external; - function setContractFamily(address target, uint64 familyId) external; + function setContractClass(address target, uint64 classId) external; function setContractClosed(address target, bool closed) external; diff --git a/contracts/utils/types/Time.sol b/contracts/utils/types/Time.sol index 07a3a68b1..9f640ec33 100644 --- a/contracts/utils/types/Time.sol +++ b/contracts/utils/types/Time.sol @@ -53,9 +53,13 @@ library Time { * * * The `Delay` type is 128 bits long, and packs the following: - * [000:031] uint32 for the current value (duration) - * [032:063] uint32 for the pending value (duration) - * [064:111] uint48 for the effect date (timepoint) + * + * ``` + * | [uint48]: effect date (timepoint) + * | | [uint32]: current value (duration) + * ↓ ↓ ↓ [uint32]: pending value (duration) + * 0xAAAAAAAAAAAABBBBBBBBCCCCCCCC + * ``` * * NOTE: The {get} and {update} function operate using timestamps. Block number based delays should use the * {getAt} and {withUpdateAt} variants of these functions. @@ -110,12 +114,14 @@ library Time { /** * @dev Update a Delay object so that it takes a new duration after at a timepoint that is automatically computed - * to enforce the old delay at the moment of the update. + * to enforce the old delay at the moment of the update. Returns the updated Delay object and the timestamp when the + * new delay becomes effective. */ - function withUpdate(Delay self, uint32 newValue, uint32 minSetback) internal view returns (Delay) { + function withUpdate(Delay self, uint32 newValue, uint32 minSetback) internal view returns (Delay, uint48) { uint32 value = self.get(); uint32 setback = uint32(Math.max(minSetback, value > newValue ? value - newValue : 0)); - return self.withUpdateAt(newValue, timestamp() + setback); + uint48 effect = timestamp() + setback; + return (self.withUpdateAt(newValue, effect), effect); } /** diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 2d2f61d3e..538120e00 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -18,7 +18,7 @@ const GROUPS = { }; Object.assign(GROUPS, Object.fromEntries(Object.entries(GROUPS).map(([key, value]) => [value, key]))); -const familyId = web3.utils.toBN(1); +const classId = web3.utils.toBN(1); const executeDelay = web3.utils.toBN(10); const grantDelay = web3.utils.toBN(10); @@ -138,24 +138,15 @@ contract('AccessManager', function (accounts) { it('to a user that is already in the group', async function () { expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); - - await expectRevertCustomError( - this.manager.grantGroup(GROUPS.SOME, member, 0, { from: manager }), - 'AccessManagerAccountAlreadyInGroup', - [GROUPS.SOME, member], - ); + await this.manager.grantGroup(GROUPS.SOME, member, 0, { from: manager }); + expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); }); it('to a user that is scheduled for joining the group', async function () { await this.manager.$_grantGroup(GROUPS.SOME, user, 10, 0); // grant delay 10 - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - - await expectRevertCustomError( - this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }), - 'AccessManagerAccountAlreadyInGroup', - [GROUPS.SOME, user], - ); + await this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }); + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); }); it('grant group is restricted', async function () { @@ -212,6 +203,14 @@ contract('AccessManager', function (accounts) { expect(access[3]).to.be.bignumber.equal('0'); // effect }); }); + + it('cannot grant public group', async function () { + await expectRevertCustomError( + this.manager.$_grantGroup(GROUPS.PUBLIC, other, 0, executeDelay, { from: manager }), + 'AccessManagerLockedGroup', + [GROUPS.PUBLIC], + ); + }); }); describe('revoke group', function () { @@ -249,12 +248,8 @@ contract('AccessManager', function (accounts) { it('from a user that is not in the group', async function () { expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - - await expectRevertCustomError( - this.manager.revokeGroup(GROUPS.SOME, user, { from: manager }), - 'AccessManagerAccountNotInGroup', - [GROUPS.SOME, user], - ); + await this.manager.revokeGroup(GROUPS.SOME, user, { from: manager }); + expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); }); it('revoke group is restricted', async function () { @@ -300,11 +295,7 @@ contract('AccessManager', function (accounts) { }); it('for a user that is not in the group', async function () { - await expectRevertCustomError( - this.manager.renounceGroup(GROUPS.SOME, user, { from: user }), - 'AccessManagerAccountNotInGroup', - [GROUPS.SOME, user], - ); + await this.manager.renounceGroup(GROUPS.SOME, user, { from: user }); }); it('bad user confirmation', async function () { @@ -355,27 +346,27 @@ contract('AccessManager', function (accounts) { }); describe('change execution delay', function () { - it('increassing the delay has immediate effect', async function () { + it('increasing the delay has immediate effect', async function () { const oldDelay = web3.utils.toBN(10); const newDelay = web3.utils.toBN(100); - await this.manager.$_setExecuteDelay(GROUPS.SOME, member, oldDelay); + await this.manager.$_grantGroup(GROUPS.SOME, member, 0, oldDelay); const accessBefore = await this.manager.getAccess(GROUPS.SOME, member); expect(accessBefore[1]).to.be.bignumber.equal(oldDelay); // currentDelay expect(accessBefore[2]).to.be.bignumber.equal('0'); // pendingDelay expect(accessBefore[3]).to.be.bignumber.equal('0'); // effect - const { receipt } = await this.manager.setExecuteDelay(GROUPS.SOME, member, newDelay, { + const { receipt } = await this.manager.grantGroup(GROUPS.SOME, member, newDelay, { from: manager, }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'GroupExecutionDelayUpdated', { + expectEvent(receipt, 'GroupGranted', { groupId: GROUPS.SOME, account: member, + since: timestamp, delay: newDelay, - from: timestamp, }); // immediate effect @@ -385,27 +376,27 @@ contract('AccessManager', function (accounts) { expect(accessAfter[3]).to.be.bignumber.equal('0'); // effect }); - it('decreassing the delay takes time', async function () { + it('decreasing the delay takes time', async function () { const oldDelay = web3.utils.toBN(100); const newDelay = web3.utils.toBN(10); - await this.manager.$_setExecuteDelay(GROUPS.SOME, member, oldDelay); + await this.manager.$_grantGroup(GROUPS.SOME, member, 0, oldDelay); const accessBefore = await this.manager.getAccess(GROUPS.SOME, member); expect(accessBefore[1]).to.be.bignumber.equal(oldDelay); // currentDelay expect(accessBefore[2]).to.be.bignumber.equal('0'); // pendingDelay expect(accessBefore[3]).to.be.bignumber.equal('0'); // effect - const { receipt } = await this.manager.setExecuteDelay(GROUPS.SOME, member, newDelay, { + const { receipt } = await this.manager.grantGroup(GROUPS.SOME, member, newDelay, { from: manager, }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'GroupExecutionDelayUpdated', { + expectEvent(receipt, 'GroupGranted', { groupId: GROUPS.SOME, account: member, + since: timestamp.add(oldDelay).sub(newDelay), delay: newDelay, - from: timestamp.add(oldDelay).sub(newDelay), }); // delayed effect @@ -415,49 +406,23 @@ contract('AccessManager', function (accounts) { expect(accessAfter[3]).to.be.bignumber.equal(timestamp.add(oldDelay).sub(newDelay)); // effect }); - it('cannot set the delay of a non member', async function () { - await expectRevertCustomError( - this.manager.setExecuteDelay(GROUPS.SOME, other, executeDelay, { from: manager }), - 'AccessManagerAccountNotInGroup', - [GROUPS.SOME, other], - ); - }); - - it('cannot set the delay of public and admin groups', async function () { - for (const group of [GROUPS.PUBLIC, GROUPS.ADMIN]) { - await expectRevertCustomError( - this.manager.$_setExecuteDelay(group, other, executeDelay, { from: manager }), - 'AccessManagerLockedGroup', - [group], - ); - } - }); - it('can set a user execution delay during the grant delay', async function () { await this.manager.$_grantGroup(GROUPS.SOME, other, 10, 0); - const { receipt } = await this.manager.setExecuteDelay(GROUPS.SOME, other, executeDelay, { from: manager }); + const { receipt } = await this.manager.grantGroup(GROUPS.SOME, other, executeDelay, { from: manager }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'GroupExecutionDelayUpdated', { + expectEvent(receipt, 'GroupGranted', { groupId: GROUPS.SOME, account: other, + since: timestamp, delay: executeDelay, - from: timestamp, }); }); - - it('changing the execution delay is restricted', async function () { - await expectRevertCustomError( - this.manager.setExecuteDelay(GROUPS.SOME, member, executeDelay, { from: other }), - 'AccessManagerUnauthorizedAccount', - [GROUPS.SOME_ADMIN, other], - ); - }); }); describe('change grant delay', function () { - it('increassing the delay has immediate effect', async function () { + it('increasing the delay has immediate effect', async function () { const oldDelay = web3.utils.toBN(10); const newDelay = web3.utils.toBN(100); await this.manager.$_setGrantDelay(GROUPS.SOME, oldDelay); @@ -467,12 +432,12 @@ contract('AccessManager', function (accounts) { const { receipt } = await this.manager.setGrantDelay(GROUPS.SOME, newDelay, { from: admin }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'GroupGrantDelayChanged', { groupId: GROUPS.SOME, delay: newDelay, from: timestamp }); + expectEvent(receipt, 'GroupGrantDelayChanged', { groupId: GROUPS.SOME, delay: newDelay, since: timestamp }); expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(newDelay); }); - it('increassing the delay has delay effect', async function () { + it('increasing the delay has delay effect', async function () { const oldDelay = web3.utils.toBN(100); const newDelay = web3.utils.toBN(10); await this.manager.$_setGrantDelay(GROUPS.SOME, oldDelay); @@ -485,7 +450,7 @@ contract('AccessManager', function (accounts) { expectEvent(receipt, 'GroupGrantDelayChanged', { groupId: GROUPS.SOME, delay: newDelay, - from: timestamp.add(oldDelay).sub(newDelay), + since: timestamp.add(oldDelay).sub(newDelay), }); expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); @@ -525,36 +490,33 @@ contract('AccessManager', function (accounts) { it('admin can set function group', async function () { for (const sig of sigs) { - expect(await this.manager.getFamilyFunctionGroup(familyId, sig)).to.be.bignumber.equal(GROUPS.ADMIN); + expect(await this.manager.getClassFunctionGroup(classId, sig)).to.be.bignumber.equal(GROUPS.ADMIN); } - const { receipt: receipt1 } = await this.manager.setFamilyFunctionGroup(familyId, sigs, GROUPS.SOME, { + const { receipt: receipt1 } = await this.manager.setClassFunctionGroup(classId, sigs, GROUPS.SOME, { from: admin, }); for (const sig of sigs) { - expectEvent(receipt1, 'FamilyFunctionGroupUpdated', { - familyId, + expectEvent(receipt1, 'ClassFunctionGroupUpdated', { + classId, selector: sig, groupId: GROUPS.SOME, }); - expect(await this.manager.getFamilyFunctionGroup(familyId, sig)).to.be.bignumber.equal(GROUPS.SOME); + expect(await this.manager.getClassFunctionGroup(classId, sig)).to.be.bignumber.equal(GROUPS.SOME); } - const { receipt: receipt2 } = await this.manager.setFamilyFunctionGroup( - familyId, - [sigs[1]], - GROUPS.SOME_ADMIN, - { from: admin }, - ); - expectEvent(receipt2, 'FamilyFunctionGroupUpdated', { - familyId, + const { receipt: receipt2 } = await this.manager.setClassFunctionGroup(classId, [sigs[1]], GROUPS.SOME_ADMIN, { + from: admin, + }); + expectEvent(receipt2, 'ClassFunctionGroupUpdated', { + classId, selector: sigs[1], groupId: GROUPS.SOME_ADMIN, }); for (const sig of sigs) { - expect(await this.manager.getFamilyFunctionGroup(familyId, sig)).to.be.bignumber.equal( + expect(await this.manager.getClassFunctionGroup(classId, sig)).to.be.bignumber.equal( sig == sigs[1] ? GROUPS.SOME_ADMIN : GROUPS.SOME, ); } @@ -562,7 +524,7 @@ contract('AccessManager', function (accounts) { it('non-admin cannot set function group', async function () { await expectRevertCustomError( - this.manager.setFamilyFunctionGroup(familyId, sigs, GROUPS.SOME, { from: other }), + this.manager.setClassFunctionGroup(classId, sigs, GROUPS.SOME, { from: other }), 'AccessManagerUnauthorizedAccount', [other, GROUPS.ADMIN], ); @@ -600,25 +562,25 @@ contract('AccessManager', function (accounts) { // setup await Promise.all([ this.manager.$_setContractClosed(this.target.address, closed), - this.manager.$_setContractFamily(this.target.address, familyId), - fnGroup && this.manager.$_setFamilyFunctionGroup(familyId, selector('fnRestricted()'), fnGroup), - fnGroup && this.manager.$_setFamilyFunctionGroup(familyId, selector('fnUnrestricted()'), fnGroup), + this.manager.$_setContractClass(this.target.address, classId), + fnGroup && this.manager.$_setClassFunctionGroup(classId, selector('fnRestricted()'), fnGroup), + fnGroup && this.manager.$_setClassFunctionGroup(classId, selector('fnUnrestricted()'), fnGroup), ...callerGroups .filter(groupId => groupId != GROUPS.PUBLIC) .map(groupId => this.manager.$_grantGroup(groupId, user, 0, delay ?? 0)), ]); // post setup checks - const result = await this.manager.getContractFamily(this.target.address); - expect(result[0]).to.be.bignumber.equal(familyId); + const result = await this.manager.getContractClass(this.target.address); + expect(result[0]).to.be.bignumber.equal(classId); expect(result[1]).to.be.equal(closed); if (fnGroup) { expect( - await this.manager.getFamilyFunctionGroup(familyId, selector('fnRestricted()')), + await this.manager.getClassFunctionGroup(classId, selector('fnRestricted()')), ).to.be.bignumber.equal(fnGroup); expect( - await this.manager.getFamilyFunctionGroup(familyId, selector('fnUnrestricted()')), + await this.manager.getClassFunctionGroup(classId, selector('fnUnrestricted()')), ).to.be.bignumber.equal(fnGroup); } @@ -832,8 +794,8 @@ contract('AccessManager', function (accounts) { describe('Indirect execution corner-cases', async function () { beforeEach(async function () { - await this.manager.$_setContractFamily(this.target.address, familyId); - await this.manager.$_setFamilyFunctionGroup(familyId, this.callData, GROUPS.SOME); + await this.manager.$_setContractClass(this.target.address, classId); + await this.manager.$_setClassFunctionGroup(classId, this.callData, GROUPS.SOME); await this.manager.$_grantGroup(GROUPS.SOME, user, 0, executeDelay); }); @@ -996,13 +958,13 @@ contract('AccessManager', function (accounts) { }); describe('Contract is managed', function () { - beforeEach('add contract to family', async function () { - await this.manager.$_setContractFamily(this.ownable.address, familyId); + beforeEach('add contract to class', async function () { + await this.manager.$_setContractClass(this.ownable.address, classId); }); describe('function is open to specific group', function () { beforeEach(async function () { - await this.manager.$_setFamilyFunctionGroup(familyId, selector('$_checkOwner()'), groupId); + await this.manager.$_setClassFunctionGroup(classId, selector('$_checkOwner()'), groupId); }); it('directly call: reverts', async function () { @@ -1026,7 +988,7 @@ contract('AccessManager', function (accounts) { describe('function is open to public group', function () { beforeEach(async function () { - await this.manager.$_setFamilyFunctionGroup(familyId, selector('$_checkOwner()'), GROUPS.PUBLIC); + await this.manager.$_setClassFunctionGroup(classId, selector('$_checkOwner()'), GROUPS.PUBLIC); }); it('directly call: reverts', async function () { @@ -1087,16 +1049,16 @@ contract('AccessManager', function (accounts) { }); // TODO: test all admin functions - describe('family delays', function () { - const otherFamilyId = '2'; + describe('class delays', function () { + const otherClassId = '2'; const delay = '1000'; - beforeEach('set contract family', async function () { + beforeEach('set contract class', async function () { this.target = await AccessManagedTarget.new(this.manager.address); - await this.manager.setContractFamily(this.target.address, familyId, { from: admin }); + await this.manager.setContractClass(this.target.address, classId, { from: admin }); - this.call = () => this.manager.setContractFamily(this.target.address, otherFamilyId, { from: admin }); - this.data = this.manager.contract.methods.setContractFamily(this.target.address, otherFamilyId).encodeABI(); + this.call = () => this.manager.setContractClass(this.target.address, otherClassId, { from: admin }); + this.data = this.manager.contract.methods.setContractClass(this.target.address, otherClassId).encodeABI(); }); it('without delay: succeeds', async function () { @@ -1105,20 +1067,20 @@ contract('AccessManager', function (accounts) { // TODO: here we need to check increase and decrease. // - Increasing should have immediate effect - // - Decreassing should take time. + // - Decreasing should take time. describe('with delay', function () { beforeEach('set admin delay', async function () { - this.tx = await this.manager.setFamilyAdminDelay(familyId, delay, { from: admin }); + this.tx = await this.manager.setClassAdminDelay(classId, delay, { from: admin }); this.opId = web3.utils.keccak256( web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], [admin, this.manager.address, this.data]), ); }); it('emits event and sets delay', async function () { - const from = await clockFromReceipt.timestamp(this.tx.receipt).then(web3.utils.toBN); - expectEvent(this.tx.receipt, 'FamilyAdminDelayUpdated', { familyId, delay, from }); + const since = await clockFromReceipt.timestamp(this.tx.receipt).then(web3.utils.toBN); + expectEvent(this.tx.receipt, 'ClassAdminDelayUpdated', { classId, delay, since }); - expect(await this.manager.getFamilyAdminDelay(familyId)).to.be.bignumber.equal(delay); + expect(await this.manager.getClassAdminDelay(classId)).to.be.bignumber.equal(delay); }); it('without prior scheduling: reverts', async function () { From adbb8c9d27e77452bc2253397908d3d044808e62 Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 16 Aug 2023 02:33:49 -0300 Subject: [PATCH 006/167] Add Governor module connecting with AccessManager (#4523) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto García --- .changeset/violet-melons-press.md | 5 + contracts/access/manager/AccessManager.sol | 87 ++++-- contracts/access/manager/IAccessManager.sol | 21 +- contracts/governance/Governor.sol | 47 +-- contracts/governance/IGovernor.sol | 6 + .../extensions/GovernorTimelockAccess.sol | 282 ++++++++++++++++++ .../extensions/GovernorTimelockCompound.sol | 7 + .../extensions/GovernorTimelockControl.sol | 7 + .../mocks/docs/governance/MyGovernor.sol | 6 + .../mocks/governance/GovernorStorageMock.sol | 6 + .../governance/GovernorTimelockAccessMock.sol | 70 +++++ .../GovernorTimelockCompoundMock.sol | 6 + .../GovernorTimelockControlMock.sol | 6 + test/governance/Governor.test.js | 6 + .../extensions/GovernorTimelockAccess.test.js | 246 +++++++++++++++ .../GovernorTimelockCompound.test.js | 14 +- .../GovernorTimelockControl.test.js | 18 +- .../SupportsInterface.behavior.js | 1 + 18 files changed, 788 insertions(+), 53 deletions(-) create mode 100644 .changeset/violet-melons-press.md create mode 100644 contracts/governance/extensions/GovernorTimelockAccess.sol create mode 100644 contracts/mocks/governance/GovernorTimelockAccessMock.sol create mode 100644 test/governance/extensions/GovernorTimelockAccess.test.js diff --git a/.changeset/violet-melons-press.md b/.changeset/violet-melons-press.md new file mode 100644 index 000000000..18fd70b58 --- /dev/null +++ b/.changeset/violet-melons-press.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': major +--- + +`GovernorTimelockAccess`: Added a module to connect a governor with an instance of `AccessManager`, allowing the governor to make calls that are delay-restricted by the manager using the normal `queue` workflow. diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 929a6736b..01ac7664e 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -89,7 +89,14 @@ contract AccessManager is Context, Multicall, IAccessManager { mapping(address target => AccessMode mode) private _contractMode; mapping(uint64 classId => Class) private _classes; mapping(uint64 groupId => Group) private _groups; - mapping(bytes32 operationId => uint48 schedule) private _schedules; + + struct Schedule { + uint48 timepoint; + uint32 nonce; + } + + mapping(bytes32 operationId => Schedule) private _schedules; + mapping(bytes4 selector => Time.Delay delay) private _adminDelays; // This should be transcient storage when supported by the EVM. @@ -568,18 +575,34 @@ contract AccessManager is Context, Multicall, IAccessManager { * operation is not yet scheduled, has expired, was executed, or was canceled. */ function getSchedule(bytes32 id) public view virtual returns (uint48) { - uint48 timepoint = _schedules[id]; + uint48 timepoint = _schedules[id].timepoint; return _isExpired(timepoint) ? 0 : timepoint; } + /** + * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never + * been scheduled. + */ + function getNonce(bytes32 id) public view virtual returns (uint32) { + return _schedules[id].nonce; + } + /** * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays * required for the caller. The special value zero will automatically set the earliest possible time. * + * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when + * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this + * scheduled operation from other occurrences of the same `operationId` in invocations of {relay} and {cancel}. + * * Emits a {OperationScheduled} event. */ - function schedule(address target, bytes calldata data, uint48 when) public virtual returns (bytes32) { + function schedule( + address target, + bytes calldata data, + uint48 when + ) public virtual returns (bytes32 operationId, uint32 nonce) { address caller = _msgSender(); // Fetch restriction to that apply to the caller on the targeted function @@ -587,37 +610,48 @@ contract AccessManager is Context, Multicall, IAccessManager { uint48 minWhen = Time.timestamp() + setback; + if (when == 0) { + when = minWhen; + } + // If caller is not authorised, revert - if (!allowed && (setback == 0 || when.isSetAndPast(minWhen - 1))) { + if (!allowed && (setback == 0 || when < minWhen)) { revert AccessManagerUnauthorizedCall(caller, target, bytes4(data[0:4])); } // If caller is authorised, schedule operation - bytes32 operationId = _hashOperation(caller, target, data); + operationId = _hashOperation(caller, target, data); // Cannot reschedule unless the operation has expired - uint48 prevTimepoint = _schedules[operationId]; + uint48 prevTimepoint = _schedules[operationId].timepoint; if (prevTimepoint != 0 && !_isExpired(prevTimepoint)) { revert AccessManagerAlreadyScheduled(operationId); } - uint48 timepoint = when == 0 ? minWhen : when; - _schedules[operationId] = timepoint; - emit OperationScheduled(operationId, timepoint, caller, target, data); + unchecked { + // It's not feasible to overflow the nonce in less than 1000 years + nonce = _schedules[operationId].nonce + 1; + } + _schedules[operationId].timepoint = when; + _schedules[operationId].nonce = nonce; + emit OperationScheduled(operationId, nonce, when, caller, target, data); - return operationId; + // Using named return values because otherwise we get stack too deep } /** * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the * execution delay is 0. * + * Returns the nonce that identifies the previously scheduled operation that is relayed, or 0 if the + * operation wasn't previously scheduled (if the caller doesn't have an execution delay). + * * Emits an {OperationExecuted} event only if the call was scheduled and delayed. */ // Reentrancy is not an issue because permissions are checked on msg.sender. Additionally, // _consumeScheduledOp guarantees a scheduled operation is only executed once. // slither-disable-next-line reentrancy-no-eth - function relay(address target, bytes calldata data) public payable virtual { + function relay(address target, bytes calldata data) public payable virtual returns (uint32) { address caller = _msgSender(); // Fetch restriction to that apply to the caller on the targeted function @@ -630,9 +664,10 @@ contract AccessManager is Context, Multicall, IAccessManager { // If caller is authorised, check operation was scheduled early enough bytes32 operationId = _hashOperation(caller, target, data); + uint32 nonce; if (setback != 0) { - _consumeScheduledOp(operationId); + nonce = _consumeScheduledOp(operationId); } // Mark the target and selector as authorised @@ -644,6 +679,8 @@ contract AccessManager is Context, Multicall, IAccessManager { // Reset relay identifier _relayIdentifier = relayIdentifierBefore; + + return nonce; } /** @@ -663,9 +700,12 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Internal variant of {consumeScheduledOp} that operates on bytes32 operationId. + * + * Returns the nonce of the scheduled operation that is consumed. */ - function _consumeScheduledOp(bytes32 operationId) internal virtual { - uint48 timepoint = _schedules[operationId]; + function _consumeScheduledOp(bytes32 operationId) internal virtual returns (uint32) { + uint48 timepoint = _schedules[operationId].timepoint; + uint32 nonce = _schedules[operationId].nonce; if (timepoint == 0) { revert AccessManagerNotScheduled(operationId); @@ -676,11 +716,14 @@ contract AccessManager is Context, Multicall, IAccessManager { } delete _schedules[operationId]; - emit OperationExecuted(operationId, timepoint); + emit OperationExecuted(operationId, nonce); + + return nonce; } /** - * @dev Cancel a scheduled (delayed) operation. + * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled + * operation that is cancelled. * * Requirements: * @@ -688,12 +731,12 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {OperationCanceled} event. */ - function cancel(address caller, address target, bytes calldata data) public virtual { + function cancel(address caller, address target, bytes calldata data) public virtual returns (uint32) { address msgsender = _msgSender(); bytes4 selector = bytes4(data[0:4]); bytes32 operationId = _hashOperation(caller, target, data); - if (_schedules[operationId] == 0) { + if (_schedules[operationId].timepoint == 0) { revert AccessManagerNotScheduled(operationId); } else if (caller != msgsender) { // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required group. @@ -705,9 +748,11 @@ contract AccessManager is Context, Multicall, IAccessManager { } } - uint48 timepoint = _schedules[operationId]; - delete _schedules[operationId]; - emit OperationCanceled(operationId, timepoint); + delete _schedules[operationId].timepoint; + uint32 nonce = _schedules[operationId].nonce; + emit OperationCanceled(operationId, nonce); + + return nonce; } /** diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index 312b4da74..f4a7da362 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -9,17 +9,24 @@ interface IAccessManager { /** * @dev A delayed operation was scheduled. */ - event OperationScheduled(bytes32 indexed operationId, uint48 schedule, address caller, address target, bytes data); + event OperationScheduled( + bytes32 indexed operationId, + uint32 indexed nonce, + uint48 schedule, + address caller, + address target, + bytes data + ); /** * @dev A scheduled operation was executed. */ - event OperationExecuted(bytes32 indexed operationId, uint48 schedule); + event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce); /** * @dev A scheduled operation was canceled. */ - event OperationCanceled(bytes32 indexed operationId, uint48 schedule); + event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce); event GroupLabel(uint64 indexed groupId, string label); event GroupGranted(uint64 indexed groupId, address indexed account, uint32 delay, uint48 since); @@ -94,11 +101,13 @@ interface IAccessManager { function getSchedule(bytes32 id) external returns (uint48); - function schedule(address target, bytes calldata data, uint48 when) external returns (bytes32); + function getNonce(bytes32 id) external returns (uint32); + + function schedule(address target, bytes calldata data, uint48 when) external returns (bytes32, uint32); - function relay(address target, bytes calldata data) external payable; + function relay(address target, bytes calldata data) external payable returns (uint32); - function cancel(address caller, address target, bytes calldata data) external; + function cancel(address caller, address target, bytes calldata data) external returns (uint32); function consumeScheduledOp(address caller, bytes calldata data) external; diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index b149129dd..f5b22b4b3 100644 --- a/contracts/governance/Governor.sol +++ b/contracts/governance/Governor.sol @@ -98,14 +98,14 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 /** * @dev See {IGovernor-name}. */ - function name() public view virtual override returns (string memory) { + function name() public view virtual returns (string memory) { return _name; } /** * @dev See {IGovernor-version}. */ - function version() public view virtual override returns (string memory) { + function version() public view virtual returns (string memory) { return "1"; } @@ -127,14 +127,14 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash - ) public pure virtual override returns (uint256) { + ) public pure virtual returns (uint256) { return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash))); } /** * @dev See {IGovernor-state}. */ - function state(uint256 proposalId) public view virtual override returns (ProposalState) { + function state(uint256 proposalId) public view virtual returns (ProposalState) { // ProposalCore is just one slot. We can load it from storage to stack with a single sload ProposalCore storage proposal = _proposals[proposalId]; bool proposalExecuted = proposal.executed; @@ -176,38 +176,45 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 /** * @dev See {IGovernor-proposalThreshold}. */ - function proposalThreshold() public view virtual override returns (uint256) { + function proposalThreshold() public view virtual returns (uint256) { return 0; } /** * @dev See {IGovernor-proposalSnapshot}. */ - function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) { + function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256) { return _proposals[proposalId].voteStart; } /** * @dev See {IGovernor-proposalDeadline}. */ - function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { + function proposalDeadline(uint256 proposalId) public view virtual returns (uint256) { return _proposals[proposalId].voteStart + _proposals[proposalId].voteDuration; } /** * @dev See {IGovernor-proposalProposer}. */ - function proposalProposer(uint256 proposalId) public view virtual override returns (address) { + function proposalProposer(uint256 proposalId) public view virtual returns (address) { return _proposals[proposalId].proposer; } /** * @dev See {IGovernor-proposalEta}. */ - function proposalEta(uint256 proposalId) public view virtual override returns (uint256) { + function proposalEta(uint256 proposalId) public view virtual returns (uint256) { return _proposals[proposalId].eta; } + /** + * @dev See {IGovernor-proposalNeedsQueuing}. + */ + function proposalNeedsQueuing(uint256) public view virtual returns (bool) { + return false; + } + /** * @dev Reverts if the `msg.sender` is not the executor. In case the executor is not this contract * itself, the function reverts if `msg.data` is not whitelisted as a result of an {execute} @@ -270,7 +277,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 uint256[] memory values, bytes[] memory calldatas, string memory description - ) public virtual override returns (uint256) { + ) public virtual returns (uint256) { address proposer = _msgSender(); // check description restriction @@ -340,7 +347,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash - ) public virtual override returns (uint256) { + ) public virtual returns (uint256) { uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); _validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Succeeded)); @@ -388,7 +395,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash - ) public payable virtual override returns (uint256) { + ) public payable virtual returns (uint256) { uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); _validateStateBitmap( @@ -448,7 +455,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash - ) public virtual override returns (uint256) { + ) public virtual returns (uint256) { // The proposalId will be recomputed in the `_cancel` call further down. However we need the value before we // do the internal call, because we need to check the proposal state BEFORE the internal `_cancel` call // changes it. The `hashProposal` duplication has a cost that is limited, and that we accept. @@ -494,7 +501,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 /** * @dev See {IGovernor-getVotes}. */ - function getVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { + function getVotes(address account, uint256 timepoint) public view virtual returns (uint256) { return _getVotes(account, timepoint, _defaultParams()); } @@ -505,14 +512,14 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 address account, uint256 timepoint, bytes memory params - ) public view virtual override returns (uint256) { + ) public view virtual returns (uint256) { return _getVotes(account, timepoint, params); } /** * @dev See {IGovernor-castVote}. */ - function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) { + function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256) { address voter = _msgSender(); return _castVote(proposalId, voter, support, ""); } @@ -524,7 +531,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 uint256 proposalId, uint8 support, string calldata reason - ) public virtual override returns (uint256) { + ) public virtual returns (uint256) { address voter = _msgSender(); return _castVote(proposalId, voter, support, reason); } @@ -537,7 +544,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 uint8 support, string calldata reason, bytes memory params - ) public virtual override returns (uint256) { + ) public virtual returns (uint256) { address voter = _msgSender(); return _castVote(proposalId, voter, support, reason, params); } @@ -550,7 +557,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 uint8 support, address voter, bytes memory signature - ) public virtual override returns (uint256) { + ) public virtual returns (uint256) { bool valid = SignatureChecker.isValidSignatureNow( voter, _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support, voter, _useNonce(voter)))), @@ -574,7 +581,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 string calldata reason, bytes memory params, bytes memory signature - ) public virtual override returns (uint256) { + ) public virtual returns (uint256) { bool valid = SignatureChecker.isValidSignatureNow( voter, _hashTypedDataV4( diff --git a/contracts/governance/IGovernor.sol b/contracts/governance/IGovernor.sol index 3b31bc502..a3f6fec52 100644 --- a/contracts/governance/IGovernor.sol +++ b/contracts/governance/IGovernor.sol @@ -245,6 +245,12 @@ interface IGovernor is IERC165, IERC6372 { */ function proposalEta(uint256 proposalId) external view returns (uint256); + /** + * @notice module:core + * @dev Whether a proposal needs to be queued before execution. + */ + function proposalNeedsQueuing(uint256 proposalId) external view returns (bool); + /** * @notice module:user-config * @dev Delay, between the proposal is created and the vote starts. The unit this duration is expressed in depends diff --git a/contracts/governance/extensions/GovernorTimelockAccess.sol b/contracts/governance/extensions/GovernorTimelockAccess.sol new file mode 100644 index 000000000..6ebb3f1d6 --- /dev/null +++ b/contracts/governance/extensions/GovernorTimelockAccess.sol @@ -0,0 +1,282 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {Governor} from "../Governor.sol"; +import {AuthorityUtils} from "../../access/manager/AuthorityUtils.sol"; +import {IAccessManager} from "../../access/manager/IAccessManager.sol"; +import {Address} from "../../utils/Address.sol"; +import {Math} from "../../utils/math/Math.sol"; +import {SafeCast} from "../../utils/math/SafeCast.sol"; +import {Time} from "../../utils/types/Time.sol"; + +/** + * @dev This module connects a {Governor} instance to an {AccessManager} instance, allowing the governor to make calls + * that are delay-restricted by the manager using the normal {queue} workflow. An optional base delay is applied to + * operations that are not delayed externally by the manager. Execution of a proposal will be delayed as much as + * necessary to meet the required delays of all of its operations. + * + * This extension allows the governor to hold and use its own assets and permissions, unlike {GovernorTimelockControl} + * and {GovernorTimelockCompound}, where the timelock is a separate contract that must be the one to hold assets and + * permissions. Operations that are delay-restricted by the manager, however, will be executed through the + * {AccessManager-relay} function. + * + * Note that some operations may be cancelable in the {AccessManager} by the admin or a set of guardians, depending on + * the restricted operation being invoked. Since proposals are atomic, the cancellation by a guardian of a single + * operation in a proposal will cause all of it to become unable to execute. + */ +abstract contract GovernorTimelockAccess is Governor { + // An execution plan is produced at the moment a proposal is created, in order to fix at that point the exact + // execution semantics of the proposal, namely whether a call will go through {AccessManager-relay}. + struct ExecutionPlan { + uint16 length; + uint32 delay; + // We use mappings instead of arrays because it allows us to pack values in storage more tightly without storing + // the length redundantly. + // We pack 8 operations' data in each bucket. Each uint32 value is set to 1 upon proposal creation if it has to + // be scheduled and relayed through the manager. Upon queuing, the value is set to nonce + 1, where the nonce is + // that which we get back from the manager when scheduling the operation. + mapping(uint256 operationBucket => uint32[8]) managerData; + } + + mapping(uint256 proposalId => ExecutionPlan) private _executionPlan; + + uint32 private _baseDelay; + + IAccessManager private immutable _manager; + + error GovernorUnmetDelay(uint256 proposalId, uint256 neededTimestamp); + error GovernorMismatchedNonce(uint256 proposalId, uint256 expectedNonce, uint256 actualNonce); + + event BaseDelaySet(uint32 oldBaseDelaySeconds, uint32 newBaseDelaySeconds); + + /** + * @dev Initialize the governor with an {AccessManager} and initial base delay. + */ + constructor(address manager, uint32 initialBaseDelay) { + _manager = IAccessManager(manager); + _setBaseDelaySeconds(initialBaseDelay); + } + + /** + * @dev Returns the {AccessManager} instance associated to this governor. + */ + function accessManager() public view virtual returns (IAccessManager) { + return _manager; + } + + /** + * @dev Base delay that will be applied to all function calls. Some may be further delayed by their associated + * `AccessManager` authority; in this case the final delay will be the maximum of the base delay and the one + * demanded by the authority. + * + * NOTE: Execution delays are processed by the `AccessManager` contracts, and according to that contract are + * expressed in seconds. Therefore, the base delay is also in seconds, regardless of the governor's clock mode. + */ + function baseDelaySeconds() public view virtual returns (uint32) { + return _baseDelay; + } + + /** + * @dev Change the value of {baseDelaySeconds}. This operation can only be invoked through a governance proposal. + */ + function setBaseDelaySeconds(uint32 newBaseDelay) public virtual onlyGovernance { + _setBaseDelaySeconds(newBaseDelay); + } + + /** + * @dev Change the value of {baseDelaySeconds}. Internal function without access control. + */ + function _setBaseDelaySeconds(uint32 newBaseDelay) internal virtual { + emit BaseDelaySet(_baseDelay, newBaseDelay); + _baseDelay = newBaseDelay; + } + + /** + * @dev Public accessor to check the execution plan, including the number of seconds that the proposal will be + * delayed since queuing, and an array indicating which of the proposal actions will be executed indirectly through + * the associated {AccessManager}. + */ + function proposalExecutionPlan(uint256 proposalId) public view returns (uint32, bool[] memory) { + ExecutionPlan storage plan = _executionPlan[proposalId]; + + uint32 delay = plan.delay; + uint32 length = plan.length; + bool[] memory indirect = new bool[](length); + for (uint256 i = 0; i < length; ++i) { + (indirect[i], ) = _getManagerData(plan, i); + } + + return (delay, indirect); + } + + /** + * @dev See {IGovernor-proposalNeedsQueuing}. + */ + function proposalNeedsQueuing(uint256 proposalId) public view virtual override returns (bool) { + return _executionPlan[proposalId].delay > 0; + } + + /** + * @dev See {IGovernor-propose} + */ + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual override returns (uint256) { + uint256 proposalId = super.propose(targets, values, calldatas, description); + + uint32 neededDelay = baseDelaySeconds(); + + ExecutionPlan storage plan = _executionPlan[proposalId]; + plan.length = SafeCast.toUint16(targets.length); + + for (uint256 i = 0; i < targets.length; ++i) { + uint32 delay = _detectExecutionRequirements(targets[i], bytes4(calldatas[i])); + if (delay > 0) { + _setManagerData(plan, i, 0); + } + // downcast is safe because both arguments are uint32 + neededDelay = uint32(Math.max(delay, neededDelay)); + } + + plan.delay = neededDelay; + + return proposalId; + } + + /** + * @dev Mechanism to queue a proposal, potentially scheduling some of its operations in the AccessManager. + * + * NOTE: The execution delay is chosen based on the delay information retrieved in {propose}. This value may be + * off if the delay was updated since proposal creation. In this case, the proposal needs to be recreated. + */ + function _queueOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory /* values */, + bytes[] memory calldatas, + bytes32 /* descriptionHash */ + ) internal virtual override returns (uint48) { + ExecutionPlan storage plan = _executionPlan[proposalId]; + uint48 eta = Time.timestamp() + plan.delay; + + for (uint256 i = 0; i < targets.length; ++i) { + (bool delayed, ) = _getManagerData(plan, i); + if (delayed) { + (, uint32 nonce) = _manager.schedule(targets[i], calldatas[i], eta); + _setManagerData(plan, i, nonce); + } + } + + return eta; + } + + /** + * @dev Mechanism to execute a proposal, potentially going through {AccessManager-relay} for delayed operations. + */ + function _executeOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 /* descriptionHash */ + ) internal virtual override { + uint48 eta = SafeCast.toUint48(proposalEta(proposalId)); + if (block.timestamp < eta) { + revert GovernorUnmetDelay(proposalId, eta); + } + + ExecutionPlan storage plan = _executionPlan[proposalId]; + + for (uint256 i = 0; i < targets.length; ++i) { + (bool delayed, uint32 nonce) = _getManagerData(plan, i); + if (delayed) { + uint32 relayedNonce = _manager.relay{value: values[i]}(targets[i], calldatas[i]); + if (relayedNonce != nonce) { + revert GovernorMismatchedNonce(proposalId, nonce, relayedNonce); + } + } else { + (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]); + Address.verifyCallResult(success, returndata); + } + } + } + + /** + * @dev See {IGovernor-_cancel} + */ + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override returns (uint256) { + uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); + + uint48 eta = SafeCast.toUint48(proposalEta(proposalId)); + + ExecutionPlan storage plan = _executionPlan[proposalId]; + + // If the proposal has been scheduled it will have an ETA and we have to externally cancel + if (eta != 0) { + for (uint256 i = 0; i < targets.length; ++i) { + (bool delayed, uint32 nonce) = _getManagerData(plan, i); + if (delayed) { + // Attempt to cancel considering the operation could have been cancelled and rescheduled already + uint32 canceledNonce = _manager.cancel(address(this), targets[i], calldatas[i]); + if (canceledNonce != nonce) { + revert GovernorMismatchedNonce(proposalId, nonce, canceledNonce); + } + } + } + } + + return proposalId; + } + + /** + * @dev Check if the execution of a call needs to be performed through an AccessManager and what delay should be + * applied to this call. + * + * Returns { manager: address(0), delay: 0 } if: + * - target does not have code + * - target does not implement IAccessManaged + * - calling canCall on the target's manager returns a 0 delay + * - calling canCall on the target's manager reverts + * Otherwise (calling canCall on the target's manager returns a non 0 delay), return the address of the + * AccessManager to use, and the delay for this call. + */ + function _detectExecutionRequirements(address target, bytes4 selector) private view returns (uint32 delay) { + (, delay) = AuthorityUtils.canCallWithDelay(address(_manager), address(this), target, selector); + } + + /** + * @dev Returns whether the operation at an index is delayed by the manager, and its scheduling nonce once queued. + */ + function _getManagerData(ExecutionPlan storage plan, uint256 index) private view returns (bool, uint32) { + (uint256 bucket, uint256 subindex) = _getManagerDataIndices(index); + uint32 nonce = plan.managerData[bucket][subindex]; + unchecked { + return nonce > 0 ? (true, nonce - 1) : (false, 0); + } + } + + /** + * @dev Marks an operation at an index as delayed by the manager, and sets its scheduling nonce. + */ + function _setManagerData(ExecutionPlan storage plan, uint256 index, uint32 nonce) private { + (uint256 bucket, uint256 subindex) = _getManagerDataIndices(index); + plan.managerData[bucket][subindex] = nonce + 1; + } + + /** + * @dev Returns bucket and subindex for reading manager data from the packed array mapping. + */ + function _getManagerDataIndices(uint256 index) private pure returns (uint256 bucket, uint256 subindex) { + bucket = index >> 3; // index / 8 + subindex = index & 7; // index % 8 + } +} diff --git a/contracts/governance/extensions/GovernorTimelockCompound.sol b/contracts/governance/extensions/GovernorTimelockCompound.sol index fe554dad5..a3d47bea1 100644 --- a/contracts/governance/extensions/GovernorTimelockCompound.sol +++ b/contracts/governance/extensions/GovernorTimelockCompound.sol @@ -54,6 +54,13 @@ abstract contract GovernorTimelockCompound is Governor { return address(_timelock); } + /** + * @dev See {IGovernor-proposalNeedsQueuing}. + */ + function proposalNeedsQueuing(uint256) public view virtual override returns (bool) { + return true; + } + /** * @dev Function to queue a proposal to the timelock. */ diff --git a/contracts/governance/extensions/GovernorTimelockControl.sol b/contracts/governance/extensions/GovernorTimelockControl.sol index 3dde36e23..34143c898 100644 --- a/contracts/governance/extensions/GovernorTimelockControl.sol +++ b/contracts/governance/extensions/GovernorTimelockControl.sol @@ -67,6 +67,13 @@ abstract contract GovernorTimelockControl is Governor { return address(_timelock); } + /** + * @dev See {IGovernor-proposalNeedsQueuing}. + */ + function proposalNeedsQueuing(uint256) public view virtual override returns (bool) { + return true; + } + /** * @dev Function to queue a proposal to the timelock. */ diff --git a/contracts/mocks/docs/governance/MyGovernor.sol b/contracts/mocks/docs/governance/MyGovernor.sol index 7cd5f3c2c..d898fc715 100644 --- a/contracts/mocks/docs/governance/MyGovernor.sol +++ b/contracts/mocks/docs/governance/MyGovernor.sol @@ -40,6 +40,12 @@ contract MyGovernor is return super.state(proposalId); } + function proposalNeedsQueuing( + uint256 proposalId + ) public view virtual override(Governor, GovernorTimelockControl) returns (bool) { + return super.proposalNeedsQueuing(proposalId); + } + function _queueOperations( uint256 proposalId, address[] memory targets, diff --git a/contracts/mocks/governance/GovernorStorageMock.sol b/contracts/mocks/governance/GovernorStorageMock.sol index 3d08a0031..88c6bf906 100644 --- a/contracts/mocks/governance/GovernorStorageMock.sol +++ b/contracts/mocks/governance/GovernorStorageMock.sol @@ -28,6 +28,12 @@ abstract contract GovernorStorageMock is return super.proposalThreshold(); } + function proposalNeedsQueuing( + uint256 proposalId + ) public view virtual override(Governor, GovernorTimelockControl) returns (bool) { + return super.proposalNeedsQueuing(proposalId); + } + function _propose( address[] memory targets, uint256[] memory values, diff --git a/contracts/mocks/governance/GovernorTimelockAccessMock.sol b/contracts/mocks/governance/GovernorTimelockAccessMock.sol new file mode 100644 index 000000000..3d1bbeeef --- /dev/null +++ b/contracts/mocks/governance/GovernorTimelockAccessMock.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {IGovernor, Governor} from "../../governance/Governor.sol"; +import {GovernorTimelockAccess} from "../../governance/extensions/GovernorTimelockAccess.sol"; +import {GovernorSettings} from "../../governance/extensions/GovernorSettings.sol"; +import {GovernorCountingSimple} from "../../governance/extensions/GovernorCountingSimple.sol"; +import {GovernorVotesQuorumFraction} from "../../governance/extensions/GovernorVotesQuorumFraction.sol"; + +abstract contract GovernorTimelockAccessMock is + GovernorSettings, + GovernorTimelockAccess, + GovernorVotesQuorumFraction, + GovernorCountingSimple +{ + function nonGovernanceFunction() external {} + + function quorum(uint256 blockNumber) public view override(Governor, GovernorVotesQuorumFraction) returns (uint256) { + return super.quorum(blockNumber); + } + + function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) { + return super.proposalThreshold(); + } + + function proposalNeedsQueuing( + uint256 proposalId + ) public view virtual override(Governor, GovernorTimelockAccess) returns (bool) { + return super.proposalNeedsQueuing(proposalId); + } + + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public override(Governor, GovernorTimelockAccess) returns (uint256) { + return super.propose(targets, values, calldatas, description); + } + + function _queueOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal override(Governor, GovernorTimelockAccess) returns (uint48) { + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash); + } + + function _executeOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal override(Governor, GovernorTimelockAccess) { + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash); + } + + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal override(Governor, GovernorTimelockAccess) returns (uint256) { + return super._cancel(targets, values, calldatas, descriptionHash); + } +} diff --git a/contracts/mocks/governance/GovernorTimelockCompoundMock.sol b/contracts/mocks/governance/GovernorTimelockCompoundMock.sol index 124b0346f..03ef62510 100644 --- a/contracts/mocks/governance/GovernorTimelockCompoundMock.sol +++ b/contracts/mocks/governance/GovernorTimelockCompoundMock.sol @@ -28,6 +28,12 @@ abstract contract GovernorTimelockCompoundMock is return super.proposalThreshold(); } + function proposalNeedsQueuing( + uint256 proposalId + ) public view virtual override(Governor, GovernorTimelockCompound) returns (bool) { + return super.proposalNeedsQueuing(proposalId); + } + function _queueOperations( uint256 proposalId, address[] memory targets, diff --git a/contracts/mocks/governance/GovernorTimelockControlMock.sol b/contracts/mocks/governance/GovernorTimelockControlMock.sol index 125aa37df..edaccc0b7 100644 --- a/contracts/mocks/governance/GovernorTimelockControlMock.sol +++ b/contracts/mocks/governance/GovernorTimelockControlMock.sol @@ -26,6 +26,12 @@ abstract contract GovernorTimelockControlMock is return super.proposalThreshold(); } + function proposalNeedsQueuing( + uint256 proposalId + ) public view virtual override(Governor, GovernorTimelockControl) returns (bool) { + return super.proposalNeedsQueuing(proposalId); + } + function _queueOperations( uint256 proposalId, address[] memory targets, diff --git a/test/governance/Governor.test.js b/test/governance/Governor.test.js index 9dfa53e7b..45cceba9a 100644 --- a/test/governance/Governor.test.js +++ b/test/governance/Governor.test.js @@ -100,6 +100,9 @@ contract('Governor', function (accounts) { expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal(value); expect(await web3.eth.getBalance(this.receiver.address)).to.be.bignumber.equal('0'); + expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal('0'); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(false); + // Run proposal const txPropose = await this.helper.propose({ from: proposer }); @@ -164,6 +167,9 @@ contract('Governor', function (accounts) { expect(await this.mock.hasVoted(this.proposal.id, voter2)).to.be.equal(true); expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal('0'); expect(await web3.eth.getBalance(this.receiver.address)).to.be.bignumber.equal(value); + + expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal('0'); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(false); }); it('send ethers', async function () { diff --git a/test/governance/extensions/GovernorTimelockAccess.test.js b/test/governance/extensions/GovernorTimelockAccess.test.js new file mode 100644 index 000000000..776ec9390 --- /dev/null +++ b/test/governance/extensions/GovernorTimelockAccess.test.js @@ -0,0 +1,246 @@ +const { expectEvent } = require('@openzeppelin/test-helpers'); +const { expect } = require('chai'); + +const Enums = require('../../helpers/enums'); +const { GovernorHelper, proposalStatesToBitMap } = require('../../helpers/governance'); +const { expectRevertCustomError } = require('../../helpers/customError'); +const { clockFromReceipt } = require('../../helpers/time'); + +const AccessManager = artifacts.require('$AccessManager'); +const Governor = artifacts.require('$GovernorTimelockAccessMock'); +const AccessManagedTarget = artifacts.require('$AccessManagedTarget'); + +const TOKENS = [ + // { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, + { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' }, +]; + +const hashOperation = (caller, target, data) => + web3.utils.keccak256(web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], [caller, target, data])); + +contract('GovernorTimelockAccess', function (accounts) { + const [admin, voter1, voter2, voter3, voter4] = accounts; + + const name = 'OZ-Governor'; + const version = '1'; + const tokenName = 'MockToken'; + const tokenSymbol = 'MTKN'; + const tokenSupply = web3.utils.toWei('100'); + const votingDelay = web3.utils.toBN(4); + const votingPeriod = web3.utils.toBN(16); + const value = web3.utils.toWei('1'); + + for (const { mode, Token } of TOKENS) { + describe(`using ${Token._json.contractName}`, function () { + beforeEach(async function () { + this.token = await Token.new(tokenName, tokenSymbol, tokenName, version); + this.manager = await AccessManager.new(admin); + this.mock = await Governor.new( + name, + votingDelay, + votingPeriod, + 0, // proposal threshold + this.manager.address, + 0, // base delay + this.token.address, + 0, // quorum + ); + this.receiver = await AccessManagedTarget.new(this.manager.address); + + this.helper = new GovernorHelper(this.mock, mode); + + await web3.eth.sendTransaction({ from: admin, to: this.mock.address, value }); + + await this.token.$_mint(admin, tokenSupply); + await this.helper.delegate({ token: this.token, to: voter1, value: web3.utils.toWei('10') }, { from: admin }); + await this.helper.delegate({ token: this.token, to: voter2, value: web3.utils.toWei('7') }, { from: admin }); + await this.helper.delegate({ token: this.token, to: voter3, value: web3.utils.toWei('5') }, { from: admin }); + await this.helper.delegate({ token: this.token, to: voter4, value: web3.utils.toWei('2') }, { from: admin }); + + // default proposals + this.restricted = {}; + this.restricted.selector = this.receiver.contract.methods.fnRestricted().encodeABI(); + this.restricted.operation = { + target: this.receiver.address, + value: '0', + data: this.restricted.selector, + }; + this.restricted.operationId = hashOperation( + this.mock.address, + this.restricted.operation.target, + this.restricted.operation.data, + ); + + this.unrestricted = {}; + this.unrestricted.selector = this.receiver.contract.methods.fnUnrestricted().encodeABI(); + this.unrestricted.operation = { + target: this.receiver.address, + value: '0', + data: this.unrestricted.selector, + }; + this.unrestricted.operationId = hashOperation( + this.mock.address, + this.unrestricted.operation.target, + this.unrestricted.operation.data, + ); + }); + + it('accepts ether transfers', async function () { + await web3.eth.sendTransaction({ from: admin, to: this.mock.address, value: 1 }); + }); + + it('post deployment check', async function () { + expect(await this.mock.name()).to.be.equal(name); + expect(await this.mock.token()).to.be.equal(this.token.address); + expect(await this.mock.votingDelay()).to.be.bignumber.equal(votingDelay); + expect(await this.mock.votingPeriod()).to.be.bignumber.equal(votingPeriod); + expect(await this.mock.quorum(0)).to.be.bignumber.equal('0'); + + expect(await this.mock.accessManager()).to.be.equal(this.manager.address); + }); + + describe('base delay only', function () { + for (const [delay, queue] of [ + [0, true], + [0, false], + [1000, true], + ]) { + it(`delay ${delay}, ${queue ? 'with' : 'without'} queuing`, async function () { + await this.mock.$_setBaseDelaySeconds(delay); + + this.proposal = await this.helper.setProposal([this.unrestricted.operation], 'descr'); + + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + if (queue) { + const txQueue = await this.helper.queue(); + expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id }); + } + if (delay > 0) { + await this.helper.waitForEta(); + } + const txExecute = await this.helper.execute(); + expectEvent(txExecute, 'ProposalExecuted', { proposalId: this.proposal.id }); + expectEvent.inTransaction(txExecute, this.receiver, 'CalledUnrestricted'); + }); + } + }); + + it('single operation with access manager delay', async function () { + const delay = 1000; + const classId = '1'; + const groupId = '1'; + + await this.manager.setContractClass(this.receiver.address, classId, { from: admin }); + await this.manager.setClassFunctionGroup(classId, [this.restricted.selector], groupId, { from: admin }); + await this.manager.grantGroup(groupId, this.mock.address, delay, { from: admin }); + + this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); + + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + const txQueue = await this.helper.queue(); + await this.helper.waitForEta(); + const txExecute = await this.helper.execute(); + + expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id }); + await expectEvent.inTransaction(txQueue.tx, this.manager, 'OperationScheduled', { + operationId: this.restricted.operationId, + nonce: '1', + schedule: web3.utils.toBN(await clockFromReceipt.timestamp(txQueue.receipt)).addn(delay), + caller: this.mock.address, + target: this.restricted.operation.target, + data: this.restricted.operation.data, + }); + + expectEvent(txExecute, 'ProposalExecuted', { proposalId: this.proposal.id }); + await expectEvent.inTransaction(txExecute.tx, this.manager, 'OperationExecuted', { + operationId: this.restricted.operationId, + nonce: '1', + }); + await expectEvent.inTransaction(txExecute.tx, this.receiver, 'CalledRestricted'); + }); + + it('bundle of varied operations', async function () { + const managerDelay = 1000; + const classId = '1'; + const groupId = '1'; + + const baseDelay = managerDelay * 2; + + await this.mock.$_setBaseDelaySeconds(baseDelay); + + await this.manager.setContractClass(this.receiver.address, classId, { from: admin }); + await this.manager.setClassFunctionGroup(classId, [this.restricted.selector], groupId, { from: admin }); + await this.manager.grantGroup(groupId, this.mock.address, managerDelay, { from: admin }); + + this.proposal = await this.helper.setProposal( + [this.restricted.operation, this.unrestricted.operation], + 'descr', + ); + + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + const txQueue = await this.helper.queue(); + await this.helper.waitForEta(); + const txExecute = await this.helper.execute(); + + expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id }); + await expectEvent.inTransaction(txQueue.tx, this.manager, 'OperationScheduled', { + operationId: this.restricted.operationId, + nonce: '1', + schedule: web3.utils.toBN(await clockFromReceipt.timestamp(txQueue.receipt)).addn(baseDelay), + caller: this.mock.address, + target: this.restricted.operation.target, + data: this.restricted.operation.data, + }); + + expectEvent(txExecute, 'ProposalExecuted', { proposalId: this.proposal.id }); + await expectEvent.inTransaction(txExecute.tx, this.manager, 'OperationExecuted', { + operationId: this.restricted.operationId, + nonce: '1', + }); + await expectEvent.inTransaction(txExecute.tx, this.receiver, 'CalledRestricted'); + await expectEvent.inTransaction(txExecute.tx, this.receiver, 'CalledUnrestricted'); + }); + + it('cancellation after queue (internal)', async function () { + const delay = 1000; + const classId = '1'; + const groupId = '1'; + + await this.manager.setContractClass(this.receiver.address, classId, { from: admin }); + await this.manager.setClassFunctionGroup(classId, [this.restricted.selector], groupId, { from: admin }); + await this.manager.grantGroup(groupId, this.mock.address, delay, { from: admin }); + + this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); + + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + await this.helper.queue(); + + const txCancel = await this.helper.cancel('internal'); + expectEvent(txCancel, 'ProposalCanceled', { proposalId: this.proposal.id }); + await expectEvent.inTransaction(txCancel.tx, this.manager, 'OperationCanceled', { + operationId: this.restricted.operationId, + nonce: '1', + }); + + await this.helper.waitForEta(); + await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ + this.proposal.id, + Enums.ProposalState.Canceled, + proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ]); + }); + }); + } +}); diff --git a/test/governance/extensions/GovernorTimelockCompound.test.js b/test/governance/extensions/GovernorTimelockCompound.test.js index 0f7fd6352..e9d6f8373 100644 --- a/test/governance/extensions/GovernorTimelockCompound.test.js +++ b/test/governance/extensions/GovernorTimelockCompound.test.js @@ -5,6 +5,7 @@ const Enums = require('../../helpers/enums'); const { GovernorHelper, proposalStatesToBitMap } = require('../../helpers/governance'); const { expectRevertCustomError } = require('../../helpers/customError'); const { computeCreateAddress } = require('../../helpers/create'); +const { clockFromReceipt } = require('../../helpers/time'); const Timelock = artifacts.require('CompTimelock'); const Governor = artifacts.require('$GovernorTimelockCompoundMock'); @@ -29,6 +30,8 @@ contract('GovernorTimelockCompound', function (accounts) { const votingPeriod = web3.utils.toBN(16); const value = web3.utils.toWei('1'); + const defaultDelay = 2 * 86400; + for (const { mode, Token } of TOKENS) { describe(`using ${Token._json.contractName}`, function () { beforeEach(async function () { @@ -40,7 +43,7 @@ contract('GovernorTimelockCompound', function (accounts) { const nonce = await web3.eth.getTransactionCount(deployer); const predictGovernor = computeCreateAddress(deployer, nonce + 1); - this.timelock = await Timelock.new(predictGovernor, 2 * 86400); + this.timelock = await Timelock.new(predictGovernor, defaultDelay); this.mock = await Governor.new( name, votingDelay, @@ -91,6 +94,9 @@ contract('GovernorTimelockCompound', function (accounts) { }); it('nominal', async function () { + expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal('0'); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(true); + await this.helper.propose(); await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); @@ -99,7 +105,11 @@ contract('GovernorTimelockCompound', function (accounts) { await this.helper.vote({ support: Enums.VoteType.Abstain }, { from: voter4 }); await this.helper.waitForDeadline(); const txQueue = await this.helper.queue(); - const eta = await this.mock.proposalEta(this.proposal.id); + + const eta = web3.utils.toBN(await clockFromReceipt.timestamp(txQueue.receipt)).addn(defaultDelay); + expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal(eta); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(true); + await this.helper.waitForEta(); const txExecute = await this.helper.execute(); diff --git a/test/governance/extensions/GovernorTimelockControl.test.js b/test/governance/extensions/GovernorTimelockControl.test.js index fe40d30e9..ec03d6144 100644 --- a/test/governance/extensions/GovernorTimelockControl.test.js +++ b/test/governance/extensions/GovernorTimelockControl.test.js @@ -4,6 +4,7 @@ const { expect } = require('chai'); const Enums = require('../../helpers/enums'); const { GovernorHelper, proposalStatesToBitMap, timelockSalt } = require('../../helpers/governance'); const { expectRevertCustomError } = require('../../helpers/customError'); +const { clockFromReceipt } = require('../../helpers/time'); const Timelock = artifacts.require('TimelockController'); const Governor = artifacts.require('$GovernorTimelockControlMock'); @@ -33,13 +34,15 @@ contract('GovernorTimelockControl', function (accounts) { const votingPeriod = web3.utils.toBN(16); const value = web3.utils.toWei('1'); + const delay = 3600; + for (const { mode, Token } of TOKENS) { describe(`using ${Token._json.contractName}`, function () { beforeEach(async function () { const [deployer] = await web3.eth.getAccounts(); this.token = await Token.new(tokenName, tokenSymbol, tokenName, version); - this.timelock = await Timelock.new(3600, [], [], deployer); + this.timelock = await Timelock.new(delay, [], [], deployer); this.mock = await Governor.new( name, votingDelay, @@ -107,6 +110,9 @@ contract('GovernorTimelockControl', function (accounts) { }); it('nominal', async function () { + expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal('0'); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(true); + await this.helper.propose(); await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); @@ -116,6 +122,11 @@ contract('GovernorTimelockControl', function (accounts) { await this.helper.waitForDeadline(); const txQueue = await this.helper.queue(); await this.helper.waitForEta(); + + const eta = web3.utils.toBN(await clockFromReceipt.timestamp(txQueue.receipt)).addn(delay); + expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal(eta); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(true); + const txExecute = await this.helper.execute(); expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id }); @@ -352,11 +363,10 @@ contract('GovernorTimelockControl', function (accounts) { const data = this.mock.contract.methods.relay(constants.ZERO_ADDRESS, 0, '0x').encodeABI(); const predecessor = constants.ZERO_BYTES32; const salt = constants.ZERO_BYTES32; - const delay = 3600; await this.timelock.schedule(target, value, data, predecessor, salt, delay, { from: owner }); - await time.increase(3600); + await time.increase(delay); await expectRevertCustomError( this.timelock.execute(target, value, data, predecessor, salt, { from: owner }), @@ -369,7 +379,7 @@ contract('GovernorTimelockControl', function (accounts) { describe('updateTimelock', function () { beforeEach(async function () { this.newTimelock = await Timelock.new( - 3600, + delay, [this.mock.address], [this.mock.address], constants.ZERO_ADDRESS, diff --git a/test/utils/introspection/SupportsInterface.behavior.js b/test/utils/introspection/SupportsInterface.behavior.js index d254082d2..49a30e755 100644 --- a/test/utils/introspection/SupportsInterface.behavior.js +++ b/test/utils/introspection/SupportsInterface.behavior.js @@ -61,6 +61,7 @@ const INTERFACES = { 'proposalDeadline(uint256)', 'proposalProposer(uint256)', 'proposalEta(uint256)', + 'proposalNeedsQueuing(uint256)', 'votingDelay()', 'votingPeriod()', 'quorum(uint256)', From 812404cee89cd91d46f6234d03451b07eebf2e35 Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Tue, 29 Aug 2023 23:25:35 +0200 Subject: [PATCH 007/167] Use leading underscore solhint rule for private constants (#4542) Co-authored-by: Francisco Giordano --- contracts/governance/Governor.sol | 4 ++-- contracts/governance/utils/Votes.sol | 4 ++-- contracts/proxy/utils/Initializable.sol | 5 ++--- contracts/security/ReentrancyGuard.sol | 16 ++++++++-------- .../token/ERC20/extensions/ERC20FlashMint.sol | 4 ++-- contracts/token/ERC20/extensions/ERC20Permit.sol | 5 ++--- contracts/utils/ShortStrings.sol | 8 ++++---- contracts/utils/Strings.sol | 10 +++++----- contracts/utils/cryptography/EIP712.sol | 4 ++-- contracts/utils/introspection/ERC165Checker.sol | 4 ++-- scripts/solhint-custom/index.js | 6 +++--- scripts/upgradeable/upgradeable.patch | 6 +++--- 12 files changed, 37 insertions(+), 39 deletions(-) diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index b149129dd..b4abaa695 100644 --- a/contracts/governance/Governor.sol +++ b/contracts/governance/Governor.sol @@ -43,7 +43,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 uint48 eta; } - bytes32 private constant _ALL_PROPOSAL_STATES_BITMAP = bytes32((2 ** (uint8(type(ProposalState).max) + 1)) - 1); + bytes32 private constant ALL_PROPOSAL_STATES_BITMAP = bytes32((2 ** (uint8(type(ProposalState).max) + 1)) - 1); string private _name; mapping(uint256 proposalId => ProposalCore) private _proposals; @@ -479,7 +479,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 _validateStateBitmap( proposalId, - _ALL_PROPOSAL_STATES_BITMAP ^ + ALL_PROPOSAL_STATES_BITMAP ^ _encodeStateBitmap(ProposalState.Canceled) ^ _encodeStateBitmap(ProposalState.Expired) ^ _encodeStateBitmap(ProposalState.Executed) diff --git a/contracts/governance/utils/Votes.sol b/contracts/governance/utils/Votes.sol index 96d89cb8e..11476eb55 100644 --- a/contracts/governance/utils/Votes.sol +++ b/contracts/governance/utils/Votes.sol @@ -31,7 +31,7 @@ import {ECDSA} from "../../utils/cryptography/ECDSA.sol"; abstract contract Votes is Context, EIP712, Nonces, IERC5805 { using Checkpoints for Checkpoints.Trace224; - bytes32 private constant _DELEGATION_TYPEHASH = + bytes32 private constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); mapping(address account => address) private _delegatee; @@ -150,7 +150,7 @@ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { revert VotesExpiredSignature(expiry); } address signer = ECDSA.recover( - _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), + _hashTypedDataV4(keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry))), v, r, s diff --git a/contracts/proxy/utils/Initializable.sol b/contracts/proxy/utils/Initializable.sol index ac97a06fb..791728309 100644 --- a/contracts/proxy/utils/Initializable.sol +++ b/contracts/proxy/utils/Initializable.sol @@ -74,8 +74,7 @@ abstract contract Initializable { } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) - bytes32 private constant _INITIALIZABLE_STORAGE = - 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e; + bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e; /** * @dev The contract is already initialized. @@ -212,7 +211,7 @@ abstract contract Initializable { // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { - $.slot := _INITIALIZABLE_STORAGE + $.slot := INITIALIZABLE_STORAGE } } } diff --git a/contracts/security/ReentrancyGuard.sol b/contracts/security/ReentrancyGuard.sol index 37a63d763..d2de919f5 100644 --- a/contracts/security/ReentrancyGuard.sol +++ b/contracts/security/ReentrancyGuard.sol @@ -31,8 +31,8 @@ abstract contract ReentrancyGuard { // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. - uint256 private constant _NOT_ENTERED = 1; - uint256 private constant _ENTERED = 2; + uint256 private constant NOT_ENTERED = 1; + uint256 private constant ENTERED = 2; uint256 private _status; @@ -42,7 +42,7 @@ abstract contract ReentrancyGuard { error ReentrancyGuardReentrantCall(); constructor() { - _status = _NOT_ENTERED; + _status = NOT_ENTERED; } /** @@ -59,19 +59,19 @@ abstract contract ReentrancyGuard { } function _nonReentrantBefore() private { - // On the first call to nonReentrant, _status will be _NOT_ENTERED - if (_status == _ENTERED) { + // On the first call to nonReentrant, _status will be NOT_ENTERED + if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail - _status = _ENTERED; + _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) - _status = _NOT_ENTERED; + _status = NOT_ENTERED; } /** @@ -79,6 +79,6 @@ abstract contract ReentrancyGuard { * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { - return _status == _ENTERED; + return _status == ENTERED; } } diff --git a/contracts/token/ERC20/extensions/ERC20FlashMint.sol b/contracts/token/ERC20/extensions/ERC20FlashMint.sol index d98dcf397..2cba0e2a5 100644 --- a/contracts/token/ERC20/extensions/ERC20FlashMint.sol +++ b/contracts/token/ERC20/extensions/ERC20FlashMint.sol @@ -19,7 +19,7 @@ import {ERC20} from "../ERC20.sol"; * overriding {maxFlashLoan} so that it correctly reflects the supply cap. */ abstract contract ERC20FlashMint is ERC20, IERC3156FlashLender { - bytes32 private constant _RETURN_VALUE = keccak256("ERC3156FlashBorrower.onFlashLoan"); + bytes32 private constant RETURN_VALUE = keccak256("ERC3156FlashBorrower.onFlashLoan"); /** * @dev The loan token is not valid. @@ -118,7 +118,7 @@ abstract contract ERC20FlashMint is ERC20, IERC3156FlashLender { } uint256 fee = flashFee(token, value); _mint(address(receiver), value); - if (receiver.onFlashLoan(_msgSender(), token, value, fee, data) != _RETURN_VALUE) { + if (receiver.onFlashLoan(_msgSender(), token, value, fee, data) != RETURN_VALUE) { revert ERC3156InvalidReceiver(address(receiver)); } address flashFeeReceiver = _flashFeeReceiver(); diff --git a/contracts/token/ERC20/extensions/ERC20Permit.sol b/contracts/token/ERC20/extensions/ERC20Permit.sol index 8acb23ddb..d6efb477e 100644 --- a/contracts/token/ERC20/extensions/ERC20Permit.sol +++ b/contracts/token/ERC20/extensions/ERC20Permit.sol @@ -18,8 +18,7 @@ import {Nonces} from "../../../utils/Nonces.sol"; * need to send a transaction, and thus is not required to hold Ether at all. */ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { - // solhint-disable-next-line var-name-mixedcase - bytes32 private constant _PERMIT_TYPEHASH = + bytes32 private constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /** @@ -55,7 +54,7 @@ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { revert ERC2612ExpiredSignature(deadline); } - bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); + bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); diff --git a/contracts/utils/ShortStrings.sol b/contracts/utils/ShortStrings.sol index 2fb97824d..f1f33280c 100644 --- a/contracts/utils/ShortStrings.sol +++ b/contracts/utils/ShortStrings.sol @@ -39,7 +39,7 @@ type ShortString is bytes32; */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. - bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; + bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); @@ -91,7 +91,7 @@ library ShortStrings { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; - return ShortString.wrap(_FALLBACK_SENTINEL); + return ShortString.wrap(FALLBACK_SENTINEL); } } @@ -99,7 +99,7 @@ library ShortStrings { * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { - if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { + if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return toString(value); } else { return store; @@ -113,7 +113,7 @@ library ShortStrings { * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { - if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { + if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; diff --git a/contracts/utils/Strings.sol b/contracts/utils/Strings.sol index 24c22d53d..6d657f7dd 100644 --- a/contracts/utils/Strings.sol +++ b/contracts/utils/Strings.sol @@ -10,8 +10,8 @@ import {SignedMath} from "./math/SignedMath.sol"; * @dev String operations. */ library Strings { - bytes16 private constant _HEX_DIGITS = "0123456789abcdef"; - uint8 private constant _ADDRESS_LENGTH = 20; + bytes16 private constant HEX_DIGITS = "0123456789abcdef"; + uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. @@ -34,7 +34,7 @@ library Strings { ptr--; /// @solidity memory-safe-assembly assembly { - mstore8(ptr, byte(mod(value, 10), _HEX_DIGITS)) + mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; @@ -68,7 +68,7 @@ library Strings { buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { - buffer[i] = _HEX_DIGITS[localValue & 0xf]; + buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { @@ -81,7 +81,7 @@ library Strings { * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { - return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); + return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol index 58f8a2180..644f6f531 100644 --- a/contracts/utils/cryptography/EIP712.sol +++ b/contracts/utils/cryptography/EIP712.sol @@ -34,7 +34,7 @@ import {IERC5267} from "../../interfaces/IERC5267.sol"; abstract contract EIP712 is IERC5267 { using ShortStrings for *; - bytes32 private constant _TYPE_HASH = + bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to @@ -86,7 +86,7 @@ abstract contract EIP712 is IERC5267 { } function _buildDomainSeparator() private view returns (bytes32) { - return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); + return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** diff --git a/contracts/utils/introspection/ERC165Checker.sol b/contracts/utils/introspection/ERC165Checker.sol index 4d3948f0d..bfa59e686 100644 --- a/contracts/utils/introspection/ERC165Checker.sol +++ b/contracts/utils/introspection/ERC165Checker.sol @@ -14,7 +14,7 @@ import {IERC165} from "./IERC165.sol"; */ library ERC165Checker { // As per the EIP-165 spec, no interface should ever match 0xffffffff - bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; + bytes4 private constant INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface. @@ -24,7 +24,7 @@ library ERC165Checker { // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) && - !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID); + !supportsERC165InterfaceUnchecked(account, INTERFACE_ID_INVALID); } /** diff --git a/scripts/solhint-custom/index.js b/scripts/solhint-custom/index.js index a4cba1a93..9625027ee 100644 --- a/scripts/solhint-custom/index.js +++ b/scripts/solhint-custom/index.js @@ -48,9 +48,9 @@ module.exports = [ VariableDeclaration(node) { if (node.isDeclaredConst) { - if (/^_/.test(node.name)) { - // TODO: re-enable and fix - // this.error(node, 'Constant variables should not have leading underscore'); + // TODO: expand visibility and fix + if (node.visibility === 'private' && /^_/.test(node.name)) { + this.error(node, 'Constant variables should not have leading underscore'); } } else if (node.visibility === 'private' && !/^_/.test(node.name)) { this.error(node, 'Non-constant private variables must have leading underscore'); diff --git a/scripts/upgradeable/upgradeable.patch b/scripts/upgradeable/upgradeable.patch index 6508212c5..125272a25 100644 --- a/scripts/upgradeable/upgradeable.patch +++ b/scripts/upgradeable/upgradeable.patch @@ -151,7 +151,7 @@ index 3800804a..90c1db78 100644 abstract contract EIP712 is IERC5267 { - using ShortStrings for *; - - bytes32 private constant _TYPE_HASH = + bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); - // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to @@ -207,8 +207,8 @@ index 3800804a..90c1db78 100644 } function _buildDomainSeparator() private view returns (bytes32) { -- return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); -+ return keccak256(abi.encode(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this))); +- return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); ++ return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this))); } /** From cd67894914b7187abfecde1157c2f9219004377e Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Wed, 30 Aug 2023 19:25:17 +0200 Subject: [PATCH 008/167] Use Trace208 in Votes to support ERC6372 clocks (#4539) Co-authored-by: Francisco --- .changeset/wild-peas-remain.md | 5 + .github/workflows/checks.yml | 1 + .../GovernorVotesQuorumFraction.sol | 14 +- contracts/governance/utils/Votes.sol | 34 ++-- .../token/ERC20/extensions/ERC20Votes.sol | 17 +- contracts/utils/structs/Checkpoints.sol | 187 ++++++++++++++++++ .../generate/templates/Checkpoints.opts.js | 2 +- .../token/ERC20/extensions/ERC20Votes.test.js | 2 +- test/utils/structs/Checkpoints.t.sol | 108 ++++++++++ 9 files changed, 339 insertions(+), 31 deletions(-) create mode 100644 .changeset/wild-peas-remain.md diff --git a/.changeset/wild-peas-remain.md b/.changeset/wild-peas-remain.md new file mode 100644 index 000000000..83b4bb307 --- /dev/null +++ b/.changeset/wild-peas-remain.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': major +--- + +`Votes`: Use Trace208 for checkpoints. This enables EIP-6372 clock support for keys but reduces the max supported voting power to uint208. diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 122d39564..199d9e36f 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -63,6 +63,7 @@ jobs: run: npm run test:inheritance - name: Check storage layout uses: ./.github/actions/storage-layout + continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'breaking change') }} with: token: ${{ github.token }} diff --git a/contracts/governance/extensions/GovernorVotesQuorumFraction.sol b/contracts/governance/extensions/GovernorVotesQuorumFraction.sol index 774bff6b1..5346fe4e9 100644 --- a/contracts/governance/extensions/GovernorVotesQuorumFraction.sol +++ b/contracts/governance/extensions/GovernorVotesQuorumFraction.sol @@ -12,9 +12,9 @@ import {Checkpoints} from "../../utils/structs/Checkpoints.sol"; * fraction of the total supply. */ abstract contract GovernorVotesQuorumFraction is GovernorVotes { - using Checkpoints for Checkpoints.Trace224; + using Checkpoints for Checkpoints.Trace208; - Checkpoints.Trace224 private _quorumNumeratorHistory; + Checkpoints.Trace208 private _quorumNumeratorHistory; event QuorumNumeratorUpdated(uint256 oldQuorumNumerator, uint256 newQuorumNumerator); @@ -49,15 +49,15 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes { uint256 length = _quorumNumeratorHistory._checkpoints.length; // Optimistic search, check the latest checkpoint - Checkpoints.Checkpoint224 storage latest = _quorumNumeratorHistory._checkpoints[length - 1]; - uint32 latestKey = latest._key; - uint224 latestValue = latest._value; + Checkpoints.Checkpoint208 memory latest = _quorumNumeratorHistory._checkpoints[length - 1]; + uint48 latestKey = latest._key; + uint208 latestValue = latest._value; if (latestKey <= timepoint) { return latestValue; } // Otherwise, do the binary search - return _quorumNumeratorHistory.upperLookupRecent(SafeCast.toUint32(timepoint)); + return _quorumNumeratorHistory.upperLookupRecent(SafeCast.toUint48(timepoint)); } /** @@ -104,7 +104,7 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes { } uint256 oldQuorumNumerator = quorumNumerator(); - _quorumNumeratorHistory.push(SafeCast.toUint32(clock()), SafeCast.toUint224(newQuorumNumerator)); + _quorumNumeratorHistory.push(clock(), SafeCast.toUint208(newQuorumNumerator)); emit QuorumNumeratorUpdated(oldQuorumNumerator, newQuorumNumerator); } diff --git a/contracts/governance/utils/Votes.sol b/contracts/governance/utils/Votes.sol index 11476eb55..d9f5e01bb 100644 --- a/contracts/governance/utils/Votes.sol +++ b/contracts/governance/utils/Votes.sol @@ -29,16 +29,16 @@ import {ECDSA} from "../../utils/cryptography/ECDSA.sol"; * previous example, it would be included in {ERC721-_beforeTokenTransfer}). */ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { - using Checkpoints for Checkpoints.Trace224; + using Checkpoints for Checkpoints.Trace208; bytes32 private constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); mapping(address account => address) private _delegatee; - mapping(address delegatee => Checkpoints.Trace224) private _delegateCheckpoints; + mapping(address delegatee => Checkpoints.Trace208) private _delegateCheckpoints; - Checkpoints.Trace224 private _totalCheckpoints; + Checkpoints.Trace208 private _totalCheckpoints; /** * @dev The clock was incorrectly modified. @@ -90,7 +90,7 @@ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { if (timepoint >= currentTimepoint) { revert ERC5805FutureLookup(timepoint, currentTimepoint); } - return _delegateCheckpoints[account].upperLookupRecent(SafeCast.toUint32(timepoint)); + return _delegateCheckpoints[account].upperLookupRecent(SafeCast.toUint48(timepoint)); } /** @@ -110,7 +110,7 @@ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { if (timepoint >= currentTimepoint) { revert ERC5805FutureLookup(timepoint, currentTimepoint); } - return _totalCheckpoints.upperLookupRecent(SafeCast.toUint32(timepoint)); + return _totalCheckpoints.upperLookupRecent(SafeCast.toUint48(timepoint)); } /** @@ -178,10 +178,10 @@ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { */ function _transferVotingUnits(address from, address to, uint256 amount) internal virtual { if (from == address(0)) { - _push(_totalCheckpoints, _add, SafeCast.toUint224(amount)); + _push(_totalCheckpoints, _add, SafeCast.toUint208(amount)); } if (to == address(0)) { - _push(_totalCheckpoints, _subtract, SafeCast.toUint224(amount)); + _push(_totalCheckpoints, _subtract, SafeCast.toUint208(amount)); } _moveDelegateVotes(delegates(from), delegates(to), amount); } @@ -195,7 +195,7 @@ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { (uint256 oldValue, uint256 newValue) = _push( _delegateCheckpoints[from], _subtract, - SafeCast.toUint224(amount) + SafeCast.toUint208(amount) ); emit DelegateVotesChanged(from, oldValue, newValue); } @@ -203,7 +203,7 @@ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { (uint256 oldValue, uint256 newValue) = _push( _delegateCheckpoints[to], _add, - SafeCast.toUint224(amount) + SafeCast.toUint208(amount) ); emit DelegateVotesChanged(to, oldValue, newValue); } @@ -223,23 +223,23 @@ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { function _checkpoints( address account, uint32 pos - ) internal view virtual returns (Checkpoints.Checkpoint224 memory) { + ) internal view virtual returns (Checkpoints.Checkpoint208 memory) { return _delegateCheckpoints[account].at(pos); } function _push( - Checkpoints.Trace224 storage store, - function(uint224, uint224) view returns (uint224) op, - uint224 delta - ) private returns (uint224, uint224) { - return store.push(SafeCast.toUint32(clock()), op(store.latest(), delta)); + Checkpoints.Trace208 storage store, + function(uint208, uint208) view returns (uint208) op, + uint208 delta + ) private returns (uint208, uint208) { + return store.push(clock(), op(store.latest(), delta)); } - function _add(uint224 a, uint224 b) private pure returns (uint224) { + function _add(uint208 a, uint208 b) private pure returns (uint208) { return a + b; } - function _subtract(uint224 a, uint224 b) private pure returns (uint224) { + function _subtract(uint208 a, uint208 b) private pure returns (uint208) { return a - b; } diff --git a/contracts/token/ERC20/extensions/ERC20Votes.sol b/contracts/token/ERC20/extensions/ERC20Votes.sol index a4ded6b24..0ec1e6059 100644 --- a/contracts/token/ERC20/extensions/ERC20Votes.sol +++ b/contracts/token/ERC20/extensions/ERC20Votes.sol @@ -9,7 +9,7 @@ import {Checkpoints} from "../../../utils/structs/Checkpoints.sol"; /** * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's, - * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1. + * and supports token supply up to 2^208^ - 1, while COMP is limited to 2^96^ - 1. * * NOTE: This contract does not provide interface compatibility with Compound's COMP token. * @@ -27,10 +27,17 @@ abstract contract ERC20Votes is ERC20, Votes { error ERC20ExceededSafeSupply(uint256 increasedSupply, uint256 cap); /** - * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1). + * @dev Maximum token supply. Defaults to `type(uint208).max` (2^208^ - 1). + * + * This maximum is enforced in {_update}. It limits the total supply of the token, which is otherwise a uint256, + * so that checkpoints can be stored in the Trace208 structure used by {{Votes}}. Increasing this value will not + * remove the underlying limitation, and will cause {_update} to fail because of a math overflow in + * {_transferVotingUnits}. An override could be used to further restrict the total supply (to a lower value) if + * additional logic requires it. When resolving override conflicts on this function, the minimum should be + * returned. */ - function _maxSupply() internal view virtual returns (uint224) { - return type(uint224).max; + function _maxSupply() internal view virtual returns (uint256) { + return type(uint208).max; } /** @@ -70,7 +77,7 @@ abstract contract ERC20Votes is ERC20, Votes { /** * @dev Get the `pos`-th checkpoint for `account`. */ - function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoints.Checkpoint224 memory) { + function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoints.Checkpoint208 memory) { return _checkpoints(account, pos); } } diff --git a/contracts/utils/structs/Checkpoints.sol b/contracts/utils/structs/Checkpoints.sol index 383f01af8..d0579f899 100644 --- a/contracts/utils/structs/Checkpoints.sol +++ b/contracts/utils/structs/Checkpoints.sol @@ -206,6 +206,193 @@ library Checkpoints { } } + struct Trace208 { + Checkpoint208[] _checkpoints; + } + + struct Checkpoint208 { + uint48 _key; + uint208 _value; + } + + /** + * @dev Pushes a (`key`, `value`) pair into a Trace208 so that it is stored as the checkpoint. + * + * Returns previous value and new value. + * + * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint48).max` key set will disable the library. + */ + function push(Trace208 storage self, uint48 key, uint208 value) internal returns (uint208, uint208) { + return _insert(self._checkpoints, key, value); + } + + /** + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. + */ + function lowerLookup(Trace208 storage self, uint48 key) internal view returns (uint208) { + uint256 len = self._checkpoints.length; + uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); + return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + */ + function upperLookup(Trace208 storage self, uint48 key) internal view returns (uint208) { + uint256 len = self._checkpoints.length; + uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * + * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). + */ + function upperLookupRecent(Trace208 storage self, uint48 key) internal view returns (uint208) { + uint256 len = self._checkpoints.length; + + uint256 low = 0; + uint256 high = len; + + if (len > 5) { + uint256 mid = len - Math.sqrt(len); + if (key < _unsafeAccess(self._checkpoints, mid)._key) { + high = mid; + } else { + low = mid + 1; + } + } + + uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); + + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. + */ + function latest(Trace208 storage self) internal view returns (uint208) { + uint256 pos = self._checkpoints.length; + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value + * in the most recent checkpoint. + */ + function latestCheckpoint(Trace208 storage self) internal view returns (bool exists, uint48 _key, uint208 _value) { + uint256 pos = self._checkpoints.length; + if (pos == 0) { + return (false, 0, 0); + } else { + Checkpoint208 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); + return (true, ckpt._key, ckpt._value); + } + } + + /** + * @dev Returns the number of checkpoint. + */ + function length(Trace208 storage self) internal view returns (uint256) { + return self._checkpoints.length; + } + + /** + * @dev Returns checkpoint at given position. + */ + function at(Trace208 storage self, uint32 pos) internal view returns (Checkpoint208 memory) { + return self._checkpoints[pos]; + } + + /** + * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, + * or by updating the last one. + */ + function _insert(Checkpoint208[] storage self, uint48 key, uint208 value) private returns (uint208, uint208) { + uint256 pos = self.length; + + if (pos > 0) { + // Copying to memory is important here. + Checkpoint208 memory last = _unsafeAccess(self, pos - 1); + + // Checkpoint keys must be non-decreasing. + if (last._key > key) { + revert CheckpointUnorderedInsertion(); + } + + // Update or push new checkpoint + if (last._key == key) { + _unsafeAccess(self, pos - 1)._value = value; + } else { + self.push(Checkpoint208({_key: key, _value: value})); + } + return (last._value, value); + } else { + self.push(Checkpoint208({_key: key, _value: value})); + return (0, value); + } + } + + /** + * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _upperBinaryLookup( + Checkpoint208[] storage self, + uint48 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key > key) { + high = mid; + } else { + low = mid + 1; + } + } + return high; + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _lowerBinaryLookup( + Checkpoint208[] storage self, + uint48 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key < key) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess( + Checkpoint208[] storage self, + uint256 pos + ) private pure returns (Checkpoint208 storage result) { + assembly { + mstore(0, self.slot) + result.slot := add(keccak256(0, 0x20), pos) + } + } + struct Trace160 { Checkpoint160[] _checkpoints; } diff --git a/scripts/generate/templates/Checkpoints.opts.js b/scripts/generate/templates/Checkpoints.opts.js index b8be23104..08b7b910b 100644 --- a/scripts/generate/templates/Checkpoints.opts.js +++ b/scripts/generate/templates/Checkpoints.opts.js @@ -1,5 +1,5 @@ // OPTIONS -const VALUE_SIZES = [224, 160]; +const VALUE_SIZES = [224, 208, 160]; const defaultOpts = size => ({ historyTypeName: `Trace${size}`, diff --git a/test/token/ERC20/extensions/ERC20Votes.test.js b/test/token/ERC20/extensions/ERC20Votes.test.js index a6abb5f9f..faf1a15ad 100644 --- a/test/token/ERC20/extensions/ERC20Votes.test.js +++ b/test/token/ERC20/extensions/ERC20Votes.test.js @@ -48,7 +48,7 @@ contract('ERC20Votes', function (accounts) { }); it('minting restriction', async function () { - const value = web3.utils.toBN(1).shln(224); + const value = web3.utils.toBN(1).shln(208); await expectRevertCustomError(this.token.$_mint(holder, value), 'ERC20ExceededSafeSupply', [ value, value.subn(1), diff --git a/test/utils/structs/Checkpoints.t.sol b/test/utils/structs/Checkpoints.t.sol index afda2423e..7bdbcfddf 100644 --- a/test/utils/structs/Checkpoints.t.sol +++ b/test/utils/structs/Checkpoints.t.sol @@ -115,6 +115,114 @@ contract CheckpointsTrace224Test is Test { } } +contract CheckpointsTrace208Test is Test { + using Checkpoints for Checkpoints.Trace208; + + // Maximum gap between keys used during the fuzzing tests: the `_prepareKeys` function with make sure that + // key#n+1 is in the [key#n, key#n + _KEY_MAX_GAP] range. + uint8 internal constant _KEY_MAX_GAP = 64; + + Checkpoints.Trace208 internal _ckpts; + + // helpers + function _boundUint48(uint48 x, uint48 min, uint48 max) internal view returns (uint48) { + return SafeCast.toUint48(bound(uint256(x), uint256(min), uint256(max))); + } + + function _prepareKeys(uint48[] memory keys, uint48 maxSpread) internal view { + uint48 lastKey = 0; + for (uint256 i = 0; i < keys.length; ++i) { + uint48 key = _boundUint48(keys[i], lastKey, lastKey + maxSpread); + keys[i] = key; + lastKey = key; + } + } + + function _assertLatestCheckpoint(bool exist, uint48 key, uint208 value) internal { + (bool _exist, uint48 _key, uint208 _value) = _ckpts.latestCheckpoint(); + assertEq(_exist, exist); + assertEq(_key, key); + assertEq(_value, value); + } + + // tests + function testPush(uint48[] memory keys, uint208[] memory values, uint48 pastKey) public { + vm.assume(values.length > 0 && values.length <= keys.length); + _prepareKeys(keys, _KEY_MAX_GAP); + + // initial state + assertEq(_ckpts.length(), 0); + assertEq(_ckpts.latest(), 0); + _assertLatestCheckpoint(false, 0, 0); + + uint256 duplicates = 0; + for (uint256 i = 0; i < keys.length; ++i) { + uint48 key = keys[i]; + uint208 value = values[i % values.length]; + if (i > 0 && key == keys[i - 1]) ++duplicates; + + // push + _ckpts.push(key, value); + + // check length & latest + assertEq(_ckpts.length(), i + 1 - duplicates); + assertEq(_ckpts.latest(), value); + _assertLatestCheckpoint(true, key, value); + } + + if (keys.length > 0) { + uint48 lastKey = keys[keys.length - 1]; + if (lastKey > 0) { + pastKey = _boundUint48(pastKey, 0, lastKey - 1); + + vm.expectRevert(); + this.push(pastKey, values[keys.length % values.length]); + } + } + } + + // used to test reverts + function push(uint48 key, uint208 value) external { + _ckpts.push(key, value); + } + + function testLookup(uint48[] memory keys, uint208[] memory values, uint48 lookup) public { + vm.assume(values.length > 0 && values.length <= keys.length); + _prepareKeys(keys, _KEY_MAX_GAP); + + uint48 lastKey = keys.length == 0 ? 0 : keys[keys.length - 1]; + lookup = _boundUint48(lookup, 0, lastKey + _KEY_MAX_GAP); + + uint208 upper = 0; + uint208 lower = 0; + uint48 lowerKey = type(uint48).max; + for (uint256 i = 0; i < keys.length; ++i) { + uint48 key = keys[i]; + uint208 value = values[i % values.length]; + + // push + _ckpts.push(key, value); + + // track expected result of lookups + if (key <= lookup) { + upper = value; + } + // find the first key that is not smaller than the lookup key + if (key >= lookup && (i == 0 || keys[i - 1] < lookup)) { + lowerKey = key; + } + if (key == lowerKey) { + lower = value; + } + } + + // check lookup + assertEq(_ckpts.lowerLookup(lookup), lower); + assertEq(_ckpts.upperLookup(lookup), upper); + assertEq(_ckpts.upperLookupRecent(lookup), upper); + } +} + contract CheckpointsTrace160Test is Test { using Checkpoints for Checkpoints.Trace160; From 3266bca15062bac2502805a286e22631cc1c6b52 Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 30 Aug 2023 16:58:51 -0300 Subject: [PATCH 009/167] Revert memory pointer to storage pointer (#4550) --- contracts/governance/extensions/GovernorVotesQuorumFraction.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/governance/extensions/GovernorVotesQuorumFraction.sol b/contracts/governance/extensions/GovernorVotesQuorumFraction.sol index 5346fe4e9..cc2e85b45 100644 --- a/contracts/governance/extensions/GovernorVotesQuorumFraction.sol +++ b/contracts/governance/extensions/GovernorVotesQuorumFraction.sol @@ -49,7 +49,7 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes { uint256 length = _quorumNumeratorHistory._checkpoints.length; // Optimistic search, check the latest checkpoint - Checkpoints.Checkpoint208 memory latest = _quorumNumeratorHistory._checkpoints[length - 1]; + Checkpoints.Checkpoint208 storage latest = _quorumNumeratorHistory._checkpoints[length - 1]; uint48 latestKey = latest._key; uint208 latestValue = latest._value; if (latestKey <= timepoint) { From 8a0b7bed82d6b8053872c3fd40703efd58f5699d Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 31 Aug 2023 06:02:05 -0300 Subject: [PATCH 010/167] Update ERC-7201 location for Initializable (#4554) --- contracts/proxy/utils/Initializable.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/proxy/utils/Initializable.sol b/contracts/proxy/utils/Initializable.sol index 791728309..cc6d9c962 100644 --- a/contracts/proxy/utils/Initializable.sol +++ b/contracts/proxy/utils/Initializable.sol @@ -73,8 +73,8 @@ abstract contract Initializable { bool _initializing; } - // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) - bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e; + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. From 8186c07a83c09046c6fbaa90a035ee47e4d7d785 Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 31 Aug 2023 11:23:40 -0300 Subject: [PATCH 011/167] Follow _approve overrides in ERC721._update (#4552) --- GUIDELINES.md | 14 ++++++++++-- contracts/token/ERC20/ERC20.sol | 6 +++-- contracts/token/ERC721/ERC721.sol | 34 ++++++++++++++++++++-------- test/token/ERC721/ERC721.behavior.js | 3 ++- 4 files changed, 43 insertions(+), 14 deletions(-) diff --git a/GUIDELINES.md b/GUIDELINES.md index 71f166405..4b7f5e76e 100644 --- a/GUIDELINES.md +++ b/GUIDELINES.md @@ -95,8 +95,18 @@ In addition to the official Solidity Style Guide we have a number of other conve } ``` -* Events should be emitted immediately after the state change that they - represent, and should be named in the past tense. +* Functions should be declared virtual, with few exceptions listed below. The + contract logic should be written considering that these functions may be + overridden by developers, e.g. getting a value using an internal getter rather + than reading directly from a state variable. + + If function A is an "alias" of function B, i.e. it invokes function B without + significant additional logic, then function A should not be virtual so that + any user overrides are implemented on B, preventing inconsistencies. + +* Events should generally be emitted immediately after the state change that they + represent, and should be named in the past tense. Some exceptions may be made for gas + efficiency if the result doesn't affect observable ordering of events. ```solidity function _burn(address who, uint256 value) internal { diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index e8212e92b..343881ff3 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/contracts/token/ERC20/ERC20.sol @@ -313,13 +313,15 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. + * + * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ - function _approve(address owner, address spender, uint256 value) internal virtual { + function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** - * @dev Alternative version of {_approve} with an optional flag that can enable or disable the Approval event. + * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any diff --git a/contracts/token/ERC721/ERC721.sol b/contracts/token/ERC721/ERC721.sol index d56e33775..e72c459f3 100644 --- a/contracts/token/ERC721/ERC721.sol +++ b/contracts/token/ERC721/ERC721.sol @@ -251,7 +251,9 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er // Execute the update if (from != address(0)) { - delete _tokenApprovals[tokenId]; + // Clear approval. No need to re-authorize or emit the Approval event + _approve(address(0), tokenId, address(0), false); + unchecked { _balances[from] -= 1; } @@ -395,19 +397,33 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er * either the owner of the token, or approved to operate on all tokens held by this owner. * * Emits an {Approval} event. + * + * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. + */ + function _approve(address to, uint256 tokenId, address auth) internal { + _approve(to, tokenId, auth, true); + } + + /** + * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not + * emitted in the context of transfers. */ - function _approve(address to, uint256 tokenId, address auth) internal virtual returns (address) { - address owner = ownerOf(tokenId); + function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual { + // Avoid reading the owner unless necessary + if (emitEvent || auth != address(0)) { + address owner = ownerOf(tokenId); - // We do not use _isAuthorized because single-token approvals should not be able to call approve - if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { - revert ERC721InvalidApprover(auth); + // We do not use _isAuthorized because single-token approvals should not be able to call approve + if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { + revert ERC721InvalidApprover(auth); + } + + if (emitEvent) { + emit Approval(owner, to, tokenId); + } } _tokenApprovals[tokenId] = to; - emit Approval(owner, to, tokenId); - - return owner; } /** diff --git a/test/token/ERC721/ERC721.behavior.js b/test/token/ERC721/ERC721.behavior.js index 4dd6e234c..10f848265 100644 --- a/test/token/ERC721/ERC721.behavior.js +++ b/test/token/ERC721/ERC721.behavior.js @@ -87,8 +87,9 @@ function shouldBehaveLikeERC721(owner, newOwner, approved, anotherApproved, oper expectEvent(receipt, 'Transfer', { from: owner, to: this.toWhom, tokenId: tokenId }); }); - it('clears the approval for the token ID', async function () { + it('clears the approval for the token ID with no event', async function () { expect(await this.token.getApproved(tokenId)).to.be.equal(ZERO_ADDRESS); + expectEvent.notEmitted(receipt, 'Approval'); }); it('adjusts owners balances', async function () { From 10e00c8ef565897ab77cb8e9f461cf8d2105b04a Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Sat, 2 Sep 2023 00:07:20 +0200 Subject: [PATCH 012/167] Missing view keyword IAccessManager interface (#4558) --- contracts/access/manager/IAccessManager.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index f4a7da362..8b3d3a790 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -59,7 +59,7 @@ interface IAccessManager { bytes4 selector ) external view returns (bool allowed, uint32 delay); - function expiration() external returns (uint32); + function expiration() external view returns (uint32); function getContractClass(address target) external view returns (uint64 classId, bool closed); @@ -99,9 +99,9 @@ interface IAccessManager { function setContractClosed(address target, bool closed) external; - function getSchedule(bytes32 id) external returns (uint48); + function getSchedule(bytes32 id) external view returns (uint48); - function getNonce(bytes32 id) external returns (uint32); + function getNonce(bytes32 id) external view returns (uint32); function schedule(address target, bytes calldata data, uint48 when) external returns (bytes32, uint32); From 00c5da203462b1555f2209431298be0bdc7c701d Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Sat, 2 Sep 2023 06:24:05 +0200 Subject: [PATCH 013/167] Allow setting tokenURI for non-existent token (#4559) Co-authored-by: Francisco --- .changeset/empty-cheetahs-hunt.md | 5 +++++ .../token/ERC721/extensions/ERC721URIStorage.sol | 8 -------- .../token/ERC721/extensions/ERC721URIStorage.test.js | 12 ++++++++---- 3 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 .changeset/empty-cheetahs-hunt.md diff --git a/.changeset/empty-cheetahs-hunt.md b/.changeset/empty-cheetahs-hunt.md new file mode 100644 index 000000000..eb20381a6 --- /dev/null +++ b/.changeset/empty-cheetahs-hunt.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': major +--- + +`ERC721URIStorage`: Allow setting the token URI prior to minting. diff --git a/contracts/token/ERC721/extensions/ERC721URIStorage.sol b/contracts/token/ERC721/extensions/ERC721URIStorage.sol index cd4845b78..dbcf3d4e6 100644 --- a/contracts/token/ERC721/extensions/ERC721URIStorage.sol +++ b/contracts/token/ERC721/extensions/ERC721URIStorage.sol @@ -49,17 +49,9 @@ abstract contract ERC721URIStorage is IERC4906, ERC721 { * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Emits {MetadataUpdate}. - * - * Requirements: - * - * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { - if (_ownerOf(tokenId) == address(0)) { - revert ERC721NonexistentToken(tokenId); - } _tokenURIs[tokenId] = _tokenURI; - emit MetadataUpdate(tokenId); } diff --git a/test/token/ERC721/extensions/ERC721URIStorage.test.js b/test/token/ERC721/extensions/ERC721URIStorage.test.js index 129515514..dc208d1ea 100644 --- a/test/token/ERC721/extensions/ERC721URIStorage.test.js +++ b/test/token/ERC721/extensions/ERC721URIStorage.test.js @@ -50,10 +50,14 @@ contract('ERC721URIStorage', function (accounts) { }); }); - it('reverts when setting for non existent token id', async function () { - await expectRevertCustomError(this.token.$_setTokenURI(nonExistentTokenId, sampleUri), 'ERC721NonexistentToken', [ - nonExistentTokenId, - ]); + it('setting the uri for non existent token id is allowed', async function () { + expectEvent(await this.token.$_setTokenURI(nonExistentTokenId, sampleUri), 'MetadataUpdate', { + _tokenId: nonExistentTokenId, + }); + + // value will be accessible after mint + await this.token.$_mint(owner, nonExistentTokenId); + expect(await this.token.tokenURI(nonExistentTokenId)).to.be.equal(sampleUri); }); it('base URI can be set', async function () { From b7da617d8dd999c48ca0deeeb16b1c336d372873 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Sat, 2 Sep 2023 06:31:59 +0200 Subject: [PATCH 014/167] Define ERC-4906 interfaceId in a private constant (#4560) Co-authored-by: Francisco Giordano --- contracts/token/ERC721/extensions/ERC721URIStorage.sol | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contracts/token/ERC721/extensions/ERC721URIStorage.sol b/contracts/token/ERC721/extensions/ERC721URIStorage.sol index dbcf3d4e6..0a4f57322 100644 --- a/contracts/token/ERC721/extensions/ERC721URIStorage.sol +++ b/contracts/token/ERC721/extensions/ERC721URIStorage.sol @@ -14,6 +14,10 @@ import {IERC165} from "../../../interfaces/IERC165.sol"; abstract contract ERC721URIStorage is IERC4906, ERC721 { using Strings for uint256; + // Interface ID as defined in ERC-4906. This does not correspond to a traditional interface ID as ERC-4906 only + // defines events and does not include any external function. + bytes4 private constant ERC4906_INTERFACE_ID = bytes4(0x49064906); + // Optional mapping for token URIs mapping(uint256 tokenId => string) private _tokenURIs; @@ -21,7 +25,7 @@ abstract contract ERC721URIStorage is IERC4906, ERC721 { * @dev See {IERC165-supportsInterface} */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) { - return interfaceId == bytes4(0x49064906) || super.supportsInterface(interfaceId); + return interfaceId == ERC4906_INTERFACE_ID || super.supportsInterface(interfaceId); } /** From 424149a6826c119cb349f52c38f13c454ad10c57 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Sat, 2 Sep 2023 06:59:00 +0200 Subject: [PATCH 015/167] Stop cleaning up token specific data on ERC-721 burn (#4561) Co-authored-by: Francisco Giordano --- .changeset/fair-humans-peel.md | 5 ++++ .../token/ERC721/extensions/ERC721Royalty.sol | 13 --------- .../ERC721/extensions/ERC721URIStorage.sol | 15 ---------- .../ERC721/extensions/ERC721Royalty.test.js | 28 +++++++++++-------- .../extensions/ERC721URIStorage.test.js | 14 ++++++++-- 5 files changed, 34 insertions(+), 41 deletions(-) create mode 100644 .changeset/fair-humans-peel.md diff --git a/.changeset/fair-humans-peel.md b/.changeset/fair-humans-peel.md new file mode 100644 index 000000000..3c0dc3c06 --- /dev/null +++ b/.changeset/fair-humans-peel.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': major +--- + +`ERC721URIStorage`, `ERC721Royalty`: Stop resetting token-specific URI and royalties when burning. diff --git a/contracts/token/ERC721/extensions/ERC721Royalty.sol b/contracts/token/ERC721/extensions/ERC721Royalty.sol index 5b889b90d..6f31368e2 100644 --- a/contracts/token/ERC721/extensions/ERC721Royalty.sol +++ b/contracts/token/ERC721/extensions/ERC721Royalty.sol @@ -24,17 +24,4 @@ abstract contract ERC721Royalty is ERC2981, ERC721 { function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } - - /** - * @dev See {ERC721-_update}. When burning, this override will additionally clear the royalty information for the token. - */ - function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) { - address previousOwner = super._update(to, tokenId, auth); - - if (to == address(0)) { - _resetTokenRoyalty(tokenId); - } - - return previousOwner; - } } diff --git a/contracts/token/ERC721/extensions/ERC721URIStorage.sol b/contracts/token/ERC721/extensions/ERC721URIStorage.sol index 0a4f57322..b2adbbea3 100644 --- a/contracts/token/ERC721/extensions/ERC721URIStorage.sol +++ b/contracts/token/ERC721/extensions/ERC721URIStorage.sol @@ -58,19 +58,4 @@ abstract contract ERC721URIStorage is IERC4906, ERC721 { _tokenURIs[tokenId] = _tokenURI; emit MetadataUpdate(tokenId); } - - /** - * @dev See {ERC721-_update}. When burning, this override will additionally check if a - * token-specific URI was set for the token, and if so, it deletes the token URI from - * the storage mapping. - */ - function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) { - address previousOwner = super._update(to, tokenId, auth); - - if (to == address(0) && bytes(_tokenURIs[tokenId]).length != 0) { - delete _tokenURIs[tokenId]; - } - - return previousOwner; - } } diff --git a/test/token/ERC721/extensions/ERC721Royalty.test.js b/test/token/ERC721/extensions/ERC721Royalty.test.js index 1c0536bf5..78cba9858 100644 --- a/test/token/ERC721/extensions/ERC721Royalty.test.js +++ b/test/token/ERC721/extensions/ERC721Royalty.test.js @@ -1,15 +1,15 @@ -const { BN, constants } = require('@openzeppelin/test-helpers'); +require('@openzeppelin/test-helpers'); const { shouldBehaveLikeERC2981 } = require('../../common/ERC2981.behavior'); const ERC721Royalty = artifacts.require('$ERC721Royalty'); contract('ERC721Royalty', function (accounts) { - const [account1, account2] = accounts; - const tokenId1 = new BN('1'); - const tokenId2 = new BN('2'); - const royalty = new BN('200'); - const salePrice = new BN('1000'); + const [account1, account2, recipient] = accounts; + const tokenId1 = web3.utils.toBN('1'); + const tokenId2 = web3.utils.toBN('2'); + const royalty = web3.utils.toBN('200'); + const salePrice = web3.utils.toBN('1000'); beforeEach(async function () { this.token = await ERC721Royalty.new('My Token', 'TKN'); @@ -25,15 +25,21 @@ contract('ERC721Royalty', function (accounts) { describe('token specific functions', function () { beforeEach(async function () { - await this.token.$_setTokenRoyalty(tokenId1, account1, royalty); + await this.token.$_setTokenRoyalty(tokenId1, recipient, royalty); }); - it('removes royalty information after burn', async function () { + it('royalty information are kept during burn and re-mint', async function () { await this.token.$_burn(tokenId1); - const tokenInfo = await this.token.royaltyInfo(tokenId1, salePrice); - expect(tokenInfo[0]).to.be.equal(constants.ZERO_ADDRESS); - expect(tokenInfo[1]).to.be.bignumber.equal(new BN('0')); + const tokenInfoA = await this.token.royaltyInfo(tokenId1, salePrice); + expect(tokenInfoA[0]).to.be.equal(recipient); + expect(tokenInfoA[1]).to.be.bignumber.equal(salePrice.mul(royalty).divn(1e4)); + + await this.token.$_mint(account2, tokenId1); + + const tokenInfoB = await this.token.royaltyInfo(tokenId1, salePrice); + expect(tokenInfoB[0]).to.be.equal(recipient); + expect(tokenInfoB[1]).to.be.bignumber.equal(salePrice.mul(royalty).divn(1e4)); }); }); diff --git a/test/token/ERC721/extensions/ERC721URIStorage.test.js b/test/token/ERC721/extensions/ERC721URIStorage.test.js index dc208d1ea..8c882fab0 100644 --- a/test/token/ERC721/extensions/ERC721URIStorage.test.js +++ b/test/token/ERC721/extensions/ERC721URIStorage.test.js @@ -88,7 +88,7 @@ contract('ERC721URIStorage', function (accounts) { }); it('tokens without URI can be burnt ', async function () { - await this.token.$_burn(firstTokenId, { from: owner }); + await this.token.$_burn(firstTokenId); await expectRevertCustomError(this.token.tokenURI(firstTokenId), 'ERC721NonexistentToken', [firstTokenId]); }); @@ -96,9 +96,19 @@ contract('ERC721URIStorage', function (accounts) { it('tokens with URI can be burnt ', async function () { await this.token.$_setTokenURI(firstTokenId, sampleUri); - await this.token.$_burn(firstTokenId, { from: owner }); + await this.token.$_burn(firstTokenId); await expectRevertCustomError(this.token.tokenURI(firstTokenId), 'ERC721NonexistentToken', [firstTokenId]); }); + + it('tokens URI is kept if token is burnt and reminted ', async function () { + await this.token.$_setTokenURI(firstTokenId, sampleUri); + + await this.token.$_burn(firstTokenId); + await expectRevertCustomError(this.token.tokenURI(firstTokenId), 'ERC721NonexistentToken', [firstTokenId]); + + await this.token.$_mint(owner, firstTokenId); + expect(await this.token.tokenURI(firstTokenId)).to.be.equal(sampleUri); + }); }); }); From 98b83dfbaa94091626deb5993907769e032ecfcf Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 4 Sep 2023 05:11:30 -0300 Subject: [PATCH 016/167] Move security directory contents to utils (#4551) --- .changeset/smooth-cougars-jump.md | 5 ++++ certora/harnesses/PausableHarness.sol | 2 +- contracts/mocks/PausableMock.sol | 2 +- contracts/mocks/ReentrancyMock.sol | 2 +- contracts/security/README.adoc | 17 ------------- .../ERC1155/extensions/ERC1155Pausable.sol | 2 +- .../token/ERC20/extensions/ERC20Pausable.sol | 2 +- .../ERC721/extensions/ERC721Pausable.sol | 2 +- contracts/{security => utils}/Pausable.sol | 0 contracts/utils/README.adoc | 25 +++++++++++-------- .../{security => utils}/ReentrancyGuard.sol | 0 test/{security => utils}/Pausable.test.js | 0 .../ReentrancyGuard.test.js | 0 13 files changed, 25 insertions(+), 34 deletions(-) create mode 100644 .changeset/smooth-cougars-jump.md delete mode 100644 contracts/security/README.adoc rename contracts/{security => utils}/Pausable.sol (100%) rename contracts/{security => utils}/ReentrancyGuard.sol (100%) rename test/{security => utils}/Pausable.test.js (100%) rename test/{security => utils}/ReentrancyGuard.test.js (100%) diff --git a/.changeset/smooth-cougars-jump.md b/.changeset/smooth-cougars-jump.md new file mode 100644 index 000000000..337101cd0 --- /dev/null +++ b/.changeset/smooth-cougars-jump.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': major +--- + +`ReentrancyGuard`, `Pausable`: Moved to `utils` directory. diff --git a/certora/harnesses/PausableHarness.sol b/certora/harnesses/PausableHarness.sol index b9c15cf54..12f946709 100644 --- a/certora/harnesses/PausableHarness.sol +++ b/certora/harnesses/PausableHarness.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; -import "../patched/security/Pausable.sol"; +import "../patched/utils/Pausable.sol"; contract PausableHarness is Pausable { function pause() external { diff --git a/contracts/mocks/PausableMock.sol b/contracts/mocks/PausableMock.sol index abe50c6c9..fa701e2c7 100644 --- a/contracts/mocks/PausableMock.sol +++ b/contracts/mocks/PausableMock.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; -import {Pausable} from "../security/Pausable.sol"; +import {Pausable} from "../utils/Pausable.sol"; contract PausableMock is Pausable { bool public drasticMeasureTaken; diff --git a/contracts/mocks/ReentrancyMock.sol b/contracts/mocks/ReentrancyMock.sol index f275c88e2..39e2d5ed8 100644 --- a/contracts/mocks/ReentrancyMock.sol +++ b/contracts/mocks/ReentrancyMock.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; -import {ReentrancyGuard} from "../security/ReentrancyGuard.sol"; +import {ReentrancyGuard} from "../utils/ReentrancyGuard.sol"; import {ReentrancyAttack} from "./ReentrancyAttack.sol"; contract ReentrancyMock is ReentrancyGuard { diff --git a/contracts/security/README.adoc b/contracts/security/README.adoc deleted file mode 100644 index 7f4799eb8..000000000 --- a/contracts/security/README.adoc +++ /dev/null @@ -1,17 +0,0 @@ -= Security - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/security - -These contracts aim to cover common security practices. - -* {ReentrancyGuard}: A modifier that can prevent reentrancy during certain functions. -* {Pausable}: A common emergency response mechanism that can pause functionality while a remediation is pending. - -TIP: For an overview on reentrancy and the possible mechanisms to prevent it, read our article https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. - -== Contracts - -{{ReentrancyGuard}} - -{{Pausable}} diff --git a/contracts/token/ERC1155/extensions/ERC1155Pausable.sol b/contracts/token/ERC1155/extensions/ERC1155Pausable.sol index 914420ccc..96f2400f8 100644 --- a/contracts/token/ERC1155/extensions/ERC1155Pausable.sol +++ b/contracts/token/ERC1155/extensions/ERC1155Pausable.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; import {ERC1155} from "../ERC1155.sol"; -import {Pausable} from "../../../security/Pausable.sol"; +import {Pausable} from "../../../utils/Pausable.sol"; /** * @dev ERC1155 token with pausable token transfers, minting and burning. diff --git a/contracts/token/ERC20/extensions/ERC20Pausable.sol b/contracts/token/ERC20/extensions/ERC20Pausable.sol index 6ac0db2e2..e7c311cc1 100644 --- a/contracts/token/ERC20/extensions/ERC20Pausable.sol +++ b/contracts/token/ERC20/extensions/ERC20Pausable.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; import {ERC20} from "../ERC20.sol"; -import {Pausable} from "../../../security/Pausable.sol"; +import {Pausable} from "../../../utils/Pausable.sol"; /** * @dev ERC20 token with pausable token transfers, minting and burning. diff --git a/contracts/token/ERC721/extensions/ERC721Pausable.sol b/contracts/token/ERC721/extensions/ERC721Pausable.sol index 301469d0a..420edab22 100644 --- a/contracts/token/ERC721/extensions/ERC721Pausable.sol +++ b/contracts/token/ERC721/extensions/ERC721Pausable.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; import {ERC721} from "../ERC721.sol"; -import {Pausable} from "../../../security/Pausable.sol"; +import {Pausable} from "../../../utils/Pausable.sol"; /** * @dev ERC721 token with pausable token transfers, minting and burning. diff --git a/contracts/security/Pausable.sol b/contracts/utils/Pausable.sol similarity index 100% rename from contracts/security/Pausable.sol rename to contracts/utils/Pausable.sol diff --git a/contracts/utils/README.adoc b/contracts/utils/README.adoc index d95f4dad4..d88b00199 100644 --- a/contracts/utils/README.adoc +++ b/contracts/utils/README.adoc @@ -5,23 +5,20 @@ NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/ Miscellaneous contracts and libraries containing utility functions you can use to improve security, work with new data types, or safely use low-level primitives. -The {Address}, {Arrays}, {Base64} and {Strings} libraries provide more operations related to these native data types, while {SafeCast} adds ways to safely convert between the different signed and unsigned numeric types. -{Multicall} provides a function to batch together multiple calls in a single external call. - -For new data types: - - * {EnumerableMap}: like Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] type, but with key-value _enumeration_: this will let you know how many entries a mapping has, and iterate over them (which is not possible with `mapping`). - * {EnumerableSet}: like {EnumerableMap}, but for https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets]. Can be used to store privileged accounts, issued IDs, etc. + * {ReentrancyGuard}: A modifier that can prevent reentrancy during certain functions. + * {Pausable}: A common emergency response mechanism that can pause functionality while a remediation is pending. + * {SafeCast}: Checked downcasting functions to avoid silent truncation. + * {Math}, {SignedMath}: Implementation of various arithmetic functions. + * {Multicall}: Simple way to batch together multiple calls in a single external call. + * {Create2}: Wrapper around the https://blog.openzeppelin.com/getting-the-most-out-of-create2/[`CREATE2` EVM opcode] for safe use without having to deal with low-level assembly. + * {EnumerableMap}: A type like Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`], but with key-value _enumeration_: this will let you know how many entries a mapping has, and iterate over them (which is not possible with `mapping`). + * {EnumerableSet}: Like {EnumerableMap}, but for https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets]. Can be used to store privileged accounts, issued IDs, etc. [NOTE] ==== Because Solidity does not support generic types, {EnumerableMap} and {EnumerableSet} are specialized to a limited number of key-value types. - -As of v3.0, {EnumerableMap} supports `uint256 -> address` (`UintToAddressMap`), and {EnumerableSet} supports `address` and `uint256` (`AddressSet` and `UintSet`). ==== -Finally, {Create2} contains all necessary utilities to safely use the https://blog.openzeppelin.com/getting-the-most-out-of-create2/[`CREATE2` EVM opcode], without having to deal with low-level assembly. - == Math {{Math}} @@ -42,6 +39,12 @@ Finally, {Create2} contains all necessary utilities to safely use the https://bl {{EIP712}} +== Security + +{{ReentrancyGuard}} + +{{Pausable}} + == Introspection This set of interfaces and contracts deal with https://en.wikipedia.org/wiki/Type_introspection[type introspection] of contracts, that is, examining which functions can be called on them. This is usually referred to as a contract's _interface_. diff --git a/contracts/security/ReentrancyGuard.sol b/contracts/utils/ReentrancyGuard.sol similarity index 100% rename from contracts/security/ReentrancyGuard.sol rename to contracts/utils/ReentrancyGuard.sol diff --git a/test/security/Pausable.test.js b/test/utils/Pausable.test.js similarity index 100% rename from test/security/Pausable.test.js rename to test/utils/Pausable.test.js diff --git a/test/security/ReentrancyGuard.test.js b/test/utils/ReentrancyGuard.test.js similarity index 100% rename from test/security/ReentrancyGuard.test.js rename to test/utils/ReentrancyGuard.test.js From c0545f741b742f204ac3d9de6d193e7b9b35f94b Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 4 Sep 2023 05:16:23 -0300 Subject: [PATCH 017/167] Delete unused variable (#4565) --- contracts/access/manager/AccessManager.sol | 2 -- 1 file changed, 2 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 01ac7664e..d6c966be0 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -97,8 +97,6 @@ contract AccessManager is Context, Multicall, IAccessManager { mapping(bytes32 operationId => Schedule) private _schedules; - mapping(bytes4 selector => Time.Delay delay) private _adminDelays; - // This should be transcient storage when supported by the EVM. bytes32 private _relayIdentifier; From a503ba1a0a1a5d1a434b6fca5e25ff5eca0a35fa Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 4 Sep 2023 05:17:03 -0300 Subject: [PATCH 018/167] Avoid overflow on empty multiproof (#4564) --- .changeset/large-humans-remain.md | 5 +++++ contracts/utils/cryptography/MerkleProof.sol | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/large-humans-remain.md diff --git a/.changeset/large-humans-remain.md b/.changeset/large-humans-remain.md new file mode 100644 index 000000000..95b72aea4 --- /dev/null +++ b/.changeset/large-humans-remain.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': patch +--- + +`MerkleProof`: Use custom error to report invalid multiproof instead of reverting with overflow panic. diff --git a/contracts/utils/cryptography/MerkleProof.sol b/contracts/utils/cryptography/MerkleProof.sol index b42a080c8..a1f5129f0 100644 --- a/contracts/utils/cryptography/MerkleProof.sol +++ b/contracts/utils/cryptography/MerkleProof.sol @@ -118,7 +118,7 @@ library MerkleProof { uint256 totalHashes = proofFlags.length; // Check proof validity. - if (leavesLen + proofLen - 1 != totalHashes) { + if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } @@ -174,7 +174,7 @@ library MerkleProof { uint256 totalHashes = proofFlags.length; // Check proof validity. - if (leavesLen + proofLen - 1 != totalHashes) { + if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } From 961208382660991e7679eb03865a2785e2c8cabe Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 4 Sep 2023 10:54:21 -0300 Subject: [PATCH 019/167] Refactor ERC721 `_requireMinted` and `ownerOf` (#4566) --- .changeset/proud-spiders-attend.md | 5 ++++ contracts/token/ERC721/ERC721.sol | 23 ++++++++++--------- .../ERC721/extensions/ERC721URIStorage.sol | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 .changeset/proud-spiders-attend.md diff --git a/.changeset/proud-spiders-attend.md b/.changeset/proud-spiders-attend.md new file mode 100644 index 000000000..a8f7694c7 --- /dev/null +++ b/.changeset/proud-spiders-attend.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': major +--- + +`ERC721`: Renamed `_requireMinted` to `_requireOwned` and added a return value with the current owner. Implemented `ownerOf` in terms of `_requireOwned`. diff --git a/contracts/token/ERC721/ERC721.sol b/contracts/token/ERC721/ERC721.sol index d56e33775..efca4b434 100644 --- a/contracts/token/ERC721/ERC721.sol +++ b/contracts/token/ERC721/ERC721.sol @@ -65,11 +65,7 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual returns (address) { - address owner = _ownerOf(tokenId); - if (owner == address(0)) { - revert ERC721NonexistentToken(tokenId); - } - return owner; + return _requireOwned(tokenId); } /** @@ -90,7 +86,7 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual returns (string memory) { - _requireMinted(tokenId); + _requireOwned(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : ""; @@ -116,7 +112,7 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual returns (address) { - _requireMinted(tokenId); + _requireOwned(tokenId); return _getApproved(tokenId); } @@ -397,7 +393,7 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId, address auth) internal virtual returns (address) { - address owner = ownerOf(tokenId); + address owner = _requireOwned(tokenId); // We do not use _isAuthorized because single-token approvals should not be able to call approve if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { @@ -427,12 +423,17 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er } /** - * @dev Reverts if the `tokenId` has not been minted yet. + * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned). + * Returns the owner. + * + * Overrides to ownership logic should be done to {_ownerOf}. */ - function _requireMinted(uint256 tokenId) internal view virtual { - if (_ownerOf(tokenId) == address(0)) { + function _requireOwned(uint256 tokenId) internal view returns (address) { + address owner = _ownerOf(tokenId); + if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } + return owner; } /** diff --git a/contracts/token/ERC721/extensions/ERC721URIStorage.sol b/contracts/token/ERC721/extensions/ERC721URIStorage.sol index b2adbbea3..e515f2369 100644 --- a/contracts/token/ERC721/extensions/ERC721URIStorage.sol +++ b/contracts/token/ERC721/extensions/ERC721URIStorage.sol @@ -32,7 +32,7 @@ abstract contract ERC721URIStorage is IERC4906, ERC721 { * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { - _requireMinted(tokenId); + _requireOwned(tokenId); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); From 9d2adccf876ed66245ada8ae503c0983968b503a Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Mon, 4 Sep 2023 18:47:51 +0200 Subject: [PATCH 020/167] Add a minimum delay on all admin update operations (#4557) Co-authored-by: Francisco --- contracts/access/manager/AccessManager.sol | 10 +- test/access/manager/AccessManager.test.js | 116 ++++++++++++++++----- 2 files changed, 97 insertions(+), 29 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index d6c966be0..29e23cea5 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -154,10 +154,12 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Minimum setback for delay updates. Defaults to 1 day. + * @dev Minimum setback for all delay updates, with the exception of execution delays, which + * can be increased without setback (and in the event of an accidental increase can be reset + * via {revokeGroup}). Defaults to 5 days. */ function minSetback() public view virtual returns (uint32) { - return 0; // TODO: set to 1 day + return 5 days; } /** @@ -367,9 +369,11 @@ contract AccessManager is Context, Multicall, IAccessManager { uint48 since; if (inGroup) { + // No setback here. Value can be reset by doing revoke + grant, effectively allowing the admin to perform + // any change to the execution delay within the duration of the group admin delay. (_groups[groupId].members[account].delay, since) = _groups[groupId].members[account].delay.withUpdate( executionDelay, - minSetback() + 0 ); } else { since = Time.timestamp() + grantDelay; diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 538120e00..7b05dc143 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -22,6 +22,8 @@ const classId = web3.utils.toBN(1); const executeDelay = web3.utils.toBN(10); const grantDelay = web3.utils.toBN(10); +const MINSETBACK = time.duration.days(5); + const formatAccess = access => [access[0], access[1].toString()]; contract('AccessManager', function (accounts) { @@ -37,6 +39,10 @@ contract('AccessManager', function (accounts) { await this.manager.$_grantGroup(GROUPS.SOME, member, 0, 0); }); + it('default minsetback is 1 day', async function () { + expect(await this.manager.minSetback()).to.be.bignumber.equal(MINSETBACK); + }); + it('groups are correctly initialized', async function () { // group admin expect(await this.manager.getGroupAdmin(GROUPS.ADMIN)).to.be.bignumber.equal(GROUPS.ADMIN); @@ -161,6 +167,7 @@ contract('AccessManager', function (accounts) { describe('with a grant delay', function () { beforeEach(async function () { await this.manager.$_setGrantDelay(GROUPS.SOME, grantDelay); + await time.increase(MINSETBACK); }); it('granted group is not active immediatly', async function () { @@ -350,6 +357,7 @@ contract('AccessManager', function (accounts) { const oldDelay = web3.utils.toBN(10); const newDelay = web3.utils.toBN(100); + // group is already granted (with no delay) in the initial setup. this update takes time. await this.manager.$_grantGroup(GROUPS.SOME, member, 0, oldDelay); const accessBefore = await this.manager.getAccess(GROUPS.SOME, member); @@ -380,6 +388,7 @@ contract('AccessManager', function (accounts) { const oldDelay = web3.utils.toBN(100); const newDelay = web3.utils.toBN(10); + // group is already granted (with no delay) in the initial setup. this update takes time. await this.manager.$_grantGroup(GROUPS.SOME, member, 0, oldDelay); const accessBefore = await this.manager.getAccess(GROUPS.SOME, member); @@ -391,27 +400,37 @@ contract('AccessManager', function (accounts) { from: manager, }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + const setback = oldDelay.sub(newDelay); expectEvent(receipt, 'GroupGranted', { groupId: GROUPS.SOME, account: member, - since: timestamp.add(oldDelay).sub(newDelay), + since: timestamp.add(setback), delay: newDelay, }); - // delayed effect + // no immediate effect const accessAfter = await this.manager.getAccess(GROUPS.SOME, member); expect(accessAfter[1]).to.be.bignumber.equal(oldDelay); // currentDelay expect(accessAfter[2]).to.be.bignumber.equal(newDelay); // pendingDelay - expect(accessAfter[3]).to.be.bignumber.equal(timestamp.add(oldDelay).sub(newDelay)); // effect + expect(accessAfter[3]).to.be.bignumber.equal(timestamp.add(setback)); // effect + + // delayed effect + await time.increase(setback); + const accessAfterSetback = await this.manager.getAccess(GROUPS.SOME, member); + expect(accessAfterSetback[1]).to.be.bignumber.equal(newDelay); // currentDelay + expect(accessAfterSetback[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(accessAfterSetback[3]).to.be.bignumber.equal('0'); // effect }); it('can set a user execution delay during the grant delay', async function () { await this.manager.$_grantGroup(GROUPS.SOME, other, 10, 0); + // here: "other" is pending to get the group, but doesn't yet have it. const { receipt } = await this.manager.grantGroup(GROUPS.SOME, other, executeDelay, { from: manager }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + // increasing the execution delay from 0 to executeDelay is immediate expectEvent(receipt, 'GroupGranted', { groupId: GROUPS.SOME, account: other, @@ -425,38 +444,75 @@ contract('AccessManager', function (accounts) { it('increasing the delay has immediate effect', async function () { const oldDelay = web3.utils.toBN(10); const newDelay = web3.utils.toBN(100); + await this.manager.$_setGrantDelay(GROUPS.SOME, oldDelay); + await time.increase(MINSETBACK); expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); const { receipt } = await this.manager.setGrantDelay(GROUPS.SOME, newDelay, { from: admin }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + const setback = web3.utils.BN.max(MINSETBACK, oldDelay.sub(newDelay)); - expectEvent(receipt, 'GroupGrantDelayChanged', { groupId: GROUPS.SOME, delay: newDelay, since: timestamp }); + expect(setback).to.be.bignumber.equal(MINSETBACK); + expectEvent(receipt, 'GroupGrantDelayChanged', { + groupId: GROUPS.SOME, + delay: newDelay, + since: timestamp.add(setback), + }); + expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); + await time.increase(setback); expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(newDelay); }); - it('increasing the delay has delay effect', async function () { + it('increasing the delay has delay effect #1', async function () { const oldDelay = web3.utils.toBN(100); const newDelay = web3.utils.toBN(10); + await this.manager.$_setGrantDelay(GROUPS.SOME, oldDelay); + await time.increase(MINSETBACK); expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); const { receipt } = await this.manager.setGrantDelay(GROUPS.SOME, newDelay, { from: admin }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + const setback = web3.utils.BN.max(MINSETBACK, oldDelay.sub(newDelay)); + expect(setback).to.be.bignumber.equal(MINSETBACK); expectEvent(receipt, 'GroupGrantDelayChanged', { groupId: GROUPS.SOME, delay: newDelay, - since: timestamp.add(oldDelay).sub(newDelay), + since: timestamp.add(setback), }); expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); + await time.increase(setback); + expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(newDelay); + }); - await time.increase(oldDelay.sub(newDelay)); + it('increasing the delay has delay effect #2', async function () { + const oldDelay = time.duration.days(30); // more than the minsetback + const newDelay = web3.utils.toBN(10); + + await this.manager.$_setGrantDelay(GROUPS.SOME, oldDelay); + await time.increase(MINSETBACK); + expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); + + const { receipt } = await this.manager.setGrantDelay(GROUPS.SOME, newDelay, { from: admin }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + const setback = web3.utils.BN.max(MINSETBACK, oldDelay.sub(newDelay)); + + expect(setback).to.be.bignumber.gt(MINSETBACK); + expectEvent(receipt, 'GroupGrantDelayChanged', { + groupId: GROUPS.SOME, + delay: newDelay, + since: timestamp.add(setback), + }); + + expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); + await time.increase(setback); expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(newDelay); }); @@ -1050,8 +1106,8 @@ contract('AccessManager', function (accounts) { // TODO: test all admin functions describe('class delays', function () { - const otherClassId = '2'; - const delay = '1000'; + const otherClassId = web3.utils.toBN(2); + const delay = web3.utils.toBN(1000); beforeEach('set contract class', async function () { this.target = await AccessManagedTarget.new(this.manager.address); @@ -1065,9 +1121,7 @@ contract('AccessManager', function (accounts) { await this.call(); }); - // TODO: here we need to check increase and decrease. - // - Increasing should have immediate effect - // - Decreasing should take time. + // TODO: here we need to check increase and decrease. Both should have be affected by the minsetback. describe('with delay', function () { beforeEach('set admin delay', async function () { this.tx = await this.manager.setClassAdminDelay(classId, delay, { from: admin }); @@ -1077,28 +1131,38 @@ contract('AccessManager', function (accounts) { }); it('emits event and sets delay', async function () { - const since = await clockFromReceipt.timestamp(this.tx.receipt).then(web3.utils.toBN); - expectEvent(this.tx.receipt, 'ClassAdminDelayUpdated', { classId, delay, since }); + const timepoint = await clockFromReceipt.timestamp(this.tx.receipt).then(web3.utils.toBN); - expect(await this.manager.getClassAdminDelay(classId)).to.be.bignumber.equal(delay); - }); + expectEvent(this.tx.receipt, 'ClassAdminDelayUpdated', { classId, delay, since: timepoint.add(MINSETBACK) }); - it('without prior scheduling: reverts', async function () { - await expectRevertCustomError(this.call(), 'AccessManagerNotScheduled', [this.opId]); + // wait for delay to become active + expect(await this.manager.getClassAdminDelay(classId)).to.be.bignumber.equal('0'); + await time.increase(MINSETBACK); + expect(await this.manager.getClassAdminDelay(classId)).to.be.bignumber.equal(delay); }); - describe('with prior scheduling', async function () { - beforeEach('schedule', async function () { - await this.manager.schedule(this.manager.address, this.data, 0, { from: admin }); + describe('after setback', function () { + beforeEach('wait', async function () { + await time.increase(MINSETBACK); }); - it('without delay: reverts', async function () { - await expectRevertCustomError(this.call(), 'AccessManagerNotReady', [this.opId]); + it('without prior scheduling: reverts', async function () { + await expectRevertCustomError(this.call(), 'AccessManagerNotScheduled', [this.opId]); }); - it('with delay: succeeds', async function () { - await time.increase(delay); - await this.call(); + describe('with prior scheduling', async function () { + beforeEach('schedule', async function () { + await this.manager.schedule(this.manager.address, this.data, 0, { from: admin }); + }); + + it('without delay: reverts', async function () { + await expectRevertCustomError(this.call(), 'AccessManagerNotReady', [this.opId]); + }); + + it('with delay: succeeds', async function () { + await time.increase(delay); + await this.call(); + }); }); }); }); From f154bc31d4f7b6f7a0218f98df9a75fc47ca1c4f Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Mon, 4 Sep 2023 18:54:28 +0200 Subject: [PATCH 021/167] Fix some spelling issues in AccessManager.sol & Time.sol (#4571) Co-authored-by: Francisco --- contracts/access/manager/AccessManager.sol | 20 ++++++++++---------- contracts/utils/types/Time.sol | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 29e23cea5..72176f5e3 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -45,7 +45,7 @@ import {Time} from "../../utils/types/Time.sol"; * will be {AccessManager} itself. * * WARNING: When granting permissions over an {Ownable} or {AccessControl} contract to an {AccessManager}, be very - * mindful of the danger associated with functions such as {{Ownable-renounceOwnership}} or + * mindful of the danger associated with functions such as {{Ownable-renounceOwnership}} or * {{AccessControl-renounceRole}}. */ contract AccessManager is Context, Multicall, IAccessManager { @@ -56,10 +56,10 @@ contract AccessManager is Context, Multicall, IAccessManager { bool closed; } - // Structure that stores the details for a group/account pair. This structures fit into a single slot. + // Structure that stores the details for a group/account pair. This structure fits into a single slot. struct Access { // Timepoint at which the user gets the permission. If this is either 0, or in the future, the group permission - // are not available. Should be checked using {Time-isSetAndPast} + // is not available. Should be checked using {Time-isSetAndPast} uint48 since; // delay for execution. Only applies to restricted() / relay() calls. This does not restrict access to // functions that use the `onlyGroup` modifier. @@ -70,7 +70,7 @@ contract AccessManager is Context, Multicall, IAccessManager { // - the members of the group // - the admin group (that can grant or revoke permissions) // - the guardian group (that can cancel operations targeting functions that need this group - // - the grand delay + // - the grant delay struct Group { mapping(address user => Access access) members; uint64 admin; @@ -97,7 +97,7 @@ contract AccessManager is Context, Multicall, IAccessManager { mapping(bytes32 operationId => Schedule) private _schedules; - // This should be transcient storage when supported by the EVM. + // This should be transient storage when supported by the EVM. bytes32 private _relayIdentifier; /** @@ -128,8 +128,8 @@ contract AccessManager is Context, Multicall, IAccessManager { * the schedule, leaving the possibility of multiple executions. Maybe this function should not be view? * * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that - * is backward compatible. Some contract may thus ignore the second return argument. In that case they will fail - * to identify the indirect workflow, and will consider call that require a delay to be forbidden. + * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail + * to identify the indirect workflow, and will consider calls that require a delay to be forbidden. */ function canCall(address caller, address target, bytes4 selector) public view virtual returns (bool, uint32) { (uint64 classId, bool closed) = getContractClass(target); @@ -212,7 +212,7 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Get the access details for a given account in a given group. These details include the timepoint at which - * membership becomes active, and the delay applied to all operation by this user that require this permission + * membership becomes active, and the delay applied to all operation by this user that requires this permission * level. * * Returns: @@ -607,7 +607,7 @@ contract AccessManager is Context, Multicall, IAccessManager { ) public virtual returns (bytes32 operationId, uint32 nonce) { address caller = _msgSender(); - // Fetch restriction to that apply to the caller on the targeted function + // Fetch restrictions that apply to the caller on the targeted function (bool allowed, uint32 setback) = _canCallExtended(caller, target, data); uint48 minWhen = Time.timestamp() + setback; @@ -656,7 +656,7 @@ contract AccessManager is Context, Multicall, IAccessManager { function relay(address target, bytes calldata data) public payable virtual returns (uint32) { address caller = _msgSender(); - // Fetch restriction to that apply to the caller on the targeted function + // Fetch restrictions that apply to the caller on the targeted function (bool allowed, uint32 setback) = _canCallExtended(caller, target, data); // If caller is not authorised, revert diff --git a/contracts/utils/types/Time.sol b/contracts/utils/types/Time.sol index 9f640ec33..5e8a2d9e0 100644 --- a/contracts/utils/types/Time.sol +++ b/contracts/utils/types/Time.sol @@ -44,9 +44,9 @@ library Time { /** * @dev A `Delay` is a uint32 duration that can be programmed to change value automatically at a given point in the * future. The "effect" timepoint describes when the transitions happens from the "old" value to the "new" value. - * This allows updating the delay applied to some operation while keeping so guarantees. + * This allows updating the delay applied to some operation while keeping some guarantees. * - * In particular, the {update} function guarantees that is the delay is reduced, the old delay still applies for + * In particular, the {update} function guarantees that if the delay is reduced, the old delay still applies for * some time. For example if the delay is currently 7 days to do an upgrade, the admin should not be able to set * the delay to 0 and upgrade immediately. If the admin wants to reduce the delay, the old delay (7 days) should * still apply for some time. @@ -113,8 +113,8 @@ library Time { } /** - * @dev Update a Delay object so that it takes a new duration after at a timepoint that is automatically computed - * to enforce the old delay at the moment of the update. Returns the updated Delay object and the timestamp when the + * @dev Update a Delay object so that it takes a new duration after a timepoint that is automatically computed to + * enforce the old delay at the moment of the update. Returns the updated Delay object and the timestamp when the * new delay becomes effective. */ function withUpdate(Delay self, uint32 newValue, uint32 minSetback) internal view returns (Delay, uint48) { From e7ba2f778487c9adf708552565ed00491e619482 Mon Sep 17 00:00:00 2001 From: NishantKoyalwar <122688383+NishantKoyalwar@users.noreply.github.com> Date: Tue, 5 Sep 2023 01:47:16 +0530 Subject: [PATCH 022/167] Move beneficiary zero address check to Ownable (#4531) Co-authored-by: Hadrien Croubois Co-authored-by: Francisco --- .changeset/clever-bats-kick.md | 5 +++++ contracts/access/Ownable.sol | 3 +++ contracts/finance/VestingWallet.sol | 9 --------- test/access/Ownable.test.js | 4 ++++ test/finance/VestingWallet.test.js | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 .changeset/clever-bats-kick.md diff --git a/.changeset/clever-bats-kick.md b/.changeset/clever-bats-kick.md new file mode 100644 index 000000000..b35301b73 --- /dev/null +++ b/.changeset/clever-bats-kick.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': patch +--- + +`Ownable`: Prevent using address(0) as the initial owner. diff --git a/contracts/access/Ownable.sol b/contracts/access/Ownable.sol index aa495ff4d..3cf113782 100644 --- a/contracts/access/Ownable.sol +++ b/contracts/access/Ownable.sol @@ -36,6 +36,9 @@ abstract contract Ownable is Context { * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { + if (initialOwner == address(0)) { + revert OwnableInvalidOwner(address(0)); + } _transferOwnership(initialOwner); } diff --git a/contracts/finance/VestingWallet.sol b/contracts/finance/VestingWallet.sol index 7b50e699e..f014e59c4 100644 --- a/contracts/finance/VestingWallet.sol +++ b/contracts/finance/VestingWallet.sol @@ -31,11 +31,6 @@ contract VestingWallet is Context, Ownable { event EtherReleased(uint256 amount); event ERC20Released(address indexed token, uint256 amount); - /** - * @dev The `beneficiary` is not a valid account. - */ - error VestingWalletInvalidBeneficiary(address beneficiary); - uint256 private _released; mapping(address token => uint256) private _erc20Released; uint64 private immutable _start; @@ -46,10 +41,6 @@ contract VestingWallet is Context, Ownable { * vesting duration of the vesting wallet. */ constructor(address beneficiary, uint64 startTimestamp, uint64 durationSeconds) payable Ownable(beneficiary) { - if (beneficiary == address(0)) { - revert VestingWalletInvalidBeneficiary(address(0)); - } - _start = startTimestamp; _duration = durationSeconds; } diff --git a/test/access/Ownable.test.js b/test/access/Ownable.test.js index 079d694d7..f85daec5d 100644 --- a/test/access/Ownable.test.js +++ b/test/access/Ownable.test.js @@ -14,6 +14,10 @@ contract('Ownable', function (accounts) { this.ownable = await Ownable.new(owner); }); + it('rejects zero address for initialOwner', async function () { + await expectRevertCustomError(Ownable.new(constants.ZERO_ADDRESS), 'OwnableInvalidOwner', [constants.ZERO_ADDRESS]); + }); + it('has an owner', async function () { expect(await this.ownable.owner()).to.equal(owner); }); diff --git a/test/finance/VestingWallet.test.js b/test/finance/VestingWallet.test.js index d79aea195..918e56345 100644 --- a/test/finance/VestingWallet.test.js +++ b/test/finance/VestingWallet.test.js @@ -23,7 +23,7 @@ contract('VestingWallet', function (accounts) { it('rejects zero address for beneficiary', async function () { await expectRevertCustomError( VestingWallet.new(constants.ZERO_ADDRESS, this.start, duration), - 'VestingWalletInvalidBeneficiary', + 'OwnableInvalidOwner', [constants.ZERO_ADDRESS], ); }); From 1523a4f071f101d4bcbffcd4b87dd1b03080ec26 Mon Sep 17 00:00:00 2001 From: Ownerless Inc <90667119+0xneves@users.noreply.github.com> Date: Mon, 4 Sep 2023 18:05:42 -0300 Subject: [PATCH 023/167] Fix accuracy of docs for ERC20._burn (#4574) Co-authored-by: Francisco --- contracts/token/ERC20/ERC20.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index 343881ff3..8eeb3149b 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/contracts/token/ERC20/ERC20.sol @@ -287,7 +287,7 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { } /** - * @dev Destroys a `value` amount of tokens from `account`, by transferring it to address(0). + * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. From 9ef69c03d13230aeff24d91cb54c9d24c4de7c8b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 21:38:01 +0000 Subject: [PATCH 024/167] Update actions/checkout action to v4 (#4572) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Francisco Giordano --- .github/workflows/actionlint.yml | 2 +- .github/workflows/changeset.yml | 2 +- .github/workflows/checks.yml | 14 +++++++------- .github/workflows/docs.yml | 2 +- .github/workflows/formal-verification.yml | 4 ++-- .github/workflows/release-cycle.yml | 14 +++++++------- .github/workflows/upgradeable.yml | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 8193109cf..3e42c8a26 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -9,7 +9,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Add problem matchers run: | # https://github.com/rhysd/actionlint/blob/3a2f2c7/docs/usage.md#problem-matchers diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index 5fe70cfcc..efc5c5347 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest if: ${{ !contains(github.event.pull_request.labels.*.name, 'ignore-changeset') }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Include history so Changesets finds merge-base - name: Set up environment diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 199d9e36f..0ba977525 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -20,7 +20,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - run: npm run lint @@ -31,7 +31,7 @@ jobs: FORCE_COLOR: 1 GAS: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - name: Run tests and generate gas report @@ -50,7 +50,7 @@ jobs: env: FORCE_COLOR: 1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Include history so patch conflicts are resolved automatically - name: Set up environment @@ -70,7 +70,7 @@ jobs: tests-foundry: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Install Foundry @@ -83,7 +83,7 @@ jobs: coverage: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - run: npm run coverage @@ -94,7 +94,7 @@ jobs: slither: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - run: rm foundry.toml @@ -105,7 +105,7 @@ jobs: codespell: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run CodeSpell uses: codespell-project/actions-codespell@v2.0 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4b54ea6ee..04b8131cb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,7 +11,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - run: bash scripts/git-user-config.sh diff --git a/.github/workflows/formal-verification.yml b/.github/workflows/formal-verification.yml index a86f255fb..6b4ca2cad 100644 --- a/.github/workflows/formal-verification.yml +++ b/.github/workflows/formal-verification.yml @@ -20,7 +20,7 @@ jobs: apply-diff: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Apply patches run: make -C certora apply @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'formal-verification') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up environment diff --git a/.github/workflows/release-cycle.yml b/.github/workflows/release-cycle.yml index 9d35022dc..21d77abb9 100644 --- a/.github/workflows/release-cycle.yml +++ b/.github/workflows/release-cycle.yml @@ -27,7 +27,7 @@ jobs: pull-requests: read runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - id: state @@ -58,7 +58,7 @@ jobs: if: needs.state.outputs.start == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - run: bash scripts/git-user-config.sh @@ -81,7 +81,7 @@ jobs: if: needs.state.outputs.promote == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - run: bash scripts/git-user-config.sh @@ -102,7 +102,7 @@ jobs: if: needs.state.outputs.changesets == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # To get all tags - name: Set up environment @@ -134,7 +134,7 @@ jobs: if: needs.state.outputs.publish == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - id: pack @@ -171,7 +171,7 @@ jobs: name: Tarball Integrity Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download tarball artifact id: artifact # Replace with actions/upload-artifact@v3 when @@ -195,7 +195,7 @@ jobs: env: MERGE_BRANCH: merge/${{ github.ref_name }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # All branches - name: Set up environment diff --git a/.github/workflows/upgradeable.yml b/.github/workflows/upgradeable.yml index 649596abb..ed63a6dbe 100644 --- a/.github/workflows/upgradeable.yml +++ b/.github/workflows/upgradeable.yml @@ -11,7 +11,7 @@ jobs: environment: push-upgradeable runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: OpenZeppelin/openzeppelin-contracts-upgradeable fetch-depth: 0 From 33cab7cd25f4baca0b55b01f90080f5139676d9b Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 5 Sep 2023 16:49:54 +0200 Subject: [PATCH 025/167] AccessManager: Remove classes (#4562) --- contracts/access/manager/AccessManager.sol | 184 +++++++----------- contracts/access/manager/IAccessManager.sol | 23 +-- test/access/manager/AccessManager.test.js | 141 +++++--------- .../extensions/GovernorTimelockAccess.test.js | 18 +- 4 files changed, 137 insertions(+), 229 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 72176f5e3..418e6ebe4 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -51,8 +51,9 @@ import {Time} from "../../utils/types/Time.sol"; contract AccessManager is Context, Multicall, IAccessManager { using Time for *; - struct AccessMode { - uint64 classId; + struct TargetConfig { + mapping(bytes4 selector => uint64 groupId) allowedGroups; + Time.Delay adminDelay; bool closed; } @@ -75,26 +76,19 @@ contract AccessManager is Context, Multicall, IAccessManager { mapping(address user => Access access) members; uint64 admin; uint64 guardian; - Time.Delay delay; // delay for granting + Time.Delay grantDelay; } - struct Class { - mapping(bytes4 selector => uint64 groupId) allowedGroups; - Time.Delay adminDelay; + struct Schedule { + uint48 timepoint; + uint32 nonce; } uint64 public constant ADMIN_GROUP = type(uint64).min; // 0 uint64 public constant PUBLIC_GROUP = type(uint64).max; // 2**64-1 - mapping(address target => AccessMode mode) private _contractMode; - mapping(uint64 classId => Class) private _classes; + mapping(address target => TargetConfig mode) private _targets; mapping(uint64 groupId => Group) private _groups; - - struct Schedule { - uint48 timepoint; - uint32 nonce; - } - mapping(bytes32 operationId => Schedule) private _schedules; // This should be transient storage when supported by the EVM. @@ -132,15 +126,14 @@ contract AccessManager is Context, Multicall, IAccessManager { * to identify the indirect workflow, and will consider calls that require a delay to be forbidden. */ function canCall(address caller, address target, bytes4 selector) public view virtual returns (bool, uint32) { - (uint64 classId, bool closed) = getContractClass(target); - if (closed) { + if (isTargetClosed(target)) { return (false, 0); } else if (caller == address(this)) { // Caller is AccessManager => call was relayed. In that case the relay already checked permissions. We // verify that the call "identifier", which is set during the relay call, is correct. return (_relayIdentifier == _hashRelayIdentifier(target, selector), 0); } else { - uint64 groupId = getClassFunctionGroup(classId, selector); + uint64 groupId = getTargetFunctionGroup(target, selector); (bool inGroup, uint32 currentDelay) = hasGroup(groupId, caller); return inGroup ? (currentDelay == 0, currentDelay) : (false, 0); } @@ -165,21 +158,20 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Get the mode under which a contract is operating. */ - function getContractClass(address target) public view virtual returns (uint64, bool) { - AccessMode storage mode = _contractMode[target]; - return (mode.classId, mode.closed); + function isTargetClosed(address target) public view virtual returns (bool) { + return _targets[target].closed; } /** * @dev Get the permission level (group) required to call a function. This only applies for contract that are * operating under the `Custom` mode. */ - function getClassFunctionGroup(uint64 classId, bytes4 selector) public view virtual returns (uint64) { - return _classes[classId].allowedGroups[selector]; + function getTargetFunctionGroup(address target, bytes4 selector) public view virtual returns (uint64) { + return _targets[target].allowedGroups[selector]; } - function getClassAdminDelay(uint64 classId) public view virtual returns (uint32) { - return _classes[classId].adminDelay.get(); + function getTargetAdminDelay(address target) public view virtual returns (uint32) { + return _targets[target].adminDelay.get(); } /** @@ -207,7 +199,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * {GroupGrantDelayChanged} event. */ function getGroupGrantDelay(uint64 groupId) public view virtual returns (uint32) { - return _groups[groupId].delay.get(); + return _groups[groupId].grantDelay.get(); } /** @@ -445,8 +437,8 @@ contract AccessManager is Context, Multicall, IAccessManager { revert AccessManagerLockedGroup(groupId); } - (Time.Delay updated, uint48 effect) = _groups[groupId].delay.withUpdate(newDelay, minSetback()); - _groups[groupId].delay = updated; + uint48 effect; + (_groups[groupId].grantDelay, effect) = _groups[groupId].grantDelay.withUpdate(newDelay, minSetback()); emit GroupGrantDelayChanged(groupId, newDelay, effect); } @@ -462,13 +454,13 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {FunctionAllowedGroupUpdated} event per selector */ - function setClassFunctionGroup( - uint64 classId, + function setTargetFunctionGroup( + address target, bytes4[] calldata selectors, uint64 groupId ) public virtual onlyAuthorized { for (uint256 i = 0; i < selectors.length; ++i) { - _setClassFunctionGroup(classId, selectors[i], groupId); + _setTargetFunctionGroup(target, selectors[i], groupId); } } @@ -477,10 +469,9 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {FunctionAllowedGroupUpdated} event */ - function _setClassFunctionGroup(uint64 classId, bytes4 selector, uint64 groupId) internal virtual { - _checkValidClassId(classId); - _classes[classId].allowedGroups[selector] = groupId; - emit ClassFunctionGroupUpdated(classId, selector, groupId); + function _setTargetFunctionGroup(address target, bytes4 selector, uint64 groupId) internal virtual { + _targets[target].allowedGroups[selector] = groupId; + emit TargetFunctionGroupUpdated(target, selector, groupId); } /** @@ -492,8 +483,8 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {FunctionAllowedGroupUpdated} event per selector */ - function setClassAdminDelay(uint64 classId, uint32 newDelay) public virtual onlyAuthorized { - _setClassAdminDelay(classId, newDelay); + function setTargetAdminDelay(address target, uint32 newDelay) public virtual onlyAuthorized { + _setTargetAdminDelay(target, newDelay); } /** @@ -501,50 +492,14 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Emits a {ClassAdminDelayUpdated} event */ - function _setClassAdminDelay(uint64 classId, uint32 newDelay) internal virtual { - _checkValidClassId(classId); - (Time.Delay updated, uint48 effect) = _classes[classId].adminDelay.withUpdate(newDelay, minSetback()); - _classes[classId].adminDelay = updated; - emit ClassAdminDelayUpdated(classId, newDelay, effect); - } + function _setTargetAdminDelay(address target, uint32 newDelay) internal virtual { + uint48 effect; + (_targets[target].adminDelay, effect) = _targets[target].adminDelay.withUpdate(newDelay, minSetback()); - /** - * @dev Reverts if `classId` is 0. This is the default class id given to contracts and it should not have any - * configurations. - */ - function _checkValidClassId(uint64 classId) private pure { - if (classId == 0) { - revert AccessManagerInvalidClass(classId); - } + emit TargetAdminDelayUpdated(target, newDelay, effect); } // =============================================== MODE MANAGEMENT ================================================ - /** - * @dev Set the class of a contract. - * - * Requirements: - * - * - the caller must be a global admin - * - * Emits a {ContractClassUpdated} event. - */ - function setContractClass(address target, uint64 classId) public virtual onlyAuthorized { - _setContractClass(target, classId); - } - - /** - * @dev Set the class of a contract. This is an internal setter with no access restrictions. - * - * Emits a {ContractClassUpdated} event. - */ - function _setContractClass(address target, uint64 classId) internal virtual { - if (target == address(this)) { - revert AccessManagerLockedAccount(target); - } - _contractMode[target].classId = classId; - emit ContractClassUpdated(target, classId); - } - /** * @dev Set the closed flag for a contract. * @@ -552,23 +507,23 @@ contract AccessManager is Context, Multicall, IAccessManager { * * - the caller must be a global admin * - * Emits a {ContractClosed} event. + * Emits a {TargetClosed} event. */ - function setContractClosed(address target, bool closed) public virtual onlyAuthorized { - _setContractClosed(target, closed); + function setTargetClosed(address target, bool closed) public virtual onlyAuthorized { + _setTargetClosed(target, closed); } /** * @dev Set the closed flag for a contract. This is an internal setter with no access restrictions. * - * Emits a {ContractClosed} event. + * Emits a {TargetClosed} event. */ - function _setContractClosed(address target, bool closed) internal virtual { + function _setTargetClosed(address target, bool closed) internal virtual { if (target == address(this)) { revert AccessManagerLockedAccount(target); } - _contractMode[target].closed = closed; - emit ContractClosed(target, closed); + _targets[target].closed = closed; + emit TargetClosed(target, closed); } // ============================================== DELAYED OPERATIONS ============================================== @@ -608,7 +563,7 @@ contract AccessManager is Context, Multicall, IAccessManager { address caller = _msgSender(); // Fetch restrictions that apply to the caller on the targeted function - (bool allowed, uint32 setback) = _canCallExtended(caller, target, data); + (bool immediate, uint32 setback) = _canCallExtended(caller, target, data); uint48 minWhen = Time.timestamp() + setback; @@ -617,7 +572,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } // If caller is not authorised, revert - if (!allowed && (setback == 0 || when < minWhen)) { + if (!immediate && (setback == 0 || when < minWhen)) { revert AccessManagerUnauthorizedCall(caller, target, bytes4(data[0:4])); } @@ -657,10 +612,10 @@ contract AccessManager is Context, Multicall, IAccessManager { address caller = _msgSender(); // Fetch restrictions that apply to the caller on the targeted function - (bool allowed, uint32 setback) = _canCallExtended(caller, target, data); + (bool immediate, uint32 setback) = _canCallExtended(caller, target, data); // If caller is not authorised, revert - if (!allowed && setback == 0) { + if (!immediate && setback == 0) { revert AccessManagerUnauthorizedCall(caller, target, bytes4(data)); } @@ -742,9 +697,8 @@ contract AccessManager is Context, Multicall, IAccessManager { revert AccessManagerNotScheduled(operationId); } else if (caller != msgsender) { // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required group. - (uint64 classId, ) = getContractClass(target); (bool isAdmin, ) = hasGroup(ADMIN_GROUP, msgsender); - (bool isGuardian, ) = hasGroup(getGroupGuardian(getClassFunctionGroup(classId, selector)), msgsender); + (bool isGuardian, ) = hasGroup(getGroupGuardian(getTargetFunctionGroup(target, selector)), msgsender); if (!isAdmin && !isGuardian) { revert AccessManagerCannotCancel(msgsender, caller, target, selector); } @@ -789,8 +743,8 @@ contract AccessManager is Context, Multicall, IAccessManager { */ function _checkAuthorized() private { address caller = _msgSender(); - (bool allowed, uint32 delay) = _canCallExtended(caller, address(this), _msgData()); - if (!allowed) { + (bool immediate, uint32 delay) = _canCallExtended(caller, address(this), _msgData()); + if (!immediate) { if (delay == 0) { (, uint64 requiredGroup, ) = _getAdminRestrictions(_msgData()); revert AccessManagerUnauthorizedAccount(caller, requiredGroup); @@ -802,41 +756,51 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Get the admin restrictions of a given function call based on the function and arguments involved. + * + * Returns: + * - bool restricted: does this data match a restricted operation + * - uint64: which group is this operation restricted to + * - uint32: minimum delay to enforce for that operation (on top of the admin's execution delay) */ function _getAdminRestrictions(bytes calldata data) private view returns (bool, uint64, uint32) { bytes4 selector = bytes4(data); if (data.length < 4) { return (false, 0, 0); - } else if (selector == this.updateAuthority.selector || selector == this.setContractClass.selector) { - // First argument is a target. Restricted to ADMIN with the class delay corresponding to the target's class - address target = abi.decode(data[0x04:0x24], (address)); - (uint64 classId, ) = getContractClass(target); - uint32 delay = getClassAdminDelay(classId); - return (true, ADMIN_GROUP, delay); - } else if (selector == this.setClassFunctionGroup.selector) { - // First argument is a class. Restricted to ADMIN with the class delay corresponding to the class - uint64 classId = abi.decode(data[0x04:0x24], (uint64)); - uint32 delay = getClassAdminDelay(classId); - return (true, ADMIN_GROUP, delay); - } else if ( + } + + // Restricted to ADMIN with no delay beside any execution delay the caller may have + if ( selector == this.labelGroup.selector || selector == this.setGroupAdmin.selector || selector == this.setGroupGuardian.selector || selector == this.setGrantDelay.selector || - selector == this.setClassAdminDelay.selector || - selector == this.setContractClosed.selector + selector == this.setTargetAdminDelay.selector ) { - // Restricted to ADMIN with no delay beside any execution delay the caller may have return (true, ADMIN_GROUP, 0); - } else if (selector == this.grantGroup.selector || selector == this.revokeGroup.selector) { - // First argument is a groupId. Restricted to that group's admin with no delay beside any execution delay the caller may have. + } + + // Restricted to ADMIN with the admin delay corresponding to the target + if ( + selector == this.updateAuthority.selector || + selector == this.setTargetClosed.selector || + selector == this.setTargetFunctionGroup.selector + ) { + // First argument is a target. + address target = abi.decode(data[0x04:0x24], (address)); + uint32 delay = getTargetAdminDelay(target); + return (true, ADMIN_GROUP, delay); + } + + // Restricted to that group's admin with no delay beside any execution delay the caller may have. + if (selector == this.grantGroup.selector || selector == this.revokeGroup.selector) { + // First argument is a groupId. uint64 groupId = abi.decode(data[0x04:0x24], (uint64)); uint64 groupAdminId = getGroupAdmin(groupId); return (true, groupAdminId, 0); - } else { - return (false, 0, 0); } + + return (false, 0, 0); } // =================================================== HELPERS ==================================================== diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index 8b3d3a790..e819f804e 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -35,11 +35,9 @@ interface IAccessManager { event GroupGuardianChanged(uint64 indexed groupId, uint64 indexed guardian); event GroupGrantDelayChanged(uint64 indexed groupId, uint32 delay, uint48 since); - event ContractClassUpdated(address indexed target, uint64 indexed classId); - event ContractClosed(address indexed target, bool closed); - - event ClassFunctionGroupUpdated(uint64 indexed classId, bytes4 selector, uint64 indexed groupId); - event ClassAdminDelayUpdated(uint64 indexed classId, uint32 delay, uint48 since); + event TargetClosed(address indexed target, bool closed); + event TargetFunctionGroupUpdated(address indexed target, bytes4 selector, uint64 indexed groupId); + event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since); error AccessManagerAlreadyScheduled(bytes32 operationId); error AccessManagerNotScheduled(bytes32 operationId); @@ -47,7 +45,6 @@ interface IAccessManager { error AccessManagerExpired(bytes32 operationId); error AccessManagerLockedAccount(address account); error AccessManagerLockedGroup(uint64 groupId); - error AccessManagerInvalidClass(uint64 classId); error AccessManagerBadConfirmation(); error AccessManagerUnauthorizedAccount(address msgsender, uint64 groupId); error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector); @@ -61,11 +58,11 @@ interface IAccessManager { function expiration() external view returns (uint32); - function getContractClass(address target) external view returns (uint64 classId, bool closed); + function isTargetClosed(address target) external view returns (bool); - function getClassFunctionGroup(uint64 classId, bytes4 selector) external view returns (uint64); + function getTargetFunctionGroup(address target, bytes4 selector) external view returns (uint64); - function getClassAdminDelay(uint64 classId) external view returns (uint32); + function getTargetAdminDelay(address target) external view returns (uint32); function getGroupAdmin(uint64 groupId) external view returns (uint64); @@ -91,13 +88,11 @@ interface IAccessManager { function setGrantDelay(uint64 groupId, uint32 newDelay) external; - function setClassFunctionGroup(uint64 classId, bytes4[] calldata selectors, uint64 groupId) external; - - function setClassAdminDelay(uint64 classId, uint32 newDelay) external; + function setTargetFunctionGroup(address target, bytes4[] calldata selectors, uint64 groupId) external; - function setContractClass(address target, uint64 classId) external; + function setTargetAdminDelay(address target, uint32 newDelay) external; - function setContractClosed(address target, bool closed) external; + function setTargetClosed(address target, bool closed) external; function getSchedule(bytes32 id) external view returns (uint48); diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 7b05dc143..4ff97cd29 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -18,7 +18,6 @@ const GROUPS = { }; Object.assign(GROUPS, Object.fromEntries(Object.entries(GROUPS).map(([key, value]) => [value, key]))); -const classId = web3.utils.toBN(1); const executeDelay = web3.utils.toBN(10); const grantDelay = web3.utils.toBN(10); @@ -546,33 +545,47 @@ contract('AccessManager', function (accounts) { it('admin can set function group', async function () { for (const sig of sigs) { - expect(await this.manager.getClassFunctionGroup(classId, sig)).to.be.bignumber.equal(GROUPS.ADMIN); + expect(await this.manager.getTargetFunctionGroup(this.target.address, sig)).to.be.bignumber.equal( + GROUPS.ADMIN, + ); } - const { receipt: receipt1 } = await this.manager.setClassFunctionGroup(classId, sigs, GROUPS.SOME, { - from: admin, - }); + const { receipt: receipt1 } = await this.manager.setTargetFunctionGroup( + this.target.address, + sigs, + GROUPS.SOME, + { + from: admin, + }, + ); for (const sig of sigs) { - expectEvent(receipt1, 'ClassFunctionGroupUpdated', { - classId, + expectEvent(receipt1, 'TargetFunctionGroupUpdated', { + target: this.target.address, selector: sig, groupId: GROUPS.SOME, }); - expect(await this.manager.getClassFunctionGroup(classId, sig)).to.be.bignumber.equal(GROUPS.SOME); + expect(await this.manager.getTargetFunctionGroup(this.target.address, sig)).to.be.bignumber.equal( + GROUPS.SOME, + ); } - const { receipt: receipt2 } = await this.manager.setClassFunctionGroup(classId, [sigs[1]], GROUPS.SOME_ADMIN, { - from: admin, - }); - expectEvent(receipt2, 'ClassFunctionGroupUpdated', { - classId, + const { receipt: receipt2 } = await this.manager.setTargetFunctionGroup( + this.target.address, + [sigs[1]], + GROUPS.SOME_ADMIN, + { + from: admin, + }, + ); + expectEvent(receipt2, 'TargetFunctionGroupUpdated', { + target: this.target.address, selector: sigs[1], groupId: GROUPS.SOME_ADMIN, }); for (const sig of sigs) { - expect(await this.manager.getClassFunctionGroup(classId, sig)).to.be.bignumber.equal( + expect(await this.manager.getTargetFunctionGroup(this.target.address, sig)).to.be.bignumber.equal( sig == sigs[1] ? GROUPS.SOME_ADMIN : GROUPS.SOME, ); } @@ -580,7 +593,7 @@ contract('AccessManager', function (accounts) { it('non-admin cannot set function group', async function () { await expectRevertCustomError( - this.manager.setClassFunctionGroup(classId, sigs, GROUPS.SOME, { from: other }), + this.manager.setTargetFunctionGroup(this.target.address, sigs, GROUPS.SOME, { from: other }), 'AccessManagerUnauthorizedAccount', [other, GROUPS.ADMIN], ); @@ -617,26 +630,25 @@ contract('AccessManager', function (accounts) { beforeEach(async function () { // setup await Promise.all([ - this.manager.$_setContractClosed(this.target.address, closed), - this.manager.$_setContractClass(this.target.address, classId), - fnGroup && this.manager.$_setClassFunctionGroup(classId, selector('fnRestricted()'), fnGroup), - fnGroup && this.manager.$_setClassFunctionGroup(classId, selector('fnUnrestricted()'), fnGroup), + this.manager.$_setTargetClosed(this.target.address, closed), + fnGroup && + this.manager.$_setTargetFunctionGroup(this.target.address, selector('fnRestricted()'), fnGroup), + fnGroup && + this.manager.$_setTargetFunctionGroup(this.target.address, selector('fnUnrestricted()'), fnGroup), ...callerGroups .filter(groupId => groupId != GROUPS.PUBLIC) .map(groupId => this.manager.$_grantGroup(groupId, user, 0, delay ?? 0)), ]); // post setup checks - const result = await this.manager.getContractClass(this.target.address); - expect(result[0]).to.be.bignumber.equal(classId); - expect(result[1]).to.be.equal(closed); + expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(closed); if (fnGroup) { expect( - await this.manager.getClassFunctionGroup(classId, selector('fnRestricted()')), + await this.manager.getTargetFunctionGroup(this.target.address, selector('fnRestricted()')), ).to.be.bignumber.equal(fnGroup); expect( - await this.manager.getClassFunctionGroup(classId, selector('fnUnrestricted()')), + await this.manager.getTargetFunctionGroup(this.target.address, selector('fnUnrestricted()')), ).to.be.bignumber.equal(fnGroup); } @@ -850,8 +862,7 @@ contract('AccessManager', function (accounts) { describe('Indirect execution corner-cases', async function () { beforeEach(async function () { - await this.manager.$_setContractClass(this.target.address, classId); - await this.manager.$_setClassFunctionGroup(classId, this.callData, GROUPS.SOME); + await this.manager.$_setTargetFunctionGroup(this.target.address, this.callData, GROUPS.SOME); await this.manager.$_grantGroup(GROUPS.SOME, user, 0, executeDelay); }); @@ -989,7 +1000,7 @@ contract('AccessManager', function (accounts) { describe('Contract is closed', function () { beforeEach(async function () { - await this.manager.$_setContractClosed(this.ownable.address, true); + await this.manager.$_setTargetClosed(this.ownable.address, true); }); it('directly call: reverts', async function () { @@ -1014,13 +1025,9 @@ contract('AccessManager', function (accounts) { }); describe('Contract is managed', function () { - beforeEach('add contract to class', async function () { - await this.manager.$_setContractClass(this.ownable.address, classId); - }); - describe('function is open to specific group', function () { beforeEach(async function () { - await this.manager.$_setClassFunctionGroup(classId, selector('$_checkOwner()'), groupId); + await this.manager.$_setTargetFunctionGroup(this.ownable.address, selector('$_checkOwner()'), groupId); }); it('directly call: reverts', async function () { @@ -1044,7 +1051,7 @@ contract('AccessManager', function (accounts) { describe('function is open to public group', function () { beforeEach(async function () { - await this.manager.$_setClassFunctionGroup(classId, selector('$_checkOwner()'), GROUPS.PUBLIC); + await this.manager.$_setTargetFunctionGroup(this.ownable.address, selector('$_checkOwner()'), GROUPS.PUBLIC); }); it('directly call: reverts', async function () { @@ -1104,67 +1111,9 @@ contract('AccessManager', function (accounts) { }); }); - // TODO: test all admin functions - describe('class delays', function () { - const otherClassId = web3.utils.toBN(2); - const delay = web3.utils.toBN(1000); - - beforeEach('set contract class', async function () { - this.target = await AccessManagedTarget.new(this.manager.address); - await this.manager.setContractClass(this.target.address, classId, { from: admin }); - - this.call = () => this.manager.setContractClass(this.target.address, otherClassId, { from: admin }); - this.data = this.manager.contract.methods.setContractClass(this.target.address, otherClassId).encodeABI(); - }); - - it('without delay: succeeds', async function () { - await this.call(); - }); - - // TODO: here we need to check increase and decrease. Both should have be affected by the minsetback. - describe('with delay', function () { - beforeEach('set admin delay', async function () { - this.tx = await this.manager.setClassAdminDelay(classId, delay, { from: admin }); - this.opId = web3.utils.keccak256( - web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], [admin, this.manager.address, this.data]), - ); - }); - - it('emits event and sets delay', async function () { - const timepoint = await clockFromReceipt.timestamp(this.tx.receipt).then(web3.utils.toBN); - - expectEvent(this.tx.receipt, 'ClassAdminDelayUpdated', { classId, delay, since: timepoint.add(MINSETBACK) }); - - // wait for delay to become active - expect(await this.manager.getClassAdminDelay(classId)).to.be.bignumber.equal('0'); - await time.increase(MINSETBACK); - expect(await this.manager.getClassAdminDelay(classId)).to.be.bignumber.equal(delay); - }); - - describe('after setback', function () { - beforeEach('wait', async function () { - await time.increase(MINSETBACK); - }); - - it('without prior scheduling: reverts', async function () { - await expectRevertCustomError(this.call(), 'AccessManagerNotScheduled', [this.opId]); - }); - - describe('with prior scheduling', async function () { - beforeEach('schedule', async function () { - await this.manager.schedule(this.manager.address, this.data, 0, { from: admin }); - }); - - it('without delay: reverts', async function () { - await expectRevertCustomError(this.call(), 'AccessManagerNotReady', [this.opId]); - }); - - it('with delay: succeeds', async function () { - await time.increase(delay); - await this.call(); - }); - }); - }); - }); - }); + // TODO: + // - check opening/closing a contract + // - check updating the contract delay + // - check the delay applies to admin function + describe.skip('contract modes', function () {}); }); diff --git a/test/governance/extensions/GovernorTimelockAccess.test.js b/test/governance/extensions/GovernorTimelockAccess.test.js index 776ec9390..ad533296a 100644 --- a/test/governance/extensions/GovernorTimelockAccess.test.js +++ b/test/governance/extensions/GovernorTimelockAccess.test.js @@ -130,11 +130,11 @@ contract('GovernorTimelockAccess', function (accounts) { it('single operation with access manager delay', async function () { const delay = 1000; - const classId = '1'; const groupId = '1'; - await this.manager.setContractClass(this.receiver.address, classId, { from: admin }); - await this.manager.setClassFunctionGroup(classId, [this.restricted.selector], groupId, { from: admin }); + await this.manager.setTargetFunctionGroup(this.receiver.address, [this.restricted.selector], groupId, { + from: admin, + }); await this.manager.grantGroup(groupId, this.mock.address, delay, { from: admin }); this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); @@ -167,15 +167,15 @@ contract('GovernorTimelockAccess', function (accounts) { it('bundle of varied operations', async function () { const managerDelay = 1000; - const classId = '1'; const groupId = '1'; const baseDelay = managerDelay * 2; await this.mock.$_setBaseDelaySeconds(baseDelay); - await this.manager.setContractClass(this.receiver.address, classId, { from: admin }); - await this.manager.setClassFunctionGroup(classId, [this.restricted.selector], groupId, { from: admin }); + await this.manager.setTargetFunctionGroup(this.receiver.address, [this.restricted.selector], groupId, { + from: admin, + }); await this.manager.grantGroup(groupId, this.mock.address, managerDelay, { from: admin }); this.proposal = await this.helper.setProposal( @@ -212,11 +212,11 @@ contract('GovernorTimelockAccess', function (accounts) { it('cancellation after queue (internal)', async function () { const delay = 1000; - const classId = '1'; const groupId = '1'; - await this.manager.setContractClass(this.receiver.address, classId, { from: admin }); - await this.manager.setClassFunctionGroup(classId, [this.restricted.selector], groupId, { from: admin }); + await this.manager.setTargetFunctionGroup(this.receiver.address, [this.restricted.selector], groupId, { + from: admin, + }); await this.manager.grantGroup(groupId, this.mock.address, delay, { from: admin }); this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); From ff9d089dad63842e81bd4f131f971d943974eb8a Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 5 Sep 2023 16:50:56 +0200 Subject: [PATCH 026/167] Add a boolean to AccessManager.GrantGroup (#4569) --- contracts/access/manager/AccessManager.sol | 2 +- contracts/access/manager/IAccessManager.sol | 2 +- test/access/manager/AccessManager.test.js | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 418e6ebe4..d80e8e358 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -372,7 +372,7 @@ contract AccessManager is Context, Multicall, IAccessManager { _groups[groupId].members[account] = Access({since: since, delay: executionDelay.toDelay()}); } - emit GroupGranted(groupId, account, executionDelay, since); + emit GroupGranted(groupId, account, executionDelay, since, !inGroup); return !inGroup; } diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index e819f804e..17b9e1aff 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -29,7 +29,7 @@ interface IAccessManager { event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce); event GroupLabel(uint64 indexed groupId, string label); - event GroupGranted(uint64 indexed groupId, address indexed account, uint32 delay, uint48 since); + event GroupGranted(uint64 indexed groupId, address indexed account, uint32 delay, uint48 since, bool newMember); event GroupRevoked(uint64 indexed groupId, address indexed account); event GroupAdminChanged(uint64 indexed groupId, uint64 indexed admin); event GroupGuardianChanged(uint64 indexed groupId, uint64 indexed guardian); diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 4ff97cd29..697f871ea 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -106,7 +106,13 @@ contract('AccessManager', function (accounts) { const { receipt } = await this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'GroupGranted', { groupId: GROUPS.SOME, account: user, since: timestamp, delay: '0' }); + expectEvent(receipt, 'GroupGranted', { + groupId: GROUPS.SOME, + account: user, + since: timestamp, + delay: '0', + newMember: true, + }); expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([true, '0']); @@ -127,6 +133,7 @@ contract('AccessManager', function (accounts) { account: user, since: timestamp, delay: executeDelay, + newMember: true, }); expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([ @@ -169,7 +176,7 @@ contract('AccessManager', function (accounts) { await time.increase(MINSETBACK); }); - it('granted group is not active immediatly', async function () { + it('granted group is not active immediately', async function () { const { receipt } = await this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); expectEvent(receipt, 'GroupGranted', { @@ -177,6 +184,7 @@ contract('AccessManager', function (accounts) { account: user, since: timestamp.add(grantDelay), delay: '0', + newMember: true, }); expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); @@ -196,6 +204,7 @@ contract('AccessManager', function (accounts) { account: user, since: timestamp.add(grantDelay), delay: '0', + newMember: true, }); await time.increase(grantDelay); @@ -374,6 +383,7 @@ contract('AccessManager', function (accounts) { account: member, since: timestamp, delay: newDelay, + newMember: false, }); // immediate effect @@ -406,6 +416,7 @@ contract('AccessManager', function (accounts) { account: member, since: timestamp.add(setback), delay: newDelay, + newMember: false, }); // no immediate effect @@ -435,6 +446,7 @@ contract('AccessManager', function (accounts) { account: other, since: timestamp, delay: executeDelay, + newMember: false, }); }); }); From 5abbd0493368a370a5e94fc66c9eb3710c565580 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 5 Sep 2023 23:46:14 +0200 Subject: [PATCH 027/167] Improve Initializable readability using intermediate variables (#4576) Co-authored-by: Francisco --- .changeset/lazy-rice-joke.md | 5 +++++ contracts/proxy/utils/Initializable.sol | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .changeset/lazy-rice-joke.md diff --git a/.changeset/lazy-rice-joke.md b/.changeset/lazy-rice-joke.md new file mode 100644 index 000000000..6e1243002 --- /dev/null +++ b/.changeset/lazy-rice-joke.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': minor +--- + +`Initializable`: Use intermediate variables to improve readability. diff --git a/contracts/proxy/utils/Initializable.sol b/contracts/proxy/utils/Initializable.sol index cc6d9c962..7545bcca6 100644 --- a/contracts/proxy/utils/Initializable.sol +++ b/contracts/proxy/utils/Initializable.sol @@ -104,9 +104,19 @@ abstract contract Initializable { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); + // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; - if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) { + + // Allowed calls: + // - initialSetup: the contract is not in the initializing state and no previous version was + // initialized + // - construction: the contract is initialized at version 1 (no reininitialization) and the + // current contract is just being deployed + bool initialSetup = initialized == 0 && isTopLevelCall; + bool construction = initialized == 1 && address(this).code.length == 0; + + if (!initialSetup && !construction) { revert AlreadyInitialized(); } $._initialized = 1; From bb7ca7d151ac4bd76da702a30095ddce0253f3ef Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 5 Sep 2023 23:47:05 +0200 Subject: [PATCH 028/167] Prevent setting address(0) as the initialAdmin in AccessManager (#4570) Co-authored-by: Francisco --- contracts/access/manager/AccessManager.sol | 4 ++++ contracts/access/manager/IAccessManager.sol | 1 + test/access/manager/AccessManager.test.js | 8 +++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index d80e8e358..66bca0890 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -104,6 +104,10 @@ contract AccessManager is Context, Multicall, IAccessManager { } constructor(address initialAdmin) { + if (initialAdmin == address(0)) { + revert AccessManagerInvalidInitialAdmin(address(0)); + } + // admin is active immediately and without any execution delay. _grantGroup(ADMIN_GROUP, initialAdmin, 0, 0); } diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index 17b9e1aff..4f28baa7e 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -49,6 +49,7 @@ interface IAccessManager { error AccessManagerUnauthorizedAccount(address msgsender, uint64 groupId); error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector); error AccessManagerCannotCancel(address msgsender, address caller, address target, bytes4 selector); + error AccessManagerInvalidInitialAdmin(address initialAdmin); function canCall( address caller, diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 697f871ea..dcf285c77 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -1,5 +1,5 @@ const { web3 } = require('hardhat'); -const { expectEvent, time } = require('@openzeppelin/test-helpers'); +const { constants, expectEvent, time } = require('@openzeppelin/test-helpers'); const { expectRevertCustomError } = require('../../helpers/customError'); const { selector } = require('../../helpers/methods'); const { clockFromReceipt } = require('../../helpers/time'); @@ -38,6 +38,12 @@ contract('AccessManager', function (accounts) { await this.manager.$_grantGroup(GROUPS.SOME, member, 0, 0); }); + it('rejects zero address for initialAdmin', async function () { + await expectRevertCustomError(AccessManager.new(constants.ZERO_ADDRESS), 'AccessManagerInvalidInitialAdmin', [ + constants.ZERO_ADDRESS, + ]); + }); + it('default minsetback is 1 day', async function () { expect(await this.manager.minSetback()).to.be.bignumber.equal(MINSETBACK); }); From 87f7a2cd4258bc668e55f8bd091862f5b5d9ec91 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Wed, 6 Sep 2023 04:19:21 +0200 Subject: [PATCH 029/167] Refactor Time library to use valueBefore/valueAfter (#4555) Co-authored-by: Francisco --- contracts/access/manager/AccessManager.sol | 4 +- .../governance/extensions/GovernorVotes.sol | 3 +- contracts/governance/utils/Votes.sol | 5 +- contracts/utils/types/Time.sol | 43 ++--- test/access/manager/AccessManager.test.js | 3 +- test/helpers/iterate.js | 16 ++ test/helpers/map-values.js | 7 - test/utils/cryptography/EIP712.test.js | 2 +- test/utils/structs/EnumerableMap.test.js | 2 +- test/utils/structs/EnumerableSet.test.js | 2 +- test/utils/types/Time.test.js | 161 ++++++++++++++++++ 11 files changed, 203 insertions(+), 45 deletions(-) create mode 100644 test/helpers/iterate.js delete mode 100644 test/helpers/map-values.js create mode 100644 test/utils/types/Time.test.js diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 66bca0890..be438536e 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -60,7 +60,7 @@ contract AccessManager is Context, Multicall, IAccessManager { // Structure that stores the details for a group/account pair. This structure fits into a single slot. struct Access { // Timepoint at which the user gets the permission. If this is either 0, or in the future, the group permission - // is not available. Should be checked using {Time-isSetAndPast} + // is not available. uint48 since; // delay for execution. Only applies to restricted() / relay() calls. This does not restrict access to // functions that use the `onlyGroup` modifier. @@ -235,7 +235,7 @@ contract AccessManager is Context, Multicall, IAccessManager { return (true, 0); } else { (uint48 inGroupSince, uint32 currentDelay, , ) = getAccess(groupId, account); - return (inGroupSince.isSetAndPast(Time.timestamp()), currentDelay); + return (inGroupSince != 0 && inGroupSince <= Time.timestamp(), currentDelay); } } diff --git a/contracts/governance/extensions/GovernorVotes.sol b/contracts/governance/extensions/GovernorVotes.sol index 45447da51..d7be2ebc2 100644 --- a/contracts/governance/extensions/GovernorVotes.sol +++ b/contracts/governance/extensions/GovernorVotes.sol @@ -7,6 +7,7 @@ import {Governor} from "../Governor.sol"; import {IVotes} from "../utils/IVotes.sol"; import {IERC5805} from "../../interfaces/IERC5805.sol"; import {SafeCast} from "../../utils/math/SafeCast.sol"; +import {Time} from "../../utils/types/Time.sol"; /** * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} token. @@ -26,7 +27,7 @@ abstract contract GovernorVotes is Governor { try token.clock() returns (uint48 timepoint) { return timepoint; } catch { - return SafeCast.toUint48(block.number); + return Time.blockNumber(); } } diff --git a/contracts/governance/utils/Votes.sol b/contracts/governance/utils/Votes.sol index d9f5e01bb..ad1074d77 100644 --- a/contracts/governance/utils/Votes.sol +++ b/contracts/governance/utils/Votes.sol @@ -9,6 +9,7 @@ import {EIP712} from "../../utils/cryptography/EIP712.sol"; import {Checkpoints} from "../../utils/structs/Checkpoints.sol"; import {SafeCast} from "../../utils/math/SafeCast.sol"; import {ECDSA} from "../../utils/cryptography/ECDSA.sol"; +import {Time} from "../../utils/types/Time.sol"; /** * @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be @@ -55,7 +56,7 @@ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { * checkpoints (and voting), in which case {CLOCK_MODE} should be overridden as well to match. */ function clock() public view virtual returns (uint48) { - return SafeCast.toUint48(block.number); + return Time.blockNumber(); } /** @@ -64,7 +65,7 @@ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() public view virtual returns (string memory) { // Check that the clock was not modified - if (clock() != block.number) { + if (clock() != Time.blockNumber()) { revert ERC6372InconsistentClock(); } return "mode=blocknumber&from=default"; diff --git a/contracts/utils/types/Time.sol b/contracts/utils/types/Time.sol index 5e8a2d9e0..13bb0add5 100644 --- a/contracts/utils/types/Time.sol +++ b/contracts/utils/types/Time.sol @@ -33,13 +33,6 @@ library Time { return SafeCast.toUint48(block.number); } - /** - * @dev Check if a timepoint is set, and in the past. - */ - function isSetAndPast(uint48 timepoint, uint48 ref) internal pure returns (bool) { - return timepoint != 0 && timepoint <= ref; - } - // ==================================================== Delay ===================================================== /** * @dev A `Delay` is a uint32 duration that can be programmed to change value automatically at a given point in the @@ -52,12 +45,12 @@ library Time { * still apply for some time. * * - * The `Delay` type is 128 bits long, and packs the following: + * The `Delay` type is 112 bits long, and packs the following: * * ``` * | [uint48]: effect date (timepoint) - * | | [uint32]: current value (duration) - * ↓ ↓ ↓ [uint32]: pending value (duration) + * | | [uint32]: value before (duration) + * ↓ ↓ ↓ [uint32]: value after (duration) * 0xAAAAAAAAAAAABBBBBBBBCCCCCCCC * ``` * @@ -78,8 +71,8 @@ library Time { * change after this timepoint. If the effect timepoint is 0, then the pending value should not be considered. */ function getFullAt(Delay self, uint48 timepoint) internal pure returns (uint32, uint32, uint48) { - (uint32 oldValue, uint32 newValue, uint48 effect) = self.unpack(); - return effect.isSetAndPast(timepoint) ? (newValue, 0, 0) : (oldValue, newValue, effect); + (uint32 valueBefore, uint32 valueAfter, uint48 effect) = self.unpack(); + return effect <= timepoint ? (valueAfter, 0, 0) : (valueBefore, valueAfter, effect); } /** @@ -105,13 +98,6 @@ library Time { return self.getAt(timestamp()); } - /** - * @dev Update a Delay object so that a new duration takes effect at a given timepoint. - */ - function withUpdateAt(Delay self, uint32 newValue, uint48 effect) internal view returns (Delay) { - return pack(self.get(), newValue, effect); - } - /** * @dev Update a Delay object so that it takes a new duration after a timepoint that is automatically computed to * enforce the old delay at the moment of the update. Returns the updated Delay object and the timestamp when the @@ -121,25 +107,26 @@ library Time { uint32 value = self.get(); uint32 setback = uint32(Math.max(minSetback, value > newValue ? value - newValue : 0)); uint48 effect = timestamp() + setback; - return (self.withUpdateAt(newValue, effect), effect); + return (pack(value, newValue, effect), effect); } /** - * @dev Split a delay into its components: oldValue, newValue and effect (transition timepoint). + * @dev Split a delay into its components: valueBefore, valueAfter and effect (transition timepoint). */ function unpack(Delay self) internal pure returns (uint32, uint32, uint48) { uint112 raw = Delay.unwrap(self); - return ( - uint32(raw), // oldValue - uint32(raw >> 32), // newValue - uint48(raw >> 64) // effect - ); + + uint32 valueAfter = uint32(raw); + uint32 valueBefore = uint32(raw >> 32); + uint48 effect = uint48(raw >> 64); + + return (valueBefore, valueAfter, effect); } /** * @dev pack the components into a Delay object. */ - function pack(uint32 oldValue, uint32 newValue, uint48 effect) internal pure returns (Delay) { - return Delay.wrap(uint112(oldValue) | (uint112(newValue) << 32) | (uint112(effect) << 64)); + function pack(uint32 valueBefore, uint32 valueAfter, uint48 effect) internal pure returns (Delay) { + return Delay.wrap((uint112(effect) << 64) | (uint112(valueBefore) << 32) | uint112(valueAfter)); } } diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index dcf285c77..c157d6b7e 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -3,6 +3,7 @@ const { constants, expectEvent, time } = require('@openzeppelin/test-helpers'); const { expectRevertCustomError } = require('../../helpers/customError'); const { selector } = require('../../helpers/methods'); const { clockFromReceipt } = require('../../helpers/time'); +const { product } = require('../../helpers/iterate'); const AccessManager = artifacts.require('$AccessManager'); const AccessManagedTarget = artifacts.require('$AccessManagedTarget'); @@ -620,8 +621,6 @@ contract('AccessManager', function (accounts) { // WIP describe('Calling restricted & unrestricted functions', function () { - const product = (...arrays) => arrays.reduce((a, b) => a.flatMap(ai => b.map(bi => [...ai, bi])), [[]]); - for (const [callerGroups, fnGroup, closed, delay] of product( [[], [GROUPS.SOME]], [undefined, GROUPS.ADMIN, GROUPS.SOME, GROUPS.PUBLIC], diff --git a/test/helpers/iterate.js b/test/helpers/iterate.js new file mode 100644 index 000000000..7f6e0e678 --- /dev/null +++ b/test/helpers/iterate.js @@ -0,0 +1,16 @@ +// Map values in an object +const mapValues = (obj, fn) => Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, fn(v)])); + +// Array of number or bigint +const max = (...values) => values.slice(1).reduce((x, y) => (x > y ? x : y), values[0]); +const min = (...values) => values.slice(1).reduce((x, y) => (x < y ? x : y), values[0]); + +// Cartesian product of a list of arrays +const product = (...arrays) => arrays.reduce((a, b) => a.flatMap(ai => b.map(bi => [...ai, bi])), [[]]); + +module.exports = { + mapValues, + max, + min, + product, +}; diff --git a/test/helpers/map-values.js b/test/helpers/map-values.js deleted file mode 100644 index 84d95fc65..000000000 --- a/test/helpers/map-values.js +++ /dev/null @@ -1,7 +0,0 @@ -function mapValues(obj, fn) { - return Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, fn(v)])); -} - -module.exports = { - mapValues, -}; diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js index 7ea535b7f..faf01f1a3 100644 --- a/test/utils/cryptography/EIP712.test.js +++ b/test/utils/cryptography/EIP712.test.js @@ -3,7 +3,7 @@ const Wallet = require('ethereumjs-wallet').default; const { getDomain, domainType, domainSeparator, hashTypedData } = require('../../helpers/eip712'); const { getChainId } = require('../../helpers/chainid'); -const { mapValues } = require('../../helpers/map-values'); +const { mapValues } = require('../../helpers/iterate'); const EIP712Verifier = artifacts.require('$EIP712Verifier'); const Clones = artifacts.require('$Clones'); diff --git a/test/utils/structs/EnumerableMap.test.js b/test/utils/structs/EnumerableMap.test.js index 8861fa731..545e12a4f 100644 --- a/test/utils/structs/EnumerableMap.test.js +++ b/test/utils/structs/EnumerableMap.test.js @@ -1,5 +1,5 @@ const { BN, constants } = require('@openzeppelin/test-helpers'); -const { mapValues } = require('../../helpers/map-values'); +const { mapValues } = require('../../helpers/iterate'); const EnumerableMap = artifacts.require('$EnumerableMap'); diff --git a/test/utils/structs/EnumerableSet.test.js b/test/utils/structs/EnumerableSet.test.js index 3ba9d7ff7..a1840257b 100644 --- a/test/utils/structs/EnumerableSet.test.js +++ b/test/utils/structs/EnumerableSet.test.js @@ -1,5 +1,5 @@ const EnumerableSet = artifacts.require('$EnumerableSet'); -const { mapValues } = require('../../helpers/map-values'); +const { mapValues } = require('../../helpers/iterate'); const { shouldBehaveLikeSet } = require('./EnumerableSet.behavior'); diff --git a/test/utils/types/Time.test.js b/test/utils/types/Time.test.js new file mode 100644 index 000000000..b246f7b92 --- /dev/null +++ b/test/utils/types/Time.test.js @@ -0,0 +1,161 @@ +require('@openzeppelin/test-helpers'); + +const { expect } = require('chai'); +const { clock } = require('../../helpers/time'); +const { product, max } = require('../../helpers/iterate'); + +const Time = artifacts.require('$Time'); + +const MAX_UINT32 = 1n << (32n - 1n); +const MAX_UINT48 = 1n << (48n - 1n); +const SOME_VALUES = [0n, 1n, 2n, 15n, 16n, 17n, 42n]; + +const asUint = (value, size) => { + if (typeof value != 'bigint') { + value = BigInt(value); + } + // chai does not support bigint :/ + if (value < 0 || value >= 1n << BigInt(size)) { + throw new Error(`value is not a valid uint${size}`); + } + return value; +}; + +const unpackDelay = delay => ({ + valueBefore: (asUint(delay, 112) >> 32n) % (1n << 32n), + valueAfter: (asUint(delay, 112) >> 0n) % (1n << 32n), + effect: (asUint(delay, 112) >> 64n) % (1n << 48n), +}); + +const packDelay = ({ valueBefore, valueAfter = 0n, effect = 0n }) => + (asUint(valueAfter, 32) << 0n) + (asUint(valueBefore, 32) << 32n) + (asUint(effect, 48) << 64n); + +const effectSamplesForTimepoint = timepoint => [ + 0n, + timepoint, + ...product([-1n, 1n], [1n, 2n, 17n, 42n]) + .map(([sign, shift]) => timepoint + sign * shift) + .filter(effect => effect > 0n && effect <= MAX_UINT48), + MAX_UINT48, +]; + +contract('Time', function () { + beforeEach(async function () { + this.mock = await Time.new(); + }); + + describe('clocks', function () { + it('timestamp', async function () { + expect(await this.mock.$timestamp()).to.be.bignumber.equal(web3.utils.toBN(await clock.timestamp())); + }); + + it('block number', async function () { + expect(await this.mock.$blockNumber()).to.be.bignumber.equal(web3.utils.toBN(await clock.blocknumber())); + }); + }); + + describe('Delay', function () { + describe('packing and unpacking', function () { + const valueBefore = 17n; + const valueAfter = 42n; + const effect = 69n; + const delay = 1272825341158973505578n; + + it('pack', async function () { + const packed = await this.mock.$pack(valueBefore, valueAfter, effect); + expect(packed).to.be.bignumber.equal(delay.toString()); + + const packed2 = packDelay({ valueBefore, valueAfter, effect }); + expect(packed2).to.be.equal(delay); + }); + + it('unpack', async function () { + const unpacked = await this.mock.$unpack(delay); + expect(unpacked[0]).to.be.bignumber.equal(valueBefore.toString()); + expect(unpacked[1]).to.be.bignumber.equal(valueAfter.toString()); + expect(unpacked[2]).to.be.bignumber.equal(effect.toString()); + + const unpacked2 = unpackDelay(delay); + expect(unpacked2).to.be.deep.equal({ valueBefore, valueAfter, effect }); + }); + }); + + it('toDelay', async function () { + for (const value of [...SOME_VALUES, MAX_UINT32]) { + const delay = await this.mock.$toDelay(value).then(unpackDelay); + expect(delay).to.be.deep.equal({ valueBefore: 0n, valueAfter: value, effect: 0n }); + } + }); + + it('getAt & getFullAt', async function () { + const valueBefore = 24194n; + const valueAfter = 4214143n; + + for (const timepoint of [...SOME_VALUES, MAX_UINT48]) + for (const effect of effectSamplesForTimepoint(timepoint)) { + const isPast = effect <= timepoint; + + const delay = packDelay({ valueBefore, valueAfter, effect }); + + expect(await this.mock.$getAt(delay, timepoint)).to.be.bignumber.equal( + String(isPast ? valueAfter : valueBefore), + ); + + const getFullAt = await this.mock.$getFullAt(delay, timepoint); + expect(getFullAt[0]).to.be.bignumber.equal(String(isPast ? valueAfter : valueBefore)); + expect(getFullAt[1]).to.be.bignumber.equal(String(isPast ? 0n : valueAfter)); + expect(getFullAt[2]).to.be.bignumber.equal(String(isPast ? 0n : effect)); + } + }); + + it('get & getFull', async function () { + const timepoint = await clock.timestamp().then(BigInt); + const valueBefore = 24194n; + const valueAfter = 4214143n; + + for (const effect of effectSamplesForTimepoint(timepoint)) { + const isPast = effect <= timepoint; + + const delay = packDelay({ valueBefore, valueAfter, effect }); + + expect(await this.mock.$get(delay)).to.be.bignumber.equal(String(isPast ? valueAfter : valueBefore)); + + const result = await this.mock.$getFull(delay); + expect(result[0]).to.be.bignumber.equal(String(isPast ? valueAfter : valueBefore)); + expect(result[1]).to.be.bignumber.equal(String(isPast ? 0n : valueAfter)); + expect(result[2]).to.be.bignumber.equal(String(isPast ? 0n : effect)); + } + }); + + it('withUpdate', async function () { + const timepoint = await clock.timestamp().then(BigInt); + const valueBefore = 24194n; + const valueAfter = 4214143n; + const newvalueAfter = 94716n; + + for (const effect of effectSamplesForTimepoint(timepoint)) + for (const minSetback of [...SOME_VALUES, MAX_UINT32]) { + const isPast = effect <= timepoint; + const expectedvalueBefore = isPast ? valueAfter : valueBefore; + const expectedSetback = max(minSetback, expectedvalueBefore - newvalueAfter, 0n); + + const result = await this.mock.$withUpdate( + packDelay({ valueBefore, valueAfter, effect }), + newvalueAfter, + minSetback, + ); + + expect(result[0]).to.be.bignumber.equal( + String( + packDelay({ + valueBefore: expectedvalueBefore, + valueAfter: newvalueAfter, + effect: timepoint + expectedSetback, + }), + ), + ); + expect(result[1]).to.be.bignumber.equal(String(timepoint + expectedSetback)); + } + }); + }); +}); From e2a9353deaaa9d00b7c4586f28a1c2b64d5f289f Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Wed, 6 Sep 2023 11:35:07 +0200 Subject: [PATCH 030/167] Remove unused named return variables (#4573) Co-authored-by: Francisco --- contracts/utils/cryptography/MessageHashUtils.sol | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/contracts/utils/cryptography/MessageHashUtils.sol b/contracts/utils/cryptography/MessageHashUtils.sol index 3cf0ce9d9..7625bab78 100644 --- a/contracts/utils/cryptography/MessageHashUtils.sol +++ b/contracts/utils/cryptography/MessageHashUtils.sol @@ -45,7 +45,7 @@ library MessageHashUtils { * * See {ECDSA-recover}. */ - function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32 digest) { + function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { return keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); } @@ -59,10 +59,7 @@ library MessageHashUtils { * * See {ECDSA-recover}. */ - function toDataWithIntendedValidatorHash( - address validator, - bytes memory data - ) internal pure returns (bytes32 digest) { + function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked(hex"19_00", validator, data)); } From 5a77c9995fa125edc2f85879f0bd17c418ae225a Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 7 Sep 2023 01:54:44 +0200 Subject: [PATCH 031/167] Make isConsumingScheduleOp return bytes4 to mitigate clashes (#4575) Co-authored-by: Francisco Giordano --- contracts/access/manager/AccessManaged.sol | 4 ++-- contracts/access/manager/AccessManager.sol | 6 ++++-- contracts/access/manager/IAccessManaged.sol | 2 +- contracts/access/manager/IAccessManager.sol | 3 ++- test/access/manager/AccessManager.test.js | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/contracts/access/manager/AccessManaged.sol b/contracts/access/manager/AccessManaged.sol index 59265017a..70b6ecd74 100644 --- a/contracts/access/manager/AccessManaged.sol +++ b/contracts/access/manager/AccessManaged.sol @@ -85,8 +85,8 @@ abstract contract AccessManaged is Context, IAccessManaged { * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs * attacker controlled calls. */ - function isConsumingScheduledOp() public view returns (bool) { - return _consumingSchedule; + function isConsumingScheduledOp() public view returns (bytes4) { + return _consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0); } /** diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index be438536e..5261b1dd9 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -655,7 +655,9 @@ contract AccessManager is Context, Multicall, IAccessManager { */ function consumeScheduledOp(address caller, bytes calldata data) public virtual { address target = _msgSender(); - require(IAccessManaged(target).isConsumingScheduledOp()); + if (IAccessManaged(target).isConsumingScheduledOp() != IAccessManaged.isConsumingScheduledOp.selector) { + revert AccessManagerUnauthorizedConsume(target); + } _consumeScheduledOp(_hashOperation(caller, target, data)); } @@ -704,7 +706,7 @@ contract AccessManager is Context, Multicall, IAccessManager { (bool isAdmin, ) = hasGroup(ADMIN_GROUP, msgsender); (bool isGuardian, ) = hasGroup(getGroupGuardian(getTargetFunctionGroup(target, selector)), msgsender); if (!isAdmin && !isGuardian) { - revert AccessManagerCannotCancel(msgsender, caller, target, selector); + revert AccessManagerUnauthorizedCancel(msgsender, caller, target, selector); } } diff --git a/contracts/access/manager/IAccessManaged.sol b/contracts/access/manager/IAccessManaged.sol index 947e5bf5d..537a4749d 100644 --- a/contracts/access/manager/IAccessManaged.sol +++ b/contracts/access/manager/IAccessManaged.sol @@ -13,5 +13,5 @@ interface IAccessManaged { function setAuthority(address) external; - function isConsumingScheduledOp() external view returns (bool); + function isConsumingScheduledOp() external view returns (bytes4); } diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index 4f28baa7e..5906e9b23 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -48,7 +48,8 @@ interface IAccessManager { error AccessManagerBadConfirmation(); error AccessManagerUnauthorizedAccount(address msgsender, uint64 groupId); error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector); - error AccessManagerCannotCancel(address msgsender, address caller, address target, bytes4 selector); + error AccessManagerUnauthorizedConsume(address target); + error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector); error AccessManagerInvalidInitialAdmin(address initialAdmin); function canCall( diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index c157d6b7e..fc80c13ed 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -961,7 +961,7 @@ contract('AccessManager', function (accounts) { expect(await this.manager.getSchedule(this.opId)).to.not.be.bignumber.equal('0'); - await expectRevertCustomError(this.cancel({ from: other }), 'AccessManagerCannotCancel', [ + await expectRevertCustomError(this.cancel({ from: other }), 'AccessManagerUnauthorizedCancel', [ other, user, ...this.call, From 25c416d01c8d9c7b9b9dd3bdd0994e10fb26daa3 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 7 Sep 2023 04:10:19 +0200 Subject: [PATCH 032/167] Rename internal variables in EnumerableSet for improved readability (#4577) Co-authored-by: Francisco Giordano --- contracts/utils/structs/EnumerableSet.sol | 32 ++++++++++----------- scripts/generate/templates/EnumerableSet.js | 32 ++++++++++----------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/contracts/utils/structs/EnumerableSet.sol b/contracts/utils/structs/EnumerableSet.sol index 6df060b55..425876d19 100644 --- a/contracts/utils/structs/EnumerableSet.sol +++ b/contracts/utils/structs/EnumerableSet.sol @@ -51,9 +51,9 @@ library EnumerableSet { struct Set { // Storage of set values bytes32[] _values; - // Position of the value in the `values` array, plus 1 because index 0 - // means a value is not in the set. - mapping(bytes32 value => uint256) _indexes; + // Position is the index of the value in the `values` array plus 1. + // Position 0 is used to mean a value is not in the set. + mapping(bytes32 value => uint256) _positions; } /** @@ -67,7 +67,7 @@ library EnumerableSet { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value - set._indexes[value] = set._values.length; + set._positions[value] = set._values.length; return true; } else { return false; @@ -81,32 +81,32 @@ library EnumerableSet { * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { - // We read and store the value's index to prevent multiple reads from the same storage slot - uint256 valueIndex = set._indexes[value]; + // We cache the value's position to prevent multiple reads from the same storage slot + uint256 position = set._positions[value]; - if (valueIndex != 0) { + if (position != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. - uint256 toDeleteIndex = valueIndex - 1; + uint256 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; - if (lastIndex != toDeleteIndex) { + if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; - // Move the last value to the index where the value to delete is - set._values[toDeleteIndex] = lastValue; - // Update the index for the moved value - set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex + // Move the lastValue to the index where the value to delete is + set._values[valueIndex] = lastValue; + // Update the tracked position of the lastValue (that was just moved) + set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); - // Delete the index for the deleted slot - delete set._indexes[value]; + // Delete the tracked position for the deleted slot + delete set._positions[value]; return true; } else { @@ -118,7 +118,7 @@ library EnumerableSet { * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { - return set._indexes[value] != 0; + return set._positions[value] != 0; } /** diff --git a/scripts/generate/templates/EnumerableSet.js b/scripts/generate/templates/EnumerableSet.js index 57dd9d8a3..cb9bffb2c 100644 --- a/scripts/generate/templates/EnumerableSet.js +++ b/scripts/generate/templates/EnumerableSet.js @@ -61,9 +61,9 @@ const defaultSet = () => `\ struct Set { // Storage of set values bytes32[] _values; - // Position of the value in the \`values\` array, plus 1 because index 0 - // means a value is not in the set. - mapping(bytes32 value => uint256) _indexes; + // Position is the index of the value in the \`values\` array plus 1. + // Position 0 is used to mean a value is not in the set. + mapping(bytes32 value => uint256) _positions; } /** @@ -77,7 +77,7 @@ function _add(Set storage set, bytes32 value) private returns (bool) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value - set._indexes[value] = set._values.length; + set._positions[value] = set._values.length; return true; } else { return false; @@ -91,32 +91,32 @@ function _add(Set storage set, bytes32 value) private returns (bool) { * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { - // We read and store the value's index to prevent multiple reads from the same storage slot - uint256 valueIndex = set._indexes[value]; + // We cache the value's position to prevent multiple reads from the same storage slot + uint256 position = set._positions[value]; - if (valueIndex != 0) { + if (position != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. - uint256 toDeleteIndex = valueIndex - 1; + uint256 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; - if (lastIndex != toDeleteIndex) { + if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; - // Move the last value to the index where the value to delete is - set._values[toDeleteIndex] = lastValue; - // Update the index for the moved value - set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex + // Move the lastValue to the index where the value to delete is + set._values[valueIndex] = lastValue; + // Update the tracked position of the lastValue (that was just moved) + set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); - // Delete the index for the deleted slot - delete set._indexes[value]; + // Delete the tracked position for the deleted slot + delete set._positions[value]; return true; } else { @@ -128,7 +128,7 @@ function _remove(Set storage set, bytes32 value) private returns (bool) { * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { - return set._indexes[value] != 0; + return set._positions[value] != 0; } /** From a05a5290496300a0a4abce2382c2fc6e8f3bd151 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 7 Sep 2023 10:08:45 +0200 Subject: [PATCH 033/167] Rename AccessManager.relay to execute (#4578) Co-authored-by: Francisco Giordano --- contracts/access/manager/AccessManager.sol | 32 ++++++------ contracts/access/manager/IAccessManager.sol | 2 +- .../extensions/GovernorTimelockAccess.sol | 22 ++++---- test/access/manager/AccessManager.test.js | 50 +++++++++---------- 4 files changed, 53 insertions(+), 53 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 5261b1dd9..30e77f126 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -40,7 +40,7 @@ import {Time} from "../../utils/types/Time.sol"; * * NOTE: Systems that implement other access control mechanisms (for example using {Ownable}) can be paired with an * {AccessManager} by transferring permissions (ownership in the case of {Ownable}) directly to the {AccessManager}. - * Users will be able to interact with these contracts through the {relay} function, following the access rules + * Users will be able to interact with these contracts through the {execute} function, following the access rules * registered in the {AccessManager}. Keep in mind that in that context, the msg.sender seen by restricted functions * will be {AccessManager} itself. * @@ -62,7 +62,7 @@ contract AccessManager is Context, Multicall, IAccessManager { // Timepoint at which the user gets the permission. If this is either 0, or in the future, the group permission // is not available. uint48 since; - // delay for execution. Only applies to restricted() / relay() calls. This does not restrict access to + // delay for execution. Only applies to restricted() / execute() calls. This does not restrict access to // functions that use the `onlyGroup` modifier. Time.Delay delay; } @@ -92,7 +92,7 @@ contract AccessManager is Context, Multicall, IAccessManager { mapping(bytes32 operationId => Schedule) private _schedules; // This should be transient storage when supported by the EVM. - bytes32 private _relayIdentifier; + bytes32 private _executionId; /** * @dev Check that the caller is authorized to perform the operation, following the restrictions encoded in @@ -116,7 +116,7 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule} - * & {relay} workflow. + * & {execute} workflow. * * This function is usually called by the targeted contract to control immediate execution of restricted functions. * Therefore we only return true is the call can be performed without any delay. If the call is subject to a delay, @@ -133,9 +133,9 @@ contract AccessManager is Context, Multicall, IAccessManager { if (isTargetClosed(target)) { return (false, 0); } else if (caller == address(this)) { - // Caller is AccessManager => call was relayed. In that case the relay already checked permissions. We - // verify that the call "identifier", which is set during the relay call, is correct. - return (_relayIdentifier == _hashRelayIdentifier(target, selector), 0); + // Caller is AccessManager, this means the call was sent through {execute} and it already checked + // permissions. We verify that the call "identifier", which is set during {execute}, is correct. + return (_executionId == _hashExecutionId(target, selector), 0); } else { uint64 groupId = getTargetFunctionGroup(target, selector); (bool inGroup, uint32 currentDelay) = hasGroup(groupId, caller); @@ -555,7 +555,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this - * scheduled operation from other occurrences of the same `operationId` in invocations of {relay} and {cancel}. + * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}. * * Emits a {OperationScheduled} event. */ @@ -604,7 +604,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the * execution delay is 0. * - * Returns the nonce that identifies the previously scheduled operation that is relayed, or 0 if the + * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the * operation wasn't previously scheduled (if the caller doesn't have an execution delay). * * Emits an {OperationExecuted} event only if the call was scheduled and delayed. @@ -612,7 +612,7 @@ contract AccessManager is Context, Multicall, IAccessManager { // Reentrancy is not an issue because permissions are checked on msg.sender. Additionally, // _consumeScheduledOp guarantees a scheduled operation is only executed once. // slither-disable-next-line reentrancy-no-eth - function relay(address target, bytes calldata data) public payable virtual returns (uint32) { + function execute(address target, bytes calldata data) public payable virtual returns (uint32) { address caller = _msgSender(); // Fetch restrictions that apply to the caller on the targeted function @@ -632,14 +632,14 @@ contract AccessManager is Context, Multicall, IAccessManager { } // Mark the target and selector as authorised - bytes32 relayIdentifierBefore = _relayIdentifier; - _relayIdentifier = _hashRelayIdentifier(target, bytes4(data)); + bytes32 executionIdBefore = _executionId; + _executionId = _hashExecutionId(target, bytes4(data)); // Perform call Address.functionCallWithValue(target, data, msg.value); - // Reset relay identifier - _relayIdentifier = relayIdentifierBefore; + // Reset execute identifier + _executionId = executionIdBefore; return nonce; } @@ -725,9 +725,9 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Hashing function for relay protection + * @dev Hashing function for execute protection */ - function _hashRelayIdentifier(address target, bytes4 selector) private pure returns (bytes32) { + function _hashExecutionId(address target, bytes4 selector) private pure returns (bytes32) { return keccak256(abi.encode(target, selector)); } diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index 5906e9b23..af6b2f3f0 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -102,7 +102,7 @@ interface IAccessManager { function schedule(address target, bytes calldata data, uint48 when) external returns (bytes32, uint32); - function relay(address target, bytes calldata data) external payable returns (uint32); + function execute(address target, bytes calldata data) external payable returns (uint32); function cancel(address caller, address target, bytes calldata data) external returns (uint32); diff --git a/contracts/governance/extensions/GovernorTimelockAccess.sol b/contracts/governance/extensions/GovernorTimelockAccess.sol index 6ebb3f1d6..63e547b83 100644 --- a/contracts/governance/extensions/GovernorTimelockAccess.sol +++ b/contracts/governance/extensions/GovernorTimelockAccess.sol @@ -19,7 +19,7 @@ import {Time} from "../../utils/types/Time.sol"; * This extension allows the governor to hold and use its own assets and permissions, unlike {GovernorTimelockControl} * and {GovernorTimelockCompound}, where the timelock is a separate contract that must be the one to hold assets and * permissions. Operations that are delay-restricted by the manager, however, will be executed through the - * {AccessManager-relay} function. + * {AccessManager-execute} function. * * Note that some operations may be cancelable in the {AccessManager} by the admin or a set of guardians, depending on * the restricted operation being invoked. Since proposals are atomic, the cancellation by a guardian of a single @@ -27,15 +27,15 @@ import {Time} from "../../utils/types/Time.sol"; */ abstract contract GovernorTimelockAccess is Governor { // An execution plan is produced at the moment a proposal is created, in order to fix at that point the exact - // execution semantics of the proposal, namely whether a call will go through {AccessManager-relay}. + // execution semantics of the proposal, namely whether a call will go through {AccessManager-execute}. struct ExecutionPlan { uint16 length; uint32 delay; - // We use mappings instead of arrays because it allows us to pack values in storage more tightly without storing - // the length redundantly. - // We pack 8 operations' data in each bucket. Each uint32 value is set to 1 upon proposal creation if it has to - // be scheduled and relayed through the manager. Upon queuing, the value is set to nonce + 1, where the nonce is - // that which we get back from the manager when scheduling the operation. + // We use mappings instead of arrays because it allows us to pack values in storage more tightly without + // storing the length redundantly. + // We pack 8 operations' data in each bucket. Each uint32 value is set to 1 upon proposal creation if it has + // to be scheduled and executed through the manager. Upon queuing, the value is set to nonce + 1, where the + // nonce is that which we get back from the manager when scheduling the operation. mapping(uint256 operationBucket => uint32[8]) managerData; } @@ -175,7 +175,7 @@ abstract contract GovernorTimelockAccess is Governor { } /** - * @dev Mechanism to execute a proposal, potentially going through {AccessManager-relay} for delayed operations. + * @dev Mechanism to execute a proposal, potentially going through {AccessManager-execute} for delayed operations. */ function _executeOperations( uint256 proposalId, @@ -194,9 +194,9 @@ abstract contract GovernorTimelockAccess is Governor { for (uint256 i = 0; i < targets.length; ++i) { (bool delayed, uint32 nonce) = _getManagerData(plan, i); if (delayed) { - uint32 relayedNonce = _manager.relay{value: values[i]}(targets[i], calldatas[i]); - if (relayedNonce != nonce) { - revert GovernorMismatchedNonce(proposalId, nonce, relayedNonce); + uint32 executedNonce = _manager.execute{value: values[i]}(targets[i], calldatas[i]); + if (executedNonce != nonce) { + revert GovernorMismatchedNonce(proposalId, nonce, executedNonce); } } else { (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]); diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index fc80c13ed..92ae830b5 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -555,7 +555,7 @@ contract('AccessManager', function (accounts) { ); this.direct = (opts = {}) => this.target.fnRestricted({ from: user, ...opts }); this.schedule = (opts = {}) => this.manager.schedule(...this.call, 0, { from: user, ...opts }); - this.relay = (opts = {}) => this.manager.relay(...this.call, { from: user, ...opts }); + this.execute = (opts = {}) => this.manager.execute(...this.call, { from: user, ...opts }); this.cancel = (opts = {}) => this.manager.cancel(user, ...this.call, { from: user, ...opts }); }); @@ -711,20 +711,20 @@ contract('AccessManager', function (accounts) { } }); - it('Calling indirectly: only relay', async function () { - // relay without schedule + it('Calling indirectly: only execute', async function () { + // execute without schedule if (directSuccess) { - const { receipt, tx } = await this.relay(); + const { receipt, tx } = await this.execute(); expectEvent.notEmitted(receipt, 'OperationExecuted', { operationId: this.opId }); await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); } else if (indirectSuccess) { - await expectRevertCustomError(this.relay(), 'AccessManagerNotScheduled', [this.opId]); + await expectRevertCustomError(this.execute(), 'AccessManagerNotScheduled', [this.opId]); } else { - await expectRevertCustomError(this.relay(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); + await expectRevertCustomError(this.execute(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); } }); - it('Calling indirectly: schedule and relay', async function () { + it('Calling indirectly: schedule and execute', async function () { if (directSuccess || indirectSuccess) { const { receipt } = await this.schedule(); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); @@ -743,23 +743,23 @@ contract('AccessManager', function (accounts) { // execute without wait if (directSuccess) { - const { receipt, tx } = await this.relay(); + const { receipt, tx } = await this.execute(); await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); if (delay && fnGroup !== GROUPS.PUBLIC) { expectEvent(receipt, 'OperationExecuted', { operationId: this.opId }); expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); } } else if (indirectSuccess) { - await expectRevertCustomError(this.relay(), 'AccessManagerNotReady', [this.opId]); + await expectRevertCustomError(this.execute(), 'AccessManagerNotReady', [this.opId]); } else { - await expectRevertCustomError(this.relay(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); + await expectRevertCustomError(this.execute(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); } } else { await expectRevertCustomError(this.schedule(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); } }); - it('Calling indirectly: schedule wait and relay', async function () { + it('Calling indirectly: schedule wait and execute', async function () { if (directSuccess || indirectSuccess) { const { receipt } = await this.schedule(); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); @@ -781,14 +781,14 @@ contract('AccessManager', function (accounts) { // execute without wait if (directSuccess || indirectSuccess) { - const { receipt, tx } = await this.relay(); + const { receipt, tx } = await this.execute(); await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); if (delay && fnGroup !== GROUPS.PUBLIC) { expectEvent(receipt, 'OperationExecuted', { operationId: this.opId }); expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); } } else { - await expectRevertCustomError(this.relay(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); + await expectRevertCustomError(this.execute(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); } } else { await expectRevertCustomError(this.schedule(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); @@ -883,7 +883,7 @@ contract('AccessManager', function (accounts) { await this.manager.$_grantGroup(GROUPS.SOME, user, 0, executeDelay); }); - it('Checking canCall when caller is the manager depend on the _relayIdentifier', async function () { + it('Checking canCall when caller is the manager depend on the _executionId', async function () { const result = await this.manager.canCall(this.manager.address, this.target.address, '0x00000000'); expect(result[0]).to.be.false; expect(result[1]).to.be.bignumber.equal('0'); @@ -900,13 +900,13 @@ contract('AccessManager', function (accounts) { await time.increaseTo(timestamp.add(executeDelay).subn(2)); // too early - await expectRevertCustomError(this.relay(), 'AccessManagerNotReady', [this.opId]); + await expectRevertCustomError(this.execute(), 'AccessManagerNotReady', [this.opId]); // the revert happened one second before the execution delay expired expect(await time.latest()).to.be.bignumber.equal(timestamp.add(executeDelay).subn(1)); // ok - await this.relay(); + await this.execute(); // the success happened when the delay was reached (earliest possible) expect(await time.latest()).to.be.bignumber.equal(timestamp.add(executeDelay)); @@ -928,10 +928,10 @@ contract('AccessManager', function (accounts) { await expectRevertCustomError(this.cancel(), 'AccessManagerNotScheduled', [this.opId]); }); - it('Cannot cancel an operation that is not already relayed', async function () { + it('Cannot cancel an operation that is already executed', async function () { await this.schedule(); await time.increase(executeDelay); - await this.relay(); + await this.execute(); await expectRevertCustomError(this.cancel(), 'AccessManagerNotScheduled', [this.opId]); }); @@ -973,7 +973,7 @@ contract('AccessManager', function (accounts) { it('Can re-schedule after execution', async function () { await this.schedule(); await time.increase(executeDelay); - await this.relay(); + await this.execute(); // reschedule const { receipt } = await this.schedule(); @@ -1026,7 +1026,7 @@ contract('AccessManager', function (accounts) { it('relayed call (with group): reverts', async function () { await expectRevertCustomError( - this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: user }), + this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: user }), 'AccessManagerUnauthorizedCall', [user, this.ownable.address, selector('$_checkOwner()')], ); @@ -1034,7 +1034,7 @@ contract('AccessManager', function (accounts) { it('relayed call (without group): reverts', async function () { await expectRevertCustomError( - this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: other }), + this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: other }), 'AccessManagerUnauthorizedCall', [other, this.ownable.address, selector('$_checkOwner()')], ); @@ -1054,12 +1054,12 @@ contract('AccessManager', function (accounts) { }); it('relayed call (with group): success', async function () { - await this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: user }); + await this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: user }); }); it('relayed call (without group): reverts', async function () { await expectRevertCustomError( - this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: other }), + this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: other }), 'AccessManagerUnauthorizedCall', [other, this.ownable.address, selector('$_checkOwner()')], ); @@ -1078,11 +1078,11 @@ contract('AccessManager', function (accounts) { }); it('relayed call (with group): success', async function () { - await this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: user }); + await this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: user }); }); it('relayed call (without group): success', async function () { - await this.manager.relay(this.ownable.address, selector('$_checkOwner()'), { from: other }); + await this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: other }); }); }); }); From d54f4ac4b703c770ce7c08a1854648ee309a2101 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Fri, 8 Sep 2023 01:58:50 +0200 Subject: [PATCH 034/167] Rename AccessManager groups to roles (#4580) --- contracts/access/manager/AccessManager.sol | 326 ++++++----- contracts/access/manager/IAccessManager.sol | 47 +- test/access/manager/AccessManager.test.js | 516 +++++++++--------- .../extensions/GovernorTimelockAccess.test.js | 18 +- 4 files changed, 446 insertions(+), 461 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 30e77f126..e397f5d44 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -15,21 +15,21 @@ import {Time} from "../../utils/types/Time.sol"; * * The smart contracts under the control of an AccessManager instance will have a set of "restricted" functions, and the * exact details of how access is restricted for each of those functions is configurable by the admins of the instance. - * These restrictions are expressed in terms of "groups". + * These restrictions are expressed in terms of "roles". * - * An AccessManager instance will define a set of groups. Accounts can be added into any number of these groups. Each of + * An AccessManager instance will define a set of roles. Accounts can be added into any number of these roles. Each of * them defines a role, and may confer access to some of the restricted functions in the system, as configured by admins - * through the use of {setFunctionAllowedGroup}. + * through the use of {setFunctionAllowedRoles}. * * Note that a function in a target contract may become permissioned in this way only when: 1) said contract is * {AccessManaged} and is connected to this contract as its manager, and 2) said function is decorated with the * `restricted` modifier. * - * There is a special group defined by default named "public" which all accounts automatically have. + * There is a special role defined by default named "public" which all accounts automatically have. * - * Contracts where functions are mapped to groups are said to be in a "custom" mode, but contracts can also be - * configured in two special modes: 1) the "open" mode, where all functions are allowed to the "public" group, and 2) - * the "closed" mode, where no function is allowed to any group. + * Contracts where functions are mapped to roles are said to be in a "custom" mode, but contracts can also be + * configured in two special modes: 1) the "open" mode, where all functions are allowed to the "public" role, and 2) + * the "closed" mode, where no function is allowed to any role. * * Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that * they will be highly secured (e.g., a multisig or a well-configured DAO). @@ -52,27 +52,26 @@ contract AccessManager is Context, Multicall, IAccessManager { using Time for *; struct TargetConfig { - mapping(bytes4 selector => uint64 groupId) allowedGroups; + mapping(bytes4 selector => uint64 roleId) allowedRoles; Time.Delay adminDelay; bool closed; } - // Structure that stores the details for a group/account pair. This structure fits into a single slot. + // Structure that stores the details for a role/account pair. This structures fit into a single slot. struct Access { - // Timepoint at which the user gets the permission. If this is either 0, or in the future, the group permission + // Timepoint at which the user gets the permission. If this is either 0, or in the future, the role permission // is not available. uint48 since; - // delay for execution. Only applies to restricted() / execute() calls. This does not restrict access to - // functions that use the `onlyGroup` modifier. + // delay for execution. Only applies to restricted() / execute() calls. Time.Delay delay; } - // Structure that stores the details of a group, including: - // - the members of the group - // - the admin group (that can grant or revoke permissions) - // - the guardian group (that can cancel operations targeting functions that need this group - // - the grant delay - struct Group { + // Structure that stores the details of a role, including: + // - the members of the role + // - the admin role (that can grant or revoke permissions) + // - the guardian role (that can cancel operations targeting functions that need this role) + // - the grand delay + struct Role { mapping(address user => Access access) members; uint64 admin; uint64 guardian; @@ -84,11 +83,11 @@ contract AccessManager is Context, Multicall, IAccessManager { uint32 nonce; } - uint64 public constant ADMIN_GROUP = type(uint64).min; // 0 - uint64 public constant PUBLIC_GROUP = type(uint64).max; // 2**64-1 + uint64 public constant ADMIN_ROLE = type(uint64).min; // 0 + uint64 public constant PUBLIC_ROLE = type(uint64).max; // 2**64-1 mapping(address target => TargetConfig mode) private _targets; - mapping(uint64 groupId => Group) private _groups; + mapping(uint64 roleId => Role) private _roles; mapping(bytes32 operationId => Schedule) private _schedules; // This should be transient storage when supported by the EVM. @@ -109,7 +108,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } // admin is active immediately and without any execution delay. - _grantGroup(ADMIN_GROUP, initialAdmin, 0, 0); + _grantRole(ADMIN_ROLE, initialAdmin, 0, 0); } // =================================================== GETTERS ==================================================== @@ -137,9 +136,9 @@ contract AccessManager is Context, Multicall, IAccessManager { // permissions. We verify that the call "identifier", which is set during {execute}, is correct. return (_executionId == _hashExecutionId(target, selector), 0); } else { - uint64 groupId = getTargetFunctionGroup(target, selector); - (bool inGroup, uint32 currentDelay) = hasGroup(groupId, caller); - return inGroup ? (currentDelay == 0, currentDelay) : (false, 0); + uint64 roleId = getTargetFunctionRole(target, selector); + (bool isMember, uint32 currentDelay) = hasRole(roleId, caller); + return isMember ? (currentDelay == 0, currentDelay) : (false, 0); } } @@ -153,7 +152,7 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Minimum setback for all delay updates, with the exception of execution delays, which * can be increased without setback (and in the event of an accidental increase can be reset - * via {revokeGroup}). Defaults to 5 days. + * via {revokeRole}). Defaults to 5 days. */ function minSetback() public view virtual returns (uint32) { return 5 days; @@ -167,11 +166,11 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Get the permission level (group) required to call a function. This only applies for contract that are + * @dev Get the permission level (role) required to call a function. This only applies for contract that are * operating under the `Custom` mode. */ - function getTargetFunctionGroup(address target, bytes4 selector) public view virtual returns (uint64) { - return _targets[target].allowedGroups[selector]; + function getTargetFunctionRole(address target, bytes4 selector) public view virtual returns (uint64) { + return _targets[target].allowedRoles[selector]; } function getTargetAdminDelay(address target) public view virtual returns (uint32) { @@ -179,35 +178,35 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Get the id of the group that acts as an admin for given group. + * @dev Get the id of the role that acts as an admin for given role. * - * The admin permission is required to grant the group, revoke the group and update the execution delay to execute - * an operation that is restricted to this group. + * The admin permission is required to grant the role, revoke the role and update the execution delay to execute + * an operation that is restricted to this role. */ - function getGroupAdmin(uint64 groupId) public view virtual returns (uint64) { - return _groups[groupId].admin; + function getRoleAdmin(uint64 roleId) public view virtual returns (uint64) { + return _roles[roleId].admin; } /** - * @dev Get the group that acts as a guardian for a given group. + * @dev Get the role that acts as a guardian for a given role. * - * The guardian permission allows canceling operations that have been scheduled under the group. + * The guardian permission allows canceling operations that have been scheduled under the role. */ - function getGroupGuardian(uint64 groupId) public view virtual returns (uint64) { - return _groups[groupId].guardian; + function getRoleGuardian(uint64 roleId) public view virtual returns (uint64) { + return _roles[roleId].guardian; } /** - * @dev Get the group current grant delay, that value may change at any point, without an event emitted, following + * @dev Get the role current grant delay, that value may change at any point, without an event emitted, following * a call to {setGrantDelay}. Changes to this value, including effect timepoint are notified by the - * {GroupGrantDelayChanged} event. + * {RoleGrantDelayChanged} event. */ - function getGroupGrantDelay(uint64 groupId) public view virtual returns (uint32) { - return _groups[groupId].grantDelay.get(); + function getRoleGrantDelay(uint64 roleId) public view virtual returns (uint32) { + return _roles[roleId].grantDelay.get(); } /** - * @dev Get the access details for a given account in a given group. These details include the timepoint at which + * @dev Get the access details for a given account in a given role. These details include the timepoint at which * membership becomes active, and the delay applied to all operation by this user that requires this permission * level. * @@ -217,8 +216,8 @@ contract AccessManager is Context, Multicall, IAccessManager { * [2] Pending execution delay for the account. * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled. */ - function getAccess(uint64 groupId, address account) public view virtual returns (uint48, uint32, uint32, uint48) { - Access storage access = _groups[groupId].members[account]; + function getAccess(uint64 roleId, address account) public view virtual returns (uint48, uint32, uint32, uint48) { + Access storage access = _roles[roleId].members[account]; uint48 since = access.since; (uint32 currentDelay, uint32 pendingDelay, uint48 effect) = access.delay.getFull(); @@ -227,255 +226,254 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Check if a given account currently had the permission level corresponding to a given group. Note that this + * @dev Check if a given account currently had the permission level corresponding to a given role. Note that this * permission might be associated with a delay. {getAccess} can provide more details. */ - function hasGroup(uint64 groupId, address account) public view virtual returns (bool, uint32) { - if (groupId == PUBLIC_GROUP) { + function hasRole(uint64 roleId, address account) public view virtual returns (bool, uint32) { + if (roleId == PUBLIC_ROLE) { return (true, 0); } else { - (uint48 inGroupSince, uint32 currentDelay, , ) = getAccess(groupId, account); - return (inGroupSince != 0 && inGroupSince <= Time.timestamp(), currentDelay); + (uint48 hasRoleSince, uint32 currentDelay, , ) = getAccess(roleId, account); + return (hasRoleSince != 0 && hasRoleSince <= Time.timestamp(), currentDelay); } } - // =============================================== GROUP MANAGEMENT =============================================== + // =============================================== ROLE MANAGEMENT =============================================== /** - * @dev Give a label to a group, for improved group discoverabily by UIs. + * @dev Give a label to a role, for improved role discoverabily by UIs. * - * Emits a {GroupLabel} event. + * Emits a {RoleLabel} event. */ - function labelGroup(uint64 groupId, string calldata label) public virtual onlyAuthorized { - if (groupId == ADMIN_GROUP || groupId == PUBLIC_GROUP) { - revert AccessManagerLockedGroup(groupId); + function labelRole(uint64 roleId, string calldata label) public virtual onlyAuthorized { + if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); } - emit GroupLabel(groupId, label); + emit RoleLabel(roleId, label); } /** - * @dev Add `account` to `groupId`, or change its execution delay. + * @dev Add `account` to `roleId`, or change its execution delay. * - * This gives the account the authorization to call any function that is restricted to this group. An optional + * This gives the account the authorization to call any function that is restricted to this role. An optional * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation - * that is restricted to members this group. The user will only be able to execute the operation after the delay has + * that is restricted to members this role. The user will only be able to execute the operation after the delay has * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}). * - * If the account has already been granted this group, the execution delay will be updated. This update is not + * If the account has already been granted this role, the execution delay will be updated. This update is not * immediate and follows the delay rules. For example, If a user currently has a delay of 3 hours, and this is * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any * operation executed in the 3 hours that follows this update was indeed scheduled before this update. * * Requirements: * - * - the caller must be in the group's admins + * - the caller must be in the role's admins * - * Emits a {GroupGranted} event + * Emits a {RoleGranted} event */ - function grantGroup(uint64 groupId, address account, uint32 executionDelay) public virtual onlyAuthorized { - _grantGroup(groupId, account, getGroupGrantDelay(groupId), executionDelay); + function grantRole(uint64 roleId, address account, uint32 executionDelay) public virtual onlyAuthorized { + _grantRole(roleId, account, getRoleGrantDelay(roleId), executionDelay); } /** - * @dev Remove an account for a group, with immediate effect. If the sender is not in the group, this call has no + * @dev Remove an account for a role, with immediate effect. If the sender is not in the role, this call has no * effect. * * Requirements: * - * - the caller must be in the group's admins + * - the caller must be in the role's admins * - * Emits a {GroupRevoked} event + * Emits a {RoleRevoked} event */ - function revokeGroup(uint64 groupId, address account) public virtual onlyAuthorized { - _revokeGroup(groupId, account); + function revokeRole(uint64 roleId, address account) public virtual onlyAuthorized { + _revokeRole(roleId, account); } /** - * @dev Renounce group permissions for the calling account, with immediate effect. If the sender is not in - * the group, this call has no effect. + * @dev Renounce role permissions for the calling account, with immediate effect. If the sender is not in + * the role, this call has no effect. * * Requirements: * * - the caller must be `callerConfirmation`. * - * Emits a {GroupRevoked} event + * Emits a {RoleRevoked} event */ - function renounceGroup(uint64 groupId, address callerConfirmation) public virtual { + function renounceRole(uint64 roleId, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessManagerBadConfirmation(); } - _revokeGroup(groupId, callerConfirmation); + _revokeRole(roleId, callerConfirmation); } /** - * @dev Change admin group for a given group. + * @dev Change admin role for a given role. * * Requirements: * * - the caller must be a global admin * - * Emits a {GroupAdminChanged} event + * Emits a {RoleAdminChanged} event */ - function setGroupAdmin(uint64 groupId, uint64 admin) public virtual onlyAuthorized { - _setGroupAdmin(groupId, admin); + function setRoleAdmin(uint64 roleId, uint64 admin) public virtual onlyAuthorized { + _setRoleAdmin(roleId, admin); } /** - * @dev Change guardian group for a given group. + * @dev Change guardian role for a given role. * * Requirements: * * - the caller must be a global admin * - * Emits a {GroupGuardianChanged} event + * Emits a {RoleGuardianChanged} event */ - function setGroupGuardian(uint64 groupId, uint64 guardian) public virtual onlyAuthorized { - _setGroupGuardian(groupId, guardian); + function setRoleGuardian(uint64 roleId, uint64 guardian) public virtual onlyAuthorized { + _setRoleGuardian(roleId, guardian); } /** - * @dev Update the delay for granting a `groupId`. + * @dev Update the delay for granting a `roleId`. * * Requirements: * * - the caller must be a global admin * - * Emits a {GroupGrantDelayChanged} event + * Emits a {RoleGrantDelayChanged} event */ - function setGrantDelay(uint64 groupId, uint32 newDelay) public virtual onlyAuthorized { - _setGrantDelay(groupId, newDelay); + function setGrantDelay(uint64 roleId, uint32 newDelay) public virtual onlyAuthorized { + _setGrantDelay(roleId, newDelay); } /** - * @dev Internal version of {grantGroup} without access control. Returns true if the group was newly granted. + * @dev Internal version of {grantRole} without access control. Returns true if the role was newly granted. * - * Emits a {GroupGranted} event + * Emits a {RoleGranted} event */ - function _grantGroup( - uint64 groupId, + function _grantRole( + uint64 roleId, address account, uint32 grantDelay, uint32 executionDelay ) internal virtual returns (bool) { - if (groupId == PUBLIC_GROUP) { - revert AccessManagerLockedGroup(groupId); + if (roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); } - bool inGroup = _groups[groupId].members[account].since != 0; - + bool newMember = _roles[roleId].members[account].since == 0; uint48 since; - if (inGroup) { + if (newMember) { + since = Time.timestamp() + grantDelay; + _roles[roleId].members[account] = Access({since: since, delay: executionDelay.toDelay()}); + } else { // No setback here. Value can be reset by doing revoke + grant, effectively allowing the admin to perform - // any change to the execution delay within the duration of the group admin delay. - (_groups[groupId].members[account].delay, since) = _groups[groupId].members[account].delay.withUpdate( + // any change to the execution delay within the duration of the role admin delay. + (_roles[roleId].members[account].delay, since) = _roles[roleId].members[account].delay.withUpdate( executionDelay, 0 ); - } else { - since = Time.timestamp() + grantDelay; - _groups[groupId].members[account] = Access({since: since, delay: executionDelay.toDelay()}); } - emit GroupGranted(groupId, account, executionDelay, since, !inGroup); - return !inGroup; + emit RoleGranted(roleId, account, executionDelay, since, newMember); + return newMember; } /** - * @dev Internal version of {revokeGroup} without access control. This logic is also used by {renounceGroup}. - * Returns true if the group was previously granted. + * @dev Internal version of {revokeRole} without access control. This logic is also used by {renounceRole}. + * Returns true if the role was previously granted. * - * Emits a {GroupRevoked} event + * Emits a {RoleRevoked} event */ - function _revokeGroup(uint64 groupId, address account) internal virtual returns (bool) { - if (groupId == PUBLIC_GROUP) { - revert AccessManagerLockedGroup(groupId); + function _revokeRole(uint64 roleId, address account) internal virtual returns (bool) { + if (roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); } - if (_groups[groupId].members[account].since == 0) { + if (_roles[roleId].members[account].since == 0) { return false; } - delete _groups[groupId].members[account]; + delete _roles[roleId].members[account]; - emit GroupRevoked(groupId, account); + emit RoleRevoked(roleId, account); return true; } /** - * @dev Internal version of {setGroupAdmin} without access control. + * @dev Internal version of {setRoleAdmin} without access control. * - * Emits a {GroupAdminChanged} event + * Emits a {RoleAdminChanged} event */ - function _setGroupAdmin(uint64 groupId, uint64 admin) internal virtual { - if (groupId == ADMIN_GROUP || groupId == PUBLIC_GROUP) { - revert AccessManagerLockedGroup(groupId); + function _setRoleAdmin(uint64 roleId, uint64 admin) internal virtual { + if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); } - _groups[groupId].admin = admin; + _roles[roleId].admin = admin; - emit GroupAdminChanged(groupId, admin); + emit RoleAdminChanged(roleId, admin); } /** - * @dev Internal version of {setGroupGuardian} without access control. + * @dev Internal version of {setRoleGuardian} without access control. * - * Emits a {GroupGuardianChanged} event + * Emits a {RoleGuardianChanged} event */ - function _setGroupGuardian(uint64 groupId, uint64 guardian) internal virtual { - if (groupId == ADMIN_GROUP || groupId == PUBLIC_GROUP) { - revert AccessManagerLockedGroup(groupId); + function _setRoleGuardian(uint64 roleId, uint64 guardian) internal virtual { + if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); } - _groups[groupId].guardian = guardian; + _roles[roleId].guardian = guardian; - emit GroupGuardianChanged(groupId, guardian); + emit RoleGuardianChanged(roleId, guardian); } /** * @dev Internal version of {setGrantDelay} without access control. * - * Emits a {GroupGrantDelayChanged} event + * Emits a {RoleGrantDelayChanged} event */ - function _setGrantDelay(uint64 groupId, uint32 newDelay) internal virtual { - if (groupId == PUBLIC_GROUP) { - revert AccessManagerLockedGroup(groupId); + function _setGrantDelay(uint64 roleId, uint32 newDelay) internal virtual { + if (roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); } uint48 effect; - (_groups[groupId].grantDelay, effect) = _groups[groupId].grantDelay.withUpdate(newDelay, minSetback()); + (_roles[roleId].grantDelay, effect) = _roles[roleId].grantDelay.withUpdate(newDelay, minSetback()); - emit GroupGrantDelayChanged(groupId, newDelay, effect); + emit RoleGrantDelayChanged(roleId, newDelay, effect); } // ============================================= FUNCTION MANAGEMENT ============================================== /** - * @dev Set the level of permission (`group`) required to call functions identified by the `selectors` in the + * @dev Set the level of permission (`role`) required to call functions identified by the `selectors` in the * `target` contract. * * Requirements: * * - the caller must be a global admin * - * Emits a {FunctionAllowedGroupUpdated} event per selector + * Emits a {FunctionAllowedRoleUpdated} event per selector */ - function setTargetFunctionGroup( + function setTargetFunctionRole( address target, bytes4[] calldata selectors, - uint64 groupId + uint64 roleId ) public virtual onlyAuthorized { for (uint256 i = 0; i < selectors.length; ++i) { - _setTargetFunctionGroup(target, selectors[i], groupId); + _setTargetFunctionRole(target, selectors[i], roleId); } } /** - * @dev Internal version of {setFunctionAllowedGroup} without access control. + * @dev Internal version of {setFunctionAllowedRole} without access control. * - * Emits a {FunctionAllowedGroupUpdated} event + * Emits a {FunctionAllowedRoleUpdated} event */ - function _setTargetFunctionGroup(address target, bytes4 selector, uint64 groupId) internal virtual { - _targets[target].allowedGroups[selector] = groupId; - emit TargetFunctionGroupUpdated(target, selector, groupId); + function _setTargetFunctionRole(address target, bytes4 selector, uint64 roleId) internal virtual { + _targets[target].allowedRoles[selector] = roleId; + emit TargetFunctionRoleUpdated(target, selector, roleId); } /** @@ -485,7 +483,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * - the caller must be a global admin * - * Emits a {FunctionAllowedGroupUpdated} event per selector + * Emits a {FunctionAllowedRoleUpdated} event per selector */ function setTargetAdminDelay(address target, uint32 newDelay) public virtual onlyAuthorized { _setTargetAdminDelay(target, newDelay); @@ -702,9 +700,9 @@ contract AccessManager is Context, Multicall, IAccessManager { if (_schedules[operationId].timepoint == 0) { revert AccessManagerNotScheduled(operationId); } else if (caller != msgsender) { - // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required group. - (bool isAdmin, ) = hasGroup(ADMIN_GROUP, msgsender); - (bool isGuardian, ) = hasGroup(getGroupGuardian(getTargetFunctionGroup(target, selector)), msgsender); + // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required role. + (bool isAdmin, ) = hasRole(ADMIN_ROLE, msgsender); + (bool isGuardian, ) = hasRole(getRoleGuardian(getTargetFunctionRole(target, selector)), msgsender); if (!isAdmin && !isGuardian) { revert AccessManagerUnauthorizedCancel(msgsender, caller, target, selector); } @@ -752,8 +750,8 @@ contract AccessManager is Context, Multicall, IAccessManager { (bool immediate, uint32 delay) = _canCallExtended(caller, address(this), _msgData()); if (!immediate) { if (delay == 0) { - (, uint64 requiredGroup, ) = _getAdminRestrictions(_msgData()); - revert AccessManagerUnauthorizedAccount(caller, requiredGroup); + (, uint64 requiredRole, ) = _getAdminRestrictions(_msgData()); + revert AccessManagerUnauthorizedAccount(caller, requiredRole); } else { _consumeScheduledOp(_hashOperation(caller, address(this), _msgData())); } @@ -765,7 +763,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Returns: * - bool restricted: does this data match a restricted operation - * - uint64: which group is this operation restricted to + * - uint64: which role is this operation restricted to * - uint32: minimum delay to enforce for that operation (on top of the admin's execution delay) */ function _getAdminRestrictions(bytes calldata data) private view returns (bool, uint64, uint32) { @@ -777,33 +775,33 @@ contract AccessManager is Context, Multicall, IAccessManager { // Restricted to ADMIN with no delay beside any execution delay the caller may have if ( - selector == this.labelGroup.selector || - selector == this.setGroupAdmin.selector || - selector == this.setGroupGuardian.selector || + selector == this.labelRole.selector || + selector == this.setRoleAdmin.selector || + selector == this.setRoleGuardian.selector || selector == this.setGrantDelay.selector || selector == this.setTargetAdminDelay.selector ) { - return (true, ADMIN_GROUP, 0); + return (true, ADMIN_ROLE, 0); } // Restricted to ADMIN with the admin delay corresponding to the target if ( selector == this.updateAuthority.selector || selector == this.setTargetClosed.selector || - selector == this.setTargetFunctionGroup.selector + selector == this.setTargetFunctionRole.selector ) { // First argument is a target. address target = abi.decode(data[0x04:0x24], (address)); uint32 delay = getTargetAdminDelay(target); - return (true, ADMIN_GROUP, delay); + return (true, ADMIN_ROLE, delay); } - // Restricted to that group's admin with no delay beside any execution delay the caller may have. - if (selector == this.grantGroup.selector || selector == this.revokeGroup.selector) { - // First argument is a groupId. - uint64 groupId = abi.decode(data[0x04:0x24], (uint64)); - uint64 groupAdminId = getGroupAdmin(groupId); - return (true, groupAdminId, 0); + // Restricted to that role's admin with no delay beside any execution delay the caller may have. + if (selector == this.grantRole.selector || selector == this.revokeRole.selector) { + // First argument is a roleId. + uint64 roleId = abi.decode(data[0x04:0x24], (uint64)); + uint64 roleAdminId = getRoleAdmin(roleId); + return (true, roleAdminId, 0); } return (false, 0, 0); @@ -815,13 +813,13 @@ contract AccessManager is Context, Multicall, IAccessManager { */ function _canCallExtended(address caller, address target, bytes calldata data) private view returns (bool, uint32) { if (target == address(this)) { - (bool enabled, uint64 groupId, uint32 operationDelay) = _getAdminRestrictions(data); + (bool enabled, uint64 roleId, uint32 operationDelay) = _getAdminRestrictions(data); if (!enabled) { return (false, 0); } - (bool inGroup, uint32 executionDelay) = hasGroup(groupId, caller); - if (!inGroup) { + (bool inRole, uint32 executionDelay) = hasRole(roleId, caller); + if (!inRole) { return (false, 0); } diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index af6b2f3f0..b0c9a51e4 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -28,15 +28,14 @@ interface IAccessManager { */ event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce); - event GroupLabel(uint64 indexed groupId, string label); - event GroupGranted(uint64 indexed groupId, address indexed account, uint32 delay, uint48 since, bool newMember); - event GroupRevoked(uint64 indexed groupId, address indexed account); - event GroupAdminChanged(uint64 indexed groupId, uint64 indexed admin); - event GroupGuardianChanged(uint64 indexed groupId, uint64 indexed guardian); - event GroupGrantDelayChanged(uint64 indexed groupId, uint32 delay, uint48 since); - + event RoleLabel(uint64 indexed roleId, string label); + event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember); + event RoleRevoked(uint64 indexed roleId, address indexed account); + event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin); + event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian); + event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since); event TargetClosed(address indexed target, bool closed); - event TargetFunctionGroupUpdated(address indexed target, bytes4 selector, uint64 indexed groupId); + event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId); event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since); error AccessManagerAlreadyScheduled(bytes32 operationId); @@ -44,9 +43,9 @@ interface IAccessManager { error AccessManagerNotReady(bytes32 operationId); error AccessManagerExpired(bytes32 operationId); error AccessManagerLockedAccount(address account); - error AccessManagerLockedGroup(uint64 groupId); + error AccessManagerLockedRole(uint64 roleId); error AccessManagerBadConfirmation(); - error AccessManagerUnauthorizedAccount(address msgsender, uint64 groupId); + error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId); error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector); error AccessManagerUnauthorizedConsume(address target); error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector); @@ -62,35 +61,35 @@ interface IAccessManager { function isTargetClosed(address target) external view returns (bool); - function getTargetFunctionGroup(address target, bytes4 selector) external view returns (uint64); + function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64); function getTargetAdminDelay(address target) external view returns (uint32); - function getGroupAdmin(uint64 groupId) external view returns (uint64); + function getRoleAdmin(uint64 roleId) external view returns (uint64); - function getGroupGuardian(uint64 groupId) external view returns (uint64); + function getRoleGuardian(uint64 roleId) external view returns (uint64); - function getGroupGrantDelay(uint64 groupId) external view returns (uint32); + function getRoleGrantDelay(uint64 roleId) external view returns (uint32); - function getAccess(uint64 groupId, address account) external view returns (uint48, uint32, uint32, uint48); + function getAccess(uint64 roleId, address account) external view returns (uint48, uint32, uint32, uint48); - function hasGroup(uint64 groupId, address account) external view returns (bool, uint32); + function hasRole(uint64 roleId, address account) external view returns (bool, uint32); - function labelGroup(uint64 groupId, string calldata label) external; + function labelRole(uint64 roleId, string calldata label) external; - function grantGroup(uint64 groupId, address account, uint32 executionDelay) external; + function grantRole(uint64 roleId, address account, uint32 executionDelay) external; - function revokeGroup(uint64 groupId, address account) external; + function revokeRole(uint64 roleId, address account) external; - function renounceGroup(uint64 groupId, address callerConfirmation) external; + function renounceRole(uint64 roleId, address callerConfirmation) external; - function setGroupAdmin(uint64 groupId, uint64 admin) external; + function setRoleAdmin(uint64 roleId, uint64 admin) external; - function setGroupGuardian(uint64 groupId, uint64 guardian) external; + function setRoleGuardian(uint64 roleId, uint64 guardian) external; - function setGrantDelay(uint64 groupId, uint32 newDelay) external; + function setGrantDelay(uint64 roleId, uint32 newDelay) external; - function setTargetFunctionGroup(address target, bytes4[] calldata selectors, uint64 groupId) external; + function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external; function setTargetAdminDelay(address target, uint32 newDelay) external; diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 92ae830b5..84fb8df21 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -11,17 +11,16 @@ const Ownable = artifacts.require('$Ownable'); const MAX_UINT64 = web3.utils.toBN((2n ** 64n - 1n).toString()); -const GROUPS = { +const ROLES = { ADMIN: web3.utils.toBN(0), SOME_ADMIN: web3.utils.toBN(17), SOME: web3.utils.toBN(42), PUBLIC: MAX_UINT64, }; -Object.assign(GROUPS, Object.fromEntries(Object.entries(GROUPS).map(([key, value]) => [value, key]))); +Object.assign(ROLES, Object.fromEntries(Object.entries(ROLES).map(([key, value]) => [value, key]))); const executeDelay = web3.utils.toBN(10); const grantDelay = web3.utils.toBN(10); - const MINSETBACK = time.duration.days(5); const formatAccess = access => [access[0], access[1].toString()]; @@ -32,11 +31,11 @@ contract('AccessManager', function (accounts) { beforeEach(async function () { this.manager = await AccessManager.new(admin); - // add member to group - await this.manager.$_setGroupAdmin(GROUPS.SOME, GROUPS.SOME_ADMIN); - await this.manager.$_setGroupGuardian(GROUPS.SOME, GROUPS.SOME_ADMIN); - await this.manager.$_grantGroup(GROUPS.SOME_ADMIN, manager, 0, 0); - await this.manager.$_grantGroup(GROUPS.SOME, member, 0, 0); + // add member to role + await this.manager.$_setRoleAdmin(ROLES.SOME, ROLES.SOME_ADMIN); + await this.manager.$_setRoleGuardian(ROLES.SOME, ROLES.SOME_ADMIN); + await this.manager.$_grantRole(ROLES.SOME_ADMIN, manager, 0, 0); + await this.manager.$_grantRole(ROLES.SOME, member, 0, 0); }); it('rejects zero address for initialAdmin', async function () { @@ -49,165 +48,165 @@ contract('AccessManager', function (accounts) { expect(await this.manager.minSetback()).to.be.bignumber.equal(MINSETBACK); }); - it('groups are correctly initialized', async function () { - // group admin - expect(await this.manager.getGroupAdmin(GROUPS.ADMIN)).to.be.bignumber.equal(GROUPS.ADMIN); - expect(await this.manager.getGroupAdmin(GROUPS.SOME_ADMIN)).to.be.bignumber.equal(GROUPS.ADMIN); - expect(await this.manager.getGroupAdmin(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.SOME_ADMIN); - expect(await this.manager.getGroupAdmin(GROUPS.PUBLIC)).to.be.bignumber.equal(GROUPS.ADMIN); - // group guardian - expect(await this.manager.getGroupGuardian(GROUPS.ADMIN)).to.be.bignumber.equal(GROUPS.ADMIN); - expect(await this.manager.getGroupGuardian(GROUPS.SOME_ADMIN)).to.be.bignumber.equal(GROUPS.ADMIN); - expect(await this.manager.getGroupGuardian(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.SOME_ADMIN); - expect(await this.manager.getGroupGuardian(GROUPS.PUBLIC)).to.be.bignumber.equal(GROUPS.ADMIN); - // group members - expect(await this.manager.hasGroup(GROUPS.ADMIN, admin).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasGroup(GROUPS.ADMIN, manager).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasGroup(GROUPS.ADMIN, member).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasGroup(GROUPS.ADMIN, user).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasGroup(GROUPS.SOME_ADMIN, admin).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasGroup(GROUPS.SOME_ADMIN, manager).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasGroup(GROUPS.SOME_ADMIN, member).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasGroup(GROUPS.SOME_ADMIN, user).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasGroup(GROUPS.SOME, admin).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasGroup(GROUPS.SOME, manager).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasGroup(GROUPS.PUBLIC, admin).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasGroup(GROUPS.PUBLIC, manager).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasGroup(GROUPS.PUBLIC, member).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasGroup(GROUPS.PUBLIC, user).then(formatAccess)).to.be.deep.equal([true, '0']); + it('roles are correctly initialized', async function () { + // role admin + expect(await this.manager.getRoleAdmin(ROLES.ADMIN)).to.be.bignumber.equal(ROLES.ADMIN); + expect(await this.manager.getRoleAdmin(ROLES.SOME_ADMIN)).to.be.bignumber.equal(ROLES.ADMIN); + expect(await this.manager.getRoleAdmin(ROLES.SOME)).to.be.bignumber.equal(ROLES.SOME_ADMIN); + expect(await this.manager.getRoleAdmin(ROLES.PUBLIC)).to.be.bignumber.equal(ROLES.ADMIN); + // role guardian + expect(await this.manager.getRoleGuardian(ROLES.ADMIN)).to.be.bignumber.equal(ROLES.ADMIN); + expect(await this.manager.getRoleGuardian(ROLES.SOME_ADMIN)).to.be.bignumber.equal(ROLES.ADMIN); + expect(await this.manager.getRoleGuardian(ROLES.SOME)).to.be.bignumber.equal(ROLES.SOME_ADMIN); + expect(await this.manager.getRoleGuardian(ROLES.PUBLIC)).to.be.bignumber.equal(ROLES.ADMIN); + // role members + expect(await this.manager.hasRole(ROLES.ADMIN, admin).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasRole(ROLES.ADMIN, manager).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.ADMIN, member).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.ADMIN, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME_ADMIN, admin).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME_ADMIN, manager).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasRole(ROLES.SOME_ADMIN, member).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME_ADMIN, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, admin).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, manager).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.PUBLIC, admin).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasRole(ROLES.PUBLIC, manager).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasRole(ROLES.PUBLIC, member).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasRole(ROLES.PUBLIC, user).then(formatAccess)).to.be.deep.equal([true, '0']); }); - describe('Groups management', function () { - describe('label group', function () { + describe('Roles management', function () { + describe('label role', function () { it('admin can emit a label event', async function () { - expectEvent(await this.manager.labelGroup(GROUPS.SOME, 'Some label', { from: admin }), 'GroupLabel', { - groupId: GROUPS.SOME, + expectEvent(await this.manager.labelRole(ROLES.SOME, 'Some label', { from: admin }), 'RoleLabel', { + roleId: ROLES.SOME, label: 'Some label', }); }); it('admin can re-emit a label event', async function () { - await this.manager.labelGroup(GROUPS.SOME, 'Some label', { from: admin }); + await this.manager.labelRole(ROLES.SOME, 'Some label', { from: admin }); - expectEvent(await this.manager.labelGroup(GROUPS.SOME, 'Updated label', { from: admin }), 'GroupLabel', { - groupId: GROUPS.SOME, + expectEvent(await this.manager.labelRole(ROLES.SOME, 'Updated label', { from: admin }), 'RoleLabel', { + roleId: ROLES.SOME, label: 'Updated label', }); }); it('emitting a label is restricted', async function () { await expectRevertCustomError( - this.manager.labelGroup(GROUPS.SOME, 'Invalid label', { from: other }), + this.manager.labelRole(ROLES.SOME, 'Invalid label', { from: other }), 'AccessManagerUnauthorizedAccount', - [other, GROUPS.ADMIN], + [other, ROLES.ADMIN], ); }); }); - describe('grant group', function () { + describe('grant role', function () { describe('without a grant delay', function () { it('without an execute delay', async function () { - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - const { receipt } = await this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }); + const { receipt } = await this.manager.grantRole(ROLES.SOME, user, 0, { from: manager }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'GroupGranted', { - groupId: GROUPS.SOME, + expectEvent(receipt, 'RoleGranted', { + roleId: ROLES.SOME, account: user, since: timestamp, delay: '0', newMember: true, }); - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([true, '0']); - const access = await this.manager.getAccess(GROUPS.SOME, user); - expect(access[0]).to.be.bignumber.equal(timestamp); // inGroupSince + const access = await this.manager.getAccess(ROLES.SOME, user); + expect(access[0]).to.be.bignumber.equal(timestamp); // inRoleSince expect(access[1]).to.be.bignumber.equal('0'); // currentDelay expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay expect(access[3]).to.be.bignumber.equal('0'); // effect }); it('with an execute delay', async function () { - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - const { receipt } = await this.manager.grantGroup(GROUPS.SOME, user, executeDelay, { from: manager }); + const { receipt } = await this.manager.grantRole(ROLES.SOME, user, executeDelay, { from: manager }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'GroupGranted', { - groupId: GROUPS.SOME, + expectEvent(receipt, 'RoleGranted', { + roleId: ROLES.SOME, account: user, since: timestamp, delay: executeDelay, newMember: true, }); - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([ true, executeDelay.toString(), ]); - const access = await this.manager.getAccess(GROUPS.SOME, user); - expect(access[0]).to.be.bignumber.equal(timestamp); // inGroupSince + const access = await this.manager.getAccess(ROLES.SOME, user); + expect(access[0]).to.be.bignumber.equal(timestamp); // inRoleSince expect(access[1]).to.be.bignumber.equal(executeDelay); // currentDelay expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay expect(access[3]).to.be.bignumber.equal('0'); // effect }); - it('to a user that is already in the group', async function () { - expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); - await this.manager.grantGroup(GROUPS.SOME, member, 0, { from: manager }); - expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); + it('to a user that is already in the role', async function () { + expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); + await this.manager.grantRole(ROLES.SOME, member, 0, { from: manager }); + expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); }); - it('to a user that is scheduled for joining the group', async function () { - await this.manager.$_grantGroup(GROUPS.SOME, user, 10, 0); // grant delay 10 - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - await this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }); - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + it('to a user that is scheduled for joining the role', async function () { + await this.manager.$_grantRole(ROLES.SOME, user, 10, 0); // grant delay 10 + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + await this.manager.grantRole(ROLES.SOME, user, 0, { from: manager }); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); }); - it('grant group is restricted', async function () { + it('grant role is restricted', async function () { await expectRevertCustomError( - this.manager.grantGroup(GROUPS.SOME, user, 0, { from: other }), + this.manager.grantRole(ROLES.SOME, user, 0, { from: other }), 'AccessManagerUnauthorizedAccount', - [other, GROUPS.SOME_ADMIN], + [other, ROLES.SOME_ADMIN], ); }); }); describe('with a grant delay', function () { beforeEach(async function () { - await this.manager.$_setGrantDelay(GROUPS.SOME, grantDelay); + await this.manager.$_setGrantDelay(ROLES.SOME, grantDelay); await time.increase(MINSETBACK); }); - it('granted group is not active immediately', async function () { - const { receipt } = await this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }); + it('granted role is not active immediately', async function () { + const { receipt } = await this.manager.grantRole(ROLES.SOME, user, 0, { from: manager }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'GroupGranted', { - groupId: GROUPS.SOME, + expectEvent(receipt, 'RoleGranted', { + roleId: ROLES.SOME, account: user, since: timestamp.add(grantDelay), delay: '0', newMember: true, }); - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - const access = await this.manager.getAccess(GROUPS.SOME, user); - expect(access[0]).to.be.bignumber.equal(timestamp.add(grantDelay)); // inGroupSince + const access = await this.manager.getAccess(ROLES.SOME, user); + expect(access[0]).to.be.bignumber.equal(timestamp.add(grantDelay)); // inRoleSince expect(access[1]).to.be.bignumber.equal('0'); // currentDelay expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay expect(access[3]).to.be.bignumber.equal('0'); // effect }); - it('granted group is active after the delay', async function () { - const { receipt } = await this.manager.grantGroup(GROUPS.SOME, user, 0, { from: manager }); + it('granted role is active after the delay', async function () { + const { receipt } = await this.manager.grantRole(ROLES.SOME, user, 0, { from: manager }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'GroupGranted', { - groupId: GROUPS.SOME, + expectEvent(receipt, 'RoleGranted', { + roleId: ROLES.SOME, account: user, since: timestamp.add(grantDelay), delay: '0', @@ -216,153 +215,153 @@ contract('AccessManager', function (accounts) { await time.increase(grantDelay); - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([true, '0']); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([true, '0']); - const access = await this.manager.getAccess(GROUPS.SOME, user); - expect(access[0]).to.be.bignumber.equal(timestamp.add(grantDelay)); // inGroupSince + const access = await this.manager.getAccess(ROLES.SOME, user); + expect(access[0]).to.be.bignumber.equal(timestamp.add(grantDelay)); // inRoleSince expect(access[1]).to.be.bignumber.equal('0'); // currentDelay expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay expect(access[3]).to.be.bignumber.equal('0'); // effect }); }); - it('cannot grant public group', async function () { + it('cannot grant public role', async function () { await expectRevertCustomError( - this.manager.$_grantGroup(GROUPS.PUBLIC, other, 0, executeDelay, { from: manager }), - 'AccessManagerLockedGroup', - [GROUPS.PUBLIC], + this.manager.$_grantRole(ROLES.PUBLIC, other, 0, executeDelay, { from: manager }), + 'AccessManagerLockedRole', + [ROLES.PUBLIC], ); }); }); - describe('revoke group', function () { - it('from a user that is already in the group', async function () { - expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); + describe('revoke role', function () { + it('from a user that is already in the role', async function () { + expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); - const { receipt } = await this.manager.revokeGroup(GROUPS.SOME, member, { from: manager }); - expectEvent(receipt, 'GroupRevoked', { groupId: GROUPS.SOME, account: member }); + const { receipt } = await this.manager.revokeRole(ROLES.SOME, member, { from: manager }); + expectEvent(receipt, 'RoleRevoked', { roleId: ROLES.SOME, account: member }); - expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([false, '0']); - const access = await this.manager.getAccess(GROUPS.SOME, user); - expect(access[0]).to.be.bignumber.equal('0'); // inGroupSince + const access = await this.manager.getAccess(ROLES.SOME, user); + expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince expect(access[1]).to.be.bignumber.equal('0'); // currentDelay expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay expect(access[3]).to.be.bignumber.equal('0'); // effect }); - it('from a user that is scheduled for joining the group', async function () { - await this.manager.$_grantGroup(GROUPS.SOME, user, 10, 0); // grant delay 10 + it('from a user that is scheduled for joining the role', async function () { + await this.manager.$_grantRole(ROLES.SOME, user, 10, 0); // grant delay 10 - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - const { receipt } = await this.manager.revokeGroup(GROUPS.SOME, user, { from: manager }); - expectEvent(receipt, 'GroupRevoked', { groupId: GROUPS.SOME, account: user }); + const { receipt } = await this.manager.revokeRole(ROLES.SOME, user, { from: manager }); + expectEvent(receipt, 'RoleRevoked', { roleId: ROLES.SOME, account: user }); - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - const access = await this.manager.getAccess(GROUPS.SOME, user); - expect(access[0]).to.be.bignumber.equal('0'); // inGroupSince + const access = await this.manager.getAccess(ROLES.SOME, user); + expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince expect(access[1]).to.be.bignumber.equal('0'); // currentDelay expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay expect(access[3]).to.be.bignumber.equal('0'); // effect }); - it('from a user that is not in the group', async function () { - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - await this.manager.revokeGroup(GROUPS.SOME, user, { from: manager }); - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + it('from a user that is not in the role', async function () { + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + await this.manager.revokeRole(ROLES.SOME, user, { from: manager }); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); }); - it('revoke group is restricted', async function () { + it('revoke role is restricted', async function () { await expectRevertCustomError( - this.manager.revokeGroup(GROUPS.SOME, member, { from: other }), + this.manager.revokeRole(ROLES.SOME, member, { from: other }), 'AccessManagerUnauthorizedAccount', - [other, GROUPS.SOME_ADMIN], + [other, ROLES.SOME_ADMIN], ); }); }); - describe('renounce group', function () { - it('for a user that is already in the group', async function () { - expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); + describe('renounce role', function () { + it('for a user that is already in the role', async function () { + expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); - const { receipt } = await this.manager.renounceGroup(GROUPS.SOME, member, { from: member }); - expectEvent(receipt, 'GroupRevoked', { groupId: GROUPS.SOME, account: member }); + const { receipt } = await this.manager.renounceRole(ROLES.SOME, member, { from: member }); + expectEvent(receipt, 'RoleRevoked', { roleId: ROLES.SOME, account: member }); - expect(await this.manager.hasGroup(GROUPS.SOME, member).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([false, '0']); - const access = await this.manager.getAccess(GROUPS.SOME, member); - expect(access[0]).to.be.bignumber.equal('0'); // inGroupSince + const access = await this.manager.getAccess(ROLES.SOME, member); + expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince expect(access[1]).to.be.bignumber.equal('0'); // currentDelay expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay expect(access[3]).to.be.bignumber.equal('0'); // effect }); - it('for a user that is schedule for joining the group', async function () { - await this.manager.$_grantGroup(GROUPS.SOME, user, 10, 0); // grant delay 10 + it('for a user that is schedule for joining the role', async function () { + await this.manager.$_grantRole(ROLES.SOME, user, 10, 0); // grant delay 10 - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - const { receipt } = await this.manager.renounceGroup(GROUPS.SOME, user, { from: user }); - expectEvent(receipt, 'GroupRevoked', { groupId: GROUPS.SOME, account: user }); + const { receipt } = await this.manager.renounceRole(ROLES.SOME, user, { from: user }); + expectEvent(receipt, 'RoleRevoked', { roleId: ROLES.SOME, account: user }); - expect(await this.manager.hasGroup(GROUPS.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - const access = await this.manager.getAccess(GROUPS.SOME, user); - expect(access[0]).to.be.bignumber.equal('0'); // inGroupSince + const access = await this.manager.getAccess(ROLES.SOME, user); + expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince expect(access[1]).to.be.bignumber.equal('0'); // currentDelay expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay expect(access[3]).to.be.bignumber.equal('0'); // effect }); - it('for a user that is not in the group', async function () { - await this.manager.renounceGroup(GROUPS.SOME, user, { from: user }); + it('for a user that is not in the role', async function () { + await this.manager.renounceRole(ROLES.SOME, user, { from: user }); }); it('bad user confirmation', async function () { await expectRevertCustomError( - this.manager.renounceGroup(GROUPS.SOME, member, { from: user }), + this.manager.renounceRole(ROLES.SOME, member, { from: user }), 'AccessManagerBadConfirmation', [], ); }); }); - describe('change group admin', function () { - it("admin can set any group's admin", async function () { - expect(await this.manager.getGroupAdmin(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.SOME_ADMIN); + describe('change role admin', function () { + it("admin can set any role's admin", async function () { + expect(await this.manager.getRoleAdmin(ROLES.SOME)).to.be.bignumber.equal(ROLES.SOME_ADMIN); - const { receipt } = await this.manager.setGroupAdmin(GROUPS.SOME, GROUPS.ADMIN, { from: admin }); - expectEvent(receipt, 'GroupAdminChanged', { groupId: GROUPS.SOME, admin: GROUPS.ADMIN }); + const { receipt } = await this.manager.setRoleAdmin(ROLES.SOME, ROLES.ADMIN, { from: admin }); + expectEvent(receipt, 'RoleAdminChanged', { roleId: ROLES.SOME, admin: ROLES.ADMIN }); - expect(await this.manager.getGroupAdmin(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.ADMIN); + expect(await this.manager.getRoleAdmin(ROLES.SOME)).to.be.bignumber.equal(ROLES.ADMIN); }); - it("setting a group's admin is restricted", async function () { + it("setting a role's admin is restricted", async function () { await expectRevertCustomError( - this.manager.setGroupAdmin(GROUPS.SOME, GROUPS.SOME, { from: manager }), + this.manager.setRoleAdmin(ROLES.SOME, ROLES.SOME, { from: manager }), 'AccessManagerUnauthorizedAccount', - [manager, GROUPS.ADMIN], + [manager, ROLES.ADMIN], ); }); }); - describe('change group guardian', function () { - it("admin can set any group's admin", async function () { - expect(await this.manager.getGroupGuardian(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.SOME_ADMIN); + describe('change role guardian', function () { + it("admin can set any role's admin", async function () { + expect(await this.manager.getRoleGuardian(ROLES.SOME)).to.be.bignumber.equal(ROLES.SOME_ADMIN); - const { receipt } = await this.manager.setGroupGuardian(GROUPS.SOME, GROUPS.ADMIN, { from: admin }); - expectEvent(receipt, 'GroupGuardianChanged', { groupId: GROUPS.SOME, guardian: GROUPS.ADMIN }); + const { receipt } = await this.manager.setRoleGuardian(ROLES.SOME, ROLES.ADMIN, { from: admin }); + expectEvent(receipt, 'RoleGuardianChanged', { roleId: ROLES.SOME, guardian: ROLES.ADMIN }); - expect(await this.manager.getGroupGuardian(GROUPS.SOME)).to.be.bignumber.equal(GROUPS.ADMIN); + expect(await this.manager.getRoleGuardian(ROLES.SOME)).to.be.bignumber.equal(ROLES.ADMIN); }); - it("setting a group's admin is restricted", async function () { + it("setting a role's admin is restricted", async function () { await expectRevertCustomError( - this.manager.setGroupGuardian(GROUPS.SOME, GROUPS.SOME, { from: other }), + this.manager.setRoleGuardian(ROLES.SOME, ROLES.SOME, { from: other }), 'AccessManagerUnauthorizedAccount', - [other, GROUPS.ADMIN], + [other, ROLES.ADMIN], ); }); }); @@ -372,21 +371,21 @@ contract('AccessManager', function (accounts) { const oldDelay = web3.utils.toBN(10); const newDelay = web3.utils.toBN(100); - // group is already granted (with no delay) in the initial setup. this update takes time. - await this.manager.$_grantGroup(GROUPS.SOME, member, 0, oldDelay); + // role is already granted (with no delay) in the initial setup. this update takes time. + await this.manager.$_grantRole(ROLES.SOME, member, 0, oldDelay); - const accessBefore = await this.manager.getAccess(GROUPS.SOME, member); + const accessBefore = await this.manager.getAccess(ROLES.SOME, member); expect(accessBefore[1]).to.be.bignumber.equal(oldDelay); // currentDelay expect(accessBefore[2]).to.be.bignumber.equal('0'); // pendingDelay expect(accessBefore[3]).to.be.bignumber.equal('0'); // effect - const { receipt } = await this.manager.grantGroup(GROUPS.SOME, member, newDelay, { + const { receipt } = await this.manager.grantRole(ROLES.SOME, member, newDelay, { from: manager, }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'GroupGranted', { - groupId: GROUPS.SOME, + expectEvent(receipt, 'RoleGranted', { + roleId: ROLES.SOME, account: member, since: timestamp, delay: newDelay, @@ -394,7 +393,7 @@ contract('AccessManager', function (accounts) { }); // immediate effect - const accessAfter = await this.manager.getAccess(GROUPS.SOME, member); + const accessAfter = await this.manager.getAccess(ROLES.SOME, member); expect(accessAfter[1]).to.be.bignumber.equal(newDelay); // currentDelay expect(accessAfter[2]).to.be.bignumber.equal('0'); // pendingDelay expect(accessAfter[3]).to.be.bignumber.equal('0'); // effect @@ -404,22 +403,22 @@ contract('AccessManager', function (accounts) { const oldDelay = web3.utils.toBN(100); const newDelay = web3.utils.toBN(10); - // group is already granted (with no delay) in the initial setup. this update takes time. - await this.manager.$_grantGroup(GROUPS.SOME, member, 0, oldDelay); + // role is already granted (with no delay) in the initial setup. this update takes time. + await this.manager.$_grantRole(ROLES.SOME, member, 0, oldDelay); - const accessBefore = await this.manager.getAccess(GROUPS.SOME, member); + const accessBefore = await this.manager.getAccess(ROLES.SOME, member); expect(accessBefore[1]).to.be.bignumber.equal(oldDelay); // currentDelay expect(accessBefore[2]).to.be.bignumber.equal('0'); // pendingDelay expect(accessBefore[3]).to.be.bignumber.equal('0'); // effect - const { receipt } = await this.manager.grantGroup(GROUPS.SOME, member, newDelay, { + const { receipt } = await this.manager.grantRole(ROLES.SOME, member, newDelay, { from: manager, }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); const setback = oldDelay.sub(newDelay); - expectEvent(receipt, 'GroupGranted', { - groupId: GROUPS.SOME, + expectEvent(receipt, 'RoleGranted', { + roleId: ROLES.SOME, account: member, since: timestamp.add(setback), delay: newDelay, @@ -427,29 +426,29 @@ contract('AccessManager', function (accounts) { }); // no immediate effect - const accessAfter = await this.manager.getAccess(GROUPS.SOME, member); + const accessAfter = await this.manager.getAccess(ROLES.SOME, member); expect(accessAfter[1]).to.be.bignumber.equal(oldDelay); // currentDelay expect(accessAfter[2]).to.be.bignumber.equal(newDelay); // pendingDelay expect(accessAfter[3]).to.be.bignumber.equal(timestamp.add(setback)); // effect // delayed effect await time.increase(setback); - const accessAfterSetback = await this.manager.getAccess(GROUPS.SOME, member); + const accessAfterSetback = await this.manager.getAccess(ROLES.SOME, member); expect(accessAfterSetback[1]).to.be.bignumber.equal(newDelay); // currentDelay expect(accessAfterSetback[2]).to.be.bignumber.equal('0'); // pendingDelay expect(accessAfterSetback[3]).to.be.bignumber.equal('0'); // effect }); it('can set a user execution delay during the grant delay', async function () { - await this.manager.$_grantGroup(GROUPS.SOME, other, 10, 0); - // here: "other" is pending to get the group, but doesn't yet have it. + await this.manager.$_grantRole(ROLES.SOME, other, 10, 0); + // here: "other" is pending to get the role, but doesn't yet have it. - const { receipt } = await this.manager.grantGroup(GROUPS.SOME, other, executeDelay, { from: manager }); + const { receipt } = await this.manager.grantRole(ROLES.SOME, other, executeDelay, { from: manager }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); // increasing the execution delay from 0 to executeDelay is immediate - expectEvent(receipt, 'GroupGranted', { - groupId: GROUPS.SOME, + expectEvent(receipt, 'RoleGranted', { + roleId: ROLES.SOME, account: other, since: timestamp, delay: executeDelay, @@ -463,82 +462,82 @@ contract('AccessManager', function (accounts) { const oldDelay = web3.utils.toBN(10); const newDelay = web3.utils.toBN(100); - await this.manager.$_setGrantDelay(GROUPS.SOME, oldDelay); + await this.manager.$_setGrantDelay(ROLES.SOME, oldDelay); await time.increase(MINSETBACK); - expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); + expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); - const { receipt } = await this.manager.setGrantDelay(GROUPS.SOME, newDelay, { from: admin }); + const { receipt } = await this.manager.setGrantDelay(ROLES.SOME, newDelay, { from: admin }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); const setback = web3.utils.BN.max(MINSETBACK, oldDelay.sub(newDelay)); expect(setback).to.be.bignumber.equal(MINSETBACK); - expectEvent(receipt, 'GroupGrantDelayChanged', { - groupId: GROUPS.SOME, + expectEvent(receipt, 'RoleGrantDelayChanged', { + roleId: ROLES.SOME, delay: newDelay, since: timestamp.add(setback), }); - expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); + expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); await time.increase(setback); - expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(newDelay); + expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(newDelay); }); it('increasing the delay has delay effect #1', async function () { const oldDelay = web3.utils.toBN(100); const newDelay = web3.utils.toBN(10); - await this.manager.$_setGrantDelay(GROUPS.SOME, oldDelay); + await this.manager.$_setGrantDelay(ROLES.SOME, oldDelay); await time.increase(MINSETBACK); - expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); + expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); - const { receipt } = await this.manager.setGrantDelay(GROUPS.SOME, newDelay, { from: admin }); + const { receipt } = await this.manager.setGrantDelay(ROLES.SOME, newDelay, { from: admin }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); const setback = web3.utils.BN.max(MINSETBACK, oldDelay.sub(newDelay)); expect(setback).to.be.bignumber.equal(MINSETBACK); - expectEvent(receipt, 'GroupGrantDelayChanged', { - groupId: GROUPS.SOME, + expectEvent(receipt, 'RoleGrantDelayChanged', { + roleId: ROLES.SOME, delay: newDelay, since: timestamp.add(setback), }); - expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); + expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); await time.increase(setback); - expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(newDelay); + expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(newDelay); }); it('increasing the delay has delay effect #2', async function () { const oldDelay = time.duration.days(30); // more than the minsetback const newDelay = web3.utils.toBN(10); - await this.manager.$_setGrantDelay(GROUPS.SOME, oldDelay); + await this.manager.$_setGrantDelay(ROLES.SOME, oldDelay); await time.increase(MINSETBACK); - expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); + expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); - const { receipt } = await this.manager.setGrantDelay(GROUPS.SOME, newDelay, { from: admin }); + const { receipt } = await this.manager.setGrantDelay(ROLES.SOME, newDelay, { from: admin }); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); const setback = web3.utils.BN.max(MINSETBACK, oldDelay.sub(newDelay)); expect(setback).to.be.bignumber.gt(MINSETBACK); - expectEvent(receipt, 'GroupGrantDelayChanged', { - groupId: GROUPS.SOME, + expectEvent(receipt, 'RoleGrantDelayChanged', { + roleId: ROLES.SOME, delay: newDelay, since: timestamp.add(setback), }); - expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(oldDelay); + expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); await time.increase(setback); - expect(await this.manager.getGroupGrantDelay(GROUPS.SOME)).to.be.bignumber.equal(newDelay); + expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(newDelay); }); it('changing the grant delay is restricted', async function () { await expectRevertCustomError( - this.manager.setGrantDelay(GROUPS.SOME, grantDelay, { from: other }), + this.manager.setGrantDelay(ROLES.SOME, grantDelay, { from: other }), 'AccessManagerUnauthorizedAccount', - [GROUPS.ADMIN, other], + [ROLES.ADMIN, other], ); }); }); @@ -562,84 +561,75 @@ contract('AccessManager', function (accounts) { describe('Change function permissions', function () { const sigs = ['someFunction()', 'someOtherFunction(uint256)', 'oneMoreFunction(address,uint8)'].map(selector); - it('admin can set function group', async function () { + it('admin can set function role', async function () { for (const sig of sigs) { - expect(await this.manager.getTargetFunctionGroup(this.target.address, sig)).to.be.bignumber.equal( - GROUPS.ADMIN, - ); + expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal(ROLES.ADMIN); } - const { receipt: receipt1 } = await this.manager.setTargetFunctionGroup( - this.target.address, - sigs, - GROUPS.SOME, - { - from: admin, - }, - ); + const { receipt: receipt1 } = await this.manager.setTargetFunctionRole(this.target.address, sigs, ROLES.SOME, { + from: admin, + }); for (const sig of sigs) { - expectEvent(receipt1, 'TargetFunctionGroupUpdated', { + expectEvent(receipt1, 'TargetFunctionRoleUpdated', { target: this.target.address, selector: sig, - groupId: GROUPS.SOME, + roleId: ROLES.SOME, }); - expect(await this.manager.getTargetFunctionGroup(this.target.address, sig)).to.be.bignumber.equal( - GROUPS.SOME, - ); + expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal(ROLES.SOME); } - const { receipt: receipt2 } = await this.manager.setTargetFunctionGroup( + const { receipt: receipt2 } = await this.manager.setTargetFunctionRole( this.target.address, [sigs[1]], - GROUPS.SOME_ADMIN, + ROLES.SOME_ADMIN, { from: admin, }, ); - expectEvent(receipt2, 'TargetFunctionGroupUpdated', { + expectEvent(receipt2, 'TargetFunctionRoleUpdated', { target: this.target.address, selector: sigs[1], - groupId: GROUPS.SOME_ADMIN, + roleId: ROLES.SOME_ADMIN, }); for (const sig of sigs) { - expect(await this.manager.getTargetFunctionGroup(this.target.address, sig)).to.be.bignumber.equal( - sig == sigs[1] ? GROUPS.SOME_ADMIN : GROUPS.SOME, + expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal( + sig == sigs[1] ? ROLES.SOME_ADMIN : ROLES.SOME, ); } }); - it('non-admin cannot set function group', async function () { + it('non-admin cannot set function role', async function () { await expectRevertCustomError( - this.manager.setTargetFunctionGroup(this.target.address, sigs, GROUPS.SOME, { from: other }), + this.manager.setTargetFunctionRole(this.target.address, sigs, ROLES.SOME, { from: other }), 'AccessManagerUnauthorizedAccount', - [other, GROUPS.ADMIN], + [other, ROLES.ADMIN], ); }); }); // WIP describe('Calling restricted & unrestricted functions', function () { - for (const [callerGroups, fnGroup, closed, delay] of product( - [[], [GROUPS.SOME]], - [undefined, GROUPS.ADMIN, GROUPS.SOME, GROUPS.PUBLIC], + for (const [callerRoles, fnRole, closed, delay] of product( + [[], [ROLES.SOME]], + [undefined, ROLES.ADMIN, ROLES.SOME, ROLES.PUBLIC], [false, true], [null, executeDelay], )) { // can we call with a delay ? - const indirectSuccess = (fnGroup == GROUPS.PUBLIC || callerGroups.includes(fnGroup)) && !closed; + const indirectSuccess = (fnRole == ROLES.PUBLIC || callerRoles.includes(fnRole)) && !closed; // can we call without a delay ? - const directSuccess = (fnGroup == GROUPS.PUBLIC || (callerGroups.includes(fnGroup) && !delay)) && !closed; + const directSuccess = (fnRole == ROLES.PUBLIC || (callerRoles.includes(fnRole) && !delay)) && !closed; const description = [ - 'Caller in groups', - '[' + (callerGroups ?? []).map(groupId => GROUPS[groupId]).join(', ') + ']', + 'Caller in roles', + '[' + (callerRoles ?? []).map(roleId => ROLES[roleId]).join(', ') + ']', delay ? 'with a delay' : 'without a delay', '+', - 'functions open to groups', - '[' + (GROUPS[fnGroup] ?? '') + ']', + 'functions open to roles', + '[' + (ROLES[fnRole] ?? '') + ']', closed ? `(closed)` : '', ].join(' '); @@ -648,36 +638,34 @@ contract('AccessManager', function (accounts) { // setup await Promise.all([ this.manager.$_setTargetClosed(this.target.address, closed), - fnGroup && - this.manager.$_setTargetFunctionGroup(this.target.address, selector('fnRestricted()'), fnGroup), - fnGroup && - this.manager.$_setTargetFunctionGroup(this.target.address, selector('fnUnrestricted()'), fnGroup), - ...callerGroups - .filter(groupId => groupId != GROUPS.PUBLIC) - .map(groupId => this.manager.$_grantGroup(groupId, user, 0, delay ?? 0)), + fnRole && this.manager.$_setTargetFunctionRole(this.target.address, selector('fnRestricted()'), fnRole), + fnRole && this.manager.$_setTargetFunctionRole(this.target.address, selector('fnUnrestricted()'), fnRole), + ...callerRoles + .filter(roleId => roleId != ROLES.PUBLIC) + .map(roleId => this.manager.$_grantRole(roleId, user, 0, delay ?? 0)), ]); // post setup checks expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(closed); - if (fnGroup) { + if (fnRole) { expect( - await this.manager.getTargetFunctionGroup(this.target.address, selector('fnRestricted()')), - ).to.be.bignumber.equal(fnGroup); + await this.manager.getTargetFunctionRole(this.target.address, selector('fnRestricted()')), + ).to.be.bignumber.equal(fnRole); expect( - await this.manager.getTargetFunctionGroup(this.target.address, selector('fnUnrestricted()')), - ).to.be.bignumber.equal(fnGroup); + await this.manager.getTargetFunctionRole(this.target.address, selector('fnUnrestricted()')), + ).to.be.bignumber.equal(fnRole); } - for (const groupId of callerGroups) { - const access = await this.manager.getAccess(groupId, user); - if (groupId == GROUPS.PUBLIC) { - expect(access[0]).to.be.bignumber.equal('0'); // inGroupSince + for (const roleId of callerRoles) { + const access = await this.manager.getAccess(roleId, user); + if (roleId == ROLES.PUBLIC) { + expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince expect(access[1]).to.be.bignumber.equal('0'); // currentDelay expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay expect(access[3]).to.be.bignumber.equal('0'); // effect } else { - expect(access[0]).to.be.bignumber.gt('0'); // inGroupSince + expect(access[0]).to.be.bignumber.gt('0'); // inRoleSince expect(access[1]).to.be.bignumber.eq(String(delay ?? 0)); // currentDelay expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay expect(access[3]).to.be.bignumber.equal('0'); // effect @@ -745,7 +733,7 @@ contract('AccessManager', function (accounts) { if (directSuccess) { const { receipt, tx } = await this.execute(); await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); - if (delay && fnGroup !== GROUPS.PUBLIC) { + if (delay && fnRole !== ROLES.PUBLIC) { expectEvent(receipt, 'OperationExecuted', { operationId: this.opId }); expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); } @@ -783,7 +771,7 @@ contract('AccessManager', function (accounts) { if (directSuccess || indirectSuccess) { const { receipt, tx } = await this.execute(); await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); - if (delay && fnGroup !== GROUPS.PUBLIC) { + if (delay && fnRole !== ROLES.PUBLIC) { expectEvent(receipt, 'OperationExecuted', { operationId: this.opId }); expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); } @@ -879,8 +867,8 @@ contract('AccessManager', function (accounts) { describe('Indirect execution corner-cases', async function () { beforeEach(async function () { - await this.manager.$_setTargetFunctionGroup(this.target.address, this.callData, GROUPS.SOME); - await this.manager.$_grantGroup(GROUPS.SOME, user, 0, executeDelay); + await this.manager.$_setTargetFunctionRole(this.target.address, this.callData, ROLES.SOME); + await this.manager.$_grantRole(ROLES.SOME, user, 0, executeDelay); }); it('Checking canCall when caller is the manager depend on the _executionId', async function () { @@ -1002,13 +990,13 @@ contract('AccessManager', function (accounts) { }); describe('with Ownable target contract', function () { - const groupId = web3.utils.toBN(1); + const roleId = web3.utils.toBN(1); beforeEach(async function () { this.ownable = await Ownable.new(this.manager.address); - // add user to group - await this.manager.$_grantGroup(groupId, user, 0, 0); + // add user to role + await this.manager.$_grantRole(roleId, user, 0, 0); }); it('initial state', async function () { @@ -1024,7 +1012,7 @@ contract('AccessManager', function (accounts) { await expectRevertCustomError(this.ownable.$_checkOwner({ from: user }), 'OwnableUnauthorizedAccount', [user]); }); - it('relayed call (with group): reverts', async function () { + it('relayed call (with role): reverts', async function () { await expectRevertCustomError( this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: user }), 'AccessManagerUnauthorizedCall', @@ -1032,7 +1020,7 @@ contract('AccessManager', function (accounts) { ); }); - it('relayed call (without group): reverts', async function () { + it('relayed call (without role): reverts', async function () { await expectRevertCustomError( this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: other }), 'AccessManagerUnauthorizedCall', @@ -1042,9 +1030,9 @@ contract('AccessManager', function (accounts) { }); describe('Contract is managed', function () { - describe('function is open to specific group', function () { + describe('function is open to specific role', function () { beforeEach(async function () { - await this.manager.$_setTargetFunctionGroup(this.ownable.address, selector('$_checkOwner()'), groupId); + await this.manager.$_setTargetFunctionRole(this.ownable.address, selector('$_checkOwner()'), roleId); }); it('directly call: reverts', async function () { @@ -1053,11 +1041,11 @@ contract('AccessManager', function (accounts) { ]); }); - it('relayed call (with group): success', async function () { + it('relayed call (with role): success', async function () { await this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: user }); }); - it('relayed call (without group): reverts', async function () { + it('relayed call (without role): reverts', async function () { await expectRevertCustomError( this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: other }), 'AccessManagerUnauthorizedCall', @@ -1066,9 +1054,9 @@ contract('AccessManager', function (accounts) { }); }); - describe('function is open to public group', function () { + describe('function is open to public role', function () { beforeEach(async function () { - await this.manager.$_setTargetFunctionGroup(this.ownable.address, selector('$_checkOwner()'), GROUPS.PUBLIC); + await this.manager.$_setTargetFunctionRole(this.ownable.address, selector('$_checkOwner()'), ROLES.PUBLIC); }); it('directly call: reverts', async function () { @@ -1077,11 +1065,11 @@ contract('AccessManager', function (accounts) { ]); }); - it('relayed call (with group): success', async function () { + it('relayed call (with role): success', async function () { await this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: user }); }); - it('relayed call (without group): success', async function () { + it('relayed call (without role): success', async function () { await this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: other }); }); }); @@ -1115,7 +1103,7 @@ contract('AccessManager', function (accounts) { await expectRevertCustomError( this.manager.updateAuthority(this.target.address, this.newManager.address, { from: other }), 'AccessManagerUnauthorizedAccount', - [other, GROUPS.ADMIN], + [other, ROLES.ADMIN], ); }); diff --git a/test/governance/extensions/GovernorTimelockAccess.test.js b/test/governance/extensions/GovernorTimelockAccess.test.js index ad533296a..c6e230a31 100644 --- a/test/governance/extensions/GovernorTimelockAccess.test.js +++ b/test/governance/extensions/GovernorTimelockAccess.test.js @@ -130,12 +130,12 @@ contract('GovernorTimelockAccess', function (accounts) { it('single operation with access manager delay', async function () { const delay = 1000; - const groupId = '1'; + const roleId = '1'; - await this.manager.setTargetFunctionGroup(this.receiver.address, [this.restricted.selector], groupId, { + await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { from: admin, }); - await this.manager.grantGroup(groupId, this.mock.address, delay, { from: admin }); + await this.manager.grantRole(roleId, this.mock.address, delay, { from: admin }); this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); @@ -167,16 +167,16 @@ contract('GovernorTimelockAccess', function (accounts) { it('bundle of varied operations', async function () { const managerDelay = 1000; - const groupId = '1'; + const roleId = '1'; const baseDelay = managerDelay * 2; await this.mock.$_setBaseDelaySeconds(baseDelay); - await this.manager.setTargetFunctionGroup(this.receiver.address, [this.restricted.selector], groupId, { + await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { from: admin, }); - await this.manager.grantGroup(groupId, this.mock.address, managerDelay, { from: admin }); + await this.manager.grantRole(roleId, this.mock.address, managerDelay, { from: admin }); this.proposal = await this.helper.setProposal( [this.restricted.operation, this.unrestricted.operation], @@ -212,12 +212,12 @@ contract('GovernorTimelockAccess', function (accounts) { it('cancellation after queue (internal)', async function () { const delay = 1000; - const groupId = '1'; + const roleId = '1'; - await this.manager.setTargetFunctionGroup(this.receiver.address, [this.restricted.selector], groupId, { + await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { from: admin, }); - await this.manager.grantGroup(groupId, this.mock.address, delay, { from: admin }); + await this.manager.grantRole(roleId, this.mock.address, delay, { from: admin }); this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); From 6f80048ce92ad4792175a899a0f4aa9cce20093c Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Fri, 8 Sep 2023 03:10:28 +0200 Subject: [PATCH 035/167] Improve natspec documentation and comments (#4581) Co-authored-by: Francisco Giordano --- contracts/access/manager/AccessManaged.sol | 4 +-- contracts/access/manager/AccessManager.sol | 35 ++++++++++++------- contracts/access/manager/AuthorityUtils.sol | 8 ++--- .../extensions/GovernorTimelockCompound.sol | 2 +- .../extensions/GovernorTimelockControl.sol | 2 +- contracts/proxy/utils/Initializable.sol | 5 +-- contracts/token/ERC721/ERC721.sol | 11 +++--- .../ERC721/extensions/ERC721Consecutive.sol | 10 +++--- contracts/utils/cryptography/ECDSA.sol | 7 ++-- .../utils/cryptography/MessageHashUtils.sol | 2 +- contracts/utils/structs/EnumerableMap.sol | 12 +++---- scripts/generate/templates/EnumerableMap.js | 12 +++---- 12 files changed, 58 insertions(+), 52 deletions(-) diff --git a/contracts/access/manager/AccessManaged.sol b/contracts/access/manager/AccessManaged.sol index 70b6ecd74..c207c5e51 100644 --- a/contracts/access/manager/AccessManaged.sol +++ b/contracts/access/manager/AccessManaged.sol @@ -102,13 +102,13 @@ abstract contract AccessManaged is Context, IAccessManaged { * @dev Reverts if the caller is not allowed to call the function identified by a selector. */ function _checkCanCall(address caller, bytes calldata data) internal virtual { - (bool allowed, uint32 delay) = AuthorityUtils.canCallWithDelay( + (bool immediate, uint32 delay) = AuthorityUtils.canCallWithDelay( authority(), caller, address(this), bytes4(data) ); - if (!allowed) { + if (!immediate) { if (delay > 0) { _consumingSchedule = true; IAccessManager(authority()).consumeScheduledOp(caller, data); diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index e397f5d44..1db16feb1 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -27,9 +27,9 @@ import {Time} from "../../utils/types/Time.sol"; * * There is a special role defined by default named "public" which all accounts automatically have. * - * Contracts where functions are mapped to roles are said to be in a "custom" mode, but contracts can also be - * configured in two special modes: 1) the "open" mode, where all functions are allowed to the "public" role, and 2) - * the "closed" mode, where no function is allowed to any role. + * In addition to the access rules defined by each target's functions being assigned to roles, then entire target can + * be "closed". This "closed" mode is set/unset by the admin using {setTargetClosed} and can be used to lock a contract + * while permissions are being (re-)configured. * * Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that * they will be highly secured (e.g., a multisig or a well-configured DAO). @@ -51,6 +51,7 @@ import {Time} from "../../utils/types/Time.sol"; contract AccessManager is Context, Multicall, IAccessManager { using Time for *; + // Structure that stores the details for a target contract. struct TargetConfig { mapping(bytes4 selector => uint64 roleId) allowedRoles; Time.Delay adminDelay; @@ -59,10 +60,10 @@ contract AccessManager is Context, Multicall, IAccessManager { // Structure that stores the details for a role/account pair. This structures fit into a single slot. struct Access { - // Timepoint at which the user gets the permission. If this is either 0, or in the future, the role permission - // is not available. + // Timepoint at which the user gets the permission. If this is either 0, or in the future, the role + // permission is not available. uint48 since; - // delay for execution. Only applies to restricted() / execute() calls. + // Delay for execution. Only applies to restricted() / execute() calls. Time.Delay delay; } @@ -78,6 +79,7 @@ contract AccessManager is Context, Multicall, IAccessManager { Time.Delay grantDelay; } + // Structure that stores the details for a scheduled operation. This structure fits into a single slot. struct Schedule { uint48 timepoint; uint32 nonce; @@ -454,7 +456,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * - the caller must be a global admin * - * Emits a {FunctionAllowedRoleUpdated} event per selector + * Emits a {TargetFunctionRoleUpdated} event per selector */ function setTargetFunctionRole( address target, @@ -469,7 +471,7 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Internal version of {setFunctionAllowedRole} without access control. * - * Emits a {FunctionAllowedRoleUpdated} event + * Emits a {TargetFunctionRoleUpdated} event */ function _setTargetFunctionRole(address target, bytes4 selector, uint64 roleId) internal virtual { _targets[target].allowedRoles[selector] = roleId; @@ -477,22 +479,22 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Set the delay for management operations on a given class of contract. + * @dev Set the delay for management operations on a given target contract. * * Requirements: * * - the caller must be a global admin * - * Emits a {FunctionAllowedRoleUpdated} event per selector + * Emits a {TargetAdminDelayUpdated} event per selector */ function setTargetAdminDelay(address target, uint32 newDelay) public virtual onlyAuthorized { _setTargetAdminDelay(target, newDelay); } /** - * @dev Internal version of {setClassAdminDelay} without access control. + * @dev Internal version of {setTargetAdminDelay} without access control. * - * Emits a {ClassAdminDelayUpdated} event + * Emits a {TargetAdminDelayUpdated} event */ function _setTargetAdminDelay(address target, uint32 newDelay) internal virtual { uint48 effect; @@ -688,7 +690,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Requirements: * - * - the caller must be the proposer, or a guardian of the targeted function + * - the caller must be the proposer, a guardian of the targeted function, or a global admin * * Emits a {OperationCanceled} event. */ @@ -810,6 +812,13 @@ contract AccessManager is Context, Multicall, IAccessManager { // =================================================== HELPERS ==================================================== /** * @dev An extended version of {canCall} for internal use that considers restrictions for admin functions. + * + * Returns: + * - bool immediate: whether the operation can be executed immediately (with no delay) + * - uint32 delay: the execution delay + * + * If immediate is true, the delay can be disregarded and the operation can be immediately executed. + * If immediate is false, the operation can be executed if and only if delay is greater than 0. */ function _canCallExtended(address caller, address target, bytes calldata data) private view returns (bool, uint32) { if (target == address(this)) { diff --git a/contracts/access/manager/AuthorityUtils.sol b/contracts/access/manager/AuthorityUtils.sol index 49ba74ea2..caf4ca299 100644 --- a/contracts/access/manager/AuthorityUtils.sol +++ b/contracts/access/manager/AuthorityUtils.sol @@ -15,17 +15,17 @@ library AuthorityUtils { address caller, address target, bytes4 selector - ) internal view returns (bool allowed, uint32 delay) { + ) internal view returns (bool immediate, uint32 delay) { (bool success, bytes memory data) = authority.staticcall( abi.encodeCall(IAuthority.canCall, (caller, target, selector)) ); if (success) { if (data.length >= 0x40) { - (allowed, delay) = abi.decode(data, (bool, uint32)); + (immediate, delay) = abi.decode(data, (bool, uint32)); } else if (data.length >= 0x20) { - allowed = abi.decode(data, (bool)); + immediate = abi.decode(data, (bool)); } } - return (allowed, delay); + return (immediate, delay); } } diff --git a/contracts/governance/extensions/GovernorTimelockCompound.sol b/contracts/governance/extensions/GovernorTimelockCompound.sol index a3d47bea1..701e89287 100644 --- a/contracts/governance/extensions/GovernorTimelockCompound.sol +++ b/contracts/governance/extensions/GovernorTimelockCompound.sol @@ -105,7 +105,7 @@ abstract contract GovernorTimelockCompound is Governor { } /** - * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already + * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it has already * been queued. */ function _cancel( diff --git a/contracts/governance/extensions/GovernorTimelockControl.sol b/contracts/governance/extensions/GovernorTimelockControl.sol index 34143c898..0a4499737 100644 --- a/contracts/governance/extensions/GovernorTimelockControl.sol +++ b/contracts/governance/extensions/GovernorTimelockControl.sol @@ -111,7 +111,7 @@ abstract contract GovernorTimelockControl is Governor { } /** - * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already + * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it has already * been queued. */ // This function can reenter through the external call to the timelock, but we assume the timelock is trusted and diff --git a/contracts/proxy/utils/Initializable.sol b/contracts/proxy/utils/Initializable.sol index 7545bcca6..856160b8d 100644 --- a/contracts/proxy/utils/Initializable.sol +++ b/contracts/proxy/utils/Initializable.sol @@ -95,8 +95,9 @@ abstract contract Initializable { * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * - * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a - * constructor. + * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any + * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in + * production. * * Emits an {Initialized} event. */ diff --git a/contracts/token/ERC721/ERC721.sol b/contracts/token/ERC721/ERC721.sol index c27172010..bf711689f 100644 --- a/contracts/token/ERC721/ERC721.sol +++ b/contracts/token/ERC721/ERC721.sol @@ -184,8 +184,8 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in * particular (ignoring whether it is owned by `owner`). * - * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not - * verify this assumption. + * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this + * assumption. */ function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) { return @@ -195,10 +195,11 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er /** * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner. - * Reverts if `spender` has not approval for all assets of the provided `owner` nor the actual owner approved the `spender` for the specific `tokenId`. + * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets + * the `spender` for the specific `tokenId`. * - * WARNING: This function relies on {_isAuthorized}, so it doesn't check whether `owner` is the - * actual owner of `tokenId`. + * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this + * assumption. */ function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual { if (!_isAuthorized(owner, spender, tokenId)) { diff --git a/contracts/token/ERC721/extensions/ERC721Consecutive.sol b/contracts/token/ERC721/extensions/ERC721Consecutive.sol index 1cf88dbf9..d5f995576 100644 --- a/contracts/token/ERC721/extensions/ERC721Consecutive.sol +++ b/contracts/token/ERC721/extensions/ERC721Consecutive.sol @@ -19,12 +19,12 @@ import {Checkpoints} from "../../../utils/structs/Checkpoints.sol"; * Using this extension removes the ability to mint single tokens during contract construction. This ability is * regained after construction. During construction, only batch minting is allowed. * - * IMPORTANT: This extension bypasses the hooks {_beforeTokenTransfer} and {_afterTokenTransfer} for tokens minted in - * batch. The hooks will be only called once per batch, so you should take `batchSize` parameter into consideration - * when relying on hooks. + * IMPORTANT: This extension does not call the {_update} function for tokens minted in batch. Any logic added to this + * function through overrides will not be triggered when token are minted in batch. You may want to also override + * {_increaseBalance} or {_mintConsecutive} to account for these mints. * - * IMPORTANT: When overriding {_afterTokenTransfer}, be careful about call ordering. {ownerOf} may return invalid - * values during the {_afterTokenTransfer} execution if the super call is not called first. To be safe, execute the + * IMPORTANT: When overriding {_mintConsecutive}, be careful about call ordering. {ownerOf} may return invalid + * values during the {_mintConsecutive} execution if the super call is not called first. To be safe, execute the * super call before your custom logic. */ abstract contract ERC721Consecutive is IERC2309, ERC721 { diff --git a/contracts/utils/cryptography/ECDSA.sol b/contracts/utils/cryptography/ECDSA.sol index 4e8259472..4a04a40af 100644 --- a/contracts/utils/cryptography/ECDSA.sol +++ b/contracts/utils/cryptography/ECDSA.sol @@ -33,8 +33,11 @@ library ECDSA { error ECDSAInvalidSignatureS(bytes32 s); /** - * @dev Returns the address that signed a hashed message (`hash`) with - * `signature` or error string. This address can then be used for verification purposes. + * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not + * return address(0) without also returning an error description. Errors are documented using an enum (error type) + * and a bytes32 providing additional information about the error. + * + * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower diff --git a/contracts/utils/cryptography/MessageHashUtils.sol b/contracts/utils/cryptography/MessageHashUtils.sol index 7625bab78..0e6d602fe 100644 --- a/contracts/utils/cryptography/MessageHashUtils.sol +++ b/contracts/utils/cryptography/MessageHashUtils.sol @@ -20,7 +20,7 @@ library MessageHashUtils { * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * - * NOTE: The `hash` parameter is intended to be the result of hashing a raw message with + * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with * keccak256, although any bytes32 value can be safely used because the final digest will * be re-hashed. * diff --git a/contracts/utils/structs/EnumerableMap.sol b/contracts/utils/structs/EnumerableMap.sol index 030ed1eef..65f9ea26c 100644 --- a/contracts/utils/structs/EnumerableMap.sol +++ b/contracts/utils/structs/EnumerableMap.sol @@ -48,14 +48,10 @@ import {EnumerableSet} from "./EnumerableSet.sol"; library EnumerableMap { using EnumerableSet for EnumerableSet.Bytes32Set; - // To implement this library for multiple types with as little code - // repetition as possible, we write it in terms of a generic Map type with - // bytes32 keys and values. - // The Map implementation uses private functions, and user-facing - // implementations (such as Uint256ToAddressMap) are just wrappers around - // the underlying Map. - // This means that we can only create new EnumerableMaps for types that fit - // in bytes32. + // To implement this library for multiple types with as little code repetition as possible, we write it in + // terms of a generic Map type with bytes32 keys and values. The Map implementation uses private functions, + // and user-facing implementations such as `UintToAddressMap` are just wrappers around the underlying Map. + // This means that we can only create new EnumerableMaps for types that fit in bytes32. /** * @dev Query for a nonexistent map key. diff --git a/scripts/generate/templates/EnumerableMap.js b/scripts/generate/templates/EnumerableMap.js index 8184bfe18..7dbe6ca7f 100644 --- a/scripts/generate/templates/EnumerableMap.js +++ b/scripts/generate/templates/EnumerableMap.js @@ -57,14 +57,10 @@ import {EnumerableSet} from "./EnumerableSet.sol"; /* eslint-enable max-len */ const defaultMap = () => `\ -// To implement this library for multiple types with as little code -// repetition as possible, we write it in terms of a generic Map type with -// bytes32 keys and values. -// The Map implementation uses private functions, and user-facing -// implementations (such as Uint256ToAddressMap) are just wrappers around -// the underlying Map. -// This means that we can only create new EnumerableMaps for types that fit -// in bytes32. +// To implement this library for multiple types with as little code repetition as possible, we write it in +// terms of a generic Map type with bytes32 keys and values. The Map implementation uses private functions, +// and user-facing implementations such as \`UintToAddressMap\` are just wrappers around the underlying Map. +// This means that we can only create new EnumerableMaps for types that fit in bytes32. /** * @dev Query for a nonexistent map key. From 26c22169f04b8650c03065c8c63aa0dcc50baa75 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Fri, 8 Sep 2023 23:05:00 +0200 Subject: [PATCH 036/167] =?UTF-8?q?Rename=20custom=20error=20AleadyInitial?= =?UTF-8?q?ized=20=E2=86=92=20InvalidInitialization=20(#4592)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/proxy/utils/Initializable.sol | 8 ++++---- test/proxy/utils/Initializable.test.js | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/contracts/proxy/utils/Initializable.sol b/contracts/proxy/utils/Initializable.sol index 856160b8d..eb4ebb8a4 100644 --- a/contracts/proxy/utils/Initializable.sol +++ b/contracts/proxy/utils/Initializable.sol @@ -79,7 +79,7 @@ abstract contract Initializable { /** * @dev The contract is already initialized. */ - error AlreadyInitialized(); + error InvalidInitialization(); /** * @dev The contract is not initializing. @@ -118,7 +118,7 @@ abstract contract Initializable { bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { - revert AlreadyInitialized(); + revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { @@ -154,7 +154,7 @@ abstract contract Initializable { InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { - revert AlreadyInitialized(); + revert InvalidInitialization(); } $._initialized = version; $._initializing = true; @@ -194,7 +194,7 @@ abstract contract Initializable { InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { - revert AlreadyInitialized(); + revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; diff --git a/test/proxy/utils/Initializable.test.js b/test/proxy/utils/Initializable.test.js index 98ed19d36..b9ff3b052 100644 --- a/test/proxy/utils/Initializable.test.js +++ b/test/proxy/utils/Initializable.test.js @@ -42,13 +42,13 @@ contract('Initializable', function () { }); it('initializer does not run again', async function () { - await expectRevertCustomError(this.contract.initialize(), 'AlreadyInitialized', []); + await expectRevertCustomError(this.contract.initialize(), 'InvalidInitialization', []); }); }); describe('nested under an initializer', function () { it('initializer modifier reverts', async function () { - await expectRevertCustomError(this.contract.initializerNested(), 'AlreadyInitialized', []); + await expectRevertCustomError(this.contract.initializerNested(), 'InvalidInitialization', []); }); it('onlyInitializing modifier succeeds', async function () { @@ -100,9 +100,9 @@ contract('Initializable', function () { it('cannot nest reinitializers', async function () { expect(await this.contract.counter()).to.be.bignumber.equal('0'); - await expectRevertCustomError(this.contract.nestedReinitialize(2, 2), 'AlreadyInitialized', []); - await expectRevertCustomError(this.contract.nestedReinitialize(2, 3), 'AlreadyInitialized', []); - await expectRevertCustomError(this.contract.nestedReinitialize(3, 2), 'AlreadyInitialized', []); + await expectRevertCustomError(this.contract.nestedReinitialize(2, 2), 'InvalidInitialization', []); + await expectRevertCustomError(this.contract.nestedReinitialize(2, 3), 'InvalidInitialization', []); + await expectRevertCustomError(this.contract.nestedReinitialize(3, 2), 'InvalidInitialization', []); }); it('can chain reinitializers', async function () { @@ -121,18 +121,18 @@ contract('Initializable', function () { describe('contract locking', function () { it('prevents initialization', async function () { await this.contract.disableInitializers(); - await expectRevertCustomError(this.contract.initialize(), 'AlreadyInitialized', []); + await expectRevertCustomError(this.contract.initialize(), 'InvalidInitialization', []); }); it('prevents re-initialization', async function () { await this.contract.disableInitializers(); - await expectRevertCustomError(this.contract.reinitialize(255), 'AlreadyInitialized', []); + await expectRevertCustomError(this.contract.reinitialize(255), 'InvalidInitialization', []); }); it('can lock contract after initialization', async function () { await this.contract.initialize(); await this.contract.disableInitializers(); - await expectRevertCustomError(this.contract.reinitialize(255), 'AlreadyInitialized', []); + await expectRevertCustomError(this.contract.reinitialize(255), 'InvalidInitialization', []); }); }); }); @@ -207,8 +207,8 @@ contract('Initializable', function () { describe('disabling initialization', function () { it('old and new patterns in bad sequence', async function () { - await expectRevertCustomError(DisableBad1.new(), 'AlreadyInitialized', []); - await expectRevertCustomError(DisableBad2.new(), 'AlreadyInitialized', []); + await expectRevertCustomError(DisableBad1.new(), 'InvalidInitialization', []); + await expectRevertCustomError(DisableBad2.new(), 'InvalidInitialization', []); }); it('old and new patterns in good sequence', async function () { From 7ae7f3ef4b89b1e6338a3110a7d2d800abe66eae Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Fri, 8 Sep 2023 23:05:26 +0200 Subject: [PATCH 037/167] Remove unused import (#4590) --- contracts/governance/extensions/GovernorTimelockCompound.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/contracts/governance/extensions/GovernorTimelockCompound.sol b/contracts/governance/extensions/GovernorTimelockCompound.sol index 701e89287..e2021bbef 100644 --- a/contracts/governance/extensions/GovernorTimelockCompound.sol +++ b/contracts/governance/extensions/GovernorTimelockCompound.sol @@ -5,7 +5,6 @@ pragma solidity ^0.8.20; import {IGovernor, Governor} from "../Governor.sol"; import {ICompoundTimelock} from "../../vendor/compound/ICompoundTimelock.sol"; -import {IERC165} from "../../interfaces/IERC165.sol"; import {Address} from "../../utils/Address.sol"; import {SafeCast} from "../../utils/math/SafeCast.sol"; From 01659449d44c3ce3fb89a8bf7e79e36839633c49 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Fri, 8 Sep 2023 23:24:06 +0200 Subject: [PATCH 038/167] Make Solidity pragma consistent (#4589) --- contracts/governance/extensions/GovernorStorage.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/governance/extensions/GovernorStorage.sol b/contracts/governance/extensions/GovernorStorage.sol index 95aacb8c3..a12aa8213 100644 --- a/contracts/governance/extensions/GovernorStorage.sol +++ b/contracts/governance/extensions/GovernorStorage.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.20; import {Governor} from "../Governor.sol"; From bba33516b1bbedeae61e54a463a8b11952eb51b0 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Fri, 8 Sep 2023 23:24:23 +0200 Subject: [PATCH 039/167] Remove unused return value and reuse helper function (#4588) Co-authored-by: Francisco Giordano --- contracts/governance/Governor.sol | 5 +---- contracts/utils/Nonces.sol | 3 +-- test/utils/Nonces.test.js | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index 62bee7de3..f0ee9d8b4 100644 --- a/contracts/governance/Governor.sol +++ b/contracts/governance/Governor.sol @@ -635,10 +635,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 string memory reason, bytes memory params ) internal virtual returns (uint256) { - ProposalState currentState = state(proposalId); - if (currentState != ProposalState.Active) { - revert GovernorUnexpectedProposalState(proposalId, currentState, _encodeStateBitmap(ProposalState.Active)); - } + _validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Active)); uint256 weight = _getVotes(account, proposalSnapshot(proposalId), params); _countVote(proposalId, account, support, weight, params); diff --git a/contracts/utils/Nonces.sol b/contracts/utils/Nonces.sol index b4681371a..2a32142ea 100644 --- a/contracts/utils/Nonces.sol +++ b/contracts/utils/Nonces.sol @@ -36,11 +36,10 @@ abstract contract Nonces { /** * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. */ - function _useCheckedNonce(address owner, uint256 nonce) internal virtual returns (uint256) { + function _useCheckedNonce(address owner, uint256 nonce) internal virtual { uint256 current = _useNonce(owner); if (nonce != current) { revert InvalidAccountNonce(owner, current); } - return current; } } diff --git a/test/utils/Nonces.test.js b/test/utils/Nonces.test.js index 361eeeeec..67a3087e3 100644 --- a/test/utils/Nonces.test.js +++ b/test/utils/Nonces.test.js @@ -42,8 +42,7 @@ contract('Nonces', function (accounts) { const currentNonce = await this.nonces.nonces(sender); expect(currentNonce).to.be.bignumber.equal('0'); - const { receipt } = await this.nonces.$_useCheckedNonce(sender, currentNonce); - expectEvent(receipt, 'return$_useCheckedNonce', [currentNonce]); + await this.nonces.$_useCheckedNonce(sender, currentNonce); expect(await this.nonces.nonces(sender)).to.be.bignumber.equal('1'); }); From a07f28b00cb493ba4befedca0d4d40b809c6df55 Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 11 Sep 2023 10:54:22 -0300 Subject: [PATCH 040/167] Improve AccessManager docs (#4586) --- contracts/access/manager/AccessManager.sol | 33 +++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 1db16feb1..eb79eb8ec 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -168,13 +168,15 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Get the permission level (role) required to call a function. This only applies for contract that are - * operating under the `Custom` mode. + * @dev Get the role required to call a function. */ function getTargetFunctionRole(address target, bytes4 selector) public view virtual returns (uint64) { return _targets[target].allowedRoles[selector]; } + /** + * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay. + */ function getTargetAdminDelay(address target) public view virtual returns (uint32) { return _targets[target].adminDelay.get(); } @@ -208,7 +210,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Get the access details for a given account in a given role. These details include the timepoint at which + * @dev Get the access details for a given account for a given role. These details include the timepoint at which * membership becomes active, and the delay applied to all operation by this user that requires this permission * level. * @@ -268,7 +270,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * Requirements: * - * - the caller must be in the role's admins + * - the caller must be an admin for the role (see {getRoleAdmin}) * * Emits a {RoleGranted} event */ @@ -277,14 +279,14 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Remove an account for a role, with immediate effect. If the sender is not in the role, this call has no - * effect. + * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has + * no effect. * * Requirements: * - * - the caller must be in the role's admins + * - the caller must be an admin for the role (see {getRoleAdmin}) * - * Emits a {RoleRevoked} event + * Emits a {RoleRevoked} event if the account had the role. */ function revokeRole(uint64 roleId, address account) public virtual onlyAuthorized { _revokeRole(roleId, account); @@ -298,7 +300,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * - the caller must be `callerConfirmation`. * - * Emits a {RoleRevoked} event + * Emits a {RoleRevoked} event if the account had the role. */ function renounceRole(uint64 roleId, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { @@ -340,7 +342,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * - the caller must be a global admin * - * Emits a {RoleGrantDelayChanged} event + * Emits a {RoleGrantDelayChanged} event. */ function setGrantDelay(uint64 roleId, uint32 newDelay) public virtual onlyAuthorized { _setGrantDelay(roleId, newDelay); @@ -349,7 +351,7 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Internal version of {grantRole} without access control. Returns true if the role was newly granted. * - * Emits a {RoleGranted} event + * Emits a {RoleGranted} event. */ function _grantRole( uint64 roleId, @@ -384,7 +386,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * @dev Internal version of {revokeRole} without access control. This logic is also used by {renounceRole}. * Returns true if the role was previously granted. * - * Emits a {RoleRevoked} event + * Emits a {RoleRevoked} event if the account had the role. */ function _revokeRole(uint64 roleId, address account) internal virtual returns (bool) { if (roleId == PUBLIC_ROLE) { @@ -449,14 +451,13 @@ contract AccessManager is Context, Multicall, IAccessManager { // ============================================= FUNCTION MANAGEMENT ============================================== /** - * @dev Set the level of permission (`role`) required to call functions identified by the `selectors` in the - * `target` contract. + * @dev Set the role required to call functions identified by the `selectors` in the `target` contract. * * Requirements: * * - the caller must be a global admin * - * Emits a {TargetFunctionRoleUpdated} event per selector + * Emits a {TargetFunctionRoleUpdated} event per selector. */ function setTargetFunctionRole( address target, @@ -479,7 +480,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Set the delay for management operations on a given target contract. + * @dev Set the delay for changing the configuration of a given target contract. * * Requirements: * From 9e09e0653a4499735f72d50a6910e54f80b1d665 Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 11 Sep 2023 12:07:06 -0300 Subject: [PATCH 041/167] Fix flaky test in AccessManager (#4593) --- test/access/manager/AccessManager.test.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 84fb8df21..160af8ba1 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -4,6 +4,7 @@ const { expectRevertCustomError } = require('../../helpers/customError'); const { selector } = require('../../helpers/methods'); const { clockFromReceipt } = require('../../helpers/time'); const { product } = require('../../helpers/iterate'); +const helpers = require('@nomicfoundation/hardhat-network-helpers'); const AccessManager = artifacts.require('$AccessManager'); const AccessManagedTarget = artifacts.require('$AccessManagedTarget'); @@ -883,17 +884,15 @@ contract('AccessManager', function (accounts) { expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(timestamp.add(executeDelay)); - // we need to set the clock 2 seconds before the value, because the increaseTo "consumes" the timestamp - // and the next transaction will be one after that (see check below) - await time.increaseTo(timestamp.add(executeDelay).subn(2)); - // too early + await helpers.time.setNextBlockTimestamp(timestamp.add(executeDelay).subn(1)); await expectRevertCustomError(this.execute(), 'AccessManagerNotReady', [this.opId]); // the revert happened one second before the execution delay expired expect(await time.latest()).to.be.bignumber.equal(timestamp.add(executeDelay).subn(1)); // ok + await helpers.time.setNextBlockTimestamp(timestamp.add(executeDelay)); await this.execute(); // the success happened when the delay was reached (earliest possible) From 095c8e120c0cc0d9003db358708740bcbc4276a1 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Mon, 11 Sep 2023 17:07:25 +0200 Subject: [PATCH 042/167] Remove SafeERC20.safePermit (#4582) Co-authored-by: Francisco --- .changeset/green-pumpkins-end.md | 5 + .../mocks/token/ERC20PermitNoRevertMock.sol | 35 ----- contracts/token/ERC20/README.adoc | 8 +- .../token/ERC20/extensions/ERC20Permit.sol | 6 +- .../token/ERC20/extensions/IERC20Permit.sol | 30 +++++ contracts/token/ERC20/utils/SafeERC20.sol | 22 ---- test/token/ERC20/utils/SafeERC20.test.js | 123 ------------------ 7 files changed, 43 insertions(+), 186 deletions(-) create mode 100644 .changeset/green-pumpkins-end.md delete mode 100644 contracts/mocks/token/ERC20PermitNoRevertMock.sol diff --git a/.changeset/green-pumpkins-end.md b/.changeset/green-pumpkins-end.md new file mode 100644 index 000000000..03cfe023f --- /dev/null +++ b/.changeset/green-pumpkins-end.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': major +--- + +`SafeERC20`: Removed `safePermit` in favor of documentation-only `permit` recommendations. diff --git a/contracts/mocks/token/ERC20PermitNoRevertMock.sol b/contracts/mocks/token/ERC20PermitNoRevertMock.sol deleted file mode 100644 index 64e82b6f3..000000000 --- a/contracts/mocks/token/ERC20PermitNoRevertMock.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.20; - -import {ERC20Permit} from "../../token/ERC20/extensions/ERC20Permit.sol"; - -abstract contract ERC20PermitNoRevertMock is ERC20Permit { - function permitThatMayRevert( - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual { - super.permit(owner, spender, value, deadline, v, r, s); - } - - function permit( - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual override { - try this.permitThatMayRevert(owner, spender, value, deadline, v, r, s) { - // do nothing - } catch { - // do nothing - } - } -} diff --git a/contracts/token/ERC20/README.adoc b/contracts/token/ERC20/README.adoc index 9482b581b..2c508802d 100644 --- a/contracts/token/ERC20/README.adoc +++ b/contracts/token/ERC20/README.adoc @@ -15,10 +15,10 @@ There are a few core contracts that implement the behavior specified in the EIP: Additionally there are multiple custom extensions, including: +* {ERC20Permit}: gasless approval of tokens (standardized as ERC2612). * {ERC20Burnable}: destruction of own tokens. * {ERC20Capped}: enforcement of a cap to the total supply when minting tokens. * {ERC20Pausable}: ability to pause token transfers. -* {ERC20Permit}: gasless approval of tokens (standardized as ERC2612). * {ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC3156). * {ERC20Votes}: support for voting and vote delegation. * {ERC20Wrapper}: wrapper to create an ERC20 backed by another ERC20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}. @@ -44,14 +44,16 @@ NOTE: This core set of contracts is designed to be unopinionated, allowing devel == Extensions +{{IERC20Permit}} + +{{ERC20Permit}} + {{ERC20Burnable}} {{ERC20Capped}} {{ERC20Pausable}} -{{ERC20Permit}} - {{ERC20Votes}} {{ERC20Wrapper}} diff --git a/contracts/token/ERC20/extensions/ERC20Permit.sol b/contracts/token/ERC20/extensions/ERC20Permit.sol index d6efb477e..4165fbaca 100644 --- a/contracts/token/ERC20/extensions/ERC20Permit.sol +++ b/contracts/token/ERC20/extensions/ERC20Permit.sol @@ -39,7 +39,7 @@ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { constructor(string memory name) EIP712(name, "1") {} /** - * @dev See {IERC20Permit-permit}. + * @inheritdoc IERC20Permit */ function permit( address owner, @@ -67,14 +67,14 @@ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { } /** - * @dev See {IERC20Permit-nonces}. + * @inheritdoc IERC20Permit */ function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) { return super.nonces(owner); } /** - * @dev See {IERC20Permit-DOMAIN_SEPARATOR}. + * @inheritdoc IERC20Permit */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view virtual returns (bytes32) { diff --git a/contracts/token/ERC20/extensions/IERC20Permit.sol b/contracts/token/ERC20/extensions/IERC20Permit.sol index 237041006..b3260f305 100644 --- a/contracts/token/ERC20/extensions/IERC20Permit.sol +++ b/contracts/token/ERC20/extensions/IERC20Permit.sol @@ -10,6 +10,34 @@ pragma solidity ^0.8.20; * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. + * + * ==== Security Considerations + * + * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature + * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be + * considered as an intention to spend the allowance in any specific way. The second is that because permits have + * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should + * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be + * generally recommended is: + * + * ```solidity + * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { + * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} + * doThing(..., value); + * } + * + * function doThing(..., uint256 value) public { + * token.safeTransferFrom(msg.sender, address(this), value); + * ... + * } + * ``` + * + * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of + * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also + * {SafeERC20-safeTransferFrom}). + * + * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so + * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** @@ -32,6 +60,8 @@ interface IERC20Permit { * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. + * + * CAUTION: See Security Considerations above. */ function permit( address owner, diff --git a/contracts/token/ERC20/utils/SafeERC20.sol b/contracts/token/ERC20/utils/SafeERC20.sol index fcdbbae76..e8b699cb0 100644 --- a/contracts/token/ERC20/utils/SafeERC20.sol +++ b/contracts/token/ERC20/utils/SafeERC20.sol @@ -82,28 +82,6 @@ library SafeERC20 { } } - /** - * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. - * Revert on invalid signature. - */ - function safePermit( - IERC20Permit token, - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) internal { - uint256 nonceBefore = token.nonces(owner); - token.permit(owner, spender, value, deadline, v, r, s); - uint256 nonceAfter = token.nonces(owner); - if (nonceAfter != nonceBefore + 1) { - revert SafeERC20FailedOperation(address(token)); - } - } - /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). diff --git a/test/token/ERC20/utils/SafeERC20.test.js b/test/token/ERC20/utils/SafeERC20.test.js index eb6e26755..4ff27f14d 100644 --- a/test/token/ERC20/utils/SafeERC20.test.js +++ b/test/token/ERC20/utils/SafeERC20.test.js @@ -4,16 +4,10 @@ const SafeERC20 = artifacts.require('$SafeERC20'); const ERC20ReturnFalseMock = artifacts.require('$ERC20ReturnFalseMock'); const ERC20ReturnTrueMock = artifacts.require('$ERC20'); // default implementation returns true const ERC20NoReturnMock = artifacts.require('$ERC20NoReturnMock'); -const ERC20PermitNoRevertMock = artifacts.require('$ERC20PermitNoRevertMock'); const ERC20ForceApproveMock = artifacts.require('$ERC20ForceApproveMock'); -const { getDomain, domainType, Permit } = require('../../../helpers/eip712'); const { expectRevertCustomError } = require('../../../helpers/customError'); -const { fromRpcSig } = require('ethereumjs-util'); -const ethSigUtil = require('eth-sig-util'); -const Wallet = require('ethereumjs-wallet').default; - const name = 'ERC20Mock'; const symbol = 'ERC20Mock'; @@ -122,123 +116,6 @@ contract('SafeERC20', function (accounts) { shouldOnlyRevertOnErrors(accounts); }); - describe("with token that doesn't revert on invalid permit", function () { - const wallet = Wallet.generate(); - const owner = wallet.getAddressString(); - const spender = hasNoCode; - - beforeEach(async function () { - this.token = await ERC20PermitNoRevertMock.new(name, symbol, name); - - this.data = await getDomain(this.token).then(domain => ({ - primaryType: 'Permit', - types: { EIP712Domain: domainType(domain), Permit }, - domain, - message: { owner, spender, value: '42', nonce: '0', deadline: constants.MAX_UINT256 }, - })); - - this.signature = fromRpcSig(ethSigUtil.signTypedMessage(wallet.getPrivateKey(), { data: this.data })); - }); - - it('accepts owner signature', async function () { - expect(await this.token.nonces(owner)).to.be.bignumber.equal('0'); - expect(await this.token.allowance(owner, spender)).to.be.bignumber.equal('0'); - - await this.mock.$safePermit( - this.token.address, - this.data.message.owner, - this.data.message.spender, - this.data.message.value, - this.data.message.deadline, - this.signature.v, - this.signature.r, - this.signature.s, - ); - - expect(await this.token.nonces(owner)).to.be.bignumber.equal('1'); - expect(await this.token.allowance(owner, spender)).to.be.bignumber.equal(this.data.message.value); - }); - - it('revert on reused signature', async function () { - expect(await this.token.nonces(owner)).to.be.bignumber.equal('0'); - // use valid signature and consume nounce - await this.mock.$safePermit( - this.token.address, - this.data.message.owner, - this.data.message.spender, - this.data.message.value, - this.data.message.deadline, - this.signature.v, - this.signature.r, - this.signature.s, - ); - expect(await this.token.nonces(owner)).to.be.bignumber.equal('1'); - // invalid call does not revert for this token implementation - await this.token.permit( - this.data.message.owner, - this.data.message.spender, - this.data.message.value, - this.data.message.deadline, - this.signature.v, - this.signature.r, - this.signature.s, - ); - expect(await this.token.nonces(owner)).to.be.bignumber.equal('1'); - // invalid call revert when called through the SafeERC20 library - await expectRevertCustomError( - this.mock.$safePermit( - this.token.address, - this.data.message.owner, - this.data.message.spender, - this.data.message.value, - this.data.message.deadline, - this.signature.v, - this.signature.r, - this.signature.s, - ), - 'SafeERC20FailedOperation', - [this.token.address], - ); - expect(await this.token.nonces(owner)).to.be.bignumber.equal('1'); - }); - - it('revert on invalid signature', async function () { - // signature that is not valid for owner - const invalidSignature = { - v: 27, - r: '0x71753dc5ecb5b4bfc0e3bc530d79ce5988760ed3f3a234c86a5546491f540775', - s: '0x0049cedee5aed990aabed5ad6a9f6e3c565b63379894b5fa8b512eb2b79e485d', - }; - - // invalid call does not revert for this token implementation - await this.token.permit( - this.data.message.owner, - this.data.message.spender, - this.data.message.value, - this.data.message.deadline, - invalidSignature.v, - invalidSignature.r, - invalidSignature.s, - ); - - // invalid call revert when called through the SafeERC20 library - await expectRevertCustomError( - this.mock.$safePermit( - this.token.address, - this.data.message.owner, - this.data.message.spender, - this.data.message.value, - this.data.message.deadline, - invalidSignature.v, - invalidSignature.r, - invalidSignature.s, - ), - 'SafeERC20FailedOperation', - [this.token.address], - ); - }); - }); - describe('with usdt approval beaviour', function () { const spender = hasNoCode; From b6111faac8e22958ac031df305c7a5923063f543 Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 11 Sep 2023 16:32:10 -0300 Subject: [PATCH 043/167] Use namespaced storage for upgradeable contracts (#4534) --- .changeset/wet-bears-heal.md | 5 ++ .github/actions/setup/action.yml | 2 +- contracts/governance/Governor.sol | 6 +- .../governance/extensions/GovernorVotes.sol | 17 ++++-- .../GovernorVotesQuorumFraction.sol | 2 +- package-lock.json | 56 ++++++++++++++++--- package.json | 2 +- scripts/upgradeable/transpile.sh | 6 +- 8 files changed, 75 insertions(+), 21 deletions(-) create mode 100644 .changeset/wet-bears-heal.md diff --git a/.changeset/wet-bears-heal.md b/.changeset/wet-bears-heal.md new file mode 100644 index 000000000..2df32f39a --- /dev/null +++ b/.changeset/wet-bears-heal.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': major +--- + +Upgradeable contracts now use namespaced storage (EIP-7201). diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 680fba0c6..84ebe823a 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -5,7 +5,7 @@ runs: steps: - uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 16.x - uses: actions/cache@v3 id: cache with: diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index b4abaa695..f5d68f654 100644 --- a/contracts/governance/Governor.sol +++ b/contracts/governance/Governor.sol @@ -299,8 +299,8 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 bytes[] memory calldatas, string memory description, address proposer - ) internal virtual returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description))); + ) internal virtual returns (uint256 proposalId) { + proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description))); if (targets.length != values.length || targets.length != calldatas.length || targets.length == 0) { revert GovernorInvalidProposalLength(targets.length, calldatas.length, values.length); @@ -329,7 +329,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 description ); - return proposalId; + // Using a named return variable to avoid stack too deep errors } /** diff --git a/contracts/governance/extensions/GovernorVotes.sol b/contracts/governance/extensions/GovernorVotes.sol index 45447da51..3ea1bd2bf 100644 --- a/contracts/governance/extensions/GovernorVotes.sol +++ b/contracts/governance/extensions/GovernorVotes.sol @@ -12,10 +12,17 @@ import {SafeCast} from "../../utils/math/SafeCast.sol"; * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} token. */ abstract contract GovernorVotes is Governor { - IERC5805 public immutable token; + IERC5805 private immutable _token; constructor(IVotes tokenAddress) { - token = IERC5805(address(tokenAddress)); + _token = IERC5805(address(tokenAddress)); + } + + /** + * @dev The token that voting power is sourced from. + */ + function token() public view virtual returns (IERC5805) { + return _token; } /** @@ -23,7 +30,7 @@ abstract contract GovernorVotes is Governor { * does not implement EIP-6372. */ function clock() public view virtual override returns (uint48) { - try token.clock() returns (uint48 timepoint) { + try token().clock() returns (uint48 timepoint) { return timepoint; } catch { return SafeCast.toUint48(block.number); @@ -35,7 +42,7 @@ abstract contract GovernorVotes is Governor { */ // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() public view virtual override returns (string memory) { - try token.CLOCK_MODE() returns (string memory clockmode) { + try token().CLOCK_MODE() returns (string memory clockmode) { return clockmode; } catch { return "mode=blocknumber&from=default"; @@ -50,6 +57,6 @@ abstract contract GovernorVotes is Governor { uint256 timepoint, bytes memory /*params*/ ) internal view virtual override returns (uint256) { - return token.getPastVotes(account, timepoint); + return token().getPastVotes(account, timepoint); } } diff --git a/contracts/governance/extensions/GovernorVotesQuorumFraction.sol b/contracts/governance/extensions/GovernorVotesQuorumFraction.sol index cc2e85b45..100758e3b 100644 --- a/contracts/governance/extensions/GovernorVotesQuorumFraction.sol +++ b/contracts/governance/extensions/GovernorVotesQuorumFraction.sol @@ -71,7 +71,7 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes { * @dev Returns the quorum for a timepoint, in terms of number of votes: `supply * numerator / denominator`. */ function quorum(uint256 timepoint) public view virtual override returns (uint256) { - return (token.getPastTotalSupply(timepoint) * quorumNumerator(timepoint)) / quorumDenominator(); + return (token().getPastTotalSupply(timepoint) * quorumNumerator(timepoint)) / quorumDenominator(); } /** diff --git a/package-lock.json b/package-lock.json index 22fe93cb7..fdcda1e7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "semver": "^7.3.5", "solhint": "^3.3.6", "solhint-plugin-openzeppelin": "file:scripts/solhint-custom", - "solidity-ast": "^0.4.25", + "solidity-ast": "^0.4.50", "solidity-coverage": "^0.8.0", "solidity-docgen": "^0.6.0-beta.29", "undici": "^5.22.1", @@ -3221,6 +3221,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array.prototype.findlast": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.2.tgz", + "integrity": "sha512-p1YDNPNqA+P6cPX9ATsxg7DKir7gOmJ+jh5dEP3LlumMNYVC1F2Jgnyh6oI3n/qD9FeIkqR2jXfd73G68ImYUQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array.prototype.flat": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", @@ -12569,10 +12588,13 @@ } }, "node_modules/solidity-ast": { - "version": "0.4.49", - "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.49.tgz", - "integrity": "sha512-Pr5sCAj1SFqzwFZw1HPKSq0PehlQNdM8GwKyAVYh2DOn7/cCK8LUKD1HeHnKtTgBW7hi9h4nnnan7hpAg5RhWQ==", - "dev": true + "version": "0.4.50", + "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.50.tgz", + "integrity": "sha512-WpIhaUibbjcBY4bg8TO2UXFWl8PQPhtH1QtMYJUqFUGxx0rRiEFsVLV+ow8XiWEnSPeu4xPp1/K43P4esxuK1Q==", + "dev": true, + "dependencies": { + "array.prototype.findlast": "^1.2.2" + } }, "node_modules/solidity-comments": { "version": "0.0.2", @@ -17853,6 +17875,19 @@ "es-shim-unscopables": "^1.0.0" } }, + "array.prototype.findlast": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.2.tgz", + "integrity": "sha512-p1YDNPNqA+P6cPX9ATsxg7DKir7gOmJ+jh5dEP3LlumMNYVC1F2Jgnyh6oI3n/qD9FeIkqR2jXfd73G68ImYUQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.1.3" + } + }, "array.prototype.flat": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", @@ -25144,10 +25179,13 @@ "version": "file:scripts/solhint-custom" }, "solidity-ast": { - "version": "0.4.49", - "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.49.tgz", - "integrity": "sha512-Pr5sCAj1SFqzwFZw1HPKSq0PehlQNdM8GwKyAVYh2DOn7/cCK8LUKD1HeHnKtTgBW7hi9h4nnnan7hpAg5RhWQ==", - "dev": true + "version": "0.4.50", + "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.50.tgz", + "integrity": "sha512-WpIhaUibbjcBY4bg8TO2UXFWl8PQPhtH1QtMYJUqFUGxx0rRiEFsVLV+ow8XiWEnSPeu4xPp1/K43P4esxuK1Q==", + "dev": true, + "requires": { + "array.prototype.findlast": "^1.2.2" + } }, "solidity-comments": { "version": "0.0.2", diff --git a/package.json b/package.json index ffa868ac7..c71139f3e 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "semver": "^7.3.5", "solhint": "^3.3.6", "solhint-plugin-openzeppelin": "file:scripts/solhint-custom", - "solidity-ast": "^0.4.25", + "solidity-ast": "^0.4.50", "solidity-coverage": "^0.8.0", "solidity-docgen": "^0.6.0-beta.29", "undici": "^5.22.1", diff --git a/scripts/upgradeable/transpile.sh b/scripts/upgradeable/transpile.sh index c0cb9ff5e..05de96d34 100644 --- a/scripts/upgradeable/transpile.sh +++ b/scripts/upgradeable/transpile.sh @@ -22,6 +22,8 @@ fi # -i: use included Initializable # -x: exclude proxy-related contracts with a few exceptions # -p: emit public initializer +# -n: use namespaces +# -N: exclude from namespaces transformation npx @openzeppelin/upgrade-safe-transpiler@latest -D \ -b "$build_info" \ -i contracts/proxy/utils/Initializable.sol \ @@ -32,7 +34,9 @@ npx @openzeppelin/upgrade-safe-transpiler@latest -D \ -x '!contracts/proxy/ERC1967/ERC1967Utils.sol' \ -x '!contracts/proxy/utils/UUPSUpgradeable.sol' \ -x '!contracts/proxy/beacon/IBeacon.sol' \ - -p 'contracts/**/presets/**/*' + -p 'contracts/**/presets/**/*' \ + -n \ + -N 'contracts/mocks/**/*' # delete compilation artifacts of vanilla code npm run clean From 36bf1e46fa811f0f07d38eb9cfbc69a955f300ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Mon, 11 Sep 2023 14:15:51 -0600 Subject: [PATCH 044/167] Migrate FV specs to CVL2 (#4527) Co-authored-by: Hadrien Croubois --- certora/diff/token_ERC721_ERC721.sol.patch | 14 - .../AccessControlDefaultAdminRulesHarness.sol | 3 +- certora/harnesses/AccessControlHarness.sol | 3 +- certora/harnesses/DoubleEndedQueueHarness.sol | 3 +- certora/harnesses/ERC20PermitHarness.sol | 3 +- certora/harnesses/ERC20WrapperHarness.sol | 15 +- .../harnesses/ERC3156FlashBorrowerHarness.sol | 2 +- certora/harnesses/ERC721Harness.sol | 6 +- certora/harnesses/EnumerableMapHarness.sol | 2 +- certora/harnesses/EnumerableSetHarness.sol | 2 +- certora/harnesses/InitializableHarness.sol | 18 +- certora/harnesses/Ownable2StepHarness.sol | 7 +- certora/harnesses/OwnableHarness.sol | 7 +- certora/harnesses/PausableHarness.sol | 3 +- .../harnesses/TimelockControllerHarness.sol | 3 +- certora/run.js | 8 +- certora/specs/AccessControl.spec | 245 ++++++------ .../specs/AccessControlDefaultAdminRules.spec | 56 +-- certora/specs/ERC20.spec | 80 ++-- certora/specs/ERC20FlashMint.spec | 41 +- certora/specs/ERC20Wrapper.spec | 64 ++-- certora/specs/ERC721.spec | 350 +++++++++++------- certora/specs/EnumerableMap.spec | 65 ++-- certora/specs/EnumerableSet.spec | 49 ++- certora/specs/Initializable.spec | 38 +- certora/specs/Ownable.spec | 155 ++++---- certora/specs/Ownable2Step.spec | 216 +++++------ certora/specs/Pausable.spec | 192 +++++----- certora/specs/TimelockController.spec | 129 ++++--- certora/specs/methods/IAccessControl.spec | 11 +- .../IAccessControlDefaultAdminRules.spec | 32 +- certora/specs/methods/IERC20.spec | 18 +- certora/specs/methods/IERC2612.spec | 6 +- certora/specs/methods/IERC3156.spec | 5 - .../specs/methods/IERC3156FlashBorrower.spec | 3 + .../specs/methods/IERC3156FlashLender.spec | 5 + certora/specs/methods/IERC5313.spec | 2 +- certora/specs/methods/IERC721.spec | 27 +- certora/specs/methods/IERC721Receiver.spec | 3 + certora/specs/methods/IOwnable.spec | 6 +- certora/specs/methods/IOwnable2Step.spec | 10 +- requirements.txt | 2 +- 42 files changed, 1002 insertions(+), 907 deletions(-) delete mode 100644 certora/diff/token_ERC721_ERC721.sol.patch delete mode 100644 certora/specs/methods/IERC3156.spec create mode 100644 certora/specs/methods/IERC3156FlashBorrower.spec create mode 100644 certora/specs/methods/IERC3156FlashLender.spec create mode 100644 certora/specs/methods/IERC721Receiver.spec diff --git a/certora/diff/token_ERC721_ERC721.sol.patch b/certora/diff/token_ERC721_ERC721.sol.patch deleted file mode 100644 index c3eae357a..000000000 --- a/certora/diff/token_ERC721_ERC721.sol.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- token/ERC721/ERC721.sol 2023-03-07 10:48:47.736822221 +0100 -+++ token/ERC721/ERC721.sol 2023-03-09 19:49:39.669338673 +0100 -@@ -199,6 +199,11 @@ - return _owners[tokenId]; - } - -+ // FV -+ function _getApproved(uint256 tokenId) internal view returns (address) { -+ return _tokenApprovals[tokenId]; -+ } -+ - /** - * @dev Returns whether `tokenId` exists. - * diff --git a/certora/harnesses/AccessControlDefaultAdminRulesHarness.sol b/certora/harnesses/AccessControlDefaultAdminRulesHarness.sol index 145f65b76..e96883fa2 100644 --- a/certora/harnesses/AccessControlDefaultAdminRulesHarness.sol +++ b/certora/harnesses/AccessControlDefaultAdminRulesHarness.sol @@ -1,8 +1,7 @@ // SPDX-License-Identifier: MIT - pragma solidity ^0.8.20; -import "../patched/access/AccessControlDefaultAdminRules.sol"; +import {AccessControlDefaultAdminRules} from "../patched/access/extensions/AccessControlDefaultAdminRules.sol"; contract AccessControlDefaultAdminRulesHarness is AccessControlDefaultAdminRules { uint48 private _delayIncreaseWait; diff --git a/certora/harnesses/AccessControlHarness.sol b/certora/harnesses/AccessControlHarness.sol index 42a536af1..e862d3eca 100644 --- a/certora/harnesses/AccessControlHarness.sol +++ b/certora/harnesses/AccessControlHarness.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT - pragma solidity ^0.8.20; -import "../patched/access/AccessControl.sol"; +import {AccessControl} from "../patched/access/AccessControl.sol"; contract AccessControlHarness is AccessControl {} diff --git a/certora/harnesses/DoubleEndedQueueHarness.sol b/certora/harnesses/DoubleEndedQueueHarness.sol index 54852a739..d684c7382 100644 --- a/certora/harnesses/DoubleEndedQueueHarness.sol +++ b/certora/harnesses/DoubleEndedQueueHarness.sol @@ -1,8 +1,7 @@ // SPDX-License-Identifier: MIT - pragma solidity ^0.8.20; -import "../patched/utils/structs/DoubleEndedQueue.sol"; +import {DoubleEndedQueue} from "../patched/utils/structs/DoubleEndedQueue.sol"; contract DoubleEndedQueueHarness { using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque; diff --git a/certora/harnesses/ERC20PermitHarness.sol b/certora/harnesses/ERC20PermitHarness.sol index 1041c1715..08113f4ea 100644 --- a/certora/harnesses/ERC20PermitHarness.sol +++ b/certora/harnesses/ERC20PermitHarness.sol @@ -1,8 +1,7 @@ // SPDX-License-Identifier: MIT - pragma solidity ^0.8.20; -import "../patched/token/ERC20/extensions/ERC20Permit.sol"; +import {ERC20Permit, ERC20} from "../patched/token/ERC20/extensions/ERC20Permit.sol"; contract ERC20PermitHarness is ERC20Permit { constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {} diff --git a/certora/harnesses/ERC20WrapperHarness.sol b/certora/harnesses/ERC20WrapperHarness.sol index 5e55e4b72..ca183ad92 100644 --- a/certora/harnesses/ERC20WrapperHarness.sol +++ b/certora/harnesses/ERC20WrapperHarness.sol @@ -2,10 +2,15 @@ pragma solidity ^0.8.20; -import "../patched/token/ERC20/extensions/ERC20Wrapper.sol"; +import {ERC20Permit} from "../patched/token/ERC20/extensions/ERC20Permit.sol"; +import {ERC20Wrapper, IERC20, ERC20} from "../patched/token/ERC20/extensions/ERC20Wrapper.sol"; -contract ERC20WrapperHarness is ERC20Wrapper { - constructor(IERC20 _underlying, string memory _name, string memory _symbol) ERC20(_name, _symbol) ERC20Wrapper(_underlying) {} +contract ERC20WrapperHarness is ERC20Permit, ERC20Wrapper { + constructor( + IERC20 _underlying, + string memory _name, + string memory _symbol + ) ERC20(_name, _symbol) ERC20Permit(_name) ERC20Wrapper(_underlying) {} function underlyingTotalSupply() public view returns (uint256) { return underlying().totalSupply(); @@ -22,4 +27,8 @@ contract ERC20WrapperHarness is ERC20Wrapper { function recover(address account) public returns (uint256) { return _recover(account); } + + function decimals() public view override(ERC20Wrapper, ERC20) returns (uint8) { + return super.decimals(); + } } diff --git a/certora/harnesses/ERC3156FlashBorrowerHarness.sol b/certora/harnesses/ERC3156FlashBorrowerHarness.sol index 81dfdaf31..1c76da2d4 100644 --- a/certora/harnesses/ERC3156FlashBorrowerHarness.sol +++ b/certora/harnesses/ERC3156FlashBorrowerHarness.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -import "../patched/interfaces/IERC3156FlashBorrower.sol"; +import {IERC3156FlashBorrower} from "../patched/interfaces/IERC3156FlashBorrower.sol"; pragma solidity ^0.8.20; diff --git a/certora/harnesses/ERC721Harness.sol b/certora/harnesses/ERC721Harness.sol index b0afb589c..69c4c205a 100644 --- a/certora/harnesses/ERC721Harness.sol +++ b/certora/harnesses/ERC721Harness.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; -import "../patched/token/ERC721/ERC721.sol"; +import {ERC721} from "../patched/token/ERC721/ERC721.sol"; contract ERC721Harness is ERC721 { constructor(string memory name, string memory symbol) ERC721(name, symbol) {} @@ -23,10 +23,6 @@ contract ERC721Harness is ERC721 { _burn(tokenId); } - function tokenExists(uint256 tokenId) external view returns (bool) { - return _exists(tokenId); - } - function unsafeOwnerOf(uint256 tokenId) external view returns (address) { return _ownerOf(tokenId); } diff --git a/certora/harnesses/EnumerableMapHarness.sol b/certora/harnesses/EnumerableMapHarness.sol index 2b9a8e47c..5c2f3229b 100644 --- a/certora/harnesses/EnumerableMapHarness.sol +++ b/certora/harnesses/EnumerableMapHarness.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; -import "../patched/utils/structs/EnumerableMap.sol"; +import {EnumerableMap} from "../patched/utils/structs/EnumerableMap.sol"; contract EnumerableMapHarness { using EnumerableMap for EnumerableMap.Bytes32ToBytes32Map; diff --git a/certora/harnesses/EnumerableSetHarness.sol b/certora/harnesses/EnumerableSetHarness.sol index 1f4cac7d9..3d18b183b 100644 --- a/certora/harnesses/EnumerableSetHarness.sol +++ b/certora/harnesses/EnumerableSetHarness.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; -import "../patched/utils/structs/EnumerableSet.sol"; +import {EnumerableSet} from "../patched/utils/structs/EnumerableSet.sol"; contract EnumerableSetHarness { using EnumerableSet for EnumerableSet.Bytes32Set; diff --git a/certora/harnesses/InitializableHarness.sol b/certora/harnesses/InitializableHarness.sol index 0d0c0a4e4..743d677dd 100644 --- a/certora/harnesses/InitializableHarness.sol +++ b/certora/harnesses/InitializableHarness.sol @@ -1,19 +1,19 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; -import "../patched/proxy/utils/Initializable.sol"; +import {Initializable} from "../patched/proxy/utils/Initializable.sol"; contract InitializableHarness is Initializable { - function initialize() public initializer {} - function reinitialize(uint8 n) public reinitializer(n) {} - function disable() public { _disableInitializers(); } + function initialize() public initializer {} + function reinitialize(uint64 n) public reinitializer(n) {} + function disable() public { _disableInitializers(); } - function nested_init_init() public initializer { initialize(); } - function nested_init_reinit(uint8 m) public initializer { reinitialize(m); } - function nested_reinit_init(uint8 n) public reinitializer(n) { initialize(); } - function nested_reinit_reinit(uint8 n, uint8 m) public reinitializer(n) { reinitialize(m); } + function nested_init_init() public initializer { initialize(); } + function nested_init_reinit(uint64 m) public initializer { reinitialize(m); } + function nested_reinit_init(uint64 n) public reinitializer(n) { initialize(); } + function nested_reinit_reinit(uint64 n, uint64 m) public reinitializer(n) { reinitialize(m); } - function version() public view returns (uint8) { + function version() public view returns (uint64) { return _getInitializedVersion(); } diff --git a/certora/harnesses/Ownable2StepHarness.sol b/certora/harnesses/Ownable2StepHarness.sol index aed6f5854..09a5faa23 100644 --- a/certora/harnesses/Ownable2StepHarness.sol +++ b/certora/harnesses/Ownable2StepHarness.sol @@ -1,9 +1,10 @@ // SPDX-License-Identifier: MIT - pragma solidity ^0.8.20; -import "../patched/access/Ownable2Step.sol"; +import {Ownable2Step, Ownable} from "../patched/access/Ownable2Step.sol"; contract Ownable2StepHarness is Ownable2Step { - function restricted() external onlyOwner {} + constructor(address initialOwner) Ownable(initialOwner) {} + + function restricted() external onlyOwner {} } diff --git a/certora/harnesses/OwnableHarness.sol b/certora/harnesses/OwnableHarness.sol index 45666772a..79b4b1b6c 100644 --- a/certora/harnesses/OwnableHarness.sol +++ b/certora/harnesses/OwnableHarness.sol @@ -1,9 +1,10 @@ // SPDX-License-Identifier: MIT - pragma solidity ^0.8.20; -import "../patched/access/Ownable.sol"; +import {Ownable} from "../patched/access/Ownable.sol"; contract OwnableHarness is Ownable { - function restricted() external onlyOwner {} + constructor(address initialOwner) Ownable(initialOwner) {} + + function restricted() external onlyOwner {} } diff --git a/certora/harnesses/PausableHarness.sol b/certora/harnesses/PausableHarness.sol index 12f946709..5977b9202 100644 --- a/certora/harnesses/PausableHarness.sol +++ b/certora/harnesses/PausableHarness.sol @@ -1,8 +1,7 @@ // SPDX-License-Identifier: MIT - pragma solidity ^0.8.20; -import "../patched/utils/Pausable.sol"; +import {Pausable} from "../patched/utils/Pausable.sol"; contract PausableHarness is Pausable { function pause() external { diff --git a/certora/harnesses/TimelockControllerHarness.sol b/certora/harnesses/TimelockControllerHarness.sol index 476a8376c..95ae40621 100644 --- a/certora/harnesses/TimelockControllerHarness.sol +++ b/certora/harnesses/TimelockControllerHarness.sol @@ -1,6 +1,7 @@ +// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; -import "../patched/governance/TimelockController.sol"; +import {TimelockController} from "../patched/governance/TimelockController.sol"; contract TimelockControllerHarness is TimelockController { constructor( diff --git a/certora/run.js b/certora/run.js index 68f34aab2..7b65534ea 100755 --- a/certora/run.js +++ b/certora/run.js @@ -64,7 +64,13 @@ if (process.exitCode) { } for (const { spec, contract, files, options = [] } of specs) { - limit(runCertora, spec, contract, files, [...options.flatMap(opt => opt.split(' ')), ...argv.options]); + limit( + runCertora, + spec, + contract, + files, + [...options, ...argv.options].flatMap(opt => opt.split(' ')), + ); } // Run certora, aggregate the output and print it at the end diff --git a/certora/specs/AccessControl.spec b/certora/specs/AccessControl.spec index cd5af2a99..70b067218 100644 --- a/certora/specs/AccessControl.spec +++ b/certora/specs/AccessControl.spec @@ -1,126 +1,119 @@ -import "helpers/helpers.spec" -import "methods/IAccessControl.spec" - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Definitions │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -definition DEFAULT_ADMIN_ROLE() returns bytes32 = 0x0000000000000000000000000000000000000000000000000000000000000000; - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Identify entrypoints: only grantRole, revokeRole and renounceRole can alter permissions │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule onlyGrantCanGrant(env e, method f, bytes32 role, address account) { - calldataarg args; - - bool hasRoleBefore = hasRole(role, account); - f(e, args); - bool hasRoleAfter = hasRole(role, account); - - assert ( - !hasRoleBefore && - hasRoleAfter - ) => ( - f.selector == grantRole(bytes32, address).selector - ); - - assert ( - hasRoleBefore && - !hasRoleAfter - ) => ( - f.selector == revokeRole(bytes32, address).selector || - f.selector == renounceRole(bytes32, address).selector - ); -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: grantRole only affects the specified user/role combo │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule grantRoleEffect(env e, bytes32 role) { - require nonpayable(e); - - bytes32 otherRole; - address account; - address otherAccount; - - bool isCallerAdmin = hasRole(getRoleAdmin(role), e.msg.sender); - bool hasOtherRoleBefore = hasRole(otherRole, otherAccount); - - grantRole@withrevert(e, role, account); - bool success = !lastReverted; - - bool hasOtherRoleAfter = hasRole(otherRole, otherAccount); - - // liveness - assert success <=> isCallerAdmin; - - // effect - assert success => hasRole(role, account); - - // no side effect - assert hasOtherRoleBefore != hasOtherRoleAfter => (role == otherRole && account == otherAccount); -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: revokeRole only affects the specified user/role combo │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule revokeRoleEffect(env e, bytes32 role) { - require nonpayable(e); - - bytes32 otherRole; - address account; - address otherAccount; - - bool isCallerAdmin = hasRole(getRoleAdmin(role), e.msg.sender); - bool hasOtherRoleBefore = hasRole(otherRole, otherAccount); - - revokeRole@withrevert(e, role, account); - bool success = !lastReverted; - - bool hasOtherRoleAfter = hasRole(otherRole, otherAccount); - - // liveness - assert success <=> isCallerAdmin; - - // effect - assert success => !hasRole(role, account); - - // no side effect - assert hasOtherRoleBefore != hasOtherRoleAfter => (role == otherRole && account == otherAccount); -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: renounceRole only affects the specified user/role combo │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule renounceRoleEffect(env e, bytes32 role) { - require nonpayable(e); - - bytes32 otherRole; - address account; - address otherAccount; - - bool hasOtherRoleBefore = hasRole(otherRole, otherAccount); - - renounceRole@withrevert(e, role, account); - bool success = !lastReverted; - - bool hasOtherRoleAfter = hasRole(otherRole, otherAccount); - - // liveness - assert success <=> account == e.msg.sender; - - // effect - assert success => !hasRole(role, account); - - // no side effect - assert hasOtherRoleBefore != hasOtherRoleAfter => (role == otherRole && account == otherAccount); -} +import "helpers/helpers.spec"; +import "methods/IAccessControl.spec"; + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Identify entrypoints: only grantRole, revokeRole and renounceRole can alter permissions │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule onlyGrantCanGrant(env e, method f, bytes32 role, address account) { + calldataarg args; + + bool hasRoleBefore = hasRole(role, account); + f(e, args); + bool hasRoleAfter = hasRole(role, account); + + assert ( + !hasRoleBefore && + hasRoleAfter + ) => ( + f.selector == sig:grantRole(bytes32, address).selector + ); + + assert ( + hasRoleBefore && + !hasRoleAfter + ) => ( + f.selector == sig:revokeRole(bytes32, address).selector || + f.selector == sig:renounceRole(bytes32, address).selector + ); +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: grantRole only affects the specified user/role combo │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule grantRoleEffect(env e, bytes32 role) { + require nonpayable(e); + + bytes32 otherRole; + address account; + address otherAccount; + + bool isCallerAdmin = hasRole(getRoleAdmin(role), e.msg.sender); + bool hasOtherRoleBefore = hasRole(otherRole, otherAccount); + + grantRole@withrevert(e, role, account); + bool success = !lastReverted; + + bool hasOtherRoleAfter = hasRole(otherRole, otherAccount); + + // liveness + assert success <=> isCallerAdmin; + + // effect + assert success => hasRole(role, account); + + // no side effect + assert hasOtherRoleBefore != hasOtherRoleAfter => (role == otherRole && account == otherAccount); +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: revokeRole only affects the specified user/role combo │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule revokeRoleEffect(env e, bytes32 role) { + require nonpayable(e); + + bytes32 otherRole; + address account; + address otherAccount; + + bool isCallerAdmin = hasRole(getRoleAdmin(role), e.msg.sender); + bool hasOtherRoleBefore = hasRole(otherRole, otherAccount); + + revokeRole@withrevert(e, role, account); + bool success = !lastReverted; + + bool hasOtherRoleAfter = hasRole(otherRole, otherAccount); + + // liveness + assert success <=> isCallerAdmin; + + // effect + assert success => !hasRole(role, account); + + // no side effect + assert hasOtherRoleBefore != hasOtherRoleAfter => (role == otherRole && account == otherAccount); +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: renounceRole only affects the specified user/role combo │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule renounceRoleEffect(env e, bytes32 role) { + require nonpayable(e); + + bytes32 otherRole; + address account; + address otherAccount; + + bool hasOtherRoleBefore = hasRole(otherRole, otherAccount); + + renounceRole@withrevert(e, role, account); + bool success = !lastReverted; + + bool hasOtherRoleAfter = hasRole(otherRole, otherAccount); + + // liveness + assert success <=> account == e.msg.sender; + + // effect + assert success => !hasRole(role, account); + + // no side effect + assert hasOtherRoleBefore != hasOtherRoleAfter => (role == otherRole && account == otherAccount); +} diff --git a/certora/specs/AccessControlDefaultAdminRules.spec b/certora/specs/AccessControlDefaultAdminRules.spec index 58b9d1202..2f5bb9d45 100644 --- a/certora/specs/AccessControlDefaultAdminRules.spec +++ b/certora/specs/AccessControlDefaultAdminRules.spec @@ -1,28 +1,28 @@ -import "helpers/helpers.spec" -import "methods/IAccessControlDefaultAdminRules.spec" -import "methods/IAccessControl.spec" -import "AccessControl.spec" +import "helpers/helpers.spec"; +import "methods/IAccessControlDefaultAdminRules.spec"; +import "methods/IAccessControl.spec"; +import "AccessControl.spec"; use rule onlyGrantCanGrant filtered { - f -> f.selector != acceptDefaultAdminTransfer().selector + f -> f.selector != sig:acceptDefaultAdminTransfer().selector } /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Helpers │ +│ Definitions │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ definition timeSanity(env e) returns bool = - e.block.timestamp > 0 && e.block.timestamp + defaultAdminDelay(e) < max_uint48(); + e.block.timestamp > 0 && e.block.timestamp + defaultAdminDelay(e) < max_uint48; definition delayChangeWaitSanity(env e, uint48 newDelay) returns bool = - e.block.timestamp + delayChangeWait_(e, newDelay) < max_uint48(); + e.block.timestamp + delayChangeWait_(e, newDelay) < max_uint48; definition isSet(uint48 schedule) returns bool = schedule != 0; definition hasPassed(env e, uint48 schedule) returns bool = - schedule < e.block.timestamp; + assert_uint256(schedule) < e.block.timestamp; definition increasingDelaySchedule(env e, uint48 newDelay) returns mathint = e.block.timestamp + min(newDelay, defaultAdminDelayIncreaseWait()); @@ -63,7 +63,7 @@ invariant singleDefaultAdmin(address account, address another) └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant defaultAdminRoleAdminConsistency() - getRoleAdmin(DEFAULT_ADMIN_ROLE()) == DEFAULT_ADMIN_ROLE() + getRoleAdmin(DEFAULT_ADMIN_ROLE()) == DEFAULT_ADMIN_ROLE(); /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -71,7 +71,7 @@ invariant defaultAdminRoleAdminConsistency() └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant ownerConsistency() - defaultAdmin() == owner() + defaultAdmin() == owner(); /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -136,7 +136,7 @@ rule renounceRoleEffect(env e, bytes32 role) { account == e.msg.sender && ( role != DEFAULT_ADMIN_ROLE() || - account != adminBefore || + account != adminBefore || ( pendingAdminBefore == 0 && isSet(scheduleBefore) && @@ -185,8 +185,8 @@ rule noDefaultAdminChange(env e, method f, calldataarg args) { address adminAfter = defaultAdmin(); assert adminBefore != adminAfter => ( - f.selector == acceptDefaultAdminTransfer().selector || - f.selector == renounceRole(bytes32,address).selector + f.selector == sig:acceptDefaultAdminTransfer().selector || + f.selector == sig:renounceRole(bytes32,address).selector ), "default admin is only affected by accepting an admin transfer or renoucing"; } @@ -199,19 +199,19 @@ rule noDefaultAdminChange(env e, method f, calldataarg args) { */ rule noPendingDefaultAdminChange(env e, method f, calldataarg args) { address pendingAdminBefore = pendingDefaultAdmin_(); - address scheduleBefore = pendingDefaultAdminSchedule_(); + uint48 scheduleBefore = pendingDefaultAdminSchedule_(); f(e, args); address pendingAdminAfter = pendingDefaultAdmin_(); - address scheduleAfter = pendingDefaultAdminSchedule_(); + uint48 scheduleAfter = pendingDefaultAdminSchedule_(); assert ( pendingAdminBefore != pendingAdminAfter || scheduleBefore != scheduleAfter ) => ( - f.selector == beginDefaultAdminTransfer(address).selector || - f.selector == acceptDefaultAdminTransfer().selector || - f.selector == cancelDefaultAdminTransfer().selector || - f.selector == renounceRole(bytes32,address).selector + f.selector == sig:beginDefaultAdminTransfer(address).selector || + f.selector == sig:acceptDefaultAdminTransfer().selector || + f.selector == sig:cancelDefaultAdminTransfer().selector || + f.selector == sig:renounceRole(bytes32,address).selector ), "pending admin and its schedule is only affected by beginning, completing, or cancelling an admin transfer"; } @@ -241,8 +241,8 @@ rule noPendingDefaultAdminDelayChange(env e, method f, calldataarg args) { uint48 pendingDelayAfter = pendingDelay_(e); assert pendingDelayBefore != pendingDelayAfter => ( - f.selector == changeDefaultAdminDelay(uint48).selector || - f.selector == rollbackDefaultAdminDelay().selector + f.selector == sig:changeDefaultAdminDelay(uint48).selector || + f.selector == sig:rollbackDefaultAdminDelay().selector ), "pending delay is only affected by changeDefaultAdminDelay or rollbackDefaultAdminDelay"; } @@ -282,7 +282,7 @@ rule beginDefaultAdminTransfer(env e, address newAdmin) { // effect assert success => pendingDefaultAdmin_() == newAdmin, "pending default admin is set"; - assert success => pendingDefaultAdminSchedule_() == e.block.timestamp + defaultAdminDelay(e), + assert success => to_mathint(pendingDefaultAdminSchedule_()) == e.block.timestamp + defaultAdminDelay(e), "pending default admin delay is set"; } @@ -307,7 +307,7 @@ rule pendingDefaultAdminDelayEnforced(env e1, env e2, method f, calldataarg args // change can only happen towards the newAdmin, with the delay assert adminAfter != adminBefore => ( adminAfter == newAdmin && - e2.block.timestamp >= e1.block.timestamp + delayBefore + to_mathint(e2.block.timestamp) >= e1.block.timestamp + delayBefore ), "The admin can only change after the enforced delay and to the previously scheduled new admin"; } @@ -393,7 +393,7 @@ rule changeDefaultAdminDelay(env e, uint48 newDelay) { "pending delay is set"; assert success => ( - pendingDelaySchedule_(e) > e.block.timestamp || + assert_uint256(pendingDelaySchedule_(e)) > e.block.timestamp || delayBefore == newDelay || // Interpreted as decreasing, x - x = 0 defaultAdminDelayIncreaseWait() == 0 ), @@ -419,7 +419,7 @@ rule pendingDelayWaitEnforced(env e1, env e2, method f, calldataarg args, uint48 assert delayAfter != delayBefore => ( delayAfter == newDelay && - e2.block.timestamp >= delayWait + to_mathint(e2.block.timestamp) >= delayWait ), "A delay can only change after the applied schedule"; } @@ -433,9 +433,9 @@ rule pendingDelayWait(env e, uint48 newDelay) { uint48 oldDelay = defaultAdminDelay(e); changeDefaultAdminDelay(e, newDelay); - assert newDelay > oldDelay => pendingDelaySchedule_(e) == increasingDelaySchedule(e, newDelay), + assert newDelay > oldDelay => to_mathint(pendingDelaySchedule_(e)) == increasingDelaySchedule(e, newDelay), "Delay wait is the minimum between the new delay and a threshold when the delay is increased"; - assert newDelay <= oldDelay => pendingDelaySchedule_(e) == decreasingDelaySchedule(e, newDelay), + assert newDelay <= oldDelay => to_mathint(pendingDelaySchedule_(e)) == decreasingDelaySchedule(e, newDelay), "Delay wait is the difference between the current and the new delay when the delay is decreased"; } diff --git a/certora/specs/ERC20.spec b/certora/specs/ERC20.spec index 3bd2b38ba..ee601bd19 100644 --- a/certora/specs/ERC20.spec +++ b/certora/specs/ERC20.spec @@ -1,15 +1,15 @@ -import "helpers/helpers.spec" -import "methods/IERC20.spec" -import "methods/IERC2612.spec" +import "helpers/helpers.spec"; +import "methods/IERC20.spec"; +import "methods/IERC2612.spec"; methods { // non standard ERC20 functions - increaseAllowance(address,uint256) returns (bool) - decreaseAllowance(address,uint256) returns (bool) + function increaseAllowance(address,uint256) external returns (bool); + function decreaseAllowance(address,uint256) external returns (bool); // exposed for FV - mint(address,uint256) - burn(address,uint256) + function mint(address,uint256) external; + function burn(address,uint256) external; } /* @@ -17,12 +17,22 @@ methods { │ Ghost & hooks: sum of all balances │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -ghost sumOfBalances() returns uint256 { - init_state axiom sumOfBalances() == 0; +ghost mathint sumOfBalances { + init_state axiom sumOfBalances == 0; +} + +// Because `balance` has a uint256 type, any balance addition in CVL1 behaved as a `require_uint256()` casting, +// leaving out the possibility of overflow. This is not the case in CVL2 where casting became more explicit. +// A counterexample in CVL2 is having an initial state where Alice initial balance is larger than totalSupply, which +// overflows Alice's balance when receiving a transfer. This is not possible unless the contract is deployed into an +// already used address (or upgraded from corrupted state). +// We restrict such behavior by making sure no balance is greater than the sum of balances. +hook Sload uint256 balance _balances[KEY address addr] STORAGE { + require sumOfBalances >= to_mathint(balance); } hook Sstore _balances[KEY address addr] uint256 newValue (uint256 oldValue) STORAGE { - havoc sumOfBalances assuming sumOfBalances@new() == sumOfBalances@old() + newValue - oldValue; + sumOfBalances = sumOfBalances - oldValue + newValue; } /* @@ -31,7 +41,7 @@ hook Sstore _balances[KEY address addr] uint256 newValue (uint256 oldValue) STOR └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant totalSupplyIsSumOfBalances() - totalSupply() == sumOfBalances() + to_mathint(totalSupply()) == sumOfBalances; /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -39,7 +49,7 @@ invariant totalSupplyIsSumOfBalances() └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant zeroAddressNoBalance() - balanceOf(0) == 0 + balanceOf(0) == 0; /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -56,8 +66,8 @@ rule noChangeTotalSupply(env e) { f(e, args); uint256 totalSupplyAfter = totalSupply(); - assert totalSupplyAfter > totalSupplyBefore => f.selector == mint(address,uint256).selector; - assert totalSupplyAfter < totalSupplyBefore => f.selector == burn(address,uint256).selector; + assert totalSupplyAfter > totalSupplyBefore => f.selector == sig:mint(address,uint256).selector; + assert totalSupplyAfter < totalSupplyBefore => f.selector == sig:burn(address,uint256).selector; } /* @@ -80,9 +90,9 @@ rule onlyAuthorizedCanTransfer(env e) { assert ( balanceAfter < balanceBefore ) => ( - f.selector == burn(address,uint256).selector || + f.selector == sig:burn(address,uint256).selector || e.msg.sender == account || - balanceBefore - balanceAfter <= allowanceBefore + balanceBefore - balanceAfter <= to_mathint(allowanceBefore) ); } @@ -106,18 +116,18 @@ rule onlyHolderOfSpenderCanChangeAllowance(env e) { assert ( allowanceAfter > allowanceBefore ) => ( - (f.selector == approve(address,uint256).selector && e.msg.sender == holder) || - (f.selector == increaseAllowance(address,uint256).selector && e.msg.sender == holder) || - (f.selector == permit(address,address,uint256,uint256,uint8,bytes32,bytes32).selector) + (f.selector == sig:approve(address,uint256).selector && e.msg.sender == holder) || + (f.selector == sig:increaseAllowance(address,uint256).selector && e.msg.sender == holder) || + (f.selector == sig:permit(address,address,uint256,uint256,uint8,bytes32,bytes32).selector) ); assert ( allowanceAfter < allowanceBefore ) => ( - (f.selector == transferFrom(address,address,uint256).selector && e.msg.sender == spender) || - (f.selector == approve(address,uint256).selector && e.msg.sender == holder ) || - (f.selector == decreaseAllowance(address,uint256).selector && e.msg.sender == holder ) || - (f.selector == permit(address,address,uint256,uint256,uint8,bytes32,bytes32).selector) + (f.selector == sig:transferFrom(address,address,uint256).selector && e.msg.sender == spender) || + (f.selector == sig:approve(address,uint256).selector && e.msg.sender == holder ) || + (f.selector == sig:decreaseAllowance(address,uint256).selector && e.msg.sender == holder ) || + (f.selector == sig:permit(address,address,uint256,uint256,uint8,bytes32,bytes32).selector) ); } @@ -147,8 +157,8 @@ rule mint(env e) { assert to == 0 || totalSupplyBefore + amount > max_uint256; } else { // updates balance and totalSupply - assert balanceOf(to) == toBalanceBefore + amount; - assert totalSupply() == totalSupplyBefore + amount; + assert to_mathint(balanceOf(to)) == toBalanceBefore + amount; + assert to_mathint(totalSupply()) == totalSupplyBefore + amount; // no other balance is modified assert balanceOf(other) != otherBalanceBefore => other == to; @@ -181,8 +191,8 @@ rule burn(env e) { assert from == 0 || fromBalanceBefore < amount; } else { // updates balance and totalSupply - assert balanceOf(from) == fromBalanceBefore - amount; - assert totalSupply() == totalSupplyBefore - amount; + assert to_mathint(balanceOf(from)) == fromBalanceBefore - amount; + assert to_mathint(totalSupply()) == totalSupplyBefore - amount; // no other balance is modified assert balanceOf(other) != otherBalanceBefore => other == from; @@ -216,8 +226,8 @@ rule transfer(env e) { assert holder == 0 || recipient == 0 || amount > holderBalanceBefore; } else { // balances of holder and recipient are updated - assert balanceOf(holder) == holderBalanceBefore - (holder == recipient ? 0 : amount); - assert balanceOf(recipient) == recipientBalanceBefore + (holder == recipient ? 0 : amount); + assert to_mathint(balanceOf(holder)) == holderBalanceBefore - (holder == recipient ? 0 : amount); + assert to_mathint(balanceOf(recipient)) == recipientBalanceBefore + (holder == recipient ? 0 : amount); // no other balance is modified assert balanceOf(other) != otherBalanceBefore => (other == holder || other == recipient); @@ -254,11 +264,11 @@ rule transferFrom(env e) { } else { // allowance is valid & updated assert allowanceBefore >= amount; - assert allowance(holder, spender) == (allowanceBefore == max_uint256 ? to_uint256(max_uint256) : allowanceBefore - amount); + assert to_mathint(allowance(holder, spender)) == (allowanceBefore == max_uint256 ? max_uint256 : allowanceBefore - amount); // balances of holder and recipient are updated - assert balanceOf(holder) == holderBalanceBefore - (holder == recipient ? 0 : amount); - assert balanceOf(recipient) == recipientBalanceBefore + (holder == recipient ? 0 : amount); + assert to_mathint(balanceOf(holder)) == holderBalanceBefore - (holder == recipient ? 0 : amount); + assert to_mathint(balanceOf(recipient)) == recipientBalanceBefore + (holder == recipient ? 0 : amount); // no other balance is modified assert balanceOf(other) != otherBalanceBefore => (other == holder || other == recipient); @@ -323,7 +333,7 @@ rule increaseAllowance(env e) { assert holder == 0 || spender == 0 || allowanceBefore + amount > max_uint256; } else { // allowance is updated - assert allowance(holder, spender) == allowanceBefore + amount; + assert to_mathint(allowance(holder, spender)) == allowanceBefore + amount; // other allowances are untouched assert allowance(otherHolder, otherSpender) != otherAllowanceBefore => (otherHolder == holder && otherSpender == spender); @@ -356,7 +366,7 @@ rule decreaseAllowance(env e) { assert holder == 0 || spender == 0 || allowanceBefore < amount; } else { // allowance is updated - assert allowance(holder, spender) == allowanceBefore - amount; + assert to_mathint(allowance(holder, spender)) == allowanceBefore - amount; // other allowances are untouched assert allowance(otherHolder, otherSpender) != otherAllowanceBefore => (otherHolder == holder && otherSpender == spender); @@ -402,7 +412,7 @@ rule permit(env e) { } else { // allowance and nonce are updated assert allowance(holder, spender) == amount; - assert nonces(holder) == nonceBefore + 1; + assert to_mathint(nonces(holder)) == nonceBefore + 1; // deadline was respected assert deadline >= e.block.timestamp; diff --git a/certora/specs/ERC20FlashMint.spec b/certora/specs/ERC20FlashMint.spec index 70a7c0795..5c87f0ded 100644 --- a/certora/specs/ERC20FlashMint.spec +++ b/certora/specs/ERC20FlashMint.spec @@ -1,15 +1,14 @@ -import "helpers/helpers.spec" -import "methods/IERC20.spec" -import "methods/IERC3156.spec" +import "helpers/helpers.spec"; +import "methods/IERC20.spec"; +import "methods/IERC3156FlashLender.spec"; +import "methods/IERC3156FlashBorrower.spec"; methods { // non standard ERC3156 functions - flashFeeReceiver() returns (address) envfree + function flashFeeReceiver() external returns (address) envfree; // function summaries below - _mint(address account, uint256 amount) => specMint(account, amount) - _burn(address account, uint256 amount) => specBurn(account, amount) - _transfer(address from, address to, uint256 amount) => specTransfer(from, to, amount) + function _._update(address from, address to, uint256 amount) internal => specUpdate(from, to, amount) expect void ALL; } /* @@ -17,13 +16,21 @@ methods { │ Ghost: track mint and burns in the CVL │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -ghost mapping(address => uint256) trackedMintAmount; -ghost mapping(address => uint256) trackedBurnAmount; -ghost mapping(address => mapping(address => uint256)) trackedTransferedAmount; - -function specMint(address account, uint256 amount) returns bool { trackedMintAmount[account] = amount; return true; } -function specBurn(address account, uint256 amount) returns bool { trackedBurnAmount[account] = amount; return true; } -function specTransfer(address from, address to, uint256 amount) returns bool { trackedTransferedAmount[from][to] = amount; return true; } +ghost mapping(address => mathint) trackedMintAmount; +ghost mapping(address => mathint) trackedBurnAmount; +ghost mapping(address => mapping(address => mathint)) trackedTransferedAmount; + +function specUpdate(address from, address to, uint256 amount) { + if (from == 0 && to == 0) { assert(false); } // defensive + + if (from == 0) { + trackedMintAmount[to] = amount; + } else if (to == 0) { + trackedBurnAmount[from] = amount; + } else { + trackedTransferedAmount[from][to] = amount; + } +} /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -42,7 +49,7 @@ rule checkMintAndBurn(env e) { flashLoan(e, receiver, token, amount, data); - assert trackedMintAmount[receiver] == amount; - assert trackedBurnAmount[receiver] == amount + (recipient == 0 ? fees : 0); - assert (fees > 0 && recipient != 0) => trackedTransferedAmount[receiver][recipient] == fees; + assert trackedMintAmount[receiver] == to_mathint(amount); + assert trackedBurnAmount[receiver] == amount + to_mathint(recipient == 0 ? fees : 0); + assert (fees > 0 && recipient != 0) => trackedTransferedAmount[receiver][recipient] == to_mathint(fees); } diff --git a/certora/specs/ERC20Wrapper.spec b/certora/specs/ERC20Wrapper.spec index badfa7a28..04e67042a 100644 --- a/certora/specs/ERC20Wrapper.spec +++ b/certora/specs/ERC20Wrapper.spec @@ -1,31 +1,29 @@ -import "helpers/helpers.spec" -import "ERC20.spec" +import "helpers/helpers.spec"; +import "ERC20.spec"; methods { - underlying() returns(address) envfree - underlyingTotalSupply() returns(uint256) envfree - underlyingBalanceOf(address) returns(uint256) envfree - underlyingAllowanceToThis(address) returns(uint256) envfree - - depositFor(address, uint256) returns(bool) - withdrawTo(address, uint256) returns(bool) - recover(address) returns(uint256) + function underlying() external returns(address) envfree; + function underlyingTotalSupply() external returns(uint256) envfree; + function underlyingBalanceOf(address) external returns(uint256) envfree; + function underlyingAllowanceToThis(address) external returns(uint256) envfree; + + function depositFor(address, uint256) external returns(bool); + function withdrawTo(address, uint256) external returns(bool); + function recover(address) external returns(uint256); } -use invariant totalSupplyIsSumOfBalances +use invariant totalSupplyIsSumOfBalances; /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Helper: consequence of `totalSupplyIsSumOfBalances` applied to underlying │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -function underlyingBalancesLowerThanUnderlyingSupply(address a) returns bool { - return underlyingBalanceOf(a) <= underlyingTotalSupply(); -} +definition underlyingBalancesLowerThanUnderlyingSupply(address a) returns bool = + underlyingBalanceOf(a) <= underlyingTotalSupply(); -function sumOfUnderlyingBalancesLowerThanUnderlyingSupply(address a, address b) returns bool { - return a != b => underlyingBalanceOf(a) + underlyingBalanceOf(b) <= underlyingTotalSupply(); -} +definition sumOfUnderlyingBalancesLowerThanUnderlyingSupply(address a, address b) returns bool = + a != b => underlyingBalanceOf(a) + underlyingBalanceOf(b) <= to_mathint(underlyingTotalSupply()); /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -47,7 +45,7 @@ invariant totalSupplyIsSmallerThanUnderlyingBalance() } invariant noSelfWrap() - currentContract != underlying() + currentContract != underlying(); /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -85,6 +83,7 @@ rule depositFor(env e) { assert success <=> ( sender != currentContract && // invalid sender sender != 0 && // invalid sender + receiver != currentContract && // invalid receiver receiver != 0 && // invalid receiver amount <= senderUnderlyingBalanceBefore && // deposit doesn't exceed balance amount <= senderUnderlyingAllowanceBefore // deposit doesn't exceed allowance @@ -92,10 +91,10 @@ rule depositFor(env e) { // effects assert success => ( - balanceOf(receiver) == balanceBefore + amount && - totalSupply() == supplyBefore + amount && - underlyingBalanceOf(currentContract) == wrapperUnderlyingBalanceBefore + amount && - underlyingBalanceOf(sender) == senderUnderlyingBalanceBefore - amount + to_mathint(balanceOf(receiver)) == balanceBefore + amount && + to_mathint(totalSupply()) == supplyBefore + amount && + to_mathint(underlyingBalanceOf(currentContract)) == wrapperUnderlyingBalanceBefore + amount && + to_mathint(underlyingBalanceOf(sender)) == senderUnderlyingBalanceBefore - amount ); // no side effect @@ -137,17 +136,18 @@ rule withdrawTo(env e) { // liveness assert success <=> ( - sender != 0 && // invalid sender - receiver != 0 && // invalid receiver - amount <= balanceBefore // withdraw doesn't exceed balance + sender != 0 && // invalid sender + receiver != currentContract && // invalid receiver + receiver != 0 && // invalid receiver + amount <= balanceBefore // withdraw doesn't exceed balance ); // effects assert success => ( - balanceOf(sender) == balanceBefore - amount && - totalSupply() == supplyBefore - amount && - underlyingBalanceOf(currentContract) == wrapperUnderlyingBalanceBefore - (currentContract != receiver ? amount : 0) && - underlyingBalanceOf(receiver) == receiverUnderlyingBalanceBefore + (currentContract != receiver ? amount : 0) + to_mathint(balanceOf(sender)) == balanceBefore - amount && + to_mathint(totalSupply()) == supplyBefore - amount && + to_mathint(underlyingBalanceOf(currentContract)) == wrapperUnderlyingBalanceBefore - (currentContract != receiver ? amount : 0) && + to_mathint(underlyingBalanceOf(receiver)) == receiverUnderlyingBalanceBefore + (currentContract != receiver ? amount : 0) ); // no side effect @@ -172,7 +172,7 @@ rule recover(env e) { requireInvariant totalSupplyIsSumOfBalances; requireInvariant totalSupplyIsSmallerThanUnderlyingBalance; - uint256 value = underlyingBalanceOf(currentContract) - totalSupply(); + mathint value = underlyingBalanceOf(currentContract) - totalSupply(); uint256 supplyBefore = totalSupply(); uint256 balanceBefore = balanceOf(receiver); @@ -187,8 +187,8 @@ rule recover(env e) { // effect assert success => ( - balanceOf(receiver) == balanceBefore + value && - totalSupply() == supplyBefore + value && + to_mathint(balanceOf(receiver)) == balanceBefore + value && + to_mathint(totalSupply()) == supplyBefore + value && totalSupply() == underlyingBalanceOf(currentContract) ); diff --git a/certora/specs/ERC721.spec b/certora/specs/ERC721.spec index 9db13f45c..bad4c4737 100644 --- a/certora/specs/ERC721.spec +++ b/certora/specs/ERC721.spec @@ -1,16 +1,16 @@ -import "helpers/helpers.spec" -import "methods/IERC721.spec" +import "helpers/helpers.spec"; +import "methods/IERC721.spec"; +import "methods/IERC721Receiver.spec"; methods { // exposed for FV - mint(address,uint256) - safeMint(address,uint256) - safeMint(address,uint256,bytes) - burn(uint256) - - tokenExists(uint256) returns (bool) envfree - unsafeOwnerOf(uint256) returns (address) envfree - unsafeGetApproved(uint256) returns (address) envfree + function mint(address,uint256) external; + function safeMint(address,uint256) external; + function safeMint(address,uint256,bytes) external; + function burn(uint256) external; + + function unsafeOwnerOf(uint256) external returns (address) envfree; + function unsafeGetApproved(uint256) external returns (address) envfree; } /* @@ -19,17 +19,17 @@ methods { └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ +definition authSanity(env e) returns bool = e.msg.sender != 0; + // Could be broken in theory, but not in practice -function balanceLimited(address account) returns bool { - return balanceOf(account) < max_uint256; -} +definition balanceLimited(address account) returns bool = balanceOf(account) < max_uint256; function helperTransferWithRevert(env e, method f, address from, address to, uint256 tokenId) { - if (f.selector == transferFrom(address,address,uint256).selector) { + if (f.selector == sig:transferFrom(address,address,uint256).selector) { transferFrom@withrevert(e, from, to, tokenId); - } else if (f.selector == safeTransferFrom(address,address,uint256).selector) { + } else if (f.selector == sig:safeTransferFrom(address,address,uint256).selector) { safeTransferFrom@withrevert(e, from, to, tokenId); - } else if (f.selector == safeTransferFrom(address,address,uint256,bytes).selector) { + } else if (f.selector == sig:safeTransferFrom(address,address,uint256,bytes).selector) { bytes params; require params.length < 0xffff; safeTransferFrom@withrevert(e, from, to, tokenId, params); @@ -40,11 +40,11 @@ function helperTransferWithRevert(env e, method f, address from, address to, uin } function helperMintWithRevert(env e, method f, address to, uint256 tokenId) { - if (f.selector == mint(address,uint256).selector) { + if (f.selector == sig:mint(address,uint256).selector) { mint@withrevert(e, to, tokenId); - } else if (f.selector == safeMint(address,uint256).selector) { + } else if (f.selector == sig:safeMint(address,uint256).selector) { safeMint@withrevert(e, to, tokenId); - } else if (f.selector == safeMint(address,uint256,bytes).selector) { + } else if (f.selector == sig:safeMint(address,uint256,bytes).selector) { bytes params; require params.length < 0xffff; safeMint@withrevert(e, to, tokenId, params); @@ -53,26 +53,70 @@ function helperMintWithRevert(env e, method f, address to, uint256 tokenId) { } } +function helperSoundFnCall(env e, method f) { + if (f.selector == sig:mint(address,uint256).selector) { + address to; uint256 tokenId; + require balanceLimited(to); + requireInvariant notMintedUnset(tokenId); + mint(e, to, tokenId); + } else if (f.selector == sig:safeMint(address,uint256).selector) { + address to; uint256 tokenId; + require balanceLimited(to); + requireInvariant notMintedUnset(tokenId); + safeMint(e, to, tokenId); + } else if (f.selector == sig:safeMint(address,uint256,bytes).selector) { + address to; uint256 tokenId; bytes data; + require data.length < 0xffff; + require balanceLimited(to); + requireInvariant notMintedUnset(tokenId); + safeMint(e, to, tokenId, data); + } else if (f.selector == sig:burn(uint256).selector) { + uint256 tokenId; + requireInvariant ownerHasBalance(tokenId); + requireInvariant notMintedUnset(tokenId); + burn(e, tokenId); + } else if (f.selector == sig:transferFrom(address,address,uint256).selector) { + address from; address to; uint256 tokenId; + require balanceLimited(to); + requireInvariant ownerHasBalance(tokenId); + requireInvariant notMintedUnset(tokenId); + transferFrom(e, from, to, tokenId); + } else if (f.selector == sig:safeTransferFrom(address,address,uint256).selector) { + address from; address to; uint256 tokenId; + require balanceLimited(to); + requireInvariant ownerHasBalance(tokenId); + requireInvariant notMintedUnset(tokenId); + safeTransferFrom(e, from, to, tokenId); + } else if (f.selector == sig:safeTransferFrom(address,address,uint256,bytes).selector) { + address from; address to; uint256 tokenId; bytes data; + require data.length < 0xffff; + require balanceLimited(to); + requireInvariant ownerHasBalance(tokenId); + requireInvariant notMintedUnset(tokenId); + safeTransferFrom(e, from, to, tokenId, data); + } else { + calldataarg args; + f(e, args); + } +} + /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Ghost & hooks: ownership count │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -ghost ownedTotal() returns uint256 { - init_state axiom ownedTotal() == 0; +ghost mathint _ownedTotal { + init_state axiom _ownedTotal == 0; } -ghost mapping(address => uint256) ownedByUser { - init_state axiom forall address a. ownedByUser[a] == 0; +ghost mapping(address => mathint) _ownedByUser { + init_state axiom forall address a. _ownedByUser[a] == 0; } hook Sstore _owners[KEY uint256 tokenId] address newOwner (address oldOwner) STORAGE { - ownedByUser[newOwner] = ownedByUser[newOwner] + to_uint256(newOwner != 0 ? 1 : 0); - ownedByUser[oldOwner] = ownedByUser[oldOwner] - to_uint256(oldOwner != 0 ? 1 : 0); - - havoc ownedTotal assuming ownedTotal@new() == ownedTotal@old() - + to_uint256(newOwner != 0 ? 1 : 0) - - to_uint256(oldOwner != 0 ? 1 : 0); + _ownedByUser[newOwner] = _ownedByUser[newOwner] + to_mathint(newOwner != 0 ? 1 : 0); + _ownedByUser[oldOwner] = _ownedByUser[oldOwner] - to_mathint(oldOwner != 0 ? 1 : 0); + _ownedTotal = _ownedTotal + to_mathint(newOwner != 0 ? 1 : 0) - to_mathint(oldOwner != 0 ? 1 : 0); } /* @@ -80,29 +124,64 @@ hook Sstore _owners[KEY uint256 tokenId] address newOwner (address oldOwner) STO │ Ghost & hooks: sum of all balances │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -ghost sumOfBalances() returns uint256 { - init_state axiom sumOfBalances() == 0; +ghost mathint _supply { + init_state axiom _supply == 0; } -hook Sstore _balances[KEY address addr] uint256 newValue (uint256 oldValue) STORAGE { - havoc sumOfBalances assuming sumOfBalances@new() == sumOfBalances@old() + newValue - oldValue; +ghost mapping(address => mathint) _balances { + init_state axiom forall address a. _balances[a] == 0; } -ghost mapping(address => uint256) ghostBalanceOf { - init_state axiom forall address a. ghostBalanceOf[a] == 0; +hook Sstore _balances[KEY address addr] uint256 newValue (uint256 oldValue) STORAGE { + _supply = _supply - oldValue + newValue; } +// TODO: This used to not be necessary. We should try to remove it. In order to do so, we will probably need to add +// many "preserved" directive that require the "balanceOfConsistency" invariant on the accounts involved. hook Sload uint256 value _balances[KEY address user] STORAGE { - require ghostBalanceOf[user] == value; + require _balances[user] == to_mathint(value); } /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Invariant: ownedTotal is the sum of all balances │ +│ Invariant: number of owned tokens is the sum of all balances │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant ownedTotalIsSumOfBalances() - ownedTotal() == sumOfBalances() + _ownedTotal == _supply + { + preserved mint(address to, uint256 tokenId) with (env e) { + require balanceLimited(to); + } + preserved safeMint(address to, uint256 tokenId) with (env e) { + require balanceLimited(to); + } + preserved safeMint(address to, uint256 tokenId, bytes data) with (env e) { + require balanceLimited(to); + } + preserved burn(uint256 tokenId) with (env e) { + requireInvariant ownerHasBalance(tokenId); + requireInvariant balanceOfConsistency(ownerOf(tokenId)); + } + preserved transferFrom(address from, address to, uint256 tokenId) with (env e) { + require balanceLimited(to); + requireInvariant ownerHasBalance(tokenId); + requireInvariant balanceOfConsistency(from); + requireInvariant balanceOfConsistency(to); + } + preserved safeTransferFrom(address from, address to, uint256 tokenId) with (env e) { + require balanceLimited(to); + requireInvariant ownerHasBalance(tokenId); + requireInvariant balanceOfConsistency(from); + requireInvariant balanceOfConsistency(to); + } + preserved safeTransferFrom(address from, address to, uint256 tokenId, bytes data) with (env e) { + require balanceLimited(to); + requireInvariant ownerHasBalance(tokenId); + requireInvariant balanceOfConsistency(from); + requireInvariant balanceOfConsistency(to); + } + } /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -110,8 +189,8 @@ invariant ownedTotalIsSumOfBalances() └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant balanceOfConsistency(address user) - balanceOf(user) == ownedByUser[user] && - balanceOf(user) == ghostBalanceOf[user] + to_mathint(balanceOf(user)) == _ownedByUser[user] && + to_mathint(balanceOf(user)) == _balances[user] { preserved { require balanceLimited(user); @@ -134,53 +213,56 @@ invariant ownerHasBalance(uint256 tokenId) /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Invariant: tokens that do not exist are not owned and not approved │ +│ Rule: balance of address(0) is 0 │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -invariant notMintedUnset(uint256 tokenId) - (!tokenExists(tokenId) <=> unsafeOwnerOf(tokenId) == 0) && - (!tokenExists(tokenId) => unsafeGetApproved(tokenId) == 0) +rule zeroAddressBalanceRevert() { + balanceOf@withrevert(0); + assert lastReverted; +} /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Rule: ownerOf and getApproved revert if token does not exist │ +│ Invariant: address(0) has no authorized operator │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -rule notMintedRevert(uint256 tokenId) { - requireInvariant notMintedUnset(tokenId); - - bool e = tokenExists(tokenId); - - address owner = ownerOf@withrevert(tokenId); - assert e <=> !lastReverted; - assert e => owner == unsafeOwnerOf(tokenId); // notMintedUnset tells us this is non-zero - - address approved = getApproved@withrevert(tokenId); - assert e <=> !lastReverted; - assert e => approved == unsafeGetApproved(tokenId); -} +invariant zeroAddressHasNoApprovedOperator(address a) + !isApprovedForAll(0, a) + { + preserved with (env e) { + require nonzerosender(e); + } + } /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Rule: unsafeOwnerOf and unsafeGetApproved don't revert │ +│ Invariant: tokens that do not exist are not owned and not approved │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -rule unsafeDontRevert(uint256 tokenId) { - unsafeOwnerOf@withrevert(tokenId); - assert !lastReverted; - - unsafeGetApproved@withrevert(tokenId); - assert !lastReverted; -} +invariant notMintedUnset(uint256 tokenId) + unsafeOwnerOf(tokenId) == 0 => unsafeGetApproved(tokenId) == 0; /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Rule: balance of address(0) is 0 │ +│ Rule: unsafeOwnerOf and unsafeGetApproved don't revert + ownerOf and getApproved revert if token does not exist │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -rule zeroAddressBalanceRevert() { - balanceOf@withrevert(0); - assert lastReverted; +rule notMintedRevert(uint256 tokenId) { + requireInvariant notMintedUnset(tokenId); + + address _owner = unsafeOwnerOf@withrevert(tokenId); + assert !lastReverted; + + address _approved = unsafeGetApproved@withrevert(tokenId); + assert !lastReverted; + + address owner = ownerOf@withrevert(tokenId); + assert lastReverted <=> _owner == 0; + assert !lastReverted => _owner == owner; + + address approved = getApproved@withrevert(tokenId); + assert lastReverted <=> _owner == 0; + assert !lastReverted => _approved == approved; } /* @@ -189,21 +271,24 @@ rule zeroAddressBalanceRevert() { └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ rule supplyChange(env e) { - uint256 supplyBefore = ownedTotal(); - method f; calldataarg args; f(e, args); - uint256 supplyAfter = ownedTotal(); + require nonzerosender(e); + requireInvariant zeroAddressHasNoApprovedOperator(e.msg.sender); + + mathint supplyBefore = _supply; + method f; helperSoundFnCall(e, f); + mathint supplyAfter = _supply; assert supplyAfter > supplyBefore => ( supplyAfter == supplyBefore + 1 && ( - f.selector == mint(address,uint256).selector || - f.selector == safeMint(address,uint256).selector || - f.selector == safeMint(address,uint256,bytes).selector + f.selector == sig:mint(address,uint256).selector || + f.selector == sig:safeMint(address,uint256).selector || + f.selector == sig:safeMint(address,uint256,bytes).selector ) ); assert supplyAfter < supplyBefore => ( supplyAfter == supplyBefore - 1 && - f.selector == burn(uint256).selector + f.selector == sig:burn(uint256).selector ); } @@ -216,9 +301,9 @@ rule balanceChange(env e, address account) { requireInvariant balanceOfConsistency(account); require balanceLimited(account); - uint256 balanceBefore = balanceOf(account); - method f; calldataarg args; f(e, args); - uint256 balanceAfter = balanceOf(account); + mathint balanceBefore = balanceOf(account); + method f; helperSoundFnCall(e, f); + mathint balanceAfter = balanceOf(account); // balance can change by at most 1 assert balanceBefore != balanceAfter => ( @@ -228,13 +313,13 @@ rule balanceChange(env e, address account) { // only selected function can change balances assert balanceBefore != balanceAfter => ( - f.selector == transferFrom(address,address,uint256).selector || - f.selector == safeTransferFrom(address,address,uint256).selector || - f.selector == safeTransferFrom(address,address,uint256,bytes).selector || - f.selector == mint(address,uint256).selector || - f.selector == safeMint(address,uint256).selector || - f.selector == safeMint(address,uint256,bytes).selector || - f.selector == burn(uint256).selector + f.selector == sig:transferFrom(address,address,uint256).selector || + f.selector == sig:safeTransferFrom(address,address,uint256).selector || + f.selector == sig:safeTransferFrom(address,address,uint256,bytes).selector || + f.selector == sig:mint(address,uint256).selector || + f.selector == sig:safeMint(address,uint256).selector || + f.selector == sig:safeMint(address,uint256,bytes).selector || + f.selector == sig:burn(uint256).selector ); } @@ -244,24 +329,27 @@ rule balanceChange(env e, address account) { └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ rule ownershipChange(env e, uint256 tokenId) { + require nonzerosender(e); + requireInvariant zeroAddressHasNoApprovedOperator(e.msg.sender); + address ownerBefore = unsafeOwnerOf(tokenId); - method f; calldataarg args; f(e, args); + method f; helperSoundFnCall(e, f); address ownerAfter = unsafeOwnerOf(tokenId); assert ownerBefore == 0 && ownerAfter != 0 => ( - f.selector == mint(address,uint256).selector || - f.selector == safeMint(address,uint256).selector || - f.selector == safeMint(address,uint256,bytes).selector + f.selector == sig:mint(address,uint256).selector || + f.selector == sig:safeMint(address,uint256).selector || + f.selector == sig:safeMint(address,uint256,bytes).selector ); assert ownerBefore != 0 && ownerAfter == 0 => ( - f.selector == burn(uint256).selector + f.selector == sig:burn(uint256).selector ); assert (ownerBefore != ownerAfter && ownerBefore != 0 && ownerAfter != 0) => ( - f.selector == transferFrom(address,address,uint256).selector || - f.selector == safeTransferFrom(address,address,uint256).selector || - f.selector == safeTransferFrom(address,address,uint256,bytes).selector + f.selector == sig:transferFrom(address,address,uint256).selector || + f.selector == sig:safeTransferFrom(address,address,uint256).selector || + f.selector == sig:safeTransferFrom(address,address,uint256,bytes).selector ); } @@ -272,18 +360,18 @@ rule ownershipChange(env e, uint256 tokenId) { */ rule approvalChange(env e, uint256 tokenId) { address approvalBefore = unsafeGetApproved(tokenId); - method f; calldataarg args; f(e, args); + method f; helperSoundFnCall(e, f); address approvalAfter = unsafeGetApproved(tokenId); // approve can set any value, other functions reset assert approvalBefore != approvalAfter => ( - f.selector == approve(address,uint256).selector || + f.selector == sig:approve(address,uint256).selector || ( ( - f.selector == transferFrom(address,address,uint256).selector || - f.selector == safeTransferFrom(address,address,uint256).selector || - f.selector == safeTransferFrom(address,address,uint256,bytes).selector || - f.selector == burn(uint256).selector + f.selector == sig:transferFrom(address,address,uint256).selector || + f.selector == sig:safeTransferFrom(address,address,uint256).selector || + f.selector == sig:safeTransferFrom(address,address,uint256,bytes).selector || + f.selector == sig:burn(uint256).selector ) && approvalAfter == 0 ) ); @@ -296,10 +384,10 @@ rule approvalChange(env e, uint256 tokenId) { */ rule approvedForAllChange(env e, address owner, address spender) { bool approvedForAllBefore = isApprovedForAll(owner, spender); - method f; calldataarg args; f(e, args); + method f; helperSoundFnCall(e, f); bool approvedForAllAfter = isApprovedForAll(owner, spender); - assert approvedForAllBefore != approvedForAllAfter => f.selector == setApprovalForAll(address,bool).selector; + assert approvedForAllBefore != approvedForAllAfter => f.selector == sig:setApprovalForAll(address,bool).selector; } /* @@ -309,6 +397,7 @@ rule approvedForAllChange(env e, address owner, address spender) { */ rule transferFrom(env e, address from, address to, uint256 tokenId) { require nonpayable(e); + require authSanity(e); address operator = e.msg.sender; uint256 otherTokenId; @@ -338,10 +427,10 @@ rule transferFrom(env e, address from, address to, uint256 tokenId) { // effect assert success => ( - balanceOf(from) == balanceOfFromBefore - to_uint256(from != to ? 1 : 0) && - balanceOf(to) == balanceOfToBefore + to_uint256(from != to ? 1 : 0) && - unsafeOwnerOf(tokenId) == to && - unsafeGetApproved(tokenId) == 0 + to_mathint(balanceOf(from)) == balanceOfFromBefore - assert_uint256(from != to ? 1 : 0) && + to_mathint(balanceOf(to)) == balanceOfToBefore + assert_uint256(from != to ? 1 : 0) && + unsafeOwnerOf(tokenId) == to && + unsafeGetApproved(tokenId) == 0 ); // no side effect @@ -356,10 +445,11 @@ rule transferFrom(env e, address from, address to, uint256 tokenId) { └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ rule safeTransferFrom(env e, method f, address from, address to, uint256 tokenId) filtered { f -> - f.selector == safeTransferFrom(address,address,uint256).selector || - f.selector == safeTransferFrom(address,address,uint256,bytes).selector + f.selector == sig:safeTransferFrom(address,address,uint256).selector || + f.selector == sig:safeTransferFrom(address,address,uint256,bytes).selector } { require nonpayable(e); + require authSanity(e); address operator = e.msg.sender; uint256 otherTokenId; @@ -388,10 +478,10 @@ rule safeTransferFrom(env e, method f, address from, address to, uint256 tokenId // effect assert success => ( - balanceOf(from) == balanceOfFromBefore - to_uint256(from != to ? 1: 0) && - balanceOf(to) == balanceOfToBefore + to_uint256(from != to ? 1: 0) && - unsafeOwnerOf(tokenId) == to && - unsafeGetApproved(tokenId) == 0 + to_mathint(balanceOf(from)) == balanceOfFromBefore - assert_uint256(from != to ? 1: 0) && + to_mathint(balanceOf(to)) == balanceOfToBefore + assert_uint256(from != to ? 1: 0) && + unsafeOwnerOf(tokenId) == to && + unsafeGetApproved(tokenId) == 0 ); // no side effect @@ -414,7 +504,7 @@ rule mint(env e, address to, uint256 tokenId) { require balanceLimited(to); - uint256 supplyBefore = ownedTotal(); + mathint supplyBefore = _supply; uint256 balanceOfToBefore = balanceOf(to); uint256 balanceOfOtherBefore = balanceOf(otherAccount); address ownerBefore = unsafeOwnerOf(tokenId); @@ -431,9 +521,9 @@ rule mint(env e, address to, uint256 tokenId) { // effect assert success => ( - ownedTotal() == supplyBefore + 1 && - balanceOf(to) == balanceOfToBefore + 1 && - unsafeOwnerOf(tokenId) == to + _supply == supplyBefore + 1 && + to_mathint(balanceOf(to)) == balanceOfToBefore + 1 && + unsafeOwnerOf(tokenId) == to ); // no side effect @@ -447,8 +537,8 @@ rule mint(env e, address to, uint256 tokenId) { └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ rule safeMint(env e, method f, address to, uint256 tokenId) filtered { f -> - f.selector == safeMint(address,uint256).selector || - f.selector == safeMint(address,uint256,bytes).selector + f.selector == sig:safeMint(address,uint256).selector || + f.selector == sig:safeMint(address,uint256,bytes).selector } { require nonpayable(e); requireInvariant notMintedUnset(tokenId); @@ -458,7 +548,7 @@ rule safeMint(env e, method f, address to, uint256 tokenId) filtered { f -> require balanceLimited(to); - uint256 supplyBefore = ownedTotal(); + mathint supplyBefore = _supply; uint256 balanceOfToBefore = balanceOf(to); uint256 balanceOfOtherBefore = balanceOf(otherAccount); address ownerBefore = unsafeOwnerOf(tokenId); @@ -474,9 +564,9 @@ rule safeMint(env e, method f, address to, uint256 tokenId) filtered { f -> // effect assert success => ( - ownedTotal() == supplyBefore + 1 && - balanceOf(to) == balanceOfToBefore + 1 && - unsafeOwnerOf(tokenId) == to + _supply == supplyBefore + 1 && + to_mathint(balanceOf(to)) == balanceOfToBefore + 1 && + unsafeOwnerOf(tokenId) == to ); // no side effect @@ -498,7 +588,7 @@ rule burn(env e, uint256 tokenId) { requireInvariant ownerHasBalance(tokenId); - uint256 supplyBefore = ownedTotal(); + mathint supplyBefore = _supply; uint256 balanceOfFromBefore = balanceOf(from); uint256 balanceOfOtherBefore = balanceOf(otherAccount); address ownerBefore = unsafeOwnerOf(tokenId); @@ -515,10 +605,10 @@ rule burn(env e, uint256 tokenId) { // effect assert success => ( - ownedTotal() == supplyBefore - 1 && - balanceOf(from) == balanceOfFromBefore - 1 && - unsafeOwnerOf(tokenId) == 0 && - unsafeGetApproved(tokenId) == 0 + _supply == supplyBefore - 1 && + to_mathint(balanceOf(from)) == balanceOfFromBefore - 1 && + unsafeOwnerOf(tokenId) == 0 && + unsafeGetApproved(tokenId) == 0 ); // no side effect @@ -534,6 +624,7 @@ rule burn(env e, uint256 tokenId) { */ rule approve(env e, address spender, uint256 tokenId) { require nonpayable(e); + require authSanity(e); address caller = e.msg.sender; address owner = unsafeOwnerOf(tokenId); @@ -547,7 +638,6 @@ rule approve(env e, address spender, uint256 tokenId) { // liveness assert success <=> ( owner != 0 && - owner != spender && (owner == caller || isApprovedForAll(owner, caller)) ); @@ -576,7 +666,7 @@ rule setApprovalForAll(env e, address operator, bool approved) { bool success = !lastReverted; // liveness - assert success <=> owner != operator; + assert success <=> operator != 0; // effect assert success => isApprovedForAll(owner, operator) == approved; diff --git a/certora/specs/EnumerableMap.spec b/certora/specs/EnumerableMap.spec index dea5d85ec..7b503031f 100644 --- a/certora/specs/EnumerableMap.spec +++ b/certora/specs/EnumerableMap.spec @@ -1,19 +1,19 @@ -import "helpers/helpers.spec" +import "helpers/helpers.spec"; methods { // library - set(bytes32,bytes32) returns (bool) envfree - remove(bytes32) returns (bool) envfree - contains(bytes32) returns (bool) envfree - length() returns (uint256) envfree - key_at(uint256) returns (bytes32) envfree - value_at(uint256) returns (bytes32) envfree - tryGet_contains(bytes32) returns (bool) envfree - tryGet_value(bytes32) returns (bytes32) envfree - get(bytes32) returns (bytes32) envfree + function set(bytes32,bytes32) external returns (bool) envfree; + function remove(bytes32) external returns (bool) envfree; + function contains(bytes32) external returns (bool) envfree; + function length() external returns (uint256) envfree; + function key_at(uint256) external returns (bytes32) envfree; + function value_at(uint256) external returns (bytes32) envfree; + function tryGet_contains(bytes32) external returns (bool) envfree; + function tryGet_value(bytes32) external returns (bytes32) envfree; + function get(bytes32) external returns (bytes32) envfree; // FV - _indexOf(bytes32) returns (uint256) envfree + function _indexOf(bytes32) external returns (uint256) envfree; } /* @@ -21,9 +21,8 @@ methods { │ Helpers │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -function sanity() returns bool { - return length() < max_uint256; -} +definition sanity() returns bool = + length() < max_uint256; /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -31,7 +30,7 @@ function sanity() returns bool { └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant noValueIfNotContained(bytes32 key) - !contains(key) => tryGet_value(key) == 0 + !contains(key) => tryGet_value(key) == to_bytes32(0) { preserved set(bytes32 otherKey, bytes32 someValue) { require sanity(); @@ -48,7 +47,7 @@ invariant indexedContained(uint256 index) { preserved { requireInvariant consistencyIndex(index); - requireInvariant consistencyIndex(to_uint256(length() - 1)); + requireInvariant consistencyIndex(require_uint256(length() - 1)); } } @@ -61,8 +60,8 @@ invariant atUniqueness(uint256 index1, uint256 index2) index1 == index2 <=> key_at(index1) == key_at(index2) { preserved remove(bytes32 key) { - requireInvariant atUniqueness(index1, to_uint256(length() - 1)); - requireInvariant atUniqueness(index2, to_uint256(length() - 1)); + requireInvariant atUniqueness(index1, require_uint256(length() - 1)); + requireInvariant atUniqueness(index2, require_uint256(length() - 1)); } } @@ -76,10 +75,10 @@ invariant atUniqueness(uint256 index1, uint256 index2) └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant consistencyIndex(uint256 index) - index < length() => _indexOf(key_at(index)) == index + 1 + index < length() => to_mathint(_indexOf(key_at(index))) == index + 1 { preserved remove(bytes32 key) { - requireInvariant consistencyIndex(to_uint256(length() - 1)); + requireInvariant consistencyIndex(require_uint256(length() - 1)); } } @@ -87,14 +86,14 @@ invariant consistencyKey(bytes32 key) contains(key) => ( _indexOf(key) > 0 && _indexOf(key) <= length() && - key_at(to_uint256(_indexOf(key) - 1)) == key + key_at(require_uint256(_indexOf(key) - 1)) == key ) { preserved remove(bytes32 otherKey) { requireInvariant consistencyKey(otherKey); requireInvariant atUniqueness( - to_uint256(_indexOf(key) - 1), - to_uint256(_indexOf(otherKey) - 1) + require_uint256(_indexOf(key) - 1), + require_uint256(_indexOf(otherKey) - 1) ); } } @@ -121,18 +120,18 @@ rule stateChange(env e, bytes32 key) { bytes32 valueAfter = tryGet_value(key); assert lengthBefore != lengthAfter => ( - (f.selector == set(bytes32,bytes32).selector && lengthAfter == lengthBefore + 1) || - (f.selector == remove(bytes32).selector && lengthAfter == lengthBefore - 1) + (f.selector == sig:set(bytes32,bytes32).selector && to_mathint(lengthAfter) == lengthBefore + 1) || + (f.selector == sig:remove(bytes32).selector && to_mathint(lengthAfter) == lengthBefore - 1) ); assert containsBefore != containsAfter => ( - (f.selector == set(bytes32,bytes32).selector && containsAfter) || - (f.selector == remove(bytes32).selector && !containsAfter) + (f.selector == sig:set(bytes32,bytes32).selector && containsAfter) || + (f.selector == sig:remove(bytes32).selector && !containsAfter) ); assert valueBefore != valueAfter => ( - (f.selector == set(bytes32,bytes32).selector && containsAfter) || - (f.selector == remove(bytes32).selector && !containsAfter && valueAfter == 0) + (f.selector == sig:set(bytes32,bytes32).selector && containsAfter) || + (f.selector == sig:remove(bytes32).selector && !containsAfter && valueAfter == to_bytes32(0)) ); } @@ -192,7 +191,7 @@ rule getAndTryGet(bytes32 key) { assert contained == tryContained; assert contained => tryValue == value; - assert !contained => tryValue == 0; + assert !contained => tryValue == to_bytes32(0); } /* @@ -217,7 +216,7 @@ rule set(bytes32 key, bytes32 value, bytes32 otherKey) { assert added <=> !containsBefore, "return value: added iff not contained"; - assert length() == lengthBefore + to_mathint(added ? 1 : 0), + assert to_mathint(length()) == lengthBefore + to_mathint(added ? 1 : 0), "effect: length increases iff added"; assert added => (key_at(lengthBefore) == key && value_at(lengthBefore) == value), @@ -253,7 +252,7 @@ rule remove(bytes32 key, bytes32 otherKey) { assert removed <=> containsBefore, "return value: removed iff contained"; - assert length() == lengthBefore - to_mathint(removed ? 1 : 0), + assert to_mathint(length()) == lengthBefore - to_mathint(removed ? 1 : 0), "effect: length decreases iff removed"; assert containsOtherBefore != contains(otherKey) => (removed && key == otherKey), @@ -295,7 +294,7 @@ rule setEnumerability(bytes32 key, bytes32 value, uint256 index) { └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ rule removeEnumerability(bytes32 key, uint256 index) { - uint256 last = length() - 1; + uint256 last = require_uint256(length() - 1); requireInvariant consistencyKey(key); requireInvariant consistencyIndex(index); diff --git a/certora/specs/EnumerableSet.spec b/certora/specs/EnumerableSet.spec index d63c556aa..3db515838 100644 --- a/certora/specs/EnumerableSet.spec +++ b/certora/specs/EnumerableSet.spec @@ -1,15 +1,15 @@ -import "helpers/helpers.spec" +import "helpers/helpers.spec"; methods { // library - add(bytes32) returns (bool) envfree - remove(bytes32) returns (bool) envfree - contains(bytes32) returns (bool) envfree - length() returns (uint256) envfree - at_(uint256) returns (bytes32) envfree + function add(bytes32) external returns (bool) envfree; + function remove(bytes32) external returns (bool) envfree; + function contains(bytes32) external returns (bool) envfree; + function length() external returns (uint256) envfree; + function at_(uint256) external returns (bytes32) envfree; // FV - _indexOf(bytes32) returns (uint256) envfree + function _indexOf(bytes32) external returns (uint256) envfree; } /* @@ -17,9 +17,8 @@ methods { │ Helpers │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -function sanity() returns bool { - return length() < max_uint256; -} +definition sanity() returns bool = + length() < max_uint256; /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -31,7 +30,7 @@ invariant indexedContained(uint256 index) { preserved { requireInvariant consistencyIndex(index); - requireInvariant consistencyIndex(to_uint256(length() - 1)); + requireInvariant consistencyIndex(require_uint256(length() - 1)); } } @@ -44,8 +43,8 @@ invariant atUniqueness(uint256 index1, uint256 index2) index1 == index2 <=> at_(index1) == at_(index2) { preserved remove(bytes32 key) { - requireInvariant atUniqueness(index1, to_uint256(length() - 1)); - requireInvariant atUniqueness(index2, to_uint256(length() - 1)); + requireInvariant atUniqueness(index1, require_uint256(length() - 1)); + requireInvariant atUniqueness(index2, require_uint256(length() - 1)); } } @@ -59,10 +58,10 @@ invariant atUniqueness(uint256 index1, uint256 index2) └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant consistencyIndex(uint256 index) - index < length() => _indexOf(at_(index)) == index + 1 + index < length() => _indexOf(at_(index)) == require_uint256(index + 1) { preserved remove(bytes32 key) { - requireInvariant consistencyIndex(to_uint256(length() - 1)); + requireInvariant consistencyIndex(require_uint256(length() - 1)); } } @@ -70,14 +69,14 @@ invariant consistencyKey(bytes32 key) contains(key) => ( _indexOf(key) > 0 && _indexOf(key) <= length() && - at_(to_uint256(_indexOf(key) - 1)) == key + at_(require_uint256(_indexOf(key) - 1)) == key ) { preserved remove(bytes32 otherKey) { requireInvariant consistencyKey(otherKey); requireInvariant atUniqueness( - to_uint256(_indexOf(key) - 1), - to_uint256(_indexOf(otherKey) - 1) + require_uint256(_indexOf(key) - 1), + require_uint256(_indexOf(otherKey) - 1) ); } } @@ -102,13 +101,13 @@ rule stateChange(env e, bytes32 key) { bool containsAfter = contains(key); assert lengthBefore != lengthAfter => ( - (f.selector == add(bytes32).selector && lengthAfter == lengthBefore + 1) || - (f.selector == remove(bytes32).selector && lengthAfter == lengthBefore - 1) + (f.selector == sig:add(bytes32).selector && lengthAfter == require_uint256(lengthBefore + 1)) || + (f.selector == sig:remove(bytes32).selector && lengthAfter == require_uint256(lengthBefore - 1)) ); assert containsBefore != containsAfter => ( - (f.selector == add(bytes32).selector && containsAfter) || - (f.selector == remove(bytes32).selector && containsBefore) + (f.selector == sig:add(bytes32).selector && containsAfter) || + (f.selector == sig:remove(bytes32).selector && containsBefore) ); } @@ -158,7 +157,7 @@ rule add(bytes32 key, bytes32 otherKey) { assert added <=> !containsBefore, "return value: added iff not contained"; - assert length() == lengthBefore + to_mathint(added ? 1 : 0), + assert length() == require_uint256(lengthBefore + to_mathint(added ? 1 : 0)), "effect: length increases iff added"; assert added => at_(lengthBefore) == key, @@ -190,7 +189,7 @@ rule remove(bytes32 key, bytes32 otherKey) { assert removed <=> containsBefore, "return value: removed iff contained"; - assert length() == lengthBefore - to_mathint(removed ? 1 : 0), + assert length() == require_uint256(lengthBefore - to_mathint(removed ? 1 : 0)), "effect: length decreases iff removed"; assert containsOtherBefore != contains(otherKey) => (removed && key == otherKey), @@ -220,7 +219,7 @@ rule addEnumerability(bytes32 key, uint256 index) { └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ rule removeEnumerability(bytes32 key, uint256 index) { - uint256 last = length() - 1; + uint256 last = require_uint256(length() - 1); requireInvariant consistencyKey(key); requireInvariant consistencyIndex(index); diff --git a/certora/specs/Initializable.spec b/certora/specs/Initializable.spec index 0e0b1b714..07c2930c2 100644 --- a/certora/specs/Initializable.spec +++ b/certora/specs/Initializable.spec @@ -1,19 +1,19 @@ -import "helpers/helpers.spec" +import "helpers/helpers.spec"; methods { // initialize, reinitialize, disable - initialize() envfree - reinitialize(uint8) envfree - disable() envfree + function initialize() external envfree; + function reinitialize(uint64) external envfree; + function disable() external envfree; - nested_init_init() envfree - nested_init_reinit(uint8) envfree - nested_reinit_init(uint8) envfree - nested_reinit_reinit(uint8,uint8) envfree + function nested_init_init() external envfree; + function nested_init_reinit(uint64) external envfree; + function nested_reinit_init(uint64) external envfree; + function nested_reinit_reinit(uint64,uint64) external envfree; // view - version() returns uint8 envfree - initializing() returns bool envfree + function version() external returns uint64 envfree; + function initializing() external returns bool envfree; } /* @@ -23,7 +23,7 @@ methods { */ definition isUninitialized() returns bool = version() == 0; definition isInitialized() returns bool = version() > 0; -definition isDisabled() returns bool = version() == 255; +definition isDisabled() returns bool = version() == max_uint64; /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -31,7 +31,7 @@ definition isDisabled() returns bool = version() == 255; └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant notInitializing() - !initializing() + !initializing(); /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -39,7 +39,7 @@ invariant notInitializing() └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ rule increasingVersion(env e) { - uint8 versionBefore = version(); + uint64 versionBefore = version(); bool disabledBefore = isDisabled(); method f; calldataarg args; @@ -83,7 +83,7 @@ rule cannotInitializeOnceDisabled() { rule cannotReinitializeOnceDisabled() { require isDisabled(); - uint8 n; + uint64 n; reinitialize@withrevert(n); assert lastReverted, "contract is disabled"; @@ -99,17 +99,17 @@ rule cannotNestInitializers_init_init() { assert lastReverted, "nested initializers"; } -rule cannotNestInitializers_init_reinit(uint8 m) { +rule cannotNestInitializers_init_reinit(uint64 m) { nested_init_reinit@withrevert(m); assert lastReverted, "nested initializers"; } -rule cannotNestInitializers_reinit_init(uint8 n) { +rule cannotNestInitializers_reinit_init(uint64 n) { nested_reinit_init@withrevert(n); assert lastReverted, "nested initializers"; } -rule cannotNestInitializers_reinit_reinit(uint8 n, uint8 m) { +rule cannotNestInitializers_reinit_reinit(uint64 n, uint64 m) { nested_reinit_reinit@withrevert(n, m); assert lastReverted, "nested initializers"; } @@ -139,9 +139,9 @@ rule initializeEffects() { rule reinitializeEffects() { requireInvariant notInitializing(); - uint8 versionBefore = version(); + uint64 versionBefore = version(); - uint8 n; + uint64 n; reinitialize@withrevert(n); bool success = !lastReverted; diff --git a/certora/specs/Ownable.spec b/certora/specs/Ownable.spec index 4bf9e3005..0d50813cf 100644 --- a/certora/specs/Ownable.spec +++ b/certora/specs/Ownable.spec @@ -1,78 +1,77 @@ -import "helpers/helpers.spec" -import "methods/IOwnable.spec" - -methods { - restricted() -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: transferOwnership changes ownership │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule transferOwnership(env e) { - require nonpayable(e); - - address newOwner; - address current = owner(); - - transferOwnership@withrevert(e, newOwner); - bool success = !lastReverted; - - assert success <=> (e.msg.sender == current && newOwner != 0), "unauthorized caller or invalid arg"; - assert success => owner() == newOwner, "current owner changed"; -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: renounceOwnership removes the owner │ - -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule renounceOwnership(env e) { - require nonpayable(e); - - address current = owner(); - - renounceOwnership@withrevert(e); - bool success = !lastReverted; - - assert success <=> e.msg.sender == current, "unauthorized caller"; - assert success => owner() == 0, "owner not cleared"; -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Access control: only current owner can call restricted functions │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule onlyCurrentOwnerCanCallOnlyOwner(env e) { - require nonpayable(e); - - address current = owner(); - - calldataarg args; - restricted@withrevert(e, args); - - assert !lastReverted <=> e.msg.sender == current, "access control failed"; -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Rule: ownership can only change in specific ways │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule onlyOwnerOrPendingOwnerCanChangeOwnership(env e) { - address oldCurrent = owner(); - - method f; calldataarg args; - f(e, args); - - address newCurrent = owner(); - - // If owner changes, must be either transferOwnership or renounceOwnership - assert oldCurrent != newCurrent => ( - (e.msg.sender == oldCurrent && newCurrent != 0 && f.selector == transferOwnership(address).selector) || - (e.msg.sender == oldCurrent && newCurrent == 0 && f.selector == renounceOwnership().selector) - ); -} +import "helpers/helpers.spec"; +import "methods/IOwnable.spec"; + +methods { + function restricted() external; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: transferOwnership changes ownership │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule transferOwnership(env e) { + require nonpayable(e); + + address newOwner; + address current = owner(); + + transferOwnership@withrevert(e, newOwner); + bool success = !lastReverted; + + assert success <=> (e.msg.sender == current && newOwner != 0), "unauthorized caller or invalid arg"; + assert success => owner() == newOwner, "current owner changed"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: renounceOwnership removes the owner │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule renounceOwnership(env e) { + require nonpayable(e); + + address current = owner(); + + renounceOwnership@withrevert(e); + bool success = !lastReverted; + + assert success <=> e.msg.sender == current, "unauthorized caller"; + assert success => owner() == 0, "owner not cleared"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Access control: only current owner can call restricted functions │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule onlyCurrentOwnerCanCallOnlyOwner(env e) { + require nonpayable(e); + + address current = owner(); + + calldataarg args; + restricted@withrevert(e, args); + + assert !lastReverted <=> e.msg.sender == current, "access control failed"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Rule: ownership can only change in specific ways │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule onlyOwnerOrPendingOwnerCanChangeOwnership(env e) { + address oldCurrent = owner(); + + method f; calldataarg args; + f(e, args); + + address newCurrent = owner(); + + // If owner changes, must be either transferOwnership or renounceOwnership + assert oldCurrent != newCurrent => ( + (e.msg.sender == oldCurrent && newCurrent != 0 && f.selector == sig:transferOwnership(address).selector) || + (e.msg.sender == oldCurrent && newCurrent == 0 && f.selector == sig:renounceOwnership().selector) + ); +} diff --git a/certora/specs/Ownable2Step.spec b/certora/specs/Ownable2Step.spec index 47b1b8d75..d13c6d3e6 100644 --- a/certora/specs/Ownable2Step.spec +++ b/certora/specs/Ownable2Step.spec @@ -1,108 +1,108 @@ -import "helpers/helpers.spec" -import "methods/IOwnable2Step.spec" - -methods { - restricted() -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: transferOwnership sets the pending owner │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule transferOwnership(env e) { - require nonpayable(e); - - address newOwner; - address current = owner(); - - transferOwnership@withrevert(e, newOwner); - bool success = !lastReverted; - - assert success <=> e.msg.sender == current, "unauthorized caller"; - assert success => pendingOwner() == newOwner, "pending owner not set"; - assert success => owner() == current, "current owner changed"; -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: renounceOwnership removes the owner and the pendingOwner │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule renounceOwnership(env e) { - require nonpayable(e); - - address current = owner(); - - renounceOwnership@withrevert(e); - bool success = !lastReverted; - - assert success <=> e.msg.sender == current, "unauthorized caller"; - assert success => pendingOwner() == 0, "pending owner not cleared"; - assert success => owner() == 0, "owner not cleared"; -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: acceptOwnership changes owner and reset pending owner │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule acceptOwnership(env e) { - - require nonpayable(e); - - address current = owner(); - address pending = pendingOwner(); - - acceptOwnership@withrevert(e); - bool success = !lastReverted; - - assert success <=> e.msg.sender == pending, "unauthorized caller"; - assert success => pendingOwner() == 0, "pending owner not cleared"; - assert success => owner() == pending, "owner not transferred"; -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Access control: only current owner can call restricted functions │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule onlyCurrentOwnerCanCallOnlyOwner(env e) { - require nonpayable(e); - - address current = owner(); - - calldataarg args; - restricted@withrevert(e, args); - - assert !lastReverted <=> e.msg.sender == current, "access control failed"; -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Rule: ownership and pending ownership can only change in specific ways │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule ownerOrPendingOwnerChange(env e, method f) { - address oldCurrent = owner(); - address oldPending = pendingOwner(); - - calldataarg args; - f(e, args); - - address newCurrent = owner(); - address newPending = pendingOwner(); - - // If owner changes, must be either acceptOwnership or renounceOwnership - assert oldCurrent != newCurrent => ( - (e.msg.sender == oldPending && newCurrent == oldPending && newPending == 0 && f.selector == acceptOwnership().selector) || - (e.msg.sender == oldCurrent && newCurrent == 0 && newPending == 0 && f.selector == renounceOwnership().selector) - ); - - // If pending changes, must be either acceptance or reset - assert oldPending != newPending => ( - (e.msg.sender == oldCurrent && newCurrent == oldCurrent && f.selector == transferOwnership(address).selector) || - (e.msg.sender == oldPending && newCurrent == oldPending && newPending == 0 && f.selector == acceptOwnership().selector) || - (e.msg.sender == oldCurrent && newCurrent == 0 && newPending == 0 && f.selector == renounceOwnership().selector) - ); -} +import "helpers/helpers.spec"; +import "methods/IOwnable2Step.spec"; + +methods { + function restricted() external; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: transferOwnership sets the pending owner │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule transferOwnership(env e) { + require nonpayable(e); + + address newOwner; + address current = owner(); + + transferOwnership@withrevert(e, newOwner); + bool success = !lastReverted; + + assert success <=> e.msg.sender == current, "unauthorized caller"; + assert success => pendingOwner() == newOwner, "pending owner not set"; + assert success => owner() == current, "current owner changed"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: renounceOwnership removes the owner and the pendingOwner │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule renounceOwnership(env e) { + require nonpayable(e); + + address current = owner(); + + renounceOwnership@withrevert(e); + bool success = !lastReverted; + + assert success <=> e.msg.sender == current, "unauthorized caller"; + assert success => pendingOwner() == 0, "pending owner not cleared"; + assert success => owner() == 0, "owner not cleared"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: acceptOwnership changes owner and reset pending owner │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule acceptOwnership(env e) { + + require nonpayable(e); + + address current = owner(); + address pending = pendingOwner(); + + acceptOwnership@withrevert(e); + bool success = !lastReverted; + + assert success <=> e.msg.sender == pending, "unauthorized caller"; + assert success => pendingOwner() == 0, "pending owner not cleared"; + assert success => owner() == pending, "owner not transferred"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Access control: only current owner can call restricted functions │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule onlyCurrentOwnerCanCallOnlyOwner(env e) { + require nonpayable(e); + + address current = owner(); + + calldataarg args; + restricted@withrevert(e, args); + + assert !lastReverted <=> e.msg.sender == current, "access control failed"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Rule: ownership and pending ownership can only change in specific ways │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule ownerOrPendingOwnerChange(env e, method f) { + address oldCurrent = owner(); + address oldPending = pendingOwner(); + + calldataarg args; + f(e, args); + + address newCurrent = owner(); + address newPending = pendingOwner(); + + // If owner changes, must be either acceptOwnership or renounceOwnership + assert oldCurrent != newCurrent => ( + (e.msg.sender == oldPending && newCurrent == oldPending && newPending == 0 && f.selector == sig:acceptOwnership().selector) || + (e.msg.sender == oldCurrent && newCurrent == 0 && newPending == 0 && f.selector == sig:renounceOwnership().selector) + ); + + // If pending changes, must be either acceptance or reset + assert oldPending != newPending => ( + (e.msg.sender == oldCurrent && newCurrent == oldCurrent && f.selector == sig:transferOwnership(address).selector) || + (e.msg.sender == oldPending && newCurrent == oldPending && newPending == 0 && f.selector == sig:acceptOwnership().selector) || + (e.msg.sender == oldCurrent && newCurrent == 0 && newPending == 0 && f.selector == sig:renounceOwnership().selector) + ); +} diff --git a/certora/specs/Pausable.spec b/certora/specs/Pausable.spec index aea38003f..a7aff9cc1 100644 --- a/certora/specs/Pausable.spec +++ b/certora/specs/Pausable.spec @@ -1,96 +1,96 @@ -import "helpers/helpers.spec" - -methods { - paused() returns (bool) envfree - pause() - unpause() - onlyWhenPaused() - onlyWhenNotPaused() -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: _pause pauses the contract │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule pause(env e) { - require nonpayable(e); - - bool pausedBefore = paused(); - - pause@withrevert(e); - bool success = !lastReverted; - - bool pausedAfter = paused(); - - // liveness - assert success <=> !pausedBefore, "works if and only if the contract was not paused before"; - - // effect - assert success => pausedAfter, "contract must be paused after a successful call"; -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: _unpause unpauses the contract │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule unpause(env e) { - require nonpayable(e); - - bool pausedBefore = paused(); - - unpause@withrevert(e); - bool success = !lastReverted; - - bool pausedAfter = paused(); - - // liveness - assert success <=> pausedBefore, "works if and only if the contract was paused before"; - - // effect - assert success => !pausedAfter, "contract must be unpaused after a successful call"; -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: whenPaused modifier can only be called if the contract is paused │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule whenPaused(env e) { - require nonpayable(e); - - onlyWhenPaused@withrevert(e); - assert !lastReverted <=> paused(), "works if and only if the contract is paused"; -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Function correctness: whenNotPaused modifier can only be called if the contract is not paused │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule whenNotPaused(env e) { - require nonpayable(e); - - onlyWhenNotPaused@withrevert(e); - assert !lastReverted <=> !paused(), "works if and only if the contract is not paused"; -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Rules: only _pause and _unpause can change paused status │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule noPauseChange(env e) { - method f; - calldataarg args; - - bool pausedBefore = paused(); - f(e, args); - bool pausedAfter = paused(); - - assert pausedBefore != pausedAfter => ( - (!pausedAfter && f.selector == unpause().selector) || - (pausedAfter && f.selector == pause().selector) - ), "contract's paused status can only be changed by _pause() or _unpause()"; -} +import "helpers/helpers.spec"; + +methods { + function paused() external returns (bool) envfree; + function pause() external; + function unpause() external; + function onlyWhenPaused() external; + function onlyWhenNotPaused() external; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: _pause pauses the contract │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule pause(env e) { + require nonpayable(e); + + bool pausedBefore = paused(); + + pause@withrevert(e); + bool success = !lastReverted; + + bool pausedAfter = paused(); + + // liveness + assert success <=> !pausedBefore, "works if and only if the contract was not paused before"; + + // effect + assert success => pausedAfter, "contract must be paused after a successful call"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: _unpause unpauses the contract │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule unpause(env e) { + require nonpayable(e); + + bool pausedBefore = paused(); + + unpause@withrevert(e); + bool success = !lastReverted; + + bool pausedAfter = paused(); + + // liveness + assert success <=> pausedBefore, "works if and only if the contract was paused before"; + + // effect + assert success => !pausedAfter, "contract must be unpaused after a successful call"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: whenPaused modifier can only be called if the contract is paused │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule whenPaused(env e) { + require nonpayable(e); + + onlyWhenPaused@withrevert(e); + assert !lastReverted <=> paused(), "works if and only if the contract is paused"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: whenNotPaused modifier can only be called if the contract is not paused │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule whenNotPaused(env e) { + require nonpayable(e); + + onlyWhenNotPaused@withrevert(e); + assert !lastReverted <=> !paused(), "works if and only if the contract is not paused"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Rules: only _pause and _unpause can change paused status │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule noPauseChange(env e) { + method f; + calldataarg args; + + bool pausedBefore = paused(); + f(e, args); + bool pausedAfter = paused(); + + assert pausedBefore != pausedAfter => ( + (!pausedAfter && f.selector == sig:unpause().selector) || + (pausedAfter && f.selector == sig:pause().selector) + ), "contract's paused status can only be changed by _pause() or _unpause()"; +} diff --git a/certora/specs/TimelockController.spec b/certora/specs/TimelockController.spec index 05ecb1340..5123768da 100644 --- a/certora/specs/TimelockController.spec +++ b/certora/specs/TimelockController.spec @@ -1,28 +1,27 @@ -import "helpers/helpers.spec" -import "methods/IAccessControl.spec" +import "helpers/helpers.spec"; +import "methods/IAccessControl.spec"; methods { - TIMELOCK_ADMIN_ROLE() returns (bytes32) envfree - PROPOSER_ROLE() returns (bytes32) envfree - EXECUTOR_ROLE() returns (bytes32) envfree - CANCELLER_ROLE() returns (bytes32) envfree - isOperation(bytes32) returns (bool) envfree - isOperationPending(bytes32) returns (bool) envfree - isOperationReady(bytes32) returns (bool) - isOperationDone(bytes32) returns (bool) envfree - getTimestamp(bytes32) returns (uint256) envfree - getMinDelay() returns (uint256) envfree - - hashOperation(address, uint256, bytes, bytes32, bytes32) returns(bytes32) envfree - hashOperationBatch(address[], uint256[], bytes[], bytes32, bytes32) returns(bytes32) envfree - - schedule(address, uint256, bytes, bytes32, bytes32, uint256) - scheduleBatch(address[], uint256[], bytes[], bytes32, bytes32, uint256) - execute(address, uint256, bytes, bytes32, bytes32) - executeBatch(address[], uint256[], bytes[], bytes32, bytes32) - cancel(bytes32) - - updateDelay(uint256) + function PROPOSER_ROLE() external returns (bytes32) envfree; + function EXECUTOR_ROLE() external returns (bytes32) envfree; + function CANCELLER_ROLE() external returns (bytes32) envfree; + function isOperation(bytes32) external returns (bool); + function isOperationPending(bytes32) external returns (bool); + function isOperationReady(bytes32) external returns (bool); + function isOperationDone(bytes32) external returns (bool); + function getTimestamp(bytes32) external returns (uint256) envfree; + function getMinDelay() external returns (uint256) envfree; + + function hashOperation(address, uint256, bytes, bytes32, bytes32) external returns(bytes32) envfree; + function hashOperationBatch(address[], uint256[], bytes[], bytes32, bytes32) external returns(bytes32) envfree; + + function schedule(address, uint256, bytes, bytes32, bytes32, uint256) external; + function scheduleBatch(address[], uint256[], bytes[], bytes32, bytes32, uint256) external; + function execute(address, uint256, bytes, bytes32, bytes32) external; + function executeBatch(address[], uint256[], bytes[], bytes32, bytes32) external; + function cancel(bytes32) external; + + function updateDelay(uint256) external; } /* @@ -32,11 +31,11 @@ methods { */ // Uniformly handle scheduling of batched and non-batched operations. function helperScheduleWithRevert(env e, method f, bytes32 id, uint256 delay) { - if (f.selector == schedule(address, uint256, bytes, bytes32, bytes32, uint256).selector) { + if (f.selector == sig:schedule(address, uint256, bytes, bytes32, bytes32, uint256).selector) { address target; uint256 value; bytes data; bytes32 predecessor; bytes32 salt; require hashOperation(target, value, data, predecessor, salt) == id; // Correlation schedule@withrevert(e, target, value, data, predecessor, salt, delay); - } else if (f.selector == scheduleBatch(address[], uint256[], bytes[], bytes32, bytes32, uint256).selector) { + } else if (f.selector == sig:scheduleBatch(address[], uint256[], bytes[], bytes32, bytes32, uint256).selector) { address[] targets; uint256[] values; bytes[] payloads; bytes32 predecessor; bytes32 salt; require hashOperationBatch(targets, values, payloads, predecessor, salt) == id; // Correlation scheduleBatch@withrevert(e, targets, values, payloads, predecessor, salt, delay); @@ -48,11 +47,11 @@ function helperScheduleWithRevert(env e, method f, bytes32 id, uint256 delay) { // Uniformly handle execution of batched and non-batched operations. function helperExecuteWithRevert(env e, method f, bytes32 id, bytes32 predecessor) { - if (f.selector == execute(address, uint256, bytes, bytes32, bytes32).selector) { + if (f.selector == sig:execute(address, uint256, bytes, bytes32, bytes32).selector) { address target; uint256 value; bytes data; bytes32 salt; require hashOperation(target, value, data, predecessor, salt) == id; // Correlation execute@withrevert(e, target, value, data, predecessor, salt); - } else if (f.selector == executeBatch(address[], uint256[], bytes[], bytes32, bytes32).selector) { + } else if (f.selector == sig:executeBatch(address[], uint256[], bytes[], bytes32, bytes32).selector) { address[] targets; uint256[] values; bytes[] payloads; bytes32 salt; require hashOperationBatch(targets, values, payloads, predecessor, salt) == id; // Correlation executeBatch@withrevert(e, targets, values, payloads, predecessor, salt); @@ -72,30 +71,30 @@ definition UNSET() returns uint8 = 0x1; definition PENDING() returns uint8 = 0x2; definition DONE() returns uint8 = 0x4; -definition isUnset(bytes32 id) returns bool = !isOperation(id); -definition isPending(bytes32 id) returns bool = isOperationPending(id); -definition isDone(bytes32 id) returns bool = isOperationDone(id); -definition state(bytes32 id) returns uint8 = (isUnset(id) ? UNSET() : 0) | (isPending(id) ? PENDING() : 0) | (isDone(id) ? DONE() : 0); +definition isUnset(env e, bytes32 id) returns bool = !isOperation(e, id); +definition isPending(env e, bytes32 id) returns bool = isOperationPending(e, id); +definition isDone(env e, bytes32 id) returns bool = isOperationDone(e, id); +definition state(env e, bytes32 id) returns uint8 = (isUnset(e, id) ? UNSET() : 0) | (isPending(e, id) ? PENDING() : 0) | (isDone(e, id) ? DONE() : 0); /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Invariants: consistency of accessors │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ -invariant isOperationCheck(bytes32 id) - isOperation(id) <=> getTimestamp(id) > 0 +invariant isOperationCheck(env e, bytes32 id) + isOperation(e, id) <=> getTimestamp(id) > 0 filtered { f -> !f.isView } -invariant isOperationPendingCheck(bytes32 id) - isOperationPending(id) <=> getTimestamp(id) > DONE_TIMESTAMP() +invariant isOperationPendingCheck(env e, bytes32 id) + isOperationPending(e, id) <=> getTimestamp(id) > DONE_TIMESTAMP() filtered { f -> !f.isView } -invariant isOperationDoneCheck(bytes32 id) - isOperationDone(id) <=> getTimestamp(id) == DONE_TIMESTAMP() +invariant isOperationDoneCheck(env e, bytes32 id) + isOperationDone(e, id) <=> getTimestamp(id) == DONE_TIMESTAMP() filtered { f -> !f.isView } invariant isOperationReadyCheck(env e, bytes32 id) - isOperationReady(e, id) <=> (isOperationPending(id) && getTimestamp(id) <= e.block.timestamp) + isOperationReady(e, id) <=> (isOperationPending(e, id) && getTimestamp(id) <= e.block.timestamp) filtered { f -> !f.isView } /* @@ -105,15 +104,15 @@ invariant isOperationReadyCheck(env e, bytes32 id) */ invariant stateConsistency(bytes32 id, env e) // Check states are mutually exclusive - (isUnset(id) <=> (!isPending(id) && !isDone(id) )) && - (isPending(id) <=> (!isUnset(id) && !isDone(id) )) && - (isDone(id) <=> (!isUnset(id) && !isPending(id))) && + (isUnset(e, id) <=> (!isPending(e, id) && !isDone(e, id) )) && + (isPending(e, id) <=> (!isUnset(e, id) && !isDone(e, id) )) && + (isDone(e, id) <=> (!isUnset(e, id) && !isPending(e, id))) && // Check that the state helper behaves as expected: - (isUnset(id) <=> state(id) == UNSET() ) && - (isPending(id) <=> state(id) == PENDING() ) && - (isDone(id) <=> state(id) == DONE() ) && + (isUnset(e, id) <=> state(e, id) == UNSET() ) && + (isPending(e, id) <=> state(e, id) == PENDING() ) && + (isDone(e, id) <=> state(e, id) == DONE() ) && // Check substate - isOperationReady(e, id) => isPending(id) + isOperationReady(e, id) => isPending(e, id) filtered { f -> !f.isView } /* @@ -124,28 +123,28 @@ invariant stateConsistency(bytes32 id, env e) rule stateTransition(bytes32 id, env e, method f, calldataarg args) { require e.block.timestamp > 1; // Sanity - uint8 stateBefore = state(id); + uint8 stateBefore = state(e, id); f(e, args); - uint8 stateAfter = state(id); + uint8 stateAfter = state(e, id); // Cannot jump from UNSET to DONE assert stateBefore == UNSET() => stateAfter != DONE(); // UNSET → PENDING: schedule or scheduleBatch assert stateBefore == UNSET() && stateAfter == PENDING() => ( - f.selector == schedule(address, uint256, bytes, bytes32, bytes32, uint256).selector || - f.selector == scheduleBatch(address[], uint256[], bytes[], bytes32, bytes32, uint256).selector + f.selector == sig:schedule(address, uint256, bytes, bytes32, bytes32, uint256).selector || + f.selector == sig:scheduleBatch(address[], uint256[], bytes[], bytes32, bytes32, uint256).selector ); // PENDING → UNSET: cancel assert stateBefore == PENDING() && stateAfter == UNSET() => ( - f.selector == cancel(bytes32).selector + f.selector == sig:cancel(bytes32).selector ); // PENDING → DONE: execute or executeBatch assert stateBefore == PENDING() && stateAfter == DONE() => ( - f.selector == execute(address, uint256, bytes, bytes32, bytes32).selector || - f.selector == executeBatch(address[], uint256[], bytes[], bytes32, bytes32).selector + f.selector == sig:execute(address, uint256, bytes, bytes32, bytes32).selector || + f.selector == sig:executeBatch(address[], uint256[], bytes[], bytes32, bytes32).selector ); // DONE is final @@ -163,7 +162,7 @@ rule minDelayOnlyChange(env e) { method f; calldataarg args; f(e, args); - assert delayBefore != getMinDelay() => (e.msg.sender == currentContract && f.selector == updateDelay(uint256).selector), "Unauthorized delay update"; + assert delayBefore != getMinDelay() => (e.msg.sender == currentContract && f.selector == sig:updateDelay(uint256).selector), "Unauthorized delay update"; } /* @@ -172,8 +171,8 @@ rule minDelayOnlyChange(env e) { └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ rule schedule(env e, method f, bytes32 id, uint256 delay) filtered { f -> - f.selector == schedule(address, uint256, bytes, bytes32, bytes32, uint256).selector || - f.selector == scheduleBatch(address[], uint256[], bytes[], bytes32, bytes32, uint256).selector + f.selector == sig:schedule(address, uint256, bytes, bytes32, bytes32, uint256).selector || + f.selector == sig:scheduleBatch(address[], uint256[], bytes[], bytes32, bytes32, uint256).selector } { require nonpayable(e); @@ -184,7 +183,7 @@ rule schedule(env e, method f, bytes32 id, uint256 delay) filtered { f -> bytes32 otherId; uint256 otherTimestamp = getTimestamp(otherId); - uint8 stateBefore = state(id); + uint8 stateBefore = state(e, id); bool isDelaySufficient = delay >= getMinDelay(); bool isProposerBefore = hasRole(PROPOSER_ROLE(), e.msg.sender); @@ -199,8 +198,8 @@ rule schedule(env e, method f, bytes32 id, uint256 delay) filtered { f -> ); // effect - assert success => state(id) == PENDING(), "State transition violation"; - assert success => getTimestamp(id) == to_uint256(e.block.timestamp + delay), "Proposal timestamp not correctly set"; + assert success => state(e, id) == PENDING(), "State transition violation"; + assert success => getTimestamp(id) == require_uint256(e.block.timestamp + delay), "Proposal timestamp not correctly set"; // no side effect assert otherTimestamp != getTimestamp(otherId) => id == otherId, "Other proposal affected"; @@ -212,15 +211,15 @@ rule schedule(env e, method f, bytes32 id, uint256 delay) filtered { f -> └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ rule execute(env e, method f, bytes32 id, bytes32 predecessor) filtered { f -> - f.selector == execute(address, uint256, bytes, bytes32, bytes32).selector || - f.selector == executeBatch(address[], uint256[], bytes[], bytes32, bytes32).selector + f.selector == sig:execute(address, uint256, bytes, bytes32, bytes32).selector || + f.selector == sig:executeBatch(address[], uint256[], bytes[], bytes32, bytes32).selector } { bytes32 otherId; uint256 otherTimestamp = getTimestamp(otherId); - uint8 stateBefore = state(id); + uint8 stateBefore = state(e, id); bool isOperationReadyBefore = isOperationReady(e, id); bool isExecutorOrOpen = hasRole(EXECUTOR_ROLE(), e.msg.sender) || hasRole(EXECUTOR_ROLE(), 0); - bool predecessorDependency = predecessor == 0 || isDone(predecessor); + bool predecessorDependency = predecessor == to_bytes32(0) || isDone(e, predecessor); helperExecuteWithRevert(e, f, id, predecessor); bool success = !lastReverted; @@ -239,7 +238,7 @@ rule execute(env e, method f, bytes32 id, bytes32 predecessor) filtered { f -> ); // effect - assert success => state(id) == DONE(), "State transition violation"; + assert success => state(e, id) == DONE(), "State transition violation"; // no side effect assert otherTimestamp != getTimestamp(otherId) => id == otherId, "Other proposal affected"; @@ -255,7 +254,7 @@ rule cancel(env e, bytes32 id) { bytes32 otherId; uint256 otherTimestamp = getTimestamp(otherId); - uint8 stateBefore = state(id); + uint8 stateBefore = state(e, id); bool isCanceller = hasRole(CANCELLER_ROLE(), e.msg.sender); cancel@withrevert(e, id); @@ -268,7 +267,7 @@ rule cancel(env e, bytes32 id) { ); // effect - assert success => state(id) == UNSET(), "State transition violation"; + assert success => state(e, id) == UNSET(), "State transition violation"; // no side effect assert otherTimestamp != getTimestamp(otherId) => id == otherId, "Other proposal affected"; diff --git a/certora/specs/methods/IAccessControl.spec b/certora/specs/methods/IAccessControl.spec index 4d41ffda7..5c395b088 100644 --- a/certora/specs/methods/IAccessControl.spec +++ b/certora/specs/methods/IAccessControl.spec @@ -1,7 +1,8 @@ methods { - hasRole(bytes32, address) returns(bool) envfree - getRoleAdmin(bytes32) returns(bytes32) envfree - grantRole(bytes32, address) - revokeRole(bytes32, address) - renounceRole(bytes32, address) + function DEFAULT_ADMIN_ROLE() external returns (bytes32) envfree; + function hasRole(bytes32, address) external returns(bool) envfree; + function getRoleAdmin(bytes32) external returns(bytes32) envfree; + function grantRole(bytes32, address) external; + function revokeRole(bytes32, address) external; + function renounceRole(bytes32, address) external; } diff --git a/certora/specs/methods/IAccessControlDefaultAdminRules.spec b/certora/specs/methods/IAccessControlDefaultAdminRules.spec index a9dd08b7f..d02db180d 100644 --- a/certora/specs/methods/IAccessControlDefaultAdminRules.spec +++ b/certora/specs/methods/IAccessControlDefaultAdminRules.spec @@ -1,36 +1,36 @@ -import "./IERC5313.spec" +import "./IERC5313.spec"; methods { // === View == // Default Admin - defaultAdmin() returns(address) envfree - pendingDefaultAdmin() returns(address, uint48) envfree + function defaultAdmin() external returns(address) envfree; + function pendingDefaultAdmin() external returns(address, uint48) envfree; // Default Admin Delay - defaultAdminDelay() returns(uint48) - pendingDefaultAdminDelay() returns(uint48, uint48) - defaultAdminDelayIncreaseWait() returns(uint48) envfree + function defaultAdminDelay() external returns(uint48); + function pendingDefaultAdminDelay() external returns(uint48, uint48); + function defaultAdminDelayIncreaseWait() external returns(uint48) envfree; // === Mutations == // Default Admin - beginDefaultAdminTransfer(address) - cancelDefaultAdminTransfer() - acceptDefaultAdminTransfer() + function beginDefaultAdminTransfer(address) external; + function cancelDefaultAdminTransfer() external; + function acceptDefaultAdminTransfer() external; // Default Admin Delay - changeDefaultAdminDelay(uint48) - rollbackDefaultAdminDelay() + function changeDefaultAdminDelay(uint48) external; + function rollbackDefaultAdminDelay() external; // == FV == // Default Admin - pendingDefaultAdmin_() returns (address) envfree - pendingDefaultAdminSchedule_() returns (uint48) envfree + function pendingDefaultAdmin_() external returns (address) envfree; + function pendingDefaultAdminSchedule_() external returns (uint48) envfree; // Default Admin Delay - pendingDelay_() returns (uint48) - pendingDelaySchedule_() returns (uint48) - delayChangeWait_(uint48) returns (uint48) + function pendingDelay_() external returns (uint48); + function pendingDelaySchedule_() external returns (uint48); + function delayChangeWait_(uint48) external returns (uint48); } diff --git a/certora/specs/methods/IERC20.spec b/certora/specs/methods/IERC20.spec index cfa454e13..100901a04 100644 --- a/certora/specs/methods/IERC20.spec +++ b/certora/specs/methods/IERC20.spec @@ -1,11 +1,11 @@ methods { - name() returns (string) envfree => DISPATCHER(true) - symbol() returns (string) envfree => DISPATCHER(true) - decimals() returns (uint8) envfree => DISPATCHER(true) - totalSupply() returns (uint256) envfree => DISPATCHER(true) - balanceOf(address) returns (uint256) envfree => DISPATCHER(true) - allowance(address,address) returns (uint256) envfree => DISPATCHER(true) - approve(address,uint256) returns (bool) => DISPATCHER(true) - transfer(address,uint256) returns (bool) => DISPATCHER(true) - transferFrom(address,address,uint256) returns (bool) => DISPATCHER(true) + function name() external returns (string) envfree; + function symbol() external returns (string) envfree; + function decimals() external returns (uint8) envfree; + function totalSupply() external returns (uint256) envfree; + function balanceOf(address) external returns (uint256) envfree; + function allowance(address,address) external returns (uint256) envfree; + function approve(address,uint256) external returns (bool); + function transfer(address,uint256) external returns (bool); + function transferFrom(address,address,uint256) external returns (bool); } diff --git a/certora/specs/methods/IERC2612.spec b/certora/specs/methods/IERC2612.spec index 0c1689da4..4ecc17b49 100644 --- a/certora/specs/methods/IERC2612.spec +++ b/certora/specs/methods/IERC2612.spec @@ -1,5 +1,5 @@ methods { - permit(address,address,uint256,uint256,uint8,bytes32,bytes32) => DISPATCHER(true) - nonces(address) returns (uint256) envfree => DISPATCHER(true) - DOMAIN_SEPARATOR() returns (bytes32) envfree => DISPATCHER(true) + function permit(address,address,uint256,uint256,uint8,bytes32,bytes32) external; + function nonces(address) external returns (uint256) envfree; + function DOMAIN_SEPARATOR() external returns (bytes32) envfree; } diff --git a/certora/specs/methods/IERC3156.spec b/certora/specs/methods/IERC3156.spec deleted file mode 100644 index 18c10c515..000000000 --- a/certora/specs/methods/IERC3156.spec +++ /dev/null @@ -1,5 +0,0 @@ -methods { - maxFlashLoan(address) returns (uint256) envfree => DISPATCHER(true) - flashFee(address,uint256) returns (uint256) envfree => DISPATCHER(true) - flashLoan(address,address,uint256,bytes) returns (bool) => DISPATCHER(true) -} diff --git a/certora/specs/methods/IERC3156FlashBorrower.spec b/certora/specs/methods/IERC3156FlashBorrower.spec new file mode 100644 index 000000000..733c168c7 --- /dev/null +++ b/certora/specs/methods/IERC3156FlashBorrower.spec @@ -0,0 +1,3 @@ +methods { + function _.onFlashLoan(address,address,uint256,uint256,bytes) external => DISPATCHER(true); +} diff --git a/certora/specs/methods/IERC3156FlashLender.spec b/certora/specs/methods/IERC3156FlashLender.spec new file mode 100644 index 000000000..66ed14cd1 --- /dev/null +++ b/certora/specs/methods/IERC3156FlashLender.spec @@ -0,0 +1,5 @@ +methods { + function maxFlashLoan(address) external returns (uint256) envfree; + function flashFee(address,uint256) external returns (uint256) envfree; + function flashLoan(address,address,uint256,bytes) external returns (bool); +} diff --git a/certora/specs/methods/IERC5313.spec b/certora/specs/methods/IERC5313.spec index d4c5a0412..f1d469faf 100644 --- a/certora/specs/methods/IERC5313.spec +++ b/certora/specs/methods/IERC5313.spec @@ -1,3 +1,3 @@ methods { - owner() returns (address) envfree + function owner() external returns (address) envfree; } diff --git a/certora/specs/methods/IERC721.spec b/certora/specs/methods/IERC721.spec index e6d4e1e04..34ff50bd1 100644 --- a/certora/specs/methods/IERC721.spec +++ b/certora/specs/methods/IERC721.spec @@ -1,20 +1,17 @@ methods { // IERC721 - balanceOf(address) returns (uint256) envfree => DISPATCHER(true) - ownerOf(uint256) returns (address) envfree => DISPATCHER(true) - getApproved(uint256) returns (address) envfree => DISPATCHER(true) - isApprovedForAll(address,address) returns (bool) envfree => DISPATCHER(true) - safeTransferFrom(address,address,uint256,bytes) => DISPATCHER(true) - safeTransferFrom(address,address,uint256) => DISPATCHER(true) - transferFrom(address,address,uint256) => DISPATCHER(true) - approve(address,uint256) => DISPATCHER(true) - setApprovalForAll(address,bool) => DISPATCHER(true) + function balanceOf(address) external returns (uint256) envfree; + function ownerOf(uint256) external returns (address) envfree; + function getApproved(uint256) external returns (address) envfree; + function isApprovedForAll(address,address) external returns (bool) envfree; + function safeTransferFrom(address,address,uint256,bytes) external; + function safeTransferFrom(address,address,uint256) external; + function transferFrom(address,address,uint256) external; + function approve(address,uint256) external; + function setApprovalForAll(address,bool) external; // IERC721Metadata - name() returns (string) => DISPATCHER(true) - symbol() returns (string) => DISPATCHER(true) - tokenURI(uint256) returns (string) => DISPATCHER(true) - - // IERC721Receiver - onERC721Received(address,address,uint256,bytes) returns (bytes4) => DISPATCHER(true) + function name() external returns (string); + function symbol() external returns (string); + function tokenURI(uint256) external returns (string); } diff --git a/certora/specs/methods/IERC721Receiver.spec b/certora/specs/methods/IERC721Receiver.spec new file mode 100644 index 000000000..e6bdf4283 --- /dev/null +++ b/certora/specs/methods/IERC721Receiver.spec @@ -0,0 +1,3 @@ +methods { + function _.onERC721Received(address,address,uint256,bytes) external => DISPATCHER(true); +} diff --git a/certora/specs/methods/IOwnable.spec b/certora/specs/methods/IOwnable.spec index cfa15f95f..4d7c925c5 100644 --- a/certora/specs/methods/IOwnable.spec +++ b/certora/specs/methods/IOwnable.spec @@ -1,5 +1,5 @@ methods { - owner() returns (address) envfree - transferOwnership(address) - renounceOwnership() + function owner() external returns (address) envfree; + function transferOwnership(address) external; + function renounceOwnership() external; } diff --git a/certora/specs/methods/IOwnable2Step.spec b/certora/specs/methods/IOwnable2Step.spec index c8e671d27..e6a99570a 100644 --- a/certora/specs/methods/IOwnable2Step.spec +++ b/certora/specs/methods/IOwnable2Step.spec @@ -1,7 +1,7 @@ methods { - owner() returns (address) envfree - pendingOwner() returns (address) envfree - transferOwnership(address) - acceptOwnership() - renounceOwnership() + function owner() external returns (address) envfree; + function pendingOwner() external returns (address) envfree; + function transferOwnership(address) external; + function acceptOwnership() external; + function renounceOwnership() external; } diff --git a/requirements.txt b/requirements.txt index b92a2728d..fd0ec3019 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -certora-cli==4.3.1 +certora-cli==4.8.0 From 63851f8de5a6e560e9774832d1a31c43645b73d2 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Mon, 11 Sep 2023 23:44:28 +0200 Subject: [PATCH 045/167] Fix typographical errors & comments (#4595) Co-authored-by: Francisco --- contracts/governance/Governor.sol | 2 +- contracts/governance/TimelockController.sol | 2 +- .../extensions/GovernorTimelockAccess.sol | 2 +- .../extensions/GovernorTimelockControl.sol | 8 ++++---- contracts/utils/Nonces.sol | 2 +- contracts/utils/cryptography/MerkleProof.sol | 18 +++++++++--------- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index f0ee9d8b4..f57f324a1 100644 --- a/contracts/governance/Governor.sol +++ b/contracts/governance/Governor.sol @@ -16,7 +16,7 @@ import {Nonces} from "../utils/Nonces.sol"; import {IGovernor, IERC6372} from "./IGovernor.sol"; /** - * @dev Core of the governance system, designed to be extended though various modules. + * @dev Core of the governance system, designed to be extended through various modules. * * This contract is abstract and requires several functions to be implemented in various modules: * diff --git a/contracts/governance/TimelockController.sol b/contracts/governance/TimelockController.sol index 408feb6ca..1ae4afb24 100644 --- a/contracts/governance/TimelockController.sol +++ b/contracts/governance/TimelockController.sol @@ -164,7 +164,7 @@ contract TimelockController is AccessControl, ERC721Holder, ERC1155Holder { } /** - * @dev Returns whether an id correspond to a registered operation. This + * @dev Returns whether an id corresponds to a registered operation. This * includes both Pending, Ready and Done operations. */ function isOperation(bytes32 id) public view returns (bool) { diff --git a/contracts/governance/extensions/GovernorTimelockAccess.sol b/contracts/governance/extensions/GovernorTimelockAccess.sol index 63e547b83..c1c944e43 100644 --- a/contracts/governance/extensions/GovernorTimelockAccess.sol +++ b/contracts/governance/extensions/GovernorTimelockAccess.sol @@ -35,7 +35,7 @@ abstract contract GovernorTimelockAccess is Governor { // storing the length redundantly. // We pack 8 operations' data in each bucket. Each uint32 value is set to 1 upon proposal creation if it has // to be scheduled and executed through the manager. Upon queuing, the value is set to nonce + 1, where the - // nonce is that which we get back from the manager when scheduling the operation. + // nonce is received from the manager when scheduling the operation. mapping(uint256 operationBucket => uint32[8]) managerData; } diff --git a/contracts/governance/extensions/GovernorTimelockControl.sol b/contracts/governance/extensions/GovernorTimelockControl.sol index 0a4499737..2b9421bf6 100644 --- a/contracts/governance/extensions/GovernorTimelockControl.sol +++ b/contracts/governance/extensions/GovernorTimelockControl.sol @@ -17,10 +17,10 @@ import {SafeCast} from "../../utils/math/SafeCast.sol"; * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be * inaccessible. * - * WARNING: Setting up the TimelockController to have additional proposers besides the governor is very risky, as it - * grants them powers that they must be trusted or known not to use: 1) {onlyGovernance} functions like {relay} are - * available to them through the timelock, and 2) approved governance proposals can be blocked by them, effectively - * executing a Denial of Service attack. This risk will be mitigated in a future release. + * WARNING: Setting up the TimelockController to have additional proposers or cancellers besides the governor is very + * risky, as it grants them the ability to: 1) execute operations as the timelock, and thus possibly performing + * operations or accessing funds that are expected to only be accessible through a vote, and 2) block governance + * proposals that have been approved by the voters, effectively executing a Denial of Service attack. */ abstract contract GovernorTimelockControl is Governor { TimelockController private _timelock; diff --git a/contracts/utils/Nonces.sol b/contracts/utils/Nonces.sol index 2a32142ea..ab43e03eb 100644 --- a/contracts/utils/Nonces.sol +++ b/contracts/utils/Nonces.sol @@ -13,7 +13,7 @@ abstract contract Nonces { mapping(address account => uint256) private _nonces; /** - * @dev Returns an the next unused nonce for an address. + * @dev Returns the next unused nonce for an address. */ function nonces(address owner) public view virtual returns (uint256) { return _nonces[owner]; diff --git a/contracts/utils/cryptography/MerkleProof.sol b/contracts/utils/cryptography/MerkleProof.sol index a1f5129f0..155ec81bf 100644 --- a/contracts/utils/cryptography/MerkleProof.sol +++ b/contracts/utils/cryptography/MerkleProof.sol @@ -13,8 +13,8 @@ pragma solidity ^0.8.20; * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in - * the merkle tree could be reinterpreted as a leaf value. - * OpenZeppelin's JavaScript library generates merkle trees that are safe + * the Merkle tree could be reinterpreted as a leaf value. + * OpenZeppelin's JavaScript library generates Merkle trees that are safe * against this attack out of the box. */ library MerkleProof { @@ -66,10 +66,10 @@ library MerkleProof { } /** - * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by + * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * - * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerify( bytes32[] memory proof, @@ -83,7 +83,7 @@ library MerkleProof { /** * @dev Calldata version of {multiProofVerify} * - * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerifyCalldata( bytes32[] calldata proof, @@ -100,7 +100,7 @@ library MerkleProof { * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * - * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree + * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). */ @@ -112,7 +112,7 @@ library MerkleProof { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of - // the merkle tree. + // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; @@ -158,7 +158,7 @@ library MerkleProof { /** * @dev Calldata version of {processMultiProof}. * - * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function processMultiProofCalldata( bytes32[] calldata proof, @@ -168,7 +168,7 @@ library MerkleProof { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of - // the merkle tree. + // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; From 60e3ffe6a3cc38ab94cae995bc1de081eed79335 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 12 Sep 2023 16:59:48 +0200 Subject: [PATCH 046/167] Remove non-standard increaseAllowance and decreaseAllowance from ERC20 (#4585) Co-authored-by: Francisco --- .changeset/six-frogs-turn.md | 5 + certora/specs/ERC20.spec | 72 -------------- contracts/token/ERC20/ERC20.sol | 52 ----------- test/token/ERC20/ERC20.test.js | 161 -------------------------------- 4 files changed, 5 insertions(+), 285 deletions(-) create mode 100644 .changeset/six-frogs-turn.md diff --git a/.changeset/six-frogs-turn.md b/.changeset/six-frogs-turn.md new file mode 100644 index 000000000..9c5668b6d --- /dev/null +++ b/.changeset/six-frogs-turn.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': major +--- + +`ERC20`: Remove the non-standard `increaseAllowance` and `decreaseAllowance` functions. diff --git a/certora/specs/ERC20.spec b/certora/specs/ERC20.spec index ee601bd19..21a033585 100644 --- a/certora/specs/ERC20.spec +++ b/certora/specs/ERC20.spec @@ -3,10 +3,6 @@ import "methods/IERC20.spec"; import "methods/IERC2612.spec"; methods { - // non standard ERC20 functions - function increaseAllowance(address,uint256) external returns (bool); - function decreaseAllowance(address,uint256) external returns (bool); - // exposed for FV function mint(address,uint256) external; function burn(address,uint256) external; @@ -117,7 +113,6 @@ rule onlyHolderOfSpenderCanChangeAllowance(env e) { allowanceAfter > allowanceBefore ) => ( (f.selector == sig:approve(address,uint256).selector && e.msg.sender == holder) || - (f.selector == sig:increaseAllowance(address,uint256).selector && e.msg.sender == holder) || (f.selector == sig:permit(address,address,uint256,uint256,uint8,bytes32,bytes32).selector) ); @@ -126,7 +121,6 @@ rule onlyHolderOfSpenderCanChangeAllowance(env e) { ) => ( (f.selector == sig:transferFrom(address,address,uint256).selector && e.msg.sender == spender) || (f.selector == sig:approve(address,uint256).selector && e.msg.sender == holder ) || - (f.selector == sig:decreaseAllowance(address,uint256).selector && e.msg.sender == holder ) || (f.selector == sig:permit(address,address,uint256,uint256,uint8,bytes32,bytes32).selector) ); } @@ -307,72 +301,6 @@ rule approve(env e) { } } -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Rule: increaseAllowance behavior and side effects │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule increaseAllowance(env e) { - require nonpayable(e); - - address holder = e.msg.sender; - address spender; - address otherHolder; - address otherSpender; - uint256 amount; - - // cache state - uint256 allowanceBefore = allowance(holder, spender); - uint256 otherAllowanceBefore = allowance(otherHolder, otherSpender); - - // run transaction - increaseAllowance@withrevert(e, spender, amount); - - // check outcome - if (lastReverted) { - assert holder == 0 || spender == 0 || allowanceBefore + amount > max_uint256; - } else { - // allowance is updated - assert to_mathint(allowance(holder, spender)) == allowanceBefore + amount; - - // other allowances are untouched - assert allowance(otherHolder, otherSpender) != otherAllowanceBefore => (otherHolder == holder && otherSpender == spender); - } -} - -/* -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Rule: decreaseAllowance behavior and side effects │ -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -*/ -rule decreaseAllowance(env e) { - require nonpayable(e); - - address holder = e.msg.sender; - address spender; - address otherHolder; - address otherSpender; - uint256 amount; - - // cache state - uint256 allowanceBefore = allowance(holder, spender); - uint256 otherAllowanceBefore = allowance(otherHolder, otherSpender); - - // run transaction - decreaseAllowance@withrevert(e, spender, amount); - - // check outcome - if (lastReverted) { - assert holder == 0 || spender == 0 || allowanceBefore < amount; - } else { - // allowance is updated - assert to_mathint(allowance(holder, spender)) == allowanceBefore - amount; - - // other allowances are untouched - assert allowance(otherHolder, otherSpender) != otherAllowanceBefore => (otherHolder == holder && otherSpender == spender); - } -} - /* ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Rule: permit behavior and side effects │ diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index 8eeb3149b..692fde828 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/contracts/token/ERC20/ERC20.sol @@ -30,10 +30,6 @@ import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. - * - * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} - * functions have been added to mitigate the well-known issues around setting - * allowances. See {IERC20-approve}. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; @@ -167,54 +163,6 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { return true; } - /** - * @dev Atomically increases the allowance granted to `spender` by the caller. - * - * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {IERC20-approve}. - * - * Emits an {Approval} event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ - function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { - address owner = _msgSender(); - _approve(owner, spender, allowance(owner, spender) + addedValue); - return true; - } - - /** - * @dev Atomically decreases the allowance granted to `spender` by the caller. - * - * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {IERC20-approve}. - * - * Emits an {Approval} event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - * - `spender` must have allowance for the caller of at least - * `requestedDecrease`. - * - * NOTE: Although this function is designed to avoid double spending with {approval}, - * it can still be frontrunned, preventing any attempt of allowance reduction. - */ - function decreaseAllowance(address spender, uint256 requestedDecrease) public virtual returns (bool) { - address owner = _msgSender(); - uint256 currentAllowance = allowance(owner, spender); - if (currentAllowance < requestedDecrease) { - revert ERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); - } - unchecked { - _approve(owner, spender, currentAllowance - requestedDecrease); - } - - return true; - } - /** * @dev Moves a `value` amount of tokens from `from` to `to`. * diff --git a/test/token/ERC20/ERC20.test.js b/test/token/ERC20/ERC20.test.js index a63df5239..2191fd8cb 100644 --- a/test/token/ERC20/ERC20.test.js +++ b/test/token/ERC20/ERC20.test.js @@ -42,167 +42,6 @@ contract('ERC20', function (accounts) { expect(await this.token.decimals()).to.be.bignumber.equal('18'); }); - describe('decrease allowance', function () { - describe('when the spender is not the zero address', function () { - const spender = recipient; - - function shouldDecreaseApproval(value) { - describe('when there was no approved value before', function () { - it('reverts', async function () { - const allowance = await this.token.allowance(initialHolder, spender); - await expectRevertCustomError( - this.token.decreaseAllowance(spender, value, { from: initialHolder }), - 'ERC20FailedDecreaseAllowance', - [spender, allowance, value], - ); - }); - }); - - describe('when the spender had an approved value', function () { - const approvedValue = value; - - beforeEach(async function () { - await this.token.approve(spender, approvedValue, { from: initialHolder }); - }); - - it('emits an approval event', async function () { - expectEvent( - await this.token.decreaseAllowance(spender, approvedValue, { from: initialHolder }), - 'Approval', - { owner: initialHolder, spender: spender, value: new BN(0) }, - ); - }); - - it('decreases the spender allowance subtracting the requested value', async function () { - await this.token.decreaseAllowance(spender, approvedValue.subn(1), { from: initialHolder }); - - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal('1'); - }); - - it('sets the allowance to zero when all allowance is removed', async function () { - await this.token.decreaseAllowance(spender, approvedValue, { from: initialHolder }); - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal('0'); - }); - - it('reverts when more than the full allowance is removed', async function () { - await expectRevertCustomError( - this.token.decreaseAllowance(spender, approvedValue.addn(1), { from: initialHolder }), - 'ERC20FailedDecreaseAllowance', - [spender, approvedValue, approvedValue.addn(1)], - ); - }); - }); - } - - describe('when the sender has enough balance', function () { - const value = initialSupply; - - shouldDecreaseApproval(value); - }); - - describe('when the sender does not have enough balance', function () { - const value = initialSupply.addn(1); - - shouldDecreaseApproval(value); - }); - }); - - describe('when the spender is the zero address', function () { - const value = initialSupply; - const spender = ZERO_ADDRESS; - - it('reverts', async function () { - await expectRevertCustomError( - this.token.decreaseAllowance(spender, value, { from: initialHolder }), - 'ERC20FailedDecreaseAllowance', - [spender, 0, value], - ); - }); - }); - }); - - describe('increase allowance', function () { - const value = initialSupply; - - describe('when the spender is not the zero address', function () { - const spender = recipient; - - describe('when the sender has enough balance', function () { - it('emits an approval event', async function () { - expectEvent(await this.token.increaseAllowance(spender, value, { from: initialHolder }), 'Approval', { - owner: initialHolder, - spender: spender, - value: value, - }); - }); - - describe('when there was no approved value before', function () { - it('approves the requested value', async function () { - await this.token.increaseAllowance(spender, value, { from: initialHolder }); - - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal(value); - }); - }); - - describe('when the spender had an approved value', function () { - beforeEach(async function () { - await this.token.approve(spender, new BN(1), { from: initialHolder }); - }); - - it('increases the spender allowance adding the requested value', async function () { - await this.token.increaseAllowance(spender, value, { from: initialHolder }); - - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal(value.addn(1)); - }); - }); - }); - - describe('when the sender does not have enough balance', function () { - const value = initialSupply.addn(1); - - it('emits an approval event', async function () { - expectEvent(await this.token.increaseAllowance(spender, value, { from: initialHolder }), 'Approval', { - owner: initialHolder, - spender: spender, - value: value, - }); - }); - - describe('when there was no approved value before', function () { - it('approves the requested value', async function () { - await this.token.increaseAllowance(spender, value, { from: initialHolder }); - - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal(value); - }); - }); - - describe('when the spender had an approved value', function () { - beforeEach(async function () { - await this.token.approve(spender, new BN(1), { from: initialHolder }); - }); - - it('increases the spender allowance adding the requested value', async function () { - await this.token.increaseAllowance(spender, value, { from: initialHolder }); - - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal(value.addn(1)); - }); - }); - }); - }); - - describe('when the spender is the zero address', function () { - const spender = ZERO_ADDRESS; - - it('reverts', async function () { - await expectRevertCustomError( - this.token.increaseAllowance(spender, value, { from: initialHolder }), - 'ERC20InvalidSpender', - [ZERO_ADDRESS], - ); - }); - }); - }); - describe('_mint', function () { const value = new BN(50); it('rejects a null account', async function () { From 3bd9ed377e738a1cc66cca180a2a26426c63b8dc Mon Sep 17 00:00:00 2001 From: Ownerless Inc <90667119+0xneves@users.noreply.github.com> Date: Wed, 13 Sep 2023 16:22:05 -0300 Subject: [PATCH 047/167] Better context on _spendAllowance NatSpec (#4568) Co-authored-by: Francisco Co-authored-by: Hadrien Croubois --- contracts/token/ERC20/ERC20.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index 692fde828..0ca686a95 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/contracts/token/ERC20/ERC20.sol @@ -304,7 +304,7 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * - * Might emit an {Approval} event. + * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); From 80b2d1df3861cd1f03788e6462e29b2994e336d2 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 14 Sep 2023 01:25:35 +0200 Subject: [PATCH 048/167] Improve GovernorTimelockAccess (#4591) Co-authored-by: Francisco --- contracts/access/manager/AccessManager.sol | 29 ++- contracts/access/manager/IAccessManager.sol | 2 + .../extensions/GovernorTimelockAccess.sol | 160 +++++++++----- .../extensions/GovernorTimelockAccess.test.js | 203 ++++++++++++++++-- 4 files changed, 312 insertions(+), 82 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index eb79eb8ec..0483f5140 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -582,13 +582,9 @@ contract AccessManager is Context, Multicall, IAccessManager { } // If caller is authorised, schedule operation - operationId = _hashOperation(caller, target, data); + operationId = hashOperation(caller, target, data); - // Cannot reschedule unless the operation has expired - uint48 prevTimepoint = _schedules[operationId].timepoint; - if (prevTimepoint != 0 && !_isExpired(prevTimepoint)) { - revert AccessManagerAlreadyScheduled(operationId); - } + _checkNotScheduled(operationId); unchecked { // It's not feasible to overflow the nonce in less than 1000 years @@ -601,6 +597,17 @@ contract AccessManager is Context, Multicall, IAccessManager { // Using named return values because otherwise we get stack too deep } + /** + * @dev Reverts if the operation is currently scheduled and has not expired. + * (Note: This function was introduced due to stack too deep errors in schedule.) + */ + function _checkNotScheduled(bytes32 operationId) private view { + uint48 prevTimepoint = _schedules[operationId].timepoint; + if (prevTimepoint != 0 && !_isExpired(prevTimepoint)) { + revert AccessManagerAlreadyScheduled(operationId); + } + } + /** * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the * execution delay is 0. @@ -625,7 +632,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } // If caller is authorised, check operation was scheduled early enough - bytes32 operationId = _hashOperation(caller, target, data); + bytes32 operationId = hashOperation(caller, target, data); uint32 nonce; if (setback != 0) { @@ -659,7 +666,7 @@ contract AccessManager is Context, Multicall, IAccessManager { if (IAccessManaged(target).isConsumingScheduledOp() != IAccessManaged.isConsumingScheduledOp.selector) { revert AccessManagerUnauthorizedConsume(target); } - _consumeScheduledOp(_hashOperation(caller, target, data)); + _consumeScheduledOp(hashOperation(caller, target, data)); } /** @@ -699,7 +706,7 @@ contract AccessManager is Context, Multicall, IAccessManager { address msgsender = _msgSender(); bytes4 selector = bytes4(data[0:4]); - bytes32 operationId = _hashOperation(caller, target, data); + bytes32 operationId = hashOperation(caller, target, data); if (_schedules[operationId].timepoint == 0) { revert AccessManagerNotScheduled(operationId); } else if (caller != msgsender) { @@ -721,7 +728,7 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Hashing function for delayed operations */ - function _hashOperation(address caller, address target, bytes calldata data) private pure returns (bytes32) { + function hashOperation(address caller, address target, bytes calldata data) public view virtual returns (bytes32) { return keccak256(abi.encode(caller, target, data)); } @@ -756,7 +763,7 @@ contract AccessManager is Context, Multicall, IAccessManager { (, uint64 requiredRole, ) = _getAdminRestrictions(_msgData()); revert AccessManagerUnauthorizedAccount(caller, requiredRole); } else { - _consumeScheduledOp(_hashOperation(caller, address(this), _msgData())); + _consumeScheduledOp(hashOperation(caller, address(this), _msgData())); } } } diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index b0c9a51e4..0fec166f9 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -57,6 +57,8 @@ interface IAccessManager { bytes4 selector ) external view returns (bool allowed, uint32 delay); + function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32); + function expiration() external view returns (uint32); function isTargetClosed(address target) external view returns (bool); diff --git a/contracts/governance/extensions/GovernorTimelockAccess.sol b/contracts/governance/extensions/GovernorTimelockAccess.sol index c1c944e43..36f82a20f 100644 --- a/contracts/governance/extensions/GovernorTimelockAccess.sol +++ b/contracts/governance/extensions/GovernorTimelockAccess.sol @@ -21,9 +21,19 @@ import {Time} from "../../utils/types/Time.sol"; * permissions. Operations that are delay-restricted by the manager, however, will be executed through the * {AccessManager-execute} function. * - * Note that some operations may be cancelable in the {AccessManager} by the admin or a set of guardians, depending on - * the restricted operation being invoked. Since proposals are atomic, the cancellation by a guardian of a single - * operation in a proposal will cause all of it to become unable to execute. + * ==== Security Considerations + * + * Some operations may be cancelable in the `AccessManager` by the admin or a set of guardians, depending on the + * restricted function being invoked. Since proposals are atomic, the cancellation by a guardian of a single operation + * in a proposal will cause all of the proposal to become unable to execute. Consider proposing cancellable operations + * separately. + * + * By default, function calls will be routed through the associated `AccessManager` whenever it claims the target + * function to be restricted by it. However, admins may configure the manager to make that claim for functions that a + * governor would want to call directly (e.g., token transfers) in an attempt to deny it access to those functions. To + * mitigate this attack vector, the governor is able to ignore the restrictions claimed by the `AccessManager` using + * {setAccessManagerIgnored}. While permanent denial of service is mitigated, temporary DoS may still be technically + * possible. All of the governor's own functions (e.g., {setBaseDelaySeconds}) ignore the `AccessManager` by default. */ abstract contract GovernorTimelockAccess is Governor { // An execution plan is produced at the moment a proposal is created, in order to fix at that point the exact @@ -39,6 +49,11 @@ abstract contract GovernorTimelockAccess is Governor { mapping(uint256 operationBucket => uint32[8]) managerData; } + // The meaning of the "toggle" set to true depends on the target contract. + // If target == address(this), the manager is ignored by default, and a true toggle means it won't be ignored. + // For all other target contracts, the manager is used by default, and a true toggle means it will be ignored. + mapping(address target => mapping(bytes4 selector => bool)) private _ignoreToggle; + mapping(uint256 proposalId => ExecutionPlan) private _executionPlan; uint32 private _baseDelay; @@ -47,8 +62,10 @@ abstract contract GovernorTimelockAccess is Governor { error GovernorUnmetDelay(uint256 proposalId, uint256 neededTimestamp); error GovernorMismatchedNonce(uint256 proposalId, uint256 expectedNonce, uint256 actualNonce); + error GovernorLockedIgnore(); event BaseDelaySet(uint32 oldBaseDelaySeconds, uint32 newBaseDelaySeconds); + event AccessManagerIgnoredSet(address target, bytes4 selector, bool ignored); /** * @dev Initialize the governor with an {AccessManager} and initial base delay. @@ -92,22 +109,62 @@ abstract contract GovernorTimelockAccess is Governor { _baseDelay = newBaseDelay; } + /** + * @dev Check if restrictions from the associated {AccessManager} are ignored for a target function. Returns true + * when the target function will be invoked directly regardless of `AccessManager` settings for the function. + * See {setAccessManagerIgnored} and Security Considerations above. + */ + function isAccessManagerIgnored(address target, bytes4 selector) public view virtual returns (bool) { + bool isGovernor = target == address(this); + return _ignoreToggle[target][selector] != isGovernor; // equivalent to: isGovernor ? !toggle : toggle + } + + /** + * @dev Configure whether restrictions from the associated {AccessManager} are ignored for a target function. + * See Security Considerations above. + */ + function setAccessManagerIgnored( + address target, + bytes4[] calldata selectors, + bool ignored + ) public virtual onlyGovernance { + for (uint256 i = 0; i < selectors.length; ++i) { + _setAccessManagerIgnored(target, selectors[i], ignored); + } + } + + /** + * @dev Internal version of {setAccessManagerIgnored} without access restriction. + */ + function _setAccessManagerIgnored(address target, bytes4 selector, bool ignored) internal virtual { + bool isGovernor = target == address(this); + if (isGovernor && selector == this.setAccessManagerIgnored.selector) { + revert GovernorLockedIgnore(); + } + _ignoreToggle[target][selector] = ignored != isGovernor; // equivalent to: isGovernor ? !ignored : ignored + emit AccessManagerIgnoredSet(target, selector, ignored); + } + /** * @dev Public accessor to check the execution plan, including the number of seconds that the proposal will be - * delayed since queuing, and an array indicating which of the proposal actions will be executed indirectly through - * the associated {AccessManager}. + * delayed since queuing, an array indicating which of the proposal actions will be executed indirectly through + * the associated {AccessManager}, and another indicating which will be scheduled in {queue}. Note that + * those that must be scheduled are cancellable by `AccessManager` guardians. */ - function proposalExecutionPlan(uint256 proposalId) public view returns (uint32, bool[] memory) { + function proposalExecutionPlan( + uint256 proposalId + ) public view returns (uint32 delay, bool[] memory indirect, bool[] memory withDelay) { ExecutionPlan storage plan = _executionPlan[proposalId]; - uint32 delay = plan.delay; uint32 length = plan.length; - bool[] memory indirect = new bool[](length); + delay = plan.delay; + indirect = new bool[](length); + withDelay = new bool[](length); for (uint256 i = 0; i < length; ++i) { - (indirect[i], ) = _getManagerData(plan, i); + (indirect[i], withDelay[i], ) = _getManagerData(plan, i); } - return (delay, indirect); + return (delay, indirect, withDelay); } /** @@ -134,12 +191,19 @@ abstract contract GovernorTimelockAccess is Governor { plan.length = SafeCast.toUint16(targets.length); for (uint256 i = 0; i < targets.length; ++i) { - uint32 delay = _detectExecutionRequirements(targets[i], bytes4(calldatas[i])); - if (delay > 0) { - _setManagerData(plan, i, 0); + address target = targets[i]; + bytes4 selector = bytes4(calldatas[i]); + (bool immediate, uint32 delay) = AuthorityUtils.canCallWithDelay( + address(_manager), + address(this), + target, + selector + ); + if ((immediate || delay > 0) && !isAccessManagerIgnored(target, selector)) { + _setManagerData(plan, i, !immediate, 0); + // downcast is safe because both arguments are uint32 + neededDelay = uint32(Math.max(delay, neededDelay)); } - // downcast is safe because both arguments are uint32 - neededDelay = uint32(Math.max(delay, neededDelay)); } plan.delay = neededDelay; @@ -164,10 +228,10 @@ abstract contract GovernorTimelockAccess is Governor { uint48 eta = Time.timestamp() + plan.delay; for (uint256 i = 0; i < targets.length; ++i) { - (bool delayed, ) = _getManagerData(plan, i); - if (delayed) { + (, bool withDelay, ) = _getManagerData(plan, i); + if (withDelay) { (, uint32 nonce) = _manager.schedule(targets[i], calldatas[i], eta); - _setManagerData(plan, i, nonce); + _setManagerData(plan, i, true, nonce); } } @@ -192,10 +256,10 @@ abstract contract GovernorTimelockAccess is Governor { ExecutionPlan storage plan = _executionPlan[proposalId]; for (uint256 i = 0; i < targets.length; ++i) { - (bool delayed, uint32 nonce) = _getManagerData(plan, i); - if (delayed) { + (bool controlled, bool withDelay, uint32 nonce) = _getManagerData(plan, i); + if (controlled) { uint32 executedNonce = _manager.execute{value: values[i]}(targets[i], calldatas[i]); - if (executedNonce != nonce) { + if (withDelay && executedNonce != nonce) { revert GovernorMismatchedNonce(proposalId, nonce, executedNonce); } } else { @@ -220,15 +284,23 @@ abstract contract GovernorTimelockAccess is Governor { ExecutionPlan storage plan = _executionPlan[proposalId]; - // If the proposal has been scheduled it will have an ETA and we have to externally cancel + // If the proposal has been scheduled it will have an ETA and we may have to externally cancel if (eta != 0) { for (uint256 i = 0; i < targets.length; ++i) { - (bool delayed, uint32 nonce) = _getManagerData(plan, i); - if (delayed) { - // Attempt to cancel considering the operation could have been cancelled and rescheduled already - uint32 canceledNonce = _manager.cancel(address(this), targets[i], calldatas[i]); - if (canceledNonce != nonce) { - revert GovernorMismatchedNonce(proposalId, nonce, canceledNonce); + (, bool withDelay, uint32 nonce) = _getManagerData(plan, i); + // Only attempt to cancel if the execution plan included a delay + if (withDelay) { + bytes32 operationId = _manager.hashOperation(address(this), targets[i], calldatas[i]); + // Check first if the current operation nonce is the one that we observed previously. It could + // already have been cancelled and rescheduled. We don't want to cancel unless it is exactly the + // instance that we previously scheduled. + if (nonce == _manager.getNonce(operationId)) { + // It is important that all calls have an opportunity to be cancelled. We chose to ignore + // potential failures of some of the cancel operations to give the other operations a chance to + // be properly cancelled. In particular cancel might fail if the operation was already cancelled + // by guardians previously. We don't match on the revert reason to avoid encoding assumptions + // about specific errors. + try _manager.cancel(address(this), targets[i], calldatas[i]) {} catch {} } } } @@ -237,39 +309,27 @@ abstract contract GovernorTimelockAccess is Governor { return proposalId; } - /** - * @dev Check if the execution of a call needs to be performed through an AccessManager and what delay should be - * applied to this call. - * - * Returns { manager: address(0), delay: 0 } if: - * - target does not have code - * - target does not implement IAccessManaged - * - calling canCall on the target's manager returns a 0 delay - * - calling canCall on the target's manager reverts - * Otherwise (calling canCall on the target's manager returns a non 0 delay), return the address of the - * AccessManager to use, and the delay for this call. - */ - function _detectExecutionRequirements(address target, bytes4 selector) private view returns (uint32 delay) { - (, delay) = AuthorityUtils.canCallWithDelay(address(_manager), address(this), target, selector); - } - /** * @dev Returns whether the operation at an index is delayed by the manager, and its scheduling nonce once queued. */ - function _getManagerData(ExecutionPlan storage plan, uint256 index) private view returns (bool, uint32) { + function _getManagerData( + ExecutionPlan storage plan, + uint256 index + ) private view returns (bool controlled, bool withDelay, uint32 nonce) { (uint256 bucket, uint256 subindex) = _getManagerDataIndices(index); - uint32 nonce = plan.managerData[bucket][subindex]; + uint32 value = plan.managerData[bucket][subindex]; unchecked { - return nonce > 0 ? (true, nonce - 1) : (false, 0); + return (value > 0, value > 1, value > 1 ? value - 2 : 0); } } /** - * @dev Marks an operation at an index as delayed by the manager, and sets its scheduling nonce. + * @dev Marks an operation at an index as permissioned by the manager, potentially delayed, and + * when delayed sets its scheduling nonce. */ - function _setManagerData(ExecutionPlan storage plan, uint256 index, uint32 nonce) private { + function _setManagerData(ExecutionPlan storage plan, uint256 index, bool withDelay, uint32 nonce) private { (uint256 bucket, uint256 subindex) = _getManagerDataIndices(index); - plan.managerData[bucket][subindex] = nonce + 1; + plan.managerData[bucket][subindex] = withDelay ? nonce + 2 : 1; } /** diff --git a/test/governance/extensions/GovernorTimelockAccess.test.js b/test/governance/extensions/GovernorTimelockAccess.test.js index c6e230a31..59ddf6dac 100644 --- a/test/governance/extensions/GovernorTimelockAccess.test.js +++ b/test/governance/extensions/GovernorTimelockAccess.test.js @@ -5,6 +5,7 @@ const Enums = require('../../helpers/enums'); const { GovernorHelper, proposalStatesToBitMap } = require('../../helpers/governance'); const { expectRevertCustomError } = require('../../helpers/customError'); const { clockFromReceipt } = require('../../helpers/time'); +const { selector } = require('../../helpers/methods'); const AccessManager = artifacts.require('$AccessManager'); const Governor = artifacts.require('$GovernorTimelockAccessMock'); @@ -210,36 +211,196 @@ contract('GovernorTimelockAccess', function (accounts) { await expectEvent.inTransaction(txExecute.tx, this.receiver, 'CalledUnrestricted'); }); - it('cancellation after queue (internal)', async function () { + describe('cancel', function () { const delay = 1000; const roleId = '1'; - await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { - from: admin, + beforeEach(async function () { + await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { + from: admin, + }); + await this.manager.grantRole(roleId, this.mock.address, delay, { from: admin }); }); - await this.manager.grantRole(roleId, this.mock.address, delay, { from: admin }); - this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); + it('cancellation after queue (internal)', async function () { + this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); - await this.helper.propose(); - await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await this.helper.waitForDeadline(); - await this.helper.queue(); + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + await this.helper.queue(); - const txCancel = await this.helper.cancel('internal'); - expectEvent(txCancel, 'ProposalCanceled', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txCancel.tx, this.manager, 'OperationCanceled', { - operationId: this.restricted.operationId, - nonce: '1', + const txCancel = await this.helper.cancel('internal'); + expectEvent(txCancel, 'ProposalCanceled', { proposalId: this.proposal.id }); + await expectEvent.inTransaction(txCancel.tx, this.manager, 'OperationCanceled', { + operationId: this.restricted.operationId, + nonce: '1', + }); + + await this.helper.waitForEta(); + await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ + this.proposal.id, + Enums.ProposalState.Canceled, + proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ]); }); - await this.helper.waitForEta(); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Canceled, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + it('cancel calls already canceled by guardian', async function () { + const operationA = { target: this.receiver.address, data: this.restricted.selector + '00' }; + const operationB = { target: this.receiver.address, data: this.restricted.selector + '01' }; + const operationC = { target: this.receiver.address, data: this.restricted.selector + '02' }; + const operationAId = hashOperation(this.mock.address, operationA.target, operationA.data); + const operationBId = hashOperation(this.mock.address, operationB.target, operationB.data); + + const proposal1 = new GovernorHelper(this.mock, mode); + const proposal2 = new GovernorHelper(this.mock, mode); + proposal1.setProposal([operationA, operationB], 'proposal A+B'); + proposal2.setProposal([operationA, operationC], 'proposal A+C'); + + for (const p of [proposal1, proposal2]) { + await p.propose(); + await p.waitForSnapshot(); + await p.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await p.waitForDeadline(); + } + + // Can queue the first proposal + await proposal1.queue(); + + // Cannot queue the second proposal: operation A already scheduled with delay + await expectRevertCustomError(proposal2.queue(), 'AccessManagerAlreadyScheduled', [operationAId]); + + // Admin cancels operation B on the manager + await this.manager.cancel(this.mock.address, operationB.target, operationB.data, { from: admin }); + + // Still cannot queue the second proposal: operation A already scheduled with delay + await expectRevertCustomError(proposal2.queue(), 'AccessManagerAlreadyScheduled', [operationAId]); + + await proposal1.waitForEta(); + + // Cannot execute first proposal: operation B has been canceled + await expectRevertCustomError(proposal1.execute(), 'AccessManagerNotScheduled', [operationBId]); + + // Cancel the first proposal to release operation A + await proposal1.cancel('internal'); + + // can finally queue the second proposal + await proposal2.queue(); + + await proposal2.waitForEta(); + + // Can execute second proposal + await proposal2.execute(); + }); + }); + + describe('ignore AccessManager', function () { + it('defaults', async function () { + expect(await this.mock.isAccessManagerIgnored(this.receiver.address, this.restricted.selector)).to.equal( + false, + ); + expect(await this.mock.isAccessManagerIgnored(this.mock.address, '0x12341234')).to.equal(true); + }); + + it('internal setter', async function () { + const p1 = { target: this.receiver.address, selector: this.restricted.selector, ignored: true }; + const tx1 = await this.mock.$_setAccessManagerIgnored(p1.target, p1.selector, p1.ignored); + expect(await this.mock.isAccessManagerIgnored(p1.target, p1.selector)).to.equal(p1.ignored); + expectEvent(tx1, 'AccessManagerIgnoredSet', p1); + + const p2 = { target: this.mock.address, selector: '0x12341234', ignored: false }; + const tx2 = await this.mock.$_setAccessManagerIgnored(p2.target, p2.selector, p2.ignored); + expect(await this.mock.isAccessManagerIgnored(p2.target, p2.selector)).to.equal(p2.ignored); + expectEvent(tx2, 'AccessManagerIgnoredSet', p2); + }); + + it('external setter', async function () { + const setAccessManagerIgnored = (...args) => + this.mock.contract.methods.setAccessManagerIgnored(...args).encodeABI(); + + await this.helper.setProposal( + [ + { + target: this.mock.address, + data: setAccessManagerIgnored( + this.receiver.address, + [this.restricted.selector, this.unrestricted.selector], + true, + ), + value: '0', + }, + { + target: this.mock.address, + data: setAccessManagerIgnored(this.mock.address, ['0x12341234', '0x67896789'], false), + value: '0', + }, + ], + 'descr', + ); + + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + const tx = await this.helper.execute(); + + expectEvent(tx, 'AccessManagerIgnoredSet'); + + expect(await this.mock.isAccessManagerIgnored(this.receiver.address, this.restricted.selector)).to.equal( + true, + ); + expect(await this.mock.isAccessManagerIgnored(this.receiver.address, this.unrestricted.selector)).to.equal( + true, + ); + + expect(await this.mock.isAccessManagerIgnored(this.mock.address, '0x12341234')).to.equal(false); + expect(await this.mock.isAccessManagerIgnored(this.mock.address, '0x67896789')).to.equal(false); + }); + + it('locked function', async function () { + const setAccessManagerIgnored = selector('setAccessManagerIgnored(address,bytes4[],bool)'); + await expectRevertCustomError( + this.mock.$_setAccessManagerIgnored(this.mock.address, setAccessManagerIgnored, true), + 'GovernorLockedIgnore', + [], + ); + await this.mock.$_setAccessManagerIgnored(this.receiver.address, setAccessManagerIgnored, true); + }); + + it('ignores access manager', async function () { + const amount = 100; + + const target = this.token.address; + const data = this.token.contract.methods.transfer(voter4, amount).encodeABI(); + const selector = data.slice(0, 10); + await this.token.$_mint(this.mock.address, amount); + + const roleId = '1'; + await this.manager.setTargetFunctionRole(target, [selector], roleId, { from: admin }); + await this.manager.grantRole(roleId, this.mock.address, 0, { from: admin }); + + await this.helper.setProposal([{ target, data, value: '0' }], '1'); + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + await expectRevertCustomError(this.helper.execute(), 'ERC20InsufficientBalance', [ + this.manager.address, + 0, + amount, + ]); + + await this.mock.$_setAccessManagerIgnored(target, selector, true); + + await this.helper.setProposal([{ target, data, value: '0' }], '2'); + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + const tx = await this.helper.execute(); + expectEvent.inTransaction(tx, this.token, 'Transfer', { from: this.mock.address }); + }); }); }); } From 224c23b38f38fc01024415a644e662c5ef827f37 Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 14 Sep 2023 04:54:43 -0300 Subject: [PATCH 049/167] Rename ProposalCore.eta to etaSeconds (#4599) --- contracts/governance/Governor.sol | 14 ++++++------ contracts/governance/IGovernor.sol | 2 +- .../extensions/GovernorTimelockAccess.sol | 16 +++++++------- .../extensions/GovernorTimelockCompound.sol | 22 ++++++++++--------- 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index f65a86be4..910f2e0bf 100644 --- a/contracts/governance/Governor.sol +++ b/contracts/governance/Governor.sol @@ -40,7 +40,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 uint32 voteDuration; bool executed; bool canceled; - uint48 eta; + uint48 etaSeconds; } bytes32 private constant ALL_PROPOSAL_STATES_BITMAP = bytes32((2 ** (uint8(type(ProposalState).max) + 1)) - 1); @@ -205,7 +205,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 * @dev See {IGovernor-proposalEta}. */ function proposalEta(uint256 proposalId) public view virtual returns (uint256) { - return _proposals[proposalId].eta; + return _proposals[proposalId].etaSeconds; } /** @@ -352,11 +352,11 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 _validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Succeeded)); - uint48 eta = _queueOperations(proposalId, targets, values, calldatas, descriptionHash); + uint48 etaSeconds = _queueOperations(proposalId, targets, values, calldatas, descriptionHash); - if (eta != 0) { - _proposals[proposalId].eta = eta; - emit ProposalQueued(proposalId, eta); + if (etaSeconds != 0) { + _proposals[proposalId].etaSeconds = etaSeconds; + emit ProposalQueued(proposalId, etaSeconds); } else { revert GovernorQueueNotImplemented(); } @@ -370,7 +370,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 * * This is empty by default, and must be overridden to implement queuing. * - * This function returns a timestamp that describes the expected eta for execution. If the returned value is 0 + * This function returns a timestamp that describes the expected ETA for execution. If the returned value is 0 * (which is the default value), the core will consider queueing did not succeed, and the public {queue} function * will revert. * diff --git a/contracts/governance/IGovernor.sol b/contracts/governance/IGovernor.sol index a3f6fec52..e05e7b379 100644 --- a/contracts/governance/IGovernor.sol +++ b/contracts/governance/IGovernor.sol @@ -122,7 +122,7 @@ interface IGovernor is IERC165, IERC6372 { /** * @dev Emitted when a proposal is queued. */ - event ProposalQueued(uint256 proposalId, uint256 eta); + event ProposalQueued(uint256 proposalId, uint256 etaSeconds); /** * @dev Emitted when a proposal is executed. diff --git a/contracts/governance/extensions/GovernorTimelockAccess.sol b/contracts/governance/extensions/GovernorTimelockAccess.sol index 36f82a20f..fa752c4a9 100644 --- a/contracts/governance/extensions/GovernorTimelockAccess.sol +++ b/contracts/governance/extensions/GovernorTimelockAccess.sol @@ -225,17 +225,17 @@ abstract contract GovernorTimelockAccess is Governor { bytes32 /* descriptionHash */ ) internal virtual override returns (uint48) { ExecutionPlan storage plan = _executionPlan[proposalId]; - uint48 eta = Time.timestamp() + plan.delay; + uint48 etaSeconds = Time.timestamp() + plan.delay; for (uint256 i = 0; i < targets.length; ++i) { (, bool withDelay, ) = _getManagerData(plan, i); if (withDelay) { - (, uint32 nonce) = _manager.schedule(targets[i], calldatas[i], eta); + (, uint32 nonce) = _manager.schedule(targets[i], calldatas[i], etaSeconds); _setManagerData(plan, i, true, nonce); } } - return eta; + return etaSeconds; } /** @@ -248,9 +248,9 @@ abstract contract GovernorTimelockAccess is Governor { bytes[] memory calldatas, bytes32 /* descriptionHash */ ) internal virtual override { - uint48 eta = SafeCast.toUint48(proposalEta(proposalId)); - if (block.timestamp < eta) { - revert GovernorUnmetDelay(proposalId, eta); + uint48 etaSeconds = SafeCast.toUint48(proposalEta(proposalId)); + if (block.timestamp < etaSeconds) { + revert GovernorUnmetDelay(proposalId, etaSeconds); } ExecutionPlan storage plan = _executionPlan[proposalId]; @@ -280,12 +280,12 @@ abstract contract GovernorTimelockAccess is Governor { ) internal virtual override returns (uint256) { uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); - uint48 eta = SafeCast.toUint48(proposalEta(proposalId)); + uint48 etaSeconds = SafeCast.toUint48(proposalEta(proposalId)); ExecutionPlan storage plan = _executionPlan[proposalId]; // If the proposal has been scheduled it will have an ETA and we may have to externally cancel - if (eta != 0) { + if (etaSeconds != 0) { for (uint256 i = 0; i < targets.length; ++i) { (, bool withDelay, uint32 nonce) = _getManagerData(plan, i); // Only attempt to cancel if the execution plan included a delay diff --git a/contracts/governance/extensions/GovernorTimelockCompound.sol b/contracts/governance/extensions/GovernorTimelockCompound.sol index e2021bbef..c562b4294 100644 --- a/contracts/governance/extensions/GovernorTimelockCompound.sol +++ b/contracts/governance/extensions/GovernorTimelockCompound.sol @@ -70,16 +70,18 @@ abstract contract GovernorTimelockCompound is Governor { bytes[] memory calldatas, bytes32 /*descriptionHash*/ ) internal virtual override returns (uint48) { - uint48 eta = SafeCast.toUint48(block.timestamp + _timelock.delay()); + uint48 etaSeconds = SafeCast.toUint48(block.timestamp + _timelock.delay()); for (uint256 i = 0; i < targets.length; ++i) { - if (_timelock.queuedTransactions(keccak256(abi.encode(targets[i], values[i], "", calldatas[i], eta)))) { + if ( + _timelock.queuedTransactions(keccak256(abi.encode(targets[i], values[i], "", calldatas[i], etaSeconds))) + ) { revert GovernorAlreadyQueuedProposal(proposalId); } - _timelock.queueTransaction(targets[i], values[i], "", calldatas[i], eta); + _timelock.queueTransaction(targets[i], values[i], "", calldatas[i], etaSeconds); } - return eta; + return etaSeconds; } /** @@ -93,13 +95,13 @@ abstract contract GovernorTimelockCompound is Governor { bytes[] memory calldatas, bytes32 /*descriptionHash*/ ) internal virtual override { - uint256 eta = proposalEta(proposalId); - if (eta == 0) { + uint256 etaSeconds = proposalEta(proposalId); + if (etaSeconds == 0) { revert GovernorNotQueuedProposal(proposalId); } Address.sendValue(payable(_timelock), msg.value); for (uint256 i = 0; i < targets.length; ++i) { - _timelock.executeTransaction(targets[i], values[i], "", calldatas[i], eta); + _timelock.executeTransaction(targets[i], values[i], "", calldatas[i], etaSeconds); } } @@ -115,11 +117,11 @@ abstract contract GovernorTimelockCompound is Governor { ) internal virtual override returns (uint256) { uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); - uint256 eta = proposalEta(proposalId); - if (eta > 0) { + uint256 etaSeconds = proposalEta(proposalId); + if (etaSeconds > 0) { // do external call later for (uint256 i = 0; i < targets.length; ++i) { - _timelock.cancelTransaction(targets[i], values[i], "", calldatas[i], eta); + _timelock.cancelTransaction(targets[i], values[i], "", calldatas[i], etaSeconds); } } From 05205ab2e1bf47f91cfce2970062e2f4204ece9a Mon Sep 17 00:00:00 2001 From: Trevor Johnson <27569194+trevorgjohnson@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:49:04 -0500 Subject: [PATCH 050/167] Remove deprecated 'ERC20FailedDecreaseAllowance' error (#4604) Co-authored-by: Hadrien Croubois --- contracts/token/ERC20/ERC20.sol | 5 ----- 1 file changed, 5 deletions(-) diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index 0ca686a95..38a4cfa8f 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/contracts/token/ERC20/ERC20.sol @@ -41,11 +41,6 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { string private _name; string private _symbol; - /** - * @dev Indicates a failed `decreaseAllowance` request. - */ - error ERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); - /** * @dev Sets the values for {name} and {symbol}. * From a714fe6dbd84d1f8016cce922fb719494afa9ba2 Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 14 Sep 2023 15:28:24 -0300 Subject: [PATCH 051/167] Wrap docstrings to 120 chars (#4600) --- contracts/finance/VestingWallet.sol | 4 +- .../extensions/GovernorPreventLateQuorum.sol | 6 +- .../governance/extensions/GovernorStorage.sol | 3 +- .../extensions/GovernorTimelockCompound.sol | 4 +- .../extensions/GovernorTimelockControl.sol | 4 +- .../governance/extensions/GovernorVotes.sol | 3 +- .../mocks/token/ERC20VotesLegacyMock.sol | 3 +- contracts/proxy/ERC1967/ERC1967Proxy.sol | 8 +- contracts/proxy/ERC1967/ERC1967Utils.sol | 4 +- contracts/proxy/Proxy.sol | 4 +- contracts/proxy/beacon/BeaconProxy.sol | 12 +-- .../TransparentUpgradeableProxy.sol | 39 +++++----- contracts/token/ERC1155/ERC1155.sol | 9 ++- contracts/token/ERC20/ERC20.sol | 9 ++- contracts/token/ERC20/utils/SafeERC20.sol | 4 +- contracts/token/ERC721/IERC721.sol | 9 ++- contracts/token/ERC721/IERC721Receiver.sol | 3 +- .../token/ERC721/extensions/ERC721Royalty.sol | 4 +- .../token/ERC721/extensions/ERC721Wrapper.sol | 6 +- contracts/token/ERC721/utils/ERC721Holder.sol | 3 +- contracts/utils/ShortStrings.sol | 3 +- contracts/utils/Strings.sol | 3 +- contracts/utils/math/Math.sol | 15 ++-- contracts/utils/structs/Checkpoints.sol | 75 ++++++++++++------- contracts/utils/structs/DoubleEndedQueue.sol | 2 +- .../vendor/compound/ICompoundTimelock.sol | 2 +- scripts/generate/templates/Checkpoints.js | 25 ++++--- 27 files changed, 153 insertions(+), 113 deletions(-) diff --git a/contracts/finance/VestingWallet.sol b/contracts/finance/VestingWallet.sol index f014e59c4..b0a4d18d4 100644 --- a/contracts/finance/VestingWallet.sol +++ b/contracts/finance/VestingWallet.sol @@ -24,8 +24,8 @@ import {Ownable} from "../access/Ownable.sol"; * counterfactually deployed contract, 2) there is likely to be a migration path for EOAs to become contracts in the * near future. * - * NOTE: When using this contract with any token whose balance is adjusted automatically (i.e. a rebase token), make sure - * to account the supply/balance adjustment in the vesting schedule to ensure the vested amount is as intended. + * NOTE: When using this contract with any token whose balance is adjusted automatically (i.e. a rebase token), make + * sure to account the supply/balance adjustment in the vesting schedule to ensure the vested amount is as intended. */ contract VestingWallet is Context, Ownable { event EtherReleased(uint256 amount); diff --git a/contracts/governance/extensions/GovernorPreventLateQuorum.sol b/contracts/governance/extensions/GovernorPreventLateQuorum.sol index bcef4400f..7f644fe7c 100644 --- a/contracts/governance/extensions/GovernorPreventLateQuorum.sol +++ b/contracts/governance/extensions/GovernorPreventLateQuorum.sol @@ -27,9 +27,9 @@ abstract contract GovernorPreventLateQuorum is Governor { event LateQuorumVoteExtensionSet(uint64 oldVoteExtension, uint64 newVoteExtension); /** - * @dev Initializes the vote extension parameter: the time in either number of blocks or seconds (depending on the governor - * clock mode) that is required to pass since the moment a proposal reaches quorum until its voting period ends. If - * necessary the voting period will be extended beyond the one set during proposal creation. + * @dev Initializes the vote extension parameter: the time in either number of blocks or seconds (depending on the + * governor clock mode) that is required to pass since the moment a proposal reaches quorum until its voting period + * ends. If necessary the voting period will be extended beyond the one set during proposal creation. */ constructor(uint48 initialVoteExtension) { _setLateQuorumVoteExtension(initialVoteExtension); diff --git a/contracts/governance/extensions/GovernorStorage.sol b/contracts/governance/extensions/GovernorStorage.sol index a12aa8213..9c5b2d3f7 100644 --- a/contracts/governance/extensions/GovernorStorage.sol +++ b/contracts/governance/extensions/GovernorStorage.sol @@ -10,7 +10,8 @@ import {Governor} from "../Governor.sol"; * * Use cases for this module include: * - UIs that explore the proposal state without relying on event indexing. - * - Using only the proposalId as an argument in the {Governor-queue} and {Governor-execute} functions for L2 chains where storage is cheap compared to calldata. + * - Using only the proposalId as an argument in the {Governor-queue} and {Governor-execute} functions for L2 chains + * where storage is cheap compared to calldata. */ abstract contract GovernorStorage is Governor { struct ProposalDetails { diff --git a/contracts/governance/extensions/GovernorTimelockCompound.sol b/contracts/governance/extensions/GovernorTimelockCompound.sol index c562b4294..617925f3f 100644 --- a/contracts/governance/extensions/GovernorTimelockCompound.sol +++ b/contracts/governance/extensions/GovernorTimelockCompound.sol @@ -85,8 +85,8 @@ abstract contract GovernorTimelockCompound is Governor { } /** - * @dev Overridden version of the {Governor-_executeOperations} function that run the already queued proposal through - * the timelock. + * @dev Overridden version of the {Governor-_executeOperations} function that run the already queued proposal + * through the timelock. */ function _executeOperations( uint256 proposalId, diff --git a/contracts/governance/extensions/GovernorTimelockControl.sol b/contracts/governance/extensions/GovernorTimelockControl.sol index 2b9421bf6..e17ea267c 100644 --- a/contracts/governance/extensions/GovernorTimelockControl.sol +++ b/contracts/governance/extensions/GovernorTimelockControl.sol @@ -94,8 +94,8 @@ abstract contract GovernorTimelockControl is Governor { } /** - * @dev Overridden version of the {Governor-_executeOperations} function that runs the already queued proposal through - * the timelock. + * @dev Overridden version of the {Governor-_executeOperations} function that runs the already queued proposal + * through the timelock. */ function _executeOperations( uint256 proposalId, diff --git a/contracts/governance/extensions/GovernorVotes.sol b/contracts/governance/extensions/GovernorVotes.sol index 7dcda1f24..b9a7b4384 100644 --- a/contracts/governance/extensions/GovernorVotes.sol +++ b/contracts/governance/extensions/GovernorVotes.sol @@ -10,7 +10,8 @@ import {SafeCast} from "../../utils/math/SafeCast.sol"; import {Time} from "../../utils/types/Time.sol"; /** - * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} token. + * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} + * token. */ abstract contract GovernorVotes is Governor { IERC5805 private immutable _token; diff --git a/contracts/mocks/token/ERC20VotesLegacyMock.sol b/contracts/mocks/token/ERC20VotesLegacyMock.sol index 192263e82..3246fd42e 100644 --- a/contracts/mocks/token/ERC20VotesLegacyMock.sol +++ b/contracts/mocks/token/ERC20VotesLegacyMock.sol @@ -88,7 +88,8 @@ abstract contract ERC20VotesLegacyMock is IVotes, ERC20Permit { // // Initially we check if the block is recent to narrow the search range. // During the loop, the index of the wanted checkpoint remains in the range [low-1, high). - // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant. + // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the + // invariant. // - If the middle checkpoint is after `blockNumber`, we look in [low, mid) // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high) // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not diff --git a/contracts/proxy/ERC1967/ERC1967Proxy.sol b/contracts/proxy/ERC1967/ERC1967Proxy.sol index df3a61369..527e8c55a 100644 --- a/contracts/proxy/ERC1967/ERC1967Proxy.sol +++ b/contracts/proxy/ERC1967/ERC1967Proxy.sol @@ -16,8 +16,8 @@ contract ERC1967Proxy is Proxy { /** * @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`. * - * If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an encoded - * function call, and allows initializing the storage of the proxy like a Solidity constructor. + * If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an + * encoded function call, and allows initializing the storage of the proxy like a Solidity constructor. * * Requirements: * @@ -30,8 +30,8 @@ contract ERC1967Proxy is Proxy { /** * @dev Returns the current implementation address. * - * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the - * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. + * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using + * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` */ function _implementation() internal view virtual override returns (address) { diff --git a/contracts/proxy/ERC1967/ERC1967Utils.sol b/contracts/proxy/ERC1967/ERC1967Utils.sol index b6f705e54..b9306480b 100644 --- a/contracts/proxy/ERC1967/ERC1967Utils.sol +++ b/contracts/proxy/ERC1967/ERC1967Utils.sol @@ -101,8 +101,8 @@ library ERC1967Utils { /** * @dev Returns the current admin. * - * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the - * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. + * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using + * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ function getAdmin() internal view returns (address) { diff --git a/contracts/proxy/Proxy.sol b/contracts/proxy/Proxy.sol index 005a876ac..993acec88 100644 --- a/contracts/proxy/Proxy.sol +++ b/contracts/proxy/Proxy.sol @@ -45,8 +45,8 @@ abstract contract Proxy { } /** - * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function - * and {_fallback} should delegate. + * @dev This is a virtual function that should be overridden so it returns the address to which the fallback + * function and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); diff --git a/contracts/proxy/beacon/BeaconProxy.sol b/contracts/proxy/beacon/BeaconProxy.sol index 9cf8dbf70..6694f7a9c 100644 --- a/contracts/proxy/beacon/BeaconProxy.sol +++ b/contracts/proxy/beacon/BeaconProxy.sol @@ -10,15 +10,15 @@ import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol"; /** * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}. * - * The beacon address can only be set once during construction, and cannot be changed afterwards. It is stored in an immutable - * variable to avoid unnecessary storage reads, and also in the beacon storage slot specified by + * The beacon address can only be set once during construction, and cannot be changed afterwards. It is stored in an + * immutable variable to avoid unnecessary storage reads, and also in the beacon storage slot specified by * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] so that it can be accessed externally. * - * CAUTION: Since the beacon address can never be changed, you must ensure that you either control the beacon, or trust the - * beacon to not upgrade the implementation maliciously. + * CAUTION: Since the beacon address can never be changed, you must ensure that you either control the beacon, or trust + * the beacon to not upgrade the implementation maliciously. * - * IMPORTANT: Do not use the implementation logic to modify the beacon storage slot. Doing so would leave the proxy in an - * inconsistent state where the beacon storage slot does not match the beacon address. + * IMPORTANT: Do not use the implementation logic to modify the beacon storage slot. Doing so would leave the proxy in + * an inconsistent state where the beacon storage slot does not match the beacon address. */ contract BeaconProxy is Proxy { // An immutable address for the beacon to avoid unnecessary SLOADs before each delegate call. diff --git a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol index 77ed5fe73..db19ce568 100644 --- a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +++ b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol @@ -28,35 +28,34 @@ interface ITransparentUpgradeableProxy is IERC1967 { * * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if * that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself. - * 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to the - * implementation. If the admin tries to call a function on the implementation it will fail with an error indicating the - * proxy admin cannot fallback to the target implementation. + * 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to + * the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating + * the proxy admin cannot fallback to the target implementation. * - * These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a dedicated - * account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function - * from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and allows upgrades - * only if they come through it. - * You should think of the `ProxyAdmin` instance as the administrative interface of the proxy, including the ability to - * change who can trigger upgrades by transferring ownership. + * These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a + * dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to + * call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and + * allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative + * interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership. * * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not - * inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch mechanism - * in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully - * implement transparency without decoding reverts caused by selector clashes between the proxy and the + * inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch + * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to + * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the * implementation. * * NOTE: This proxy does not inherit from {Context} deliberately. The {ProxyAdmin} of this contract won't send a * meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract. * - * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an immutable variable, - * preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be overwritten by the implementation - * logic pointed to by this proxy. In such cases, the contract may end up in an undesirable state where the admin slot is different - * from the actual admin. + * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an + * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be + * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an + * undesirable state where the admin slot is different from the actual admin. * - * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler - * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function - * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could - * render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency. + * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the + * compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new + * function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This + * could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency. */ contract TransparentUpgradeableProxy is ERC1967Proxy { // An immutable address for the admin to avoid unnecessary SLOADs before each call diff --git a/contracts/token/ERC1155/ERC1155.sol b/contracts/token/ERC1155/ERC1155.sol index a89c35d2d..becd973bd 100644 --- a/contracts/token/ERC1155/ERC1155.sol +++ b/contracts/token/ERC1155/ERC1155.sol @@ -132,7 +132,8 @@ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IER } /** - * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from` (or `to`) is the zero address. + * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from` + * (or `to`) is the zero address. * * Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise. * @@ -181,9 +182,9 @@ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IER } /** - * @dev Version of {_update} that performs the token acceptance check by calling {IERC1155Receiver-onERC1155Received} - * or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it contains code (eg. is a smart contract - * at the moment of execution). + * @dev Version of {_update} that performs the token acceptance check by calling + * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it + * contains code (eg. is a smart contract at the moment of execution). * * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any * update to the contract state after this function would break the check-effect-interaction pattern. Consider diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index 692fde828..be531f88e 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/contracts/token/ERC20/ERC20.sol @@ -184,8 +184,9 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { } /** - * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` (or `to`) is - * the zero address. All customizations to transfers, mints, and burns should be done by overriding this function. + * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` + * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding + * this function. * * Emits a {Transfer} event. */ @@ -275,8 +276,8 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * - * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to true - * using the following override: + * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to + * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); diff --git a/contracts/token/ERC20/utils/SafeERC20.sol b/contracts/token/ERC20/utils/SafeERC20.sol index e8b699cb0..69370a4b0 100644 --- a/contracts/token/ERC20/utils/SafeERC20.sol +++ b/contracts/token/ERC20/utils/SafeERC20.sol @@ -55,8 +55,8 @@ library SafeERC20 { } /** - * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no value, - * non-reverting calls are assumed to be successful. + * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no + * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { diff --git a/contracts/token/ERC721/IERC721.sol b/contracts/token/ERC721/IERC721.sol index cea9c1ca5..b66d922db 100644 --- a/contracts/token/ERC721/IERC721.sol +++ b/contracts/token/ERC721/IERC721.sol @@ -47,7 +47,8 @@ interface IERC721 is IERC165 { * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon + * a safe transfer. * * Emits a {Transfer} event. */ @@ -62,8 +63,10 @@ interface IERC721 is IERC165 { * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. - * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or + * {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon + * a safe transfer. * * Emits a {Transfer} event. */ diff --git a/contracts/token/ERC721/IERC721Receiver.sol b/contracts/token/ERC721/IERC721Receiver.sol index 914f5995c..06a286ba1 100644 --- a/contracts/token/ERC721/IERC721Receiver.sol +++ b/contracts/token/ERC721/IERC721Receiver.sol @@ -14,7 +14,8 @@ interface IERC721Receiver { * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. - * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. + * If any other value is returned or the interface is not implemented by the recipient, the transfer will be + * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ diff --git a/contracts/token/ERC721/extensions/ERC721Royalty.sol b/contracts/token/ERC721/extensions/ERC721Royalty.sol index 6f31368e2..397f0d4f5 100644 --- a/contracts/token/ERC721/extensions/ERC721Royalty.sol +++ b/contracts/token/ERC721/extensions/ERC721Royalty.sol @@ -10,8 +10,8 @@ import {ERC2981} from "../../common/ERC2981.sol"; * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment * information. * - * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually for - * specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. + * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually + * for specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to diff --git a/contracts/token/ERC721/extensions/ERC721Wrapper.sol b/contracts/token/ERC721/extensions/ERC721Wrapper.sol index 15844ea6f..72cef509f 100644 --- a/contracts/token/ERC721/extensions/ERC721Wrapper.sol +++ b/contracts/token/ERC721/extensions/ERC721Wrapper.sol @@ -9,9 +9,9 @@ import {IERC721Receiver} from "../IERC721Receiver.sol"; /** * @dev Extension of the ERC721 token contract to support token wrapping. * - * Users can deposit and withdraw an "underlying token" and receive a "wrapped token" with a matching tokenId. This is useful - * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC721Votes} will allow the - * wrapping of an existing "basic" ERC721 into a governance token. + * Users can deposit and withdraw an "underlying token" and receive a "wrapped token" with a matching tokenId. This is + * useful in conjunction with other modules. For example, combining this wrapping mechanism with {ERC721Votes} will allow + * the wrapping of an existing "basic" ERC721 into a governance token. */ abstract contract ERC721Wrapper is ERC721, IERC721Receiver { IERC721 private immutable _underlying; diff --git a/contracts/token/ERC721/utils/ERC721Holder.sol b/contracts/token/ERC721/utils/ERC721Holder.sol index 740e29c5f..4ffd16146 100644 --- a/contracts/token/ERC721/utils/ERC721Holder.sol +++ b/contracts/token/ERC721/utils/ERC721Holder.sol @@ -9,7 +9,8 @@ import {IERC721Receiver} from "../IERC721Receiver.sol"; * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. - * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. + * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or + * {IERC721-setApprovalForAll}. */ abstract contract ERC721Holder is IERC721Receiver { /** diff --git a/contracts/utils/ShortStrings.sol b/contracts/utils/ShortStrings.sol index f1f33280c..0c046c4c3 100644 --- a/contracts/utils/ShortStrings.sol +++ b/contracts/utils/ShortStrings.sol @@ -107,7 +107,8 @@ library ShortStrings { } /** - * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}. + * @dev Return the length of a string that was encoded to `ShortString` or written to storage using + * {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. diff --git a/contracts/utils/Strings.sol b/contracts/utils/Strings.sol index 6d657f7dd..fb5c42af6 100644 --- a/contracts/utils/Strings.sol +++ b/contracts/utils/Strings.sol @@ -78,7 +78,8 @@ library Strings { } /** - * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. + * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal + * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); diff --git a/contracts/utils/math/Math.sol b/contracts/utils/math/Math.sol index 17ce4c8ab..690373b07 100644 --- a/contracts/utils/math/Math.sol +++ b/contracts/utils/math/Math.sol @@ -115,9 +115,10 @@ library Math { } /** - * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 - * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) - * with further edits by Uniswap Labs also under MIT license. + * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or + * denominator == 0. + * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by + * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { @@ -159,8 +160,8 @@ library Math { prod0 := sub(prod0, remainder) } - // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. - // See https://cs.stackexchange.com/q/138556/92363. + // Factor powers of two out of denominator and compute largest power of two divisor of denominator. + // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { @@ -182,8 +183,8 @@ library Math { // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; - // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works - // in modular arithmetic, doubling the correct bits in each step. + // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also + // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 diff --git a/contracts/utils/structs/Checkpoints.sol b/contracts/utils/structs/Checkpoints.sol index d0579f899..9c849b759 100644 --- a/contracts/utils/structs/Checkpoints.sol +++ b/contracts/utils/structs/Checkpoints.sol @@ -33,14 +33,16 @@ library Checkpoints { * * Returns previous value and new value. * - * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint32).max` key set will disable the library. + * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint32).max` key set will disable the + * library. */ function push(Trace224 storage self, uint32 key, uint224 value) internal returns (uint224, uint224) { return _insert(self._checkpoints, key, value); } /** - * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if + * there is none. */ function lowerLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { uint256 len = self._checkpoints.length; @@ -49,7 +51,8 @@ library Checkpoints { } /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. */ function upperLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { uint256 len = self._checkpoints.length; @@ -58,9 +61,11 @@ library Checkpoints { } /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. * - * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). + * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high + * keys). */ function upperLookupRecent(Trace224 storage self, uint32 key) internal view returns (uint224) { uint256 len = self._checkpoints.length; @@ -148,8 +153,9 @@ library Checkpoints { } /** - * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` + * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive + * `high`. * * WARNING: `high` should not be greater than the array's length. */ @@ -171,8 +177,9 @@ library Checkpoints { } /** - * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or + * `high` if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and + * exclusive `high`. * * WARNING: `high` should not be greater than the array's length. */ @@ -220,14 +227,16 @@ library Checkpoints { * * Returns previous value and new value. * - * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint48).max` key set will disable the library. + * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint48).max` key set will disable the + * library. */ function push(Trace208 storage self, uint48 key, uint208 value) internal returns (uint208, uint208) { return _insert(self._checkpoints, key, value); } /** - * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if + * there is none. */ function lowerLookup(Trace208 storage self, uint48 key) internal view returns (uint208) { uint256 len = self._checkpoints.length; @@ -236,7 +245,8 @@ library Checkpoints { } /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. */ function upperLookup(Trace208 storage self, uint48 key) internal view returns (uint208) { uint256 len = self._checkpoints.length; @@ -245,9 +255,11 @@ library Checkpoints { } /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. * - * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). + * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high + * keys). */ function upperLookupRecent(Trace208 storage self, uint48 key) internal view returns (uint208) { uint256 len = self._checkpoints.length; @@ -335,8 +347,9 @@ library Checkpoints { } /** - * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` + * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive + * `high`. * * WARNING: `high` should not be greater than the array's length. */ @@ -358,8 +371,9 @@ library Checkpoints { } /** - * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or + * `high` if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and + * exclusive `high`. * * WARNING: `high` should not be greater than the array's length. */ @@ -407,14 +421,16 @@ library Checkpoints { * * Returns previous value and new value. * - * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint96).max` key set will disable the library. + * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint96).max` key set will disable the + * library. */ function push(Trace160 storage self, uint96 key, uint160 value) internal returns (uint160, uint160) { return _insert(self._checkpoints, key, value); } /** - * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if + * there is none. */ function lowerLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { uint256 len = self._checkpoints.length; @@ -423,7 +439,8 @@ library Checkpoints { } /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. */ function upperLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { uint256 len = self._checkpoints.length; @@ -432,9 +449,11 @@ library Checkpoints { } /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. * - * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). + * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high + * keys). */ function upperLookupRecent(Trace160 storage self, uint96 key) internal view returns (uint160) { uint256 len = self._checkpoints.length; @@ -522,8 +541,9 @@ library Checkpoints { } /** - * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` + * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive + * `high`. * * WARNING: `high` should not be greater than the array's length. */ @@ -545,8 +565,9 @@ library Checkpoints { } /** - * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or + * `high` if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and + * exclusive `high`. * * WARNING: `high` should not be greater than the array's length. */ diff --git a/contracts/utils/structs/DoubleEndedQueue.sol b/contracts/utils/structs/DoubleEndedQueue.sol index 1827a5cf4..2369f12f2 100644 --- a/contracts/utils/structs/DoubleEndedQueue.sol +++ b/contracts/utils/structs/DoubleEndedQueue.sol @@ -133,7 +133,7 @@ library DoubleEndedQueue { */ function at(Bytes32Deque storage deque, uint256 index) internal view returns (bytes32 value) { if (index >= length(deque)) revert QueueOutOfBounds(); - // By construction, length is a uint128, so the check above ensures that index can be safely downcast to uint128. + // By construction, length is a uint128, so the check above ensures that index can be safely downcast to uint128 unchecked { return deque._data[deque._begin + uint128(index)]; } diff --git a/contracts/vendor/compound/ICompoundTimelock.sol b/contracts/vendor/compound/ICompoundTimelock.sol index edefc4e04..00387bdc1 100644 --- a/contracts/vendor/compound/ICompoundTimelock.sol +++ b/contracts/vendor/compound/ICompoundTimelock.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; /** - * https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[Compound's timelock] interface + * https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[Compound timelock] interface */ interface ICompoundTimelock { event NewAdmin(address indexed newAdmin); diff --git a/scripts/generate/templates/Checkpoints.js b/scripts/generate/templates/Checkpoints.js index 73c9ab53e..321a77489 100644 --- a/scripts/generate/templates/Checkpoints.js +++ b/scripts/generate/templates/Checkpoints.js @@ -38,7 +38,8 @@ struct ${opts.checkpointTypeName} { * * Returns previous value and new value. * - * IMPORTANT: Never accept \`key\` as a user input, since an arbitrary \`type(${opts.keyTypeName}).max\` key set will disable the library. + * IMPORTANT: Never accept \`key\` as a user input, since an arbitrary \`type(${opts.keyTypeName}).max\` key set will disable the + * library. */ function push( ${opts.historyTypeName} storage self, @@ -49,7 +50,8 @@ function push( } /** - * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if + * there is none. */ function lowerLookup(${opts.historyTypeName} storage self, ${opts.keyTypeName} key) internal view returns (${opts.valueTypeName}) { uint256 len = self.${opts.checkpointFieldName}.length; @@ -58,7 +60,8 @@ function lowerLookup(${opts.historyTypeName} storage self, ${opts.keyTypeName} k } /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. */ function upperLookup(${opts.historyTypeName} storage self, ${opts.keyTypeName} key) internal view returns (${opts.valueTypeName}) { uint256 len = self.${opts.checkpointFieldName}.length; @@ -67,9 +70,11 @@ function upperLookup(${opts.historyTypeName} storage self, ${opts.keyTypeName} k } /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. * - * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). + * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high + * keys). */ function upperLookupRecent(${opts.historyTypeName} storage self, ${opts.keyTypeName} key) internal view returns (${opts.valueTypeName}) { uint256 len = self.${opts.checkpointFieldName}.length; @@ -169,8 +174,9 @@ function _insert( } /** - * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or \`high\` if there is none. - * \`low\` and \`high\` define a section where to do the search, with inclusive \`low\` and exclusive \`high\`. + * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or \`high\` + * if there is none. \`low\` and \`high\` define a section where to do the search, with inclusive \`low\` and exclusive + * \`high\`. * * WARNING: \`high\` should not be greater than the array's length. */ @@ -192,8 +198,9 @@ function _upperBinaryLookup( } /** - * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or \`high\` if there is none. - * \`low\` and \`high\` define a section where to do the search, with inclusive \`low\` and exclusive \`high\`. + * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or + * \`high\` if there is none. \`low\` and \`high\` define a section where to do the search, with inclusive \`low\` and + * exclusive \`high\`. * * WARNING: \`high\` should not be greater than the array's length. */ From d555464c5387b2924b55d990e5229255a6b16752 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 14 Sep 2023 22:26:14 +0200 Subject: [PATCH 052/167] AccessManager: Avoid resetting nonce when consuming a scheduled operation (#4603) Co-authored-by: Francisco --- contracts/access/manager/AccessManager.sol | 15 ++++----- test/access/manager/AccessManager.test.js | 38 ++++++++++++++++++++++ 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 0483f5140..783ebecc5 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -572,15 +572,14 @@ contract AccessManager is Context, Multicall, IAccessManager { uint48 minWhen = Time.timestamp() + setback; - if (when == 0) { - when = minWhen; - } - - // If caller is not authorised, revert - if (!immediate && (setback == 0 || when < minWhen)) { + // if call is not authorized, or if requested timing is too soon + if ((!immediate && setback == 0) || (when > 0 && when < minWhen)) { revert AccessManagerUnauthorizedCall(caller, target, bytes4(data[0:4])); } + // Reuse variable due to stack too deep + when = uint48(Math.max(when, minWhen)); // cast is safe: both inputs are uint48 + // If caller is authorised, schedule operation operationId = hashOperation(caller, target, data); @@ -686,7 +685,7 @@ contract AccessManager is Context, Multicall, IAccessManager { revert AccessManagerExpired(operationId); } - delete _schedules[operationId]; + delete _schedules[operationId].timepoint; // reset the timepoint, keep the nonce emit OperationExecuted(operationId, nonce); return nonce; @@ -718,7 +717,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } } - delete _schedules[operationId].timepoint; + delete _schedules[operationId].timepoint; // reset the timepoint, keep the nonce uint32 nonce = _schedules[operationId].nonce; emit OperationCanceled(operationId, nonce); diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 160af8ba1..1da7b3ced 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -703,9 +703,14 @@ contract('AccessManager', function (accounts) { it('Calling indirectly: only execute', async function () { // execute without schedule if (directSuccess) { + const nonceBefore = await this.manager.getNonce(this.opId); const { receipt, tx } = await this.execute(); + expectEvent.notEmitted(receipt, 'OperationExecuted', { operationId: this.opId }); await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); + + // nonce is not modified + expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore); } else if (indirectSuccess) { await expectRevertCustomError(this.execute(), 'AccessManagerNotScheduled', [this.opId]); } else { @@ -715,6 +720,7 @@ contract('AccessManager', function (accounts) { it('Calling indirectly: schedule and execute', async function () { if (directSuccess || indirectSuccess) { + const nonceBefore = await this.manager.getNonce(this.opId); const { receipt } = await this.schedule(); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); @@ -730,14 +736,21 @@ contract('AccessManager', function (accounts) { timestamp.add(directSuccess ? web3.utils.toBN(0) : delay), ); + // nonce is incremented + expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); + // execute without wait if (directSuccess) { const { receipt, tx } = await this.execute(); + await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); if (delay && fnRole !== ROLES.PUBLIC) { expectEvent(receipt, 'OperationExecuted', { operationId: this.opId }); expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); } + + // nonce is not modified by execute + expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); } else if (indirectSuccess) { await expectRevertCustomError(this.execute(), 'AccessManagerNotReady', [this.opId]); } else { @@ -750,6 +763,7 @@ contract('AccessManager', function (accounts) { it('Calling indirectly: schedule wait and execute', async function () { if (directSuccess || indirectSuccess) { + const nonceBefore = await this.manager.getNonce(this.opId); const { receipt } = await this.schedule(); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); @@ -765,17 +779,24 @@ contract('AccessManager', function (accounts) { timestamp.add(directSuccess ? web3.utils.toBN(0) : delay), ); + // nonce is incremented + expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); + // wait await time.increase(delay ?? 0); // execute without wait if (directSuccess || indirectSuccess) { const { receipt, tx } = await this.execute(); + await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); if (delay && fnRole !== ROLES.PUBLIC) { expectEvent(receipt, 'OperationExecuted', { operationId: this.opId }); expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); } + + // nonce is not modified by execute + expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); } else { await expectRevertCustomError(this.execute(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); } @@ -786,6 +807,7 @@ contract('AccessManager', function (accounts) { it('Calling directly: schedule and call', async function () { if (directSuccess || indirectSuccess) { + const nonceBefore = await this.manager.getNonce(this.opId); const { receipt } = await this.schedule(); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); @@ -800,6 +822,9 @@ contract('AccessManager', function (accounts) { const schedule = timestamp.add(directSuccess ? web3.utils.toBN(0) : delay); expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); + // nonce is incremented + expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); + // execute without wait const promise = this.direct(); if (directSuccess) { @@ -807,6 +832,9 @@ contract('AccessManager', function (accounts) { // schedule is not reset expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); + + // nonce is not modified by execute + expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); } else if (indirectSuccess) { await expectRevertCustomError(promise, 'AccessManagerNotReady', [this.opId]); } else { @@ -819,6 +847,7 @@ contract('AccessManager', function (accounts) { it('Calling directly: schedule wait and call', async function () { if (directSuccess || indirectSuccess) { + const nonceBefore = await this.manager.getNonce(this.opId); const { receipt } = await this.schedule(); const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); @@ -833,6 +862,9 @@ contract('AccessManager', function (accounts) { const schedule = timestamp.add(directSuccess ? web3.utils.toBN(0) : delay); expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); + // nonce is incremented + expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); + // wait await time.increase(delay ?? 0); @@ -843,6 +875,9 @@ contract('AccessManager', function (accounts) { // schedule is not reset expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); + + // nonce is not modified by execute + expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); } else if (indirectSuccess) { const receipt = await promise; @@ -853,6 +888,9 @@ contract('AccessManager', function (accounts) { // schedule is reset expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); + + // nonce is not modified by execute + expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); } else { await expectRevertCustomError(this.direct(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); } From af06fdcfd470f21ece991e4c6d405b432e4c42c1 Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 14 Sep 2023 17:32:47 -0300 Subject: [PATCH 053/167] Fix various documentation errors (#4601) --- contracts/access/manager/AccessManager.sol | 4 ++++ contracts/governance/Governor.sol | 10 +++++----- contracts/governance/TimelockController.sol | 2 +- .../governance/extensions/GovernorSettings.sol | 1 - .../extensions/GovernorTimelockControl.sol | 5 ++++- .../extensions/GovernorVotesQuorumFraction.sol | 1 - contracts/proxy/utils/Initializable.sol | 2 +- contracts/utils/cryptography/MerkleProof.sol | 6 ++++++ contracts/utils/structs/DoubleEndedQueue.sol | 13 +++++++------ 9 files changed, 28 insertions(+), 16 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 783ebecc5..e83b8a4da 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -559,6 +559,10 @@ contract AccessManager is Context, Multicall, IAccessManager { * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}. * * Emits a {OperationScheduled} event. + * + * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If + * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target + * contract if it is using standard Solidity ABI encoding. */ function schedule( address target, diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index 910f2e0bf..c2a60ce73 100644 --- a/contracts/governance/Governor.sol +++ b/contracts/governance/Governor.sol @@ -48,9 +48,9 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 mapping(uint256 proposalId => ProposalCore) private _proposals; - // This queue keeps track of the governor operating on itself. Calls to functions protected by the - // {onlyGovernance} modifier needs to be whitelisted in this queue. Whitelisting is set in {_beforeExecute}, - // consumed by the {onlyGovernance} modifier and eventually reset in {_afterExecute}. This ensures that the + // This queue keeps track of the governor operating on itself. Calls to functions protected by the {onlyGovernance} + // modifier needs to be whitelisted in this queue. Whitelisting is set in {execute}, consumed by the + // {onlyGovernance} modifier and eventually reset after {_executeOperations} completes. This ensures that the // execution of {onlyGovernance} protected calls can only be achieved through successful proposals. DoubleEndedQueue.Bytes32Deque private _governanceCall; @@ -135,7 +135,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 * @dev See {IGovernor-state}. */ function state(uint256 proposalId) public view virtual returns (ProposalState) { - // ProposalCore is just one slot. We can load it from storage to stack with a single sload + // We read the struct fields into the stack at once so Solidity emits a single SLOAD ProposalCore storage proposal = _proposals[proposalId]; bool proposalExecuted = proposal.executed; bool proposalCanceled = proposal.canceled; @@ -375,7 +375,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 * will revert. * * NOTE: Calling this function directly will NOT check the current state of the proposal, or emit the - * `ProposalQueued` event. Queuing a proposal should be done using {queue} or {_queue}. + * `ProposalQueued` event. Queuing a proposal should be done using {queue}. */ function _queueOperations( uint256 /*proposalId*/, diff --git a/contracts/governance/TimelockController.sol b/contracts/governance/TimelockController.sol index 1ae4afb24..4439b9b8b 100644 --- a/contracts/governance/TimelockController.sol +++ b/contracts/governance/TimelockController.sol @@ -165,7 +165,7 @@ contract TimelockController is AccessControl, ERC721Holder, ERC1155Holder { /** * @dev Returns whether an id corresponds to a registered operation. This - * includes both Pending, Ready and Done operations. + * includes both Waiting, Ready, and Done operations. */ function isOperation(bytes32 id) public view returns (bool) { return getOperationState(id) != OperationState.Unset; diff --git a/contracts/governance/extensions/GovernorSettings.sol b/contracts/governance/extensions/GovernorSettings.sol index f6aba7d37..3b577aad8 100644 --- a/contracts/governance/extensions/GovernorSettings.sol +++ b/contracts/governance/extensions/GovernorSettings.sol @@ -93,7 +93,6 @@ abstract contract GovernorSettings is Governor { * Emits a {VotingPeriodSet} event. */ function _setVotingPeriod(uint32 newVotingPeriod) internal virtual { - // voting period must be at least one block long if (newVotingPeriod == 0) { revert GovernorInvalidVotingPeriod(0); } diff --git a/contracts/governance/extensions/GovernorTimelockControl.sol b/contracts/governance/extensions/GovernorTimelockControl.sol index e17ea267c..6c08b32ed 100644 --- a/contracts/governance/extensions/GovernorTimelockControl.sol +++ b/contracts/governance/extensions/GovernorTimelockControl.sol @@ -15,12 +15,15 @@ import {SafeCast} from "../../utils/math/SafeCast.sol"; * * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be - * inaccessible. + * inaccessible from a proposal, unless executed via {Governor-relay}. * * WARNING: Setting up the TimelockController to have additional proposers or cancellers besides the governor is very * risky, as it grants them the ability to: 1) execute operations as the timelock, and thus possibly performing * operations or accessing funds that are expected to only be accessible through a vote, and 2) block governance * proposals that have been approved by the voters, effectively executing a Denial of Service attack. + * + * NOTE: `AccessManager` does not support scheduling more than one operation with the same target and calldata at + * the same time. See {AccessManager-schedule} for a workaround. */ abstract contract GovernorTimelockControl is Governor { TimelockController private _timelock; diff --git a/contracts/governance/extensions/GovernorVotesQuorumFraction.sol b/contracts/governance/extensions/GovernorVotesQuorumFraction.sol index 100758e3b..eefe665ab 100644 --- a/contracts/governance/extensions/GovernorVotesQuorumFraction.sol +++ b/contracts/governance/extensions/GovernorVotesQuorumFraction.sol @@ -45,7 +45,6 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes { * @dev Returns the quorum numerator at a specific timepoint. See {quorumDenominator}. */ function quorumNumerator(uint256 timepoint) public view virtual returns (uint256) { - // If history is empty, fallback to old storage uint256 length = _quorumNumeratorHistory._checkpoints.length; // Optimistic search, check the latest checkpoint diff --git a/contracts/proxy/utils/Initializable.sol b/contracts/proxy/utils/Initializable.sol index eb4ebb8a4..75a018b0c 100644 --- a/contracts/proxy/utils/Initializable.sol +++ b/contracts/proxy/utils/Initializable.sol @@ -145,7 +145,7 @@ abstract contract Initializable { * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * - * WARNING: setting the version to 255 will prevent any future reinitialization. + * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ diff --git a/contracts/utils/cryptography/MerkleProof.sol b/contracts/utils/cryptography/MerkleProof.sol index 155ec81bf..8461e49cc 100644 --- a/contracts/utils/cryptography/MerkleProof.sol +++ b/contracts/utils/cryptography/MerkleProof.sol @@ -211,10 +211,16 @@ library MerkleProof { } } + /** + * @dev Sorts the pair (a, b) and hashes the result. + */ function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } + /** + * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory. + */ function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { diff --git a/contracts/utils/structs/DoubleEndedQueue.sol b/contracts/utils/structs/DoubleEndedQueue.sol index 2369f12f2..294e50a7f 100644 --- a/contracts/utils/structs/DoubleEndedQueue.sol +++ b/contracts/utils/structs/DoubleEndedQueue.sol @@ -31,16 +31,13 @@ library DoubleEndedQueue { error QueueOutOfBounds(); /** - * @dev Indices are signed integers because the queue can grow in any direction. They are 128 bits so begin and end - * are packed in a single storage slot for efficient access. Since the items are added one at a time we can safely - * assume that these 128-bit indices will not overflow, and use unchecked arithmetic. + * @dev Indices are 128 bits so begin and end are packed in a single storage slot for efficient access. * * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and * lead to unexpected behavior. * - * Indices are in the range [begin, end) which means the first item is at data[begin] and the last item is at - * data[end - 1]. + * The first item is at data[begin] and the last item is at data[end - 1]. This range can wrap around. */ struct Bytes32Deque { uint128 _begin; @@ -50,6 +47,8 @@ library DoubleEndedQueue { /** * @dev Inserts an item at the end of the queue. + * + * Reverts with {QueueFull} if the queue is full. */ function pushBack(Bytes32Deque storage deque, bytes32 value) internal { unchecked { @@ -63,7 +62,7 @@ library DoubleEndedQueue { /** * @dev Removes the item at the end of the queue and returns it. * - * Reverts with `QueueEmpty` if the queue is empty. + * Reverts with {QueueEmpty} if the queue is empty. */ function popBack(Bytes32Deque storage deque) internal returns (bytes32 value) { unchecked { @@ -78,6 +77,8 @@ library DoubleEndedQueue { /** * @dev Inserts an item at the beginning of the queue. + * + * Reverts with {QueueFull} if the queue is full. */ function pushFront(Bytes32Deque storage deque, bytes32 value) internal { unchecked { From 618304cc01e718cbdd87059ce2978b748c15050f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 17:39:27 -0300 Subject: [PATCH 054/167] Update linters (major) (#4563) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Francisco Giordano --- .prettierrc | 3 +- package-lock.json | 101 ++++++++++++++++++++++++++++++++++++++-------- package.json | 12 +++--- 3 files changed, 93 insertions(+), 23 deletions(-) diff --git a/.prettierrc b/.prettierrc index e08e24273..39c004c70 100644 --- a/.prettierrc +++ b/.prettierrc @@ -10,5 +10,6 @@ "singleQuote": false } } - ] + ], + "plugins": ["prettier-plugin-solidity"] } diff --git a/package-lock.json b/package-lock.json index fdcda1e7b..edbf2981d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "array.prototype.at": "^1.1.1", "chai": "^4.2.0", "eslint": "^8.30.0", - "eslint-config-prettier": "^8.5.0", + "eslint-config-prettier": "^9.0.0", "eth-sig-util": "^3.0.0", "ethereumjs-util": "^7.0.7", "ethereumjs-wallet": "^1.0.1", @@ -38,7 +38,7 @@ "merkletreejs": "^0.2.13", "micromatch": "^4.0.2", "p-limit": "^3.1.0", - "prettier": "^2.8.1", + "prettier": "^3.0.0", "prettier-plugin-solidity": "^1.1.0", "rimraf": "^3.0.2", "semver": "^7.3.5", @@ -155,6 +155,21 @@ "semver": "^7.5.3" } }, + "node_modules/@changesets/apply-release-plan/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/@changesets/assemble-release-plan": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-5.2.4.tgz", @@ -398,6 +413,21 @@ "prettier": "^2.7.1" } }, + "node_modules/@changesets/write/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/@ensdomains/address-encoder": { "version": "0.1.9", "resolved": "https://registry.npmjs.org/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz", @@ -5385,9 +5415,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", - "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", + "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -10692,15 +10722,15 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -12554,6 +12584,22 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/solhint/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "optional": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/solhint/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -15530,6 +15576,14 @@ "prettier": "^2.7.1", "resolve-from": "^5.0.0", "semver": "^7.5.3" + }, + "dependencies": { + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true + } } }, "@changesets/assemble-release-plan": { @@ -15766,6 +15820,14 @@ "fs-extra": "^7.0.1", "human-id": "^1.0.2", "prettier": "^2.7.1" + }, + "dependencies": { + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true + } } }, "@ensdomains/address-encoder": { @@ -19705,9 +19767,9 @@ } }, "eslint-config-prettier": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", - "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", + "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", "dev": true, "requires": {} }, @@ -23716,9 +23778,9 @@ "dev": true }, "prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", "dev": true }, "prettier-plugin-solidity": { @@ -25149,6 +25211,13 @@ "argparse": "^2.0.1" } }, + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "optional": true + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", diff --git a/package.json b/package.json index c71139f3e..f0dabd47e 100644 --- a/package.json +++ b/package.json @@ -15,10 +15,10 @@ "prepare-docs": "scripts/prepare-docs.sh", "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 .", - "lint:js:fix": "prettier --loglevel warn --ignore-path .gitignore '**/*.{js,ts}' --write && eslint --ignore-path .gitignore . --fix", - "lint:sol": "prettier --loglevel warn --ignore-path .gitignore '{contracts,test}/**/*.sol' --check && solhint '{contracts,test}/**/*.sol'", - "lint:sol:fix": "prettier --loglevel warn --ignore-path .gitignore '{contracts,test}/**/*.sol' --write", + "lint:js": "prettier --log-level warn --ignore-path .gitignore '**/*.{js,ts}' --check && eslint --ignore-path .gitignore .", + "lint:js:fix": "prettier --log-level warn --ignore-path .gitignore '**/*.{js,ts}' --write && eslint --ignore-path .gitignore . --fix", + "lint:sol": "prettier --log-level warn --ignore-path .gitignore '{contracts,test}/**/*.sol' --check && solhint '{contracts,test}/**/*.sol'", + "lint:sol:fix": "prettier --log-level warn --ignore-path .gitignore '{contracts,test}/**/*.sol' --write", "clean": "hardhat clean && rimraf build contracts/build", "prepare": "scripts/prepare.sh", "prepack": "scripts/prepack.sh", @@ -63,7 +63,7 @@ "array.prototype.at": "^1.1.1", "chai": "^4.2.0", "eslint": "^8.30.0", - "eslint-config-prettier": "^8.5.0", + "eslint-config-prettier": "^9.0.0", "eth-sig-util": "^3.0.0", "ethereumjs-util": "^7.0.7", "ethereumjs-wallet": "^1.0.1", @@ -79,7 +79,7 @@ "merkletreejs": "^0.2.13", "micromatch": "^4.0.2", "p-limit": "^3.1.0", - "prettier": "^2.8.1", + "prettier": "^3.0.0", "prettier-plugin-solidity": "^1.1.0", "rimraf": "^3.0.2", "semver": "^7.3.5", From 2215d9fd5e22d4d779e2c20f42ee3d7443adfa87 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Fri, 15 Sep 2023 17:23:28 +0200 Subject: [PATCH 055/167] Remove Time.Delay *At functions (#4606) Co-authored-by: Francisco Giordano --- contracts/utils/types/Time.sol | 19 ++++++------------- test/utils/types/Time.test.js | 21 --------------------- 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/contracts/utils/types/Time.sol b/contracts/utils/types/Time.sol index 13bb0add5..4ccdc8174 100644 --- a/contracts/utils/types/Time.sol +++ b/contracts/utils/types/Time.sol @@ -54,8 +54,8 @@ library Time { * 0xAAAAAAAAAAAABBBBBBBBCCCCCCCC * ``` * - * NOTE: The {get} and {update} function operate using timestamps. Block number based delays should use the - * {getAt} and {withUpdateAt} variants of these functions. + * NOTE: The {get} and {withUpdate} functions operate using timestamps. Block number based delays are not currently + * supported. */ type Delay is uint112; @@ -70,7 +70,7 @@ library Time { * @dev Get the value at a given timepoint plus the pending value and effect timepoint if there is a scheduled * change after this timepoint. If the effect timepoint is 0, then the pending value should not be considered. */ - function getFullAt(Delay self, uint48 timepoint) internal pure returns (uint32, uint32, uint48) { + function _getFullAt(Delay self, uint48 timepoint) private pure returns (uint32, uint32, uint48) { (uint32 valueBefore, uint32 valueAfter, uint48 effect) = self.unpack(); return effect <= timepoint ? (valueAfter, 0, 0) : (valueBefore, valueAfter, effect); } @@ -80,22 +80,15 @@ library Time { * effect timepoint is 0, then the pending value should not be considered. */ function getFull(Delay self) internal view returns (uint32, uint32, uint48) { - return self.getFullAt(timestamp()); - } - - /** - * @dev Get the value the Delay will be at a given timepoint. - */ - function getAt(Delay self, uint48 timepoint) internal pure returns (uint32) { - (uint32 delay, , ) = getFullAt(self, timepoint); - return delay; + return _getFullAt(self, timestamp()); } /** * @dev Get the current value. */ function get(Delay self) internal view returns (uint32) { - return self.getAt(timestamp()); + (uint32 delay, , ) = self.getFull(); + return delay; } /** diff --git a/test/utils/types/Time.test.js b/test/utils/types/Time.test.js index b246f7b92..614911738 100644 --- a/test/utils/types/Time.test.js +++ b/test/utils/types/Time.test.js @@ -87,27 +87,6 @@ contract('Time', function () { } }); - it('getAt & getFullAt', async function () { - const valueBefore = 24194n; - const valueAfter = 4214143n; - - for (const timepoint of [...SOME_VALUES, MAX_UINT48]) - for (const effect of effectSamplesForTimepoint(timepoint)) { - const isPast = effect <= timepoint; - - const delay = packDelay({ valueBefore, valueAfter, effect }); - - expect(await this.mock.$getAt(delay, timepoint)).to.be.bignumber.equal( - String(isPast ? valueAfter : valueBefore), - ); - - const getFullAt = await this.mock.$getFullAt(delay, timepoint); - expect(getFullAt[0]).to.be.bignumber.equal(String(isPast ? valueAfter : valueBefore)); - expect(getFullAt[1]).to.be.bignumber.equal(String(isPast ? 0n : valueAfter)); - expect(getFullAt[2]).to.be.bignumber.equal(String(isPast ? 0n : effect)); - } - }); - it('get & getFull', async function () { const timepoint = await clock.timestamp().then(BigInt); const valueBefore = 24194n; From 652d0c5fb3d87bf33896050d4071d5884899f6e1 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Mon, 18 Sep 2023 15:56:38 +0200 Subject: [PATCH 056/167] Fix minor mistake in GovernorTimelockAccess documentation (#4609) --- contracts/governance/extensions/GovernorTimelockAccess.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/governance/extensions/GovernorTimelockAccess.sol b/contracts/governance/extensions/GovernorTimelockAccess.sol index fa752c4a9..08e295c74 100644 --- a/contracts/governance/extensions/GovernorTimelockAccess.sol +++ b/contracts/governance/extensions/GovernorTimelockAccess.sol @@ -44,7 +44,7 @@ abstract contract GovernorTimelockAccess is Governor { // We use mappings instead of arrays because it allows us to pack values in storage more tightly without // storing the length redundantly. // We pack 8 operations' data in each bucket. Each uint32 value is set to 1 upon proposal creation if it has - // to be scheduled and executed through the manager. Upon queuing, the value is set to nonce + 1, where the + // to be scheduled and executed through the manager. Upon queuing, the value is set to nonce + 2, where the // nonce is received from the manager when scheduling the operation. mapping(uint256 operationBucket => uint32[8]) managerData; } From 68204769a1bd617821e8785a3580530348c20eb4 Mon Sep 17 00:00:00 2001 From: Ownerless Inc <90667119+0xneves@users.noreply.github.com> Date: Mon, 18 Sep 2023 11:30:25 -0300 Subject: [PATCH 057/167] Fix function documentation in Nonces (#4597) Co-authored-by: Francisco --- contracts/utils/Nonces.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/utils/Nonces.sol b/contracts/utils/Nonces.sol index b4681371a..1057d2a7d 100644 --- a/contracts/utils/Nonces.sol +++ b/contracts/utils/Nonces.sol @@ -13,7 +13,7 @@ abstract contract Nonces { mapping(address account => uint256) private _nonces; /** - * @dev Returns an the next unused nonce for an address. + * @dev Returns the next unused nonce for an address. */ function nonces(address owner) public view virtual returns (uint256) { return _nonces[owner]; From 64da2c10a41db51c1a7db14fd0700f50ba1ccdcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Tue, 19 Sep 2023 08:35:42 -0600 Subject: [PATCH 058/167] Fix `AccessManager._checkAuthorized` in `execute` context (#4612) Co-authored-by: Francisco --- contracts/access/manager/AccessManager.sol | 50 +++++++++++++++------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index e83b8a4da..47dc47f73 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -136,7 +136,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } else if (caller == address(this)) { // Caller is AccessManager, this means the call was sent through {execute} and it already checked // permissions. We verify that the call "identifier", which is set during {execute}, is correct. - return (_executionId == _hashExecutionId(target, selector), 0); + return (_isExecuting(target, selector), 0); } else { uint64 roleId = getTargetFunctionRole(target, selector); (bool isMember, uint32 currentDelay) = hasRole(roleId, caller); @@ -760,7 +760,7 @@ contract AccessManager is Context, Multicall, IAccessManager { */ function _checkAuthorized() private { address caller = _msgSender(); - (bool immediate, uint32 delay) = _canCallExtended(caller, address(this), _msgData()); + (bool immediate, uint32 delay) = _canCallSelf(caller, _msgData()); if (!immediate) { if (delay == 0) { (, uint64 requiredRole, ) = _getAdminRestrictions(_msgData()); @@ -833,25 +833,45 @@ contract AccessManager is Context, Multicall, IAccessManager { */ function _canCallExtended(address caller, address target, bytes calldata data) private view returns (bool, uint32) { if (target == address(this)) { - (bool enabled, uint64 roleId, uint32 operationDelay) = _getAdminRestrictions(data); - if (!enabled) { - return (false, 0); - } - - (bool inRole, uint32 executionDelay) = hasRole(roleId, caller); - if (!inRole) { - return (false, 0); - } - - // downcast is safe because both options are uint32 - uint32 delay = uint32(Math.max(operationDelay, executionDelay)); - return (delay == 0, delay); + return _canCallSelf(caller, data); } else { bytes4 selector = bytes4(data); return canCall(caller, target, selector); } } + /** + * @dev A version of {canCall} that checks for admin restrictions in this contract. + */ + function _canCallSelf(address caller, bytes calldata data) private view returns (bool immediate, uint32 delay) { + if (caller == address(this)) { + // Caller is AccessManager, this means the call was sent through {execute} and it already checked + // permissions. We verify that the call "identifier", which is set during {execute}, is correct. + return (_isExecuting(address(this), bytes4(data)), 0); + } + + (bool enabled, uint64 roleId, uint32 operationDelay) = _getAdminRestrictions(data); + if (!enabled) { + return (false, 0); + } + + (bool inRole, uint32 executionDelay) = hasRole(roleId, caller); + if (!inRole) { + return (false, 0); + } + + // downcast is safe because both options are uint32 + delay = uint32(Math.max(operationDelay, executionDelay)); + return (delay == 0, delay); + } + + /** + * @dev Returns true if a call with `target` and `selector` is being executed via {executed}. + */ + function _isExecuting(address target, bytes4 selector) private view returns (bool) { + return _executionId == _hashExecutionId(target, selector); + } + /** * @dev Returns true if a schedule timepoint is past its expiration deadline. */ From 31aa460467854c1f08c3dfc7406df0628b8081c8 Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Tue, 19 Sep 2023 16:13:10 -0300 Subject: [PATCH 059/167] Update docs-utils to support prereleases --- docs/antora.yml | 1 + package-lock.json | 14 +++++++------- package.json | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/antora.yml b/docs/antora.yml index 513a997dd..20f4a1d89 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,6 +1,7 @@ name: contracts title: Contracts version: 4.x +prerelease: false nav: - modules/ROOT/nav.adoc - modules/api/nav.adoc diff --git a/package-lock.json b/package-lock.json index 72b002026..ea4c6db0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", - "@openzeppelin/docs-utils": "^0.1.3", + "@openzeppelin/docs-utils": "^0.1.4", "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrades-core": "^1.20.6", "array.prototype.at": "^1.1.1", @@ -2138,9 +2138,9 @@ } }, "node_modules/@openzeppelin/docs-utils": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/docs-utils/-/docs-utils-0.1.3.tgz", - "integrity": "sha512-O/iJ4jEi5ryNc/T74G9gbnFwQ8QaQ2bpAVoYXLPknZJyK52GEAvxC12UMP33KodTNV3rMzeeQrSBIdI8skjDJg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@openzeppelin/docs-utils/-/docs-utils-0.1.4.tgz", + "integrity": "sha512-2I56U1GhnNlymz0gGmJbyZKhnErGIaJ+rqtKTGyNf7YX3jgeS9/Twv8H0T+OgLV4dimtCHPz/27w6CYhWQ/TGg==", "dev": true, "dependencies": { "@frangio/servbot": "^0.2.5", @@ -17010,9 +17010,9 @@ } }, "@openzeppelin/docs-utils": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/docs-utils/-/docs-utils-0.1.3.tgz", - "integrity": "sha512-O/iJ4jEi5ryNc/T74G9gbnFwQ8QaQ2bpAVoYXLPknZJyK52GEAvxC12UMP33KodTNV3rMzeeQrSBIdI8skjDJg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@openzeppelin/docs-utils/-/docs-utils-0.1.4.tgz", + "integrity": "sha512-2I56U1GhnNlymz0gGmJbyZKhnErGIaJ+rqtKTGyNf7YX3jgeS9/Twv8H0T+OgLV4dimtCHPz/27w6CYhWQ/TGg==", "dev": true, "requires": { "@frangio/servbot": "^0.2.5", diff --git a/package.json b/package.json index f0dabd47e..cdb65dbf7 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", - "@openzeppelin/docs-utils": "^0.1.3", + "@openzeppelin/docs-utils": "^0.1.4", "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrades-core": "^1.20.6", "array.prototype.at": "^1.1.1", From ae986db608bf06b2acb2d6f2781b24fb4daa88ce Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Tue, 19 Sep 2023 16:17:35 -0300 Subject: [PATCH 060/167] Enable docs generation for prereleases --- scripts/update-docs-branch.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/update-docs-branch.js b/scripts/update-docs-branch.js index 4e94ba6b1..26922ec49 100644 --- a/scripts/update-docs-branch.js +++ b/scripts/update-docs-branch.js @@ -21,11 +21,6 @@ if (!match) { process.exit(1); } -if (/-.*$/.test(require('../package.json').version)) { - console.error('Refusing to update docs: prerelease detected'); - process.exit(0); -} - const current = match.groups; const docsBranch = `docs-v${current.major}.x`; From f0316a4cefc5526b9e052e77b5c29b6a715d4f98 Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Tue, 19 Sep 2023 17:24:03 -0300 Subject: [PATCH 061/167] Fix docs updates on prereleases --- scripts/update-docs-branch.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/update-docs-branch.js b/scripts/update-docs-branch.js index 26922ec49..324ba0c67 100644 --- a/scripts/update-docs-branch.js +++ b/scripts/update-docs-branch.js @@ -21,6 +21,13 @@ if (!match) { process.exit(1); } +const pkgVersion = require('../package.json').version; + +if (pkgVersion.includes('-') && !pkgVersion.includes('.0.0-')) { + console.error('Refusing to update docs: non-major prerelease detected'); + process.exit(0); +} + const current = match.groups; const docsBranch = `docs-v${current.major}.x`; From 181d518609a9f006fcb97af63e6952e603cf100e Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 20 Sep 2023 16:19:48 -0300 Subject: [PATCH 062/167] Update readme for release candidate (#4618) --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 11ee615bb..6446c4f7e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ -> **Warning** -> Version 5.0 is under active development. The code in this branch is not recommended for use. +> **Note** +> Version 5.0 is currently in release candidate period. Bug bounty rewards are boosted 50% until the release. +> [See more details on Immunefi.](https://immunefi.com/bounty/openzeppelin/) # OpenZeppelin From da04f40e981370ed870f7d885630c30e1070e800 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 22:04:06 -0300 Subject: [PATCH 063/167] Update lockfile (#4556) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Francisco Giordano --- package-lock.json | 31055 ++++++++++------------------- package.json | 4 +- scripts/checks/extract-layout.js | 6 +- 3 files changed, 10479 insertions(+), 20586 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea4c6db0d..1fd5230af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7 +1,7 @@ { "name": "openzeppelin-solidity", "version": "4.9.2", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -26,7 +26,7 @@ "eth-sig-util": "^3.0.0", "ethereumjs-util": "^7.0.7", "ethereumjs-wallet": "^1.0.1", - "glob": "^8.0.3", + "glob": "^10.3.5", "graphlib": "^2.1.8", "hardhat": "^2.9.1", "hardhat-exposed": "^0.3.11", @@ -40,7 +40,7 @@ "p-limit": "^3.1.0", "prettier": "^3.0.0", "prettier-plugin-solidity": "^1.1.0", - "rimraf": "^3.0.2", + "rimraf": "^5.0.1", "semver": "^7.3.5", "solhint": "^3.3.6", "solhint-plugin-openzeppelin": "file:scripts/solhint-custom", @@ -62,34 +62,35 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -97,12 +98,12 @@ } }, "node_modules/@babel/runtime": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz", - "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz", + "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==", "dev": true, "dependencies": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" @@ -544,18 +545,18 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz", + "integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", - "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -594,9 +595,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", - "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", + "version": "8.49.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.49.0.tgz", + "integrity": "sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -612,6 +613,18 @@ "ethereumjs-util": "^7.1.1" } }, + "node_modules/@ethereumjs/rlp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", + "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", + "dev": true, + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/@ethereumjs/tx": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.2.tgz", @@ -622,6 +635,32 @@ "ethereumjs-util": "^7.1.2" } }, + "node_modules/@ethereumjs/util": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", + "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", + "dev": true, + "dependencies": { + "@ethereumjs/rlp": "^4.0.1", + "ethereum-cryptography": "^2.0.0", + "micro-ftch": "^0.3.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@ethereumjs/util/node_modules/ethereum-cryptography": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", + "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", + "dev": true, + "dependencies": { + "@noble/curves": "1.1.0", + "@noble/hashes": "1.3.1", + "@scure/bip32": "1.3.1", + "@scure/bip39": "1.2.1" + } + }, "node_modules/@ethersproject/abi": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", @@ -1373,9 +1412,9 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", + "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -1405,6 +1444,102 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@manypkg/find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", @@ -1505,17 +1640,29 @@ "rlp": "^2.2.3" } }, + "node_modules/@noble/curves": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", + "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.3.1" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@noble/hashes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", - "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } }, "node_modules/@noble/secp256k1": { "version": "1.7.1", @@ -1565,16 +1712,16 @@ } }, "node_modules/@nomicfoundation/ethereumjs-block": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz", - "integrity": "sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.2.tgz", + "integrity": "sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q==", "dev": true, "dependencies": { - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-trie": "6.0.1", - "@nomicfoundation/ethereumjs-tx": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", + "@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" }, @@ -1631,18 +1778,18 @@ } }, "node_modules/@nomicfoundation/ethereumjs-blockchain": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz", - "integrity": "sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A==", - "dev": true, - "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.1", - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-ethash": "3.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-trie": "6.0.1", - "@nomicfoundation/ethereumjs-tx": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", + "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, + "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", @@ -1655,24 +1802,24 @@ } }, "node_modules/@nomicfoundation/ethereumjs-common": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz", - "integrity": "sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.2.tgz", + "integrity": "sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg==", "dev": true, "dependencies": { - "@nomicfoundation/ethereumjs-util": "9.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.2", "crc-32": "^1.2.0" } }, "node_modules/@nomicfoundation/ethereumjs-ethash": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz", - "integrity": "sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w==", + "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, "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", + "@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" @@ -1682,15 +1829,15 @@ } }, "node_modules/@nomicfoundation/ethereumjs-evm": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz", - "integrity": "sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ==", + "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, "dependencies": { "@ethersproject/providers": "^5.7.1", - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-tx": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.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", @@ -1701,9 +1848,9 @@ } }, "node_modules/@nomicfoundation/ethereumjs-rlp": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz", - "integrity": "sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.2.tgz", + "integrity": "sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA==", "dev": true, "bin": { "rlp": "bin/rlp" @@ -1713,13 +1860,13 @@ } }, "node_modules/@nomicfoundation/ethereumjs-statemanager": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz", - "integrity": "sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ==", + "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.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@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", @@ -1775,13 +1922,13 @@ } }, "node_modules/@nomicfoundation/ethereumjs-trie": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz", - "integrity": "sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA==", + "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.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", + "@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" @@ -1791,16 +1938,16 @@ } }, "node_modules/@nomicfoundation/ethereumjs-tx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz", - "integrity": "sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w==", + "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==", "dev": true, "dependencies": { "@chainsafe/ssz": "^0.9.2", "@ethersproject/providers": "^5.7.2", - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", + "@nomicfoundation/ethereumjs-common": "4.0.2", + "@nomicfoundation/ethereumjs-rlp": "5.0.2", + "@nomicfoundation/ethereumjs-util": "9.0.2", "ethereum-cryptography": "0.1.3" }, "engines": { @@ -1808,13 +1955,13 @@ } }, "node_modules/@nomicfoundation/ethereumjs-util": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz", - "integrity": "sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.2.tgz", + "integrity": "sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ==", "dev": true, "dependencies": { "@chainsafe/ssz": "^0.10.0", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.2", "ethereum-cryptography": "0.1.3" }, "engines": { @@ -1841,20 +1988,20 @@ } }, "node_modules/@nomicfoundation/ethereumjs-vm": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz", - "integrity": "sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ==", - "dev": true, - "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.1", - "@nomicfoundation/ethereumjs-blockchain": "7.0.1", - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-evm": "2.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-statemanager": "2.0.1", - "@nomicfoundation/ethereumjs-trie": "6.0.1", - "@nomicfoundation/ethereumjs-tx": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", + "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", @@ -1865,9 +2012,9 @@ } }, "node_modules/@nomicfoundation/hardhat-network-helpers": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.8.tgz", - "integrity": "sha512-MNqQbzUJZnCMIYvlniC3U+kcavz/PhhQSsY90tbEtUyMj/IQqsLwIRZa4ctjABh3Bz0KCh9OXUZ7Yk/d9hr45Q==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.9.tgz", + "integrity": "sha512-OXWCv0cHpwLUO2u7bFxBna6dQtCC2Gg/aN/KtJLO7gmuuA28vgmVKYFRCDUqrbjujzgfwQ2aKyZ9Y3vSmDqS7Q==", "dev": true, "dependencies": { "ethereumjs-util": "^7.1.4" @@ -2252,28 +2399,28 @@ } }, "node_modules/@openzeppelin/test-helpers/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" } }, "node_modules/@openzeppelin/upgrades-core": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@openzeppelin/upgrades-core/-/upgrades-core-1.27.1.tgz", - "integrity": "sha512-6tLcu6jt0nYdJNr+LRicBgP3jp+//B+dixgB3KsvycSglCHNfmBNDf0ZQ3ZquDdLL0QQmKzIs1EBRVp6lNvPnQ==", + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/upgrades-core/-/upgrades-core-1.29.0.tgz", + "integrity": "sha512-csZvAMNqUJjMDNBPbaXcV9Nlo4oagMD/HkOBHTpYbBTpnmUhwPVHOMv+Rl0RatBdLHuGc6hw88h80k5PWkEeWw==", "dev": true, "dependencies": { - "cbor": "^8.0.0", + "cbor": "^9.0.0", "chalk": "^4.1.0", - "compare-versions": "^5.0.0", + "compare-versions": "^6.0.0", "debug": "^4.1.1", "ethereumjs-util": "^7.0.3", "minimist": "^1.2.7", "proper-lockfile": "^4.1.1", - "solidity-ast": "^0.4.15" + "solidity-ast": "^0.4.26" }, "bin": { "openzeppelin-upgrades-core": "dist/cli/cli.js" @@ -2349,49 +2496,50 @@ "node": ">=8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@scure/base": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz", - "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.3.tgz", + "integrity": "sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] + "funding": { + "url": "https://paulmillr.com/funding/" + } }, "node_modules/@scure/bip32": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", - "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz", + "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { - "@noble/hashes": "~1.2.0", - "@noble/secp256k1": "~1.7.0", + "@noble/curves": "~1.1.0", + "@noble/hashes": "~1.3.1", "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/@scure/bip39": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", - "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { - "@noble/hashes": "~1.2.0", + "@noble/hashes": "~1.3.0", "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/@sentry/core": { @@ -2530,44 +2678,77 @@ } }, "node_modules/@truffle/abi-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@truffle/abi-utils/-/abi-utils-1.0.1.tgz", - "integrity": "sha512-ZQUY3XUxEPdqxNaoXsOqF0spTtb6f5RNlnN4MUrVsJ64sOh0FJsY7rxZiUI3khfePmNh4i2qcJrQlKT36YcWUA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@truffle/abi-utils/-/abi-utils-1.0.3.tgz", + "integrity": "sha512-AWhs01HCShaVKjml7Z4AbVREr/u4oiWxCcoR7Cktm0mEvtT04pvnxW5xB/cI4znRkrbPdFQlFt67kgrAjesYkw==", "dev": true, "dependencies": { "change-case": "3.0.2", "fast-check": "3.1.1", "web3-utils": "1.10.0" + }, + "engines": { + "node": "^16.20 || ^18.16 || >=20" } }, - "node_modules/@truffle/blockchain-utils": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.8.tgz", - "integrity": "sha512-ZskpYDNHkXD3ota4iU3pZz6kLth87RC+wDn66Rp2Or+DqqJCKdnmS9GDctBi1EcMPDEi0BqpkdrfBuzA9uIkGg==", + "node_modules/@truffle/abi-utils/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, + "node_modules/@truffle/abi-utils/node_modules/web3-utils": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", + "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", + "dev": true, + "dependencies": { + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereumjs-util": "^7.1.0", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/blockchain-utils": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.9.tgz", + "integrity": "sha512-RHfumgbIVo68Rv9ofDYfynjnYZIfP/f1vZy4RoqkfYAO+fqfc58PDRzB1WAGq2U6GPuOnipOJxQhnqNnffORZg==", + "dev": true, + "engines": { + "node": "^16.20 || ^18.16 || >=20" + } + }, "node_modules/@truffle/codec": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.17.0.tgz", - "integrity": "sha512-0Z7DQNCnvW++JuvNj35v/CuJoaFSAp7/+lXWwe+Zoe++E27V+hzRI88ZYxRJa0/q1HE81epd1r0ipqc7WBotig==", + "version": "0.17.3", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.17.3.tgz", + "integrity": "sha512-Ko/+dsnntNyrJa57jUD9u4qx9nQby+H4GsUO6yjiCPSX0TQnEHK08XWqBSg0WdmCH2+h0y1nr2CXSx8gbZapxg==", "dev": true, "dependencies": { - "@truffle/abi-utils": "^1.0.1", - "@truffle/compile-common": "^0.9.6", + "@truffle/abi-utils": "^1.0.3", + "@truffle/compile-common": "^0.9.8", "big.js": "^6.0.3", "bn.js": "^5.1.3", "cbor": "^5.2.0", "debug": "^4.3.1", "lodash": "^4.17.21", - "semver": "7.5.2", + "semver": "^7.5.4", "utf8": "^3.0.0", "web3-utils": "1.10.0" + }, + "engines": { + "node": "^16.20 || ^18.16 || >=20" } }, "node_modules/@truffle/codec/node_modules/bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", "dev": true, "engines": { "node": "*" @@ -2592,18 +2773,6 @@ "node": ">=6.0.0" } }, - "node_modules/@truffle/codec/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@truffle/codec/node_modules/nofilter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz", @@ -2613,55 +2782,58 @@ "node": ">=8" } }, - "node_modules/@truffle/codec/node_modules/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "node_modules/@truffle/codec/node_modules/web3-utils": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", + "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereumjs-util": "^7.1.0", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" }, "engines": { - "node": ">=10" + "node": ">=8.0.0" } }, - "node_modules/@truffle/codec/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/@truffle/compile-common": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/@truffle/compile-common/-/compile-common-0.9.6.tgz", - "integrity": "sha512-TCcmr1E0GqMZJ2tOaCRNEllxTBJ/g7TuD6jDJpw5Gt9Bw0YO3Cmp6yPQRynRSO4xMJbHUgiEsSfRgIhswut5UA==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@truffle/compile-common/-/compile-common-0.9.8.tgz", + "integrity": "sha512-DTpiyo32t/YhLI1spn84D3MHYHrnoVqO+Gp7ZHrYNwDs86mAxtNiH5lsVzSb8cPgiqlvNsRCU9nm9R0YmKMTBQ==", "dev": true, "dependencies": { - "@truffle/error": "^0.2.1", + "@truffle/error": "^0.2.2", "colors": "1.4.0" + }, + "engines": { + "node": "^16.20 || ^18.16 || >=20" } }, "node_modules/@truffle/compile-common/node_modules/@truffle/error": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.1.tgz", - "integrity": "sha512-5Qy+z9dg9hP37WNdLnXH4b9MzemWrjTufRq7/DTKqimjyxCP/1zlL8gQEMdiSx1BBtAZz0xypkID/jb7AF/Osg==", - "dev": true + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.2.tgz", + "integrity": "sha512-TqbzJ0O8DHh34cu8gDujnYl4dUl6o2DE4PR6iokbybvnIm/L2xl6+Gv1VC+YJS45xfH83Yo3/Zyg/9Oq8/xZWg==", + "dev": true, + "engines": { + "node": "^16.20 || ^18.16 || >=20" + } }, "node_modules/@truffle/contract": { - "version": "4.6.26", - "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.6.26.tgz", - "integrity": "sha512-B3KM8fW9dKJCzMRD40r+u+iqQtBGFbcMr2GML31iUkjC77Wn/KlM9cCGZiuXcOquWmBlKrpD4nJCoGirPhyPTQ==", + "version": "4.6.31", + "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.6.31.tgz", + "integrity": "sha512-s+oHDpXASnZosiCdzu+X1Tx5mUJUs1L1CYXIcgRmzMghzqJkaUFmR6NpNo7nJYliYbO+O9/aW8oCKqQ7rCHfmQ==", "dev": true, "dependencies": { "@ensdomains/ensjs": "^2.1.0", - "@truffle/blockchain-utils": "^0.1.8", - "@truffle/contract-schema": "^3.4.14", - "@truffle/debug-utils": "^6.0.54", - "@truffle/error": "^0.2.1", - "@truffle/interface-adapter": "^0.5.34", + "@truffle/blockchain-utils": "^0.1.9", + "@truffle/contract-schema": "^3.4.16", + "@truffle/debug-utils": "^6.0.57", + "@truffle/error": "^0.2.2", + "@truffle/interface-adapter": "^0.5.37", "bignumber.js": "^7.2.1", "debug": "^4.3.1", "ethers": "^4.0.32", @@ -2670,1033 +2842,1009 @@ "web3-core-promievent": "1.10.0", "web3-eth-abi": "1.10.0", "web3-utils": "1.10.0" + }, + "engines": { + "node": "^16.20 || ^18.16 || >=20" } }, "node_modules/@truffle/contract-schema": { - "version": "3.4.14", - "resolved": "https://registry.npmjs.org/@truffle/contract-schema/-/contract-schema-3.4.14.tgz", - "integrity": "sha512-IwVQZG9RVNwTdn321+jbFIcky3/kZLkCtq8tqil4jZwivvmZQg8rIVC8GJ7Lkrmixl9/yTyQNL6GtIUUvkZxyA==", + "version": "3.4.16", + "resolved": "https://registry.npmjs.org/@truffle/contract-schema/-/contract-schema-3.4.16.tgz", + "integrity": "sha512-g0WNYR/J327DqtJPI70ubS19K1Fth/1wxt2jFqLsPmz5cGZVjCwuhiie+LfBde4/Mc9QR8G+L3wtmT5cyoBxAg==", "dev": true, "dependencies": { "ajv": "^6.10.0", "debug": "^4.3.1" + }, + "engines": { + "node": "^16.20 || ^18.16 || >=20" } }, "node_modules/@truffle/contract/node_modules/@truffle/error": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.1.tgz", - "integrity": "sha512-5Qy+z9dg9hP37WNdLnXH4b9MzemWrjTufRq7/DTKqimjyxCP/1zlL8gQEMdiSx1BBtAZz0xypkID/jb7AF/Osg==", - "dev": true + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.2.tgz", + "integrity": "sha512-TqbzJ0O8DHh34cu8gDujnYl4dUl6o2DE4PR6iokbybvnIm/L2xl6+Gv1VC+YJS45xfH83Yo3/Zyg/9Oq8/xZWg==", + "dev": true, + "engines": { + "node": "^16.20 || ^18.16 || >=20" + } }, - "node_modules/@truffle/debug-utils": { - "version": "6.0.54", - "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.54.tgz", - "integrity": "sha512-ENv5TQQv+CJrwSX9AdXXTDHVNHpPfH+yCpRSnM3Sg0dx7IeWJAjGA66/BiucNBUiAgLhV2EcvkMo+4tEPoR+YQ==", + "node_modules/@truffle/contract/node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", "dev": true, "dependencies": { - "@truffle/codec": "^0.17.0", - "@trufflesuite/chromafi": "^3.0.0", - "bn.js": "^5.1.3", - "chalk": "^2.4.2", - "debug": "^4.3.1", - "highlightjs-solidity": "^2.0.6" + "node-fetch": "^2.6.12" } }, - "node_modules/@truffle/debug-utils/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/@truffle/error": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.1.1.tgz", - "integrity": "sha512-sE7c9IHIGdbK4YayH4BC8i8qMjoAOeg6nUXUDZZp8wlU21/EMpaG+CLx+KqcIPyR+GSWIW3Dm0PXkr2nlggFDA==", - "dev": true - }, - "node_modules/@truffle/interface-adapter": { - "version": "0.5.34", - "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.34.tgz", - "integrity": "sha512-gPxabfMi2TueE4VxnNuyeudOfvGJQ1ofVC02PFw14cnRQhzH327JikjjQbZ1bT6S7kWl9H6P3hQPFeYFMHdm1g==", + "node_modules/@truffle/contract/node_modules/eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", "dev": true, "dependencies": { - "bn.js": "^5.1.3", - "ethers": "^4.0.32", - "web3": "1.10.0" + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" } }, - "node_modules/@truffle/interface-adapter/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true + "node_modules/@truffle/contract/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } }, - "node_modules/@trufflesuite/chromafi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz", - "integrity": "sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ==", + "node_modules/@truffle/contract/node_modules/web3": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.0.tgz", + "integrity": "sha512-YfKY9wSkGcM8seO+daR89oVTcbu18NsVfvOngzqMYGUU0pPSQmE57qQDvQzUeoIOHAnXEBNzrhjQJmm8ER0rng==", "dev": true, + "hasInstallScript": true, "dependencies": { - "camelcase": "^4.1.0", - "chalk": "^2.3.2", - "cheerio": "^1.0.0-rc.2", - "detect-indent": "^5.0.0", - "highlight.js": "^10.4.1", - "lodash.merge": "^4.6.2", - "strip-ansi": "^4.0.0", - "strip-indent": "^2.0.0" + "web3-bzz": "1.10.0", + "web3-core": "1.10.0", + "web3-eth": "1.10.0", + "web3-eth-personal": "1.10.0", + "web3-net": "1.10.0", + "web3-shh": "1.10.0", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@trufflesuite/chromafi/node_modules/detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==", + "node_modules/@truffle/contract/node_modules/web3-bzz": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.0.tgz", + "integrity": "sha512-o9IR59io3pDUsXTsps5pO5hW1D5zBmg46iNc2t4j2DkaYHNdDLwk2IP9ukoM2wg47QILfPEJYzhTfkS/CcX0KA==", "dev": true, + "hasInstallScript": true, + "dependencies": { + "@types/node": "^12.12.6", + "got": "12.1.0", + "swarm-js": "^0.1.40" + }, "engines": { - "node": ">=4" + "node": ">=8.0.0" } }, - "node_modules/@types/bignumber.js": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-5.0.0.tgz", - "integrity": "sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA==", - "deprecated": "This is a stub types definition for bignumber.js (https://github.com/MikeMcl/bignumber.js/). bignumber.js provides its own type definitions, so you don't need @types/bignumber.js installed!", + "node_modules/@truffle/contract/node_modules/web3-core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.0.tgz", + "integrity": "sha512-fWySwqy2hn3TL89w5TM8wXF1Z2Q6frQTKHWmP0ppRQorEK8NcHJRfeMiv/mQlSKoTS1F6n/nv2uyZsixFycjYQ==", "dev": true, "dependencies": { - "bignumber.js": "*" + "@types/bn.js": "^5.1.1", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.10.0", + "web3-core-method": "1.10.0", + "web3-core-requestmanager": "1.10.0", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@types/bn.js": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", - "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", + "node_modules/@truffle/contract/node_modules/web3-core-method": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.0.tgz", + "integrity": "sha512-4R700jTLAMKDMhQ+nsVfIXvH6IGJlJzGisIfMKWAIswH31h5AZz7uDUW2YctI+HrYd+5uOAlS4OJeeT9bIpvkA==", "dev": true, "dependencies": { - "@types/node": "*" + "@ethersproject/transactions": "^5.6.2", + "web3-core-helpers": "1.10.0", + "web3-core-promievent": "1.10.0", + "web3-core-subscriptions": "1.10.0", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@types/cacheable-request": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", - "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "node_modules/@truffle/contract/node_modules/web3-core-requestmanager": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.0.tgz", + "integrity": "sha512-3z/JKE++Os62APml4dvBM+GAuId4h3L9ckUrj7ebEtS2AR0ixyQPbrBodgL91Sv7j7cQ3Y+hllaluqjguxvSaQ==", "dev": true, "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" + "util": "^0.12.5", + "web3-core-helpers": "1.10.0", + "web3-providers-http": "1.10.0", + "web3-providers-ipc": "1.10.0", + "web3-providers-ws": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@types/chai": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz", - "integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==", - "dev": true - }, - "node_modules/@types/concat-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", - "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", + "node_modules/@truffle/contract/node_modules/web3-core-subscriptions": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.0.tgz", + "integrity": "sha512-HGm1PbDqsxejI075gxBc5OSkwymilRWZufIy9zEpnWKNmfbuv5FfHgW1/chtJP6aP3Uq2vHkvTDl3smQBb8l+g==", "dev": true, "dependencies": { - "@types/node": "*" + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@types/form-data": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", - "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", + "node_modules/@truffle/contract/node_modules/web3-core/node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", "dev": true, - "dependencies": { - "@types/node": "*" + "engines": { + "node": "*" } }, - "node_modules/@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "node_modules/@truffle/contract/node_modules/web3-eth": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.0.tgz", + "integrity": "sha512-Z5vT6slNMLPKuwRyKGbqeGYC87OAy8bOblaqRTgg94CXcn/mmqU7iPIlG4506YdcdK3x6cfEDG7B6w+jRxypKA==", "dev": true, "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" + "web3-core": "1.10.0", + "web3-core-helpers": "1.10.0", + "web3-core-method": "1.10.0", + "web3-core-subscriptions": "1.10.0", + "web3-eth-abi": "1.10.0", + "web3-eth-accounts": "1.10.0", + "web3-eth-contract": "1.10.0", + "web3-eth-ens": "1.10.0", + "web3-eth-iban": "1.10.0", + "web3-eth-personal": "1.10.0", + "web3-net": "1.10.0", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", - "dev": true - }, - "node_modules/@types/is-ci": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/is-ci/-/is-ci-3.0.0.tgz", - "integrity": "sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==", + "node_modules/@truffle/contract/node_modules/web3-eth-abi": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.0.tgz", + "integrity": "sha512-cwS+qRBWpJ43aI9L3JS88QYPfFcSJJ3XapxOQ4j40v6mk7ATpA8CVK1vGTzpihNlOfMVRBkR95oAj7oL6aiDOg==", "dev": true, "dependencies": { - "ci-info": "^3.1.0" + "@ethersproject/abi": "^5.6.3", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "node_modules/@truffle/contract/node_modules/web3-eth-accounts": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.0.tgz", + "integrity": "sha512-wiq39Uc3mOI8rw24wE2n15hboLE0E9BsQLdlmsL4Zua9diDS6B5abXG0XhFcoNsXIGMWXVZz4TOq3u4EdpXF/Q==", "dev": true, "dependencies": { - "@types/node": "*" + "@ethereumjs/common": "2.5.0", + "@ethereumjs/tx": "3.3.2", + "eth-lib": "0.2.8", + "ethereumjs-util": "^7.1.5", + "scrypt-js": "^3.0.1", + "uuid": "^9.0.0", + "web3-core": "1.10.0", + "web3-core-helpers": "1.10.0", + "web3-core-method": "1.10.0", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@types/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", - "dev": true - }, - "node_modules/@types/minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "dev": true + "node_modules/@truffle/contract/node_modules/web3-eth-contract": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.0.tgz", + "integrity": "sha512-MIC5FOzP/+2evDksQQ/dpcXhSqa/2hFNytdl/x61IeWxhh6vlFeSjq0YVTAyIzdjwnL7nEmZpjfI6y6/Ufhy7w==", + "dev": true, + "dependencies": { + "@types/bn.js": "^5.1.1", + "web3-core": "1.10.0", + "web3-core-helpers": "1.10.0", + "web3-core-method": "1.10.0", + "web3-core-promievent": "1.10.0", + "web3-core-subscriptions": "1.10.0", + "web3-eth-abi": "1.10.0", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" + } }, - "node_modules/@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, - "node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", - "dev": true - }, - "node_modules/@types/pbkdf2": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", - "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "node_modules/@truffle/contract/node_modules/web3-eth-ens": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.0.tgz", + "integrity": "sha512-3hpGgzX3qjgxNAmqdrC2YUQMTfnZbs4GeLEmy8aCWziVwogbuqQZ+Gzdfrym45eOZodk+lmXyLuAdqkNlvkc1g==", "dev": true, "dependencies": { - "@types/node": "*" + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "web3-core": "1.10.0", + "web3-core-helpers": "1.10.0", + "web3-core-promievent": "1.10.0", + "web3-eth-abi": "1.10.0", + "web3-eth-contract": "1.10.0", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", - "dev": 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==", + "node_modules/@truffle/contract/node_modules/web3-eth-personal": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.0.tgz", + "integrity": "sha512-anseKn98w/d703eWq52uNuZi7GhQeVjTC5/svrBWEKob0WZ5kPdo+EZoFN0sp5a5ubbrk/E0xSl1/M5yORMtpg==", "dev": true, "dependencies": { - "@types/node": "*", - "safe-buffer": "~5.1.1" + "@types/node": "^12.12.6", + "web3-core": "1.10.0", + "web3-core-helpers": "1.10.0", + "web3-core-method": "1.10.0", + "web3-net": "1.10.0", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@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", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", + "node_modules/@truffle/contract/node_modules/web3-net": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.0.tgz", + "integrity": "sha512-NLH/N3IshYWASpxk4/18Ge6n60GEvWBVeM8inx2dmZJVmRI6SJIlUxbL8jySgiTn3MMZlhbdvrGo8fpUW7a1GA==", "dev": true, "dependencies": { - "@types/node": "*" + "web3-core": "1.10.0", + "web3-core-method": "1.10.0", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@types/secp256k1": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", - "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", + "node_modules/@truffle/contract/node_modules/web3-providers-http": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.0.tgz", + "integrity": "sha512-eNr965YB8a9mLiNrkjAWNAPXgmQWfpBfkkn7tpEFlghfww0u3I0tktMZiaToJVcL2+Xq+81cxbkpeWJ5XQDwOA==", "dev": true, "dependencies": { - "@types/node": "*" + "abortcontroller-polyfill": "^1.7.3", + "cross-fetch": "^3.1.4", + "es6-promise": "^4.2.8", + "web3-core-helpers": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", - "dev": true - }, - "node_modules/abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", - "dev": true - }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "node_modules/@truffle/contract/node_modules/web3-providers-ipc": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.0.tgz", + "integrity": "sha512-OfXG1aWN8L1OUqppshzq8YISkWrYHaATW9H8eh0p89TlWMc1KZOL9vttBuaBEi96D/n0eYDn2trzt22bqHWfXA==", "dev": true, "dependencies": { - "event-target-shim": "^5.0.0" + "oboe": "2.1.5", + "web3-core-helpers": "1.10.0" }, "engines": { - "node": ">=6.5" + "node": ">=8.0.0" } }, - "node_modules/abortcontroller-polyfill": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", - "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==", - "dev": true - }, - "node_modules/abstract-level": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", - "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", + "node_modules/@truffle/contract/node_modules/web3-providers-ws": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.0.tgz", + "integrity": "sha512-sK0fNcglW36yD5xjnjtSGBnEtf59cbw4vZzJ+CmOWIKGIR96mP5l684g0WD0Eo+f4NQc2anWWXG74lRc9OVMCQ==", "dev": true, "dependencies": { - "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" + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.10.0", + "websocket": "^1.0.32" }, "engines": { - "node": ">=12" + "node": ">=8.0.0" } }, - "node_modules/abstract-level/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "node_modules/@truffle/contract/node_modules/web3-shh": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.0.tgz", + "integrity": "sha512-uNUUuNsO2AjX41GJARV9zJibs11eq6HtOe6Wr0FtRUcj8SN6nHeYIzwstAvJ4fXA53gRqFMTxdntHEt9aXVjpg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], + "hasInstallScript": true, "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "web3-core": "1.10.0", + "web3-core-method": "1.10.0", + "web3-core-subscriptions": "1.10.0", + "web3-net": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "node_modules/@truffle/contract/node_modules/web3-utils": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", + "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", "dev": true, "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereumjs-util": "^7.1.0", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">=8.0.0" } }, - "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "node_modules/@truffle/contract/node_modules/web3-utils/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/@truffle/debug-utils": { + "version": "6.0.57", + "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.57.tgz", + "integrity": "sha512-Q6oI7zLaeNLB69ixjwZk2UZEWBY6b2OD1sjLMGDKBGR7GaHYiw96GLR2PFgPH1uwEeLmV4N78LYaQCrDsHbNeA==", "dev": true, - "bin": { - "acorn": "bin/acorn" + "dependencies": { + "@truffle/codec": "^0.17.3", + "@trufflesuite/chromafi": "^3.0.0", + "bn.js": "^5.1.3", + "chalk": "^2.4.2", + "debug": "^4.3.1", + "highlightjs-solidity": "^2.0.6" }, "engines": { - "node": ">=0.4.0" + "node": "^16.20 || ^18.16 || >=20" } }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } + "node_modules/@truffle/debug-utils/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true }, - "node_modules/address": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz", - "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", + "node_modules/@truffle/error": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.1.1.tgz", + "integrity": "sha512-sE7c9IHIGdbK4YayH4BC8i8qMjoAOeg6nUXUDZZp8wlU21/EMpaG+CLx+KqcIPyR+GSWIW3Dm0PXkr2nlggFDA==", + "dev": true + }, + "node_modules/@truffle/interface-adapter": { + "version": "0.5.37", + "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.37.tgz", + "integrity": "sha512-lPH9MDgU+7sNDlJSClwyOwPCfuOimqsCx0HfGkznL3mcFRymc1pukAR1k17zn7ErHqBwJjiKAZ6Ri72KkS+IWw==", "dev": true, + "dependencies": { + "bn.js": "^5.1.3", + "ethers": "^4.0.32", + "web3": "1.10.0" + }, "engines": { - "node": ">= 10.0.0" + "node": "^16.20 || ^18.16 || >=20" } }, - "node_modules/adm-zip": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", - "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", + "node_modules/@truffle/interface-adapter/node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", "dev": true, "engines": { - "node": ">=0.3.0" + "node": "*" } }, - "node_modules/aes-js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", + "node_modules/@truffle/interface-adapter/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "node_modules/@truffle/interface-adapter/node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", "dev": true, "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" + "node-fetch": "^2.6.12" } }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "node_modules/@truffle/interface-adapter/node_modules/eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", "dev": true, "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" } }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } + "node_modules/@truffle/interface-adapter/node_modules/eth-lib/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "node_modules/@truffle/interface-adapter/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", "dev": true, - "optional": true, - "engines": { - "node": ">=0.4.2" + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "node_modules/@truffle/interface-adapter/node_modules/web3": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.0.tgz", + "integrity": "sha512-YfKY9wSkGcM8seO+daR89oVTcbu18NsVfvOngzqMYGUU0pPSQmE57qQDvQzUeoIOHAnXEBNzrhjQJmm8ER0rng==", "dev": true, + "hasInstallScript": true, + "dependencies": { + "web3-bzz": "1.10.0", + "web3-core": "1.10.0", + "web3-eth": "1.10.0", + "web3-eth-personal": "1.10.0", + "web3-net": "1.10.0", + "web3-shh": "1.10.0", + "web3-utils": "1.10.0" + }, "engines": { - "node": ">=6" + "node": ">=8.0.0" } }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "node_modules/@truffle/interface-adapter/node_modules/web3-bzz": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.0.tgz", + "integrity": "sha512-o9IR59io3pDUsXTsps5pO5hW1D5zBmg46iNc2t4j2DkaYHNdDLwk2IP9ukoM2wg47QILfPEJYzhTfkS/CcX0KA==", "dev": true, + "hasInstallScript": true, "dependencies": { - "type-fest": "^0.21.3" + "@types/node": "^12.12.6", + "got": "12.1.0", + "swarm-js": "^0.1.40" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8.0.0" } }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "node_modules/@truffle/interface-adapter/node_modules/web3-core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.0.tgz", + "integrity": "sha512-fWySwqy2hn3TL89w5TM8wXF1Z2Q6frQTKHWmP0ppRQorEK8NcHJRfeMiv/mQlSKoTS1F6n/nv2uyZsixFycjYQ==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "@types/bn.js": "^5.1.1", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.10.0", + "web3-core-method": "1.10.0", + "web3-core-requestmanager": "1.10.0", + "web3-utils": "1.10.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, "engines": { - "node": ">=4" + "node": ">=8.0.0" } }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/@truffle/interface-adapter/node_modules/web3-core-method": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.0.tgz", + "integrity": "sha512-4R700jTLAMKDMhQ+nsVfIXvH6IGJlJzGisIfMKWAIswH31h5AZz7uDUW2YctI+HrYd+5uOAlS4OJeeT9bIpvkA==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "@ethersproject/transactions": "^5.6.2", + "web3-core-helpers": "1.10.0", + "web3-core-promievent": "1.10.0", + "web3-core-subscriptions": "1.10.0", + "web3-utils": "1.10.0" }, "engines": { - "node": ">=4" + "node": ">=8.0.0" } }, - "node_modules/antlr4": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.0.tgz", - "integrity": "sha512-zooUbt+UscjnWyOrsuY/tVFL4rwrAGwOivpQmvmUDE22hy/lUA467Rc1rcixyRwcRUIXFYBwv7+dClDSHdmmew==", + "node_modules/@truffle/interface-adapter/node_modules/web3-core-requestmanager": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.0.tgz", + "integrity": "sha512-3z/JKE++Os62APml4dvBM+GAuId4h3L9ckUrj7ebEtS2AR0ixyQPbrBodgL91Sv7j7cQ3Y+hllaluqjguxvSaQ==", "dev": true, + "dependencies": { + "util": "^0.12.5", + "web3-core-helpers": "1.10.0", + "web3-providers-http": "1.10.0", + "web3-providers-ipc": "1.10.0", + "web3-providers-ws": "1.10.0" + }, "engines": { - "node": ">=16" + "node": ">=8.0.0" } }, - "node_modules/antlr4ts": { - "version": "0.5.0-alpha.4", - "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", - "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", - "dev": true - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "node_modules/@truffle/interface-adapter/node_modules/web3-core-subscriptions": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.0.tgz", + "integrity": "sha512-HGm1PbDqsxejI075gxBc5OSkwymilRWZufIy9zEpnWKNmfbuv5FfHgW1/chtJP6aP3Uq2vHkvTDl3smQBb8l+g==", "dev": true, "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.10.0" }, "engines": { - "node": ">= 8" + "node": ">=8.0.0" } }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/@truffle/interface-adapter/node_modules/web3-eth": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.0.tgz", + "integrity": "sha512-Z5vT6slNMLPKuwRyKGbqeGYC87OAy8bOblaqRTgg94CXcn/mmqU7iPIlG4506YdcdK3x6cfEDG7B6w+jRxypKA==", "dev": true, "dependencies": { - "sprintf-js": "~1.0.2" + "web3-core": "1.10.0", + "web3-core-helpers": "1.10.0", + "web3-core-method": "1.10.0", + "web3-core-subscriptions": "1.10.0", + "web3-eth-abi": "1.10.0", + "web3-eth-accounts": "1.10.0", + "web3-eth-contract": "1.10.0", + "web3-eth-ens": "1.10.0", + "web3-eth-iban": "1.10.0", + "web3-eth-personal": "1.10.0", + "web3-net": "1.10.0", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-abi": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.0.tgz", + "integrity": "sha512-cwS+qRBWpJ43aI9L3JS88QYPfFcSJJ3XapxOQ4j40v6mk7ATpA8CVK1vGTzpihNlOfMVRBkR95oAj7oL6aiDOg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "@ethersproject/abi": "^5.6.3", + "web3-utils": "1.10.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, "engines": { - "node": ">=8" + "node": ">=8.0.0" } }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-accounts": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.0.tgz", + "integrity": "sha512-wiq39Uc3mOI8rw24wE2n15hboLE0E9BsQLdlmsL4Zua9diDS6B5abXG0XhFcoNsXIGMWXVZz4TOq3u4EdpXF/Q==", "dev": true, + "dependencies": { + "@ethereumjs/common": "2.5.0", + "@ethereumjs/tx": "3.3.2", + "eth-lib": "0.2.8", + "ethereumjs-util": "^7.1.5", + "scrypt-js": "^3.0.1", + "uuid": "^9.0.0", + "web3-core": "1.10.0", + "web3-core-helpers": "1.10.0", + "web3-core-method": "1.10.0", + "web3-utils": "1.10.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8.0.0" } }, - "node_modules/array.prototype.at": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array.prototype.at/-/array.prototype.at-1.1.1.tgz", - "integrity": "sha512-n/wYNLJy/fVEU9EGPt2ww920hy1XX3XB2yTREFy1QsxctBgQV/tZIwg1G8jVxELna4pLCzg/xvvS/DDXtI4NNg==", + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-contract": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.0.tgz", + "integrity": "sha512-MIC5FOzP/+2evDksQQ/dpcXhSqa/2hFNytdl/x61IeWxhh6vlFeSjq0YVTAyIzdjwnL7nEmZpjfI6y6/Ufhy7w==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0" + "@types/bn.js": "^5.1.1", + "web3-core": "1.10.0", + "web3-core-helpers": "1.10.0", + "web3-core-method": "1.10.0", + "web3-core-promievent": "1.10.0", + "web3-core-subscriptions": "1.10.0", + "web3-eth-abi": "1.10.0", + "web3-utils": "1.10.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8.0.0" } }, - "node_modules/array.prototype.findlast": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.2.tgz", - "integrity": "sha512-p1YDNPNqA+P6cPX9ATsxg7DKir7gOmJ+jh5dEP3LlumMNYVC1F2Jgnyh6oI3n/qD9FeIkqR2jXfd73G68ImYUQ==", + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-ens": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.0.tgz", + "integrity": "sha512-3hpGgzX3qjgxNAmqdrC2YUQMTfnZbs4GeLEmy8aCWziVwogbuqQZ+Gzdfrym45eOZodk+lmXyLuAdqkNlvkc1g==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.1.3" + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "web3-core": "1.10.0", + "web3-core-helpers": "1.10.0", + "web3-core-promievent": "1.10.0", + "web3-eth-abi": "1.10.0", + "web3-eth-contract": "1.10.0", + "web3-utils": "1.10.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8.0.0" } }, - "node_modules/array.prototype.flat": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", - "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-personal": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.0.tgz", + "integrity": "sha512-anseKn98w/d703eWq52uNuZi7GhQeVjTC5/svrBWEKob0WZ5kPdo+EZoFN0sp5a5ubbrk/E0xSl1/M5yORMtpg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0" + "@types/node": "^12.12.6", + "web3-core": "1.10.0", + "web3-core-helpers": "1.10.0", + "web3-core-method": "1.10.0", + "web3-net": "1.10.0", + "web3-utils": "1.10.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8.0.0" } }, - "node_modules/array.prototype.reduce": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz", - "integrity": "sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==", + "node_modules/@truffle/interface-adapter/node_modules/web3-net": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.0.tgz", + "integrity": "sha512-NLH/N3IshYWASpxk4/18Ge6n60GEvWBVeM8inx2dmZJVmRI6SJIlUxbL8jySgiTn3MMZlhbdvrGo8fpUW7a1GA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" + "web3-core": "1.10.0", + "web3-core-method": "1.10.0", + "web3-utils": "1.10.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8.0.0" } }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "node_modules/@truffle/interface-adapter/node_modules/web3-providers-http": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.0.tgz", + "integrity": "sha512-eNr965YB8a9mLiNrkjAWNAPXgmQWfpBfkkn7tpEFlghfww0u3I0tktMZiaToJVcL2+Xq+81cxbkpeWJ5XQDwOA==", "dev": true, + "dependencies": { + "abortcontroller-polyfill": "^1.7.3", + "cross-fetch": "^3.1.4", + "es6-promise": "^4.2.8", + "web3-core-helpers": "1.10.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8.0.0" } }, - "node_modules/asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true - }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "node_modules/@truffle/interface-adapter/node_modules/web3-providers-ipc": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.0.tgz", + "integrity": "sha512-OfXG1aWN8L1OUqppshzq8YISkWrYHaATW9H8eh0p89TlWMc1KZOL9vttBuaBEi96D/n0eYDn2trzt22bqHWfXA==", "dev": true, "dependencies": { - "safer-buffer": "~2.1.0" + "oboe": "2.1.5", + "web3-core-helpers": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "node_modules/@truffle/interface-adapter/node_modules/web3-providers-ws": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.0.tgz", + "integrity": "sha512-sK0fNcglW36yD5xjnjtSGBnEtf59cbw4vZzJ+CmOWIKGIR96mP5l684g0WD0Eo+f4NQc2anWWXG74lRc9OVMCQ==", "dev": true, + "dependencies": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.10.0", + "websocket": "^1.0.32" + }, "engines": { - "node": ">=0.8" + "node": ">=8.0.0" } }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "node_modules/@truffle/interface-adapter/node_modules/web3-shh": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.0.tgz", + "integrity": "sha512-uNUUuNsO2AjX41GJARV9zJibs11eq6HtOe6Wr0FtRUcj8SN6nHeYIzwstAvJ4fXA53gRqFMTxdntHEt9aXVjpg==", "dev": true, + "hasInstallScript": true, + "dependencies": { + "web3-core": "1.10.0", + "web3-core-method": "1.10.0", + "web3-core-subscriptions": "1.10.0", + "web3-net": "1.10.0" + }, "engines": { - "node": "*" + "node": ">=8.0.0" } }, - "node_modules/ast-parents": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", - "integrity": "sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==", - "dev": true - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "node_modules/@truffle/interface-adapter/node_modules/web3-utils": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", + "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", "dev": true, + "dependencies": { + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereumjs-util": "^7.1.0", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, "engines": { - "node": ">=8" + "node": ">=8.0.0" } }, - "node_modules/async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", - "dev": true - }, - "node_modules/async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "node_modules/@trufflesuite/chromafi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz", + "integrity": "sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ==", "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "dependencies": { + "camelcase": "^4.1.0", + "chalk": "^2.3.2", + "cheerio": "^1.0.0-rc.2", + "detect-indent": "^5.0.0", + "highlight.js": "^10.4.1", + "lodash.merge": "^4.6.2", + "strip-ansi": "^4.0.0", + "strip-indent": "^2.0.0" } }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "node_modules/@trufflesuite/chromafi/node_modules/detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==", "dev": true, "engines": { - "node": "*" + "node": ">=4" } }, - "node_modules/aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", - "dev": true - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base-x": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", - "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "node_modules/@types/bignumber.js": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-5.0.0.tgz", + "integrity": "sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA==", + "deprecated": "This is a stub types definition for bignumber.js (https://github.com/MikeMcl/bignumber.js/). bignumber.js provides its own type definitions, so you don't need @types/bignumber.js installed!", "dev": true, "dependencies": { - "safe-buffer": "^5.0.1" + "bignumber.js": "*" } }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "node_modules/@types/bn.js": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.2.tgz", + "integrity": "sha512-dkpZu0szUtn9UXTmw+e0AJFd4D2XAxDnsCLdc05SfqpqzPEBft8eQr8uaFitfo/dUUOZERaLec2hHMG87A4Dxg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "dependencies": { + "@types/node": "*" + } }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", "dev": true, "dependencies": { - "tweetnacl": "^0.14.3" + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" } }, - "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "node_modules/@types/chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", "dev": true }, - "node_modules/bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", - "dev": true - }, - "node_modules/better-path-resolve": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", - "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", + "node_modules/@types/concat-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", "dev": true, "dependencies": { - "is-windows": "^1.0.0" - }, - "engines": { - "node": ">=4" + "@types/node": "*" } }, - "node_modules/big-integer": { - "version": "1.6.36", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz", - "integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==", + "node_modules/@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", "dev": true, - "engines": { - "node": ">=0.6" + "dependencies": { + "@types/node": "*" } }, - "node_modules/big.js": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", - "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", "dev": true, - "engines": { - "node": "*" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/bigjs" + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" } }, - "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/@types/http-cache-semantics": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.2.tgz", + "integrity": "sha512-FD+nQWA2zJjh4L9+pFXqWOi0Hs1ryBCfI+985NjluQ1p8EYtoLvjLOKidXBtZ4/IcxDX4o8/E8qDS3540tNliw==", + "dev": true }, - "node_modules/bignumber.js": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", - "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", + "node_modules/@types/is-ci": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/is-ci/-/is-ci-3.0.0.tgz", + "integrity": "sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==", "dev": true, - "engines": { - "node": "*" + "dependencies": { + "ci-info": "^3.1.0" } }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "@types/node": "*" } }, - "node_modules/blakejs": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", - "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", + "node_modules/@types/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", "dev": true }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", "dev": true }, - "node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "node_modules/@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", "dev": true }, - "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } + "node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "node_modules/@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "node_modules/@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", "dev": true, "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "@types/node": "*" } }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "node_modules/@types/qs": { + "version": "6.9.8", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.8.tgz", + "integrity": "sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg==", "dev": true }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "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": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@types/node": "*", + "safe-buffer": "~5.1.1" } }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "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", + "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" + "@types/node": "*" } }, - "node_modules/breakword": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/breakword/-/breakword-1.0.6.tgz", - "integrity": "sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==", + "node_modules/@types/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", "dev": true, "dependencies": { - "wcwidth": "^1.0.1" + "@types/node": "*" } }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "node_modules/@types/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==", "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/abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", + "dev": true }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "node_modules/abortcontroller-polyfill": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", + "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==", "dev": true }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "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-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", - "dev": true, - "dependencies": { - "base-x": "^3.0.2" - } - }, - "node_modules/bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "dev": true, - "dependencies": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" + "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/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "node_modules/abstract-level/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dev": true, "funding": [ { @@ -3714,168 +3862,134 @@ ], "dependencies": { "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "ieee754": "^1.2.1" } }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/buffer-reverse": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-reverse/-/buffer-reverse-1.0.1.tgz", - "integrity": "sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg==", - "dev": true - }, - "node_modules/buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==", - "dev": true - }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true - }, - "node_modules/bufferutil": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", - "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, - "hasInstallScript": true, "dependencies": { - "node-gyp-build": "^4.3.0" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" }, "engines": { - "node": ">=6.14.2" + "node": ">= 0.6" } }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true, - "dependencies": { - "streamsearch": "^1.1.0" + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=10.16.0" + "node": ">=0.4.0" } }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "engines": { - "node": ">= 0.8" + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/cacheable-lookup": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz", - "integrity": "sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==", + "node_modules/address": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz", + "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", "dev": true, "engines": { - "node": ">=10.6.0" + "node": ">= 10.0.0" } }, - "node_modules/cacheable-request": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", - "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "node_modules/adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - }, "engines": { - "node": ">=8" + "node": ">=0.3.0" } }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "node_modules/aes-js": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", + "dev": true + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "dependencies": { - "pump": "^3.0.0" + "debug": "4" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 6.0.0" } }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, "engines": { "node": ">=8" } }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", "dev": true, + "optional": true, "engines": { - "node": ">=6" - } - }, - "node_modules/camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" + "node": ">=0.4.2" } }, - "node_modules/camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==", + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "dependencies": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" + "type-fest": "^0.21.3" }, "engines": { "node": ">=8" @@ -3884,1709 +3998,1681 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/camelcase-keys/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "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==", + "node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true, "engines": { - "node": ">= 0.8.0" + "node": ">=4" } }, - "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==", + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/cbor": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", - "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", + "node_modules/antlr4": { + "version": "4.13.1", + "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.1.tgz", + "integrity": "sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA==", "dev": true, - "dependencies": { - "nofilter": "^3.1.0" - }, "engines": { - "node": ">=12.19" + "node": ">=16" } }, - "node_modules/chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", + "node_modules/antlr4ts": { + "version": "0.5.0-alpha.4", + "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", + "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", + "dev": true + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": ">=4" - } - }, - "node_modules/chai-bn": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/chai-bn/-/chai-bn-0.2.2.tgz", - "integrity": "sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg==", - "dev": true, - "peerDependencies": { - "bn.js": "^4.11.0", - "chai": "^4.0.0" + "node": ">= 8" } }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" + "sprintf-js": "~1.0.2" } }, - "node_modules/change-case": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.0.2.tgz", - "integrity": "sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==", + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", "dev": true, "dependencies": { - "camel-case": "^3.0.0", - "constant-case": "^2.0.0", - "dot-case": "^2.1.0", - "header-case": "^1.0.0", - "is-lower-case": "^1.1.0", - "is-upper-case": "^1.1.0", - "lower-case": "^1.1.1", - "lower-case-first": "^1.0.0", - "no-case": "^2.3.2", - "param-case": "^2.1.0", - "pascal-case": "^2.0.0", - "path-case": "^2.1.0", - "sentence-case": "^2.1.0", - "snake-case": "^2.1.0", - "swap-case": "^1.1.0", - "title-case": "^2.1.0", - "upper-case": "^1.1.1", - "upper-case-first": "^1.1.0" + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", "dev": true }, - "node_modules/charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", "dev": true, "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "node_modules/cheerio": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "node_modules/array.prototype.at": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/array.prototype.at/-/array.prototype.at-1.1.2.tgz", + "integrity": "sha512-TPj626jUZMc2Qbld8uXKZrXM/lSStx2KfbIyF70Ui9RgdgibpTWC6WGCuff6qQ7xYzqXtir60WAHrfmknkF3Vw==", "dev": true, "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0" - }, - "engines": { - "node": ">= 6" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" }, "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "node_modules/array.prototype.findlast": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.3.tgz", + "integrity": "sha512-kcBubumjciBg4JKp5KTKtI7ec7tRefPk88yjkWJwaVKYd9QfTaxcsOxoMNKd7iBr447zCfDV0z1kOF47umv42g==", "dev": true, "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/fb55" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 0.4" }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "node_modules/ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "node_modules/array.prototype.reduce": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.6.tgz", + "integrity": "sha512-UW+Mz8LG/sPSU8jRDCjVr6J/ZKAGpHfwrZ6kWTG5qCxIEiXdVshqGnu5vEZA8S1y6X4aCSbQZ0/EEsfvEvBiSg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" + }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/cids": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", - "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", - "deprecated": "This module has been superseded by the multiformats module", + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", "dev": true, "dependencies": { - "buffer": "^5.5.0", - "class-is": "^1.1.0", - "multibase": "~0.6.0", - "multicodec": "^1.0.0", - "multihashes": "~0.4.15" + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" }, "engines": { - "node": ">=4.0.0", - "npm": ">=3.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/cids/node_modules/multicodec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", - "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", - "deprecated": "This module has been superseded by the multiformats module", + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true, - "dependencies": { - "buffer": "^5.6.0", - "varint": "^5.0.0" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "safer-buffer": "~2.1.0" } }, - "node_modules/class-is": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", - "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", - "dev": true - }, - "node_modules/classic-level": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", - "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true, - "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": ">=0.8" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, "engines": { - "node": ">=6" + "node": "*" } }, - "node_modules/cli-table3": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", - "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "node_modules/ast-parents": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", + "integrity": "sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==", + "dev": true + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, - "dependencies": { - "object-assign": "^4.1.0", - "string-width": "^2.1.1" - }, "engines": { - "node": ">=6" - }, - "optionalDependencies": { - "colors": "^1.1.2" + "node": ">=8" } }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "dev": true + }, + "node_modules/async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, "engines": { - "node": ">=12" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/aws4": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "safe-buffer": "^5.0.1" } }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" + "tweetnacl": "^0.14.3" } }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true + }, + "node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", + "dev": true + }, + "node_modules/better-path-resolve": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", + "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1" + "is-windows": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "node_modules/big-integer": { + "version": "1.6.36", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz", + "integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==", "dev": true, "engines": { - "node": ">=0.8" + "node": ">=0.6" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "node_modules/big.js": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", + "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" + "engines": { + "node": "*" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/bigjs" } }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "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": ">=0.10.0" + "node": ">=14.0.0" } }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/bignumber.js": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", "dev": true, - "dependencies": { - "color-name": "1.1.3" + "engines": { + "node": "*" } }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, "engines": { - "node": ">= 0.8" + "node": ">=8" } }, - "node_modules/command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", "dev": true }, - "node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/compare-versions": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-5.0.3.tgz", - "integrity": "sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A==", + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", "dev": true }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dev": true, - "engines": [ - "node >= 0.8" - ], "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/concat-stream/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "ms": "2.0.0" } }, - "node_modules/concat-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==", + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/concat-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/body-parser/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, "dependencies": { - "safe-buffer": "~5.1.0" + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/constant-case": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz", - "integrity": "sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==", + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "snake-case": "^2.1.0", - "upper-case": "^1.1.1" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { - "safe-buffer": "5.2.1" + "fill-range": "^7.0.1" }, "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "node_modules/content-hash": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", - "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "node_modules/breakword": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/breakword/-/breakword-1.0.6.tgz", + "integrity": "sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==", "dev": true, "dependencies": { - "cids": "^0.7.1", - "multicodec": "^0.5.5", - "multihashes": "^0.4.15" + "wcwidth": "^1.0.1" } }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "dev": true }, - "node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "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, - "engines": { - "node": ">= 0.6" + "dependencies": { + "abstract-level": "^1.0.2", + "catering": "^2.1.1", + "module-error": "^1.0.2", + "run-parallel-limit": "^1.1.0" } }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", "dev": true, "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" + "base-x": "^3.0.2" } }, - "node_modules/cosmiconfig": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.2.0.tgz", - "integrity": "sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==", + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "dev": true, "dependencies": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" } }, - "node_modules/cosmiconfig/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/buffer-reverse": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-reverse/-/buffer-reverse-1.0.1.tgz", + "integrity": "sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg==", + "dev": true + }, + "node_modules/buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==", + "dev": true + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "dev": true + }, + "node_modules/bufferutil": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", "dev": true, + "hasInstallScript": true, "dependencies": { - "argparse": "^2.0.1" + "node-gyp-build": "^4.3.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=6.14.2" } }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", "dev": true, - "bin": { - "crc32": "bin/crc32.njs" + "dependencies": { + "streamsearch": "^1.1.0" }, "engines": { - "node": ">=0.8" + "node": ">=10.16.0" } }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" + "engines": { + "node": ">= 0.8" } }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "node_modules/cacheable-lookup": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz", + "integrity": "sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==", "dev": true, - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "engines": { + "node": ">=10.6.0" } }, - "node_modules/cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "node_modules/cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", "dev": true, "dependencies": { - "node-fetch": "^2.6.12" + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "pump": "^3.0.0" }, "engines": { - "node": ">= 8" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true, "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/crypto-addr-codec": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz", - "integrity": "sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg==", + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "dependencies": { - "base-x": "^3.0.8", - "big-integer": "1.6.36", - "blakejs": "^1.1.0", - "bs58": "^4.0.1", - "ripemd160-min": "0.0.6", - "safe-buffer": "^5.2.0", - "sha3": "^2.1.1" + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/crypto-js": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", - "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", - "dev": true + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "node_modules/camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==", "dev": true, "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" + "no-case": "^2.2.0", + "upper-case": "^1.1.1" } }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "node_modules/camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==", "dev": true, "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" + "node": ">=4" } }, - "node_modules/csv": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/csv/-/csv-5.5.3.tgz", - "integrity": "sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==", + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", "dev": true, "dependencies": { - "csv-generate": "^3.4.3", - "csv-parse": "^4.16.3", - "csv-stringify": "^5.6.5", - "stream-transform": "^2.1.3" + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" }, "engines": { - "node": ">= 0.1.90" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/csv-generate": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/csv-generate/-/csv-generate-3.4.3.tgz", - "integrity": "sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==", - "dev": true + "node_modules/camelcase-keys/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } }, - "node_modules/csv-parse": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.3.tgz", - "integrity": "sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==", - "dev": true + "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/csv-stringify": { - "version": "5.6.5", - "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-5.6.5.tgz", - "integrity": "sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==", + "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/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "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, - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" + "engines": { + "node": ">=6" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "node_modules/cbor": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-9.0.1.tgz", + "integrity": "sha512-/TQOWyamDxvVIv+DY9cOLNuABkoyz8K/F3QE56539pGVYohx0+MEA1f4lChFTX79dBTBS7R1PF6ovH7G+VtBfQ==", "dev": true, "dependencies": { - "assert-plus": "^1.0.0" + "nofilter": "^3.1.0" }, "engines": { - "node": ">=0.10" + "node": ">=16" } }, - "node_modules/dataloader": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", - "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", - "dev": true - }, - "node_modules/death": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", - "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/chai": { + "version": "4.3.8", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.8.tgz", + "integrity": "sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==", "dev": true, "dependencies": { - "ms": "2.1.2" + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^4.1.2", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=4" } }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "node_modules/chai-bn": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/chai-bn/-/chai-bn-0.2.2.tgz", + "integrity": "sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg==", "dev": true, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "bn.js": "^4.11.0", + "chai": "^4.0.0" } }, - "node_modules/decamelize-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", - "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "dependencies": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "node_modules/decamelize-keys/node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "node_modules/change-case": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.0.2.tgz", + "integrity": "sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==", + "dev": true, + "dependencies": { + "camel-case": "^3.0.0", + "constant-case": "^2.0.0", + "dot-case": "^2.1.0", + "header-case": "^1.0.0", + "is-lower-case": "^1.1.0", + "is-upper-case": "^1.1.0", + "lower-case": "^1.1.1", + "lower-case-first": "^1.0.0", + "no-case": "^2.3.2", + "param-case": "^2.1.0", + "pascal-case": "^2.0.0", + "path-case": "^2.1.0", + "sentence-case": "^2.1.0", + "snake-case": "^2.1.0", + "swap-case": "^1.1.0", + "title-case": "^2.1.0", + "upper-case": "^1.1.1", + "upper-case-first": "^1.1.0" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "node_modules/charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": "*" } }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", "dev": true, "engines": { - "node": ">=0.10" + "node": "*" } }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "node_modules/cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", "dev": true, "dependencies": { - "mimic-response": "^3.1.0" + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" }, "engines": { - "node": ">=10" + "node": ">= 6" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" } }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/fb55" } }, - "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "type-detect": "^4.0.0" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">=6" + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "dev": true, - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" } }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "node_modules/cids": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", + "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", + "deprecated": "This module has been superseded by the multiformats module", "dev": true, "dependencies": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" + "buffer": "^5.5.0", + "class-is": "^1.1.0", + "multibase": "~0.6.0", + "multicodec": "^1.0.0", + "multihashes": "~0.4.15" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4.0.0", + "npm": ">=3.0.0" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "node_modules/cids/node_modules/multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "deprecated": "This module has been superseded by the multiformats module", "dev": true, - "engines": { - "node": ">=0.4.0" + "dependencies": { + "buffer": "^5.6.0", + "varint": "^5.0.0" } }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, - "engines": { - "node": ">= 0.8" + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "node_modules/class-is": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", + "dev": true + }, + "node_modules/classic-level": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", + "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": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "node": ">=12" } }, - "node_modules/detect-indent": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", - "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "node_modules/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, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/detect-port": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", - "integrity": "sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ==", + "node_modules/cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", "dev": true, "dependencies": { - "address": "^1.0.1", - "debug": "4" + "object-assign": "^4.1.0", + "string-width": "^2.1.1" }, - "bin": { - "detect": "bin/detect-port.js", - "detect-port": "bin/detect-port.js" - } - }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, "engines": { - "node": ">=0.3.1" + "node": ">=6" + }, + "optionalDependencies": { + "colors": "^1.1.2" } }, - "node_modules/difflib": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", - "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { - "heap": ">= 0.2.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": "*" + "node": ">=12" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/doctrine": { + "node_modules/cliui/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, "engines": { - "node": ">=6.0.0" + "node": ">=8" } }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + "engines": { + "node": ">=8" } }, - "node_modules/dom-walk": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", - "dev": true - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "domelementtype": "^2.3.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" + "node": ">=8" } }, - "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "dev": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" + "engines": { + "node": ">=0.8" } }, - "node_modules/dot-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz", - "integrity": "sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==", + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", "dev": true, "dependencies": { - "no-case": "^2.2.0" + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/dotenv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", - "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", "dev": true, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" + "color-name": "1.1.3" } }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", "dev": true, "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" + "node": ">=0.1.90" } }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "dependencies": { - "ansi-colors": "^4.1.1" + "delayed-stream": "~1.0.0" }, "engines": { - "node": ">=8.6" + "node": ">= 0.8" } }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "dev": true }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, "engines": { - "node": ">=6" + "node": ">=14" } }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } + "node_modules/compare-versions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==", + "dev": true }, - "node_modules/es-abstract": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", - "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, + "engines": [ + "node >= 0.8" + ], "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.0", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, - "node_modules/es-array-method-boxes-properly": { + "node_modules/concat-stream/node_modules/isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "dev": true }, - "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "node_modules/concat-stream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "node_modules/concat-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/concat-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "dependencies": { - "has": "^1.0.3" + "safe-buffer": "~5.1.0" } }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "node_modules/constant-case": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz", + "integrity": "sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==", "dev": true, "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "snake-case": "^2.1.0", + "upper-case": "^1.1.1" } }, - "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dev": true, - "hasInstallScript": true, "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" + "safe-buffer": "5.2.1" }, "engines": { - "node": ">=0.10" - } - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" + "node": ">= 0.6" } }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "dev": true - }, - "node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "node_modules/content-hash": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", + "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", "dev": true, "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" + "cids": "^0.7.1", + "multicodec": "^0.5.5", + "multihashes": "^0.4.15" } }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true, "engines": { - "node": ">=6" + "node": ">= 0.6" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "dev": true, + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, "engines": { - "node": ">=0.8.0" + "node": ">= 0.10" } }, - "node_modules/escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", + "node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", "dev": true, "dependencies": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" }, "engines": { - "node": ">=0.12.0" + "node": ">=14" }, - "optionalDependencies": { - "source-map": "~0.2.0" + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/escodegen/node_modules/esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", + "node_modules/cosmiconfig/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/cosmiconfig/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "dependencies": { + "argparse": "^2.0.1" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/escodegen/node_modules/estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", "dev": true, + "bin": { + "crc32": "bin/crc32.njs" + }, "engines": { - "node": ">=0.10.0" + "node": ">=0.8" } }, - "node_modules/escodegen/node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, - "node_modules/escodegen/node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, - "node_modules/escodegen/node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", "dev": true, - "engines": { - "node": ">= 0.8.0" + "dependencies": { + "node-fetch": "^2.6.12" } }, - "node_modules/escodegen/node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 8" } }, - "node_modules/eslint": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz", - "integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==", + "node_modules/crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.1.0", - "@eslint/js": "8.44.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.6.0", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": "*" } }, - "node_modules/eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "node_modules/crypto-addr-codec": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/crypto-addr-codec/-/crypto-addr-codec-0.1.8.tgz", + "integrity": "sha512-GqAK90iLLgP3FvhNmHbpT3wR6dEdaM8hZyZtLX29SPardh3OA13RFLHDR6sntGCgRWOfiHqW6sIyohpNqOtV/g==", "dev": true, - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" + "dependencies": { + "base-x": "^3.0.8", + "big-integer": "1.6.36", + "blakejs": "^1.1.0", + "bs58": "^4.0.1", + "ripemd160-min": "0.0.6", + "safe-buffer": "^5.2.0", + "sha3": "^2.1.1" } }, - "node_modules/eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "node_modules/crypto-js": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", + "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", + "dev": true + }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/sponsors/fb55" } }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">= 6" }, "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" + "url": "https://github.com/sponsors/fb55" } }, - "node_modules/eslint/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==", + "node_modules/csv": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/csv/-/csv-5.5.3.tgz", + "integrity": "sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "csv-generate": "^3.4.3", + "csv-parse": "^4.16.3", + "csv-stringify": "^5.6.5", + "stream-transform": "^2.1.3" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">= 0.1.90" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "node_modules/csv-generate": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/csv-generate/-/csv-generate-3.4.3.tgz", + "integrity": "sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==", "dev": true }, - "node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/csv-parse": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.3.tgz", + "integrity": "sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==", + "dev": true + }, + "node_modules/csv-stringify": { + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-5.6.5.tgz", + "integrity": "sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==", + "dev": true + }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "es5-ext": "^0.10.50", + "type": "^1.0.1" } }, - "node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "assert-plus": "^1.0.0" }, "engines": { - "node": ">=7.0.0" + "node": ">=0.10" } }, - "node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "node_modules/dataloader": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", + "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", "dev": true }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/death": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", + "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, + "dependencies": { + "ms": "2.1.2" + }, "engines": { - "node": ">=10" + "node": ">=6.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/eslint/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", "dev": true, "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" }, "engines": { - "node": ">=10" + "node": ">=0.10.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, "engines": { - "node": ">=10.13.0" + "node": ">=0.10.0" } }, - "node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "dependencies": { - "argparse": "^2.0.1" + "mimic-response": "^3.1.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, "engines": { "node": ">=10" }, @@ -5594,1641 +5680,1456 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, "dependencies": { - "p-limit": "^3.0.2" + "type-detect": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=6" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "dependencies": { + "clone": "^1.0.2" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/define-data-property": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", + "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">= 0.4" } }, - "node_modules/espree": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.0.tgz", - "integrity": "sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==", + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">= 0.4" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, "engines": { - "node": ">=4" + "node": ">=0.4.0" } }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, "engines": { - "node": ">=0.10" + "node": ">= 0.8" } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, "engines": { - "node": ">=4.0" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", "dev": true, "engines": { - "node": ">=4.0" + "node": ">=8" } }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "node_modules/detect-port": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", + "integrity": "sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "address": "^1.0.1", + "debug": "4" + }, + "bin": { + "detect": "bin/detect-port.js", + "detect-port": "bin/detect-port.js" } }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, "engines": { - "node": ">= 0.6" + "node": ">=0.3.1" } }, - "node_modules/eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw==", + "node_modules/difflib": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", + "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", "dev": true, "dependencies": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" + "heap": ">= 0.2.0" + }, + "engines": { + "node": "*" } }, - "node_modules/eth-ens-namehash/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, - "node_modules/eth-gas-reporter": { - "version": "0.2.25", - "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz", - "integrity": "sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ==", + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "dependencies": { - "@ethersproject/abi": "^5.0.0-beta.146", - "@solidity-parser/parser": "^0.14.0", - "cli-table3": "^0.5.0", - "colors": "1.4.0", - "ethereum-cryptography": "^1.0.3", - "ethers": "^4.0.40", - "fs-readdir-recursive": "^1.1.0", - "lodash": "^4.17.14", - "markdown-table": "^1.1.3", - "mocha": "^7.1.1", - "req-cwd": "^2.0.0", - "request": "^2.88.0", - "request-promise-native": "^1.0.5", - "sha1": "^1.1.1", - "sync-request": "^6.0.0" - }, - "peerDependencies": { - "@codechecks/client": "^0.1.0" + "path-type": "^4.0.0" }, - "peerDependenciesMeta": { - "@codechecks/client": { - "optional": true - } + "engines": { + "node": ">=8" } }, - "node_modules/eth-gas-reporter/node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, "engines": { - "node": ">=6" + "node": ">=6.0.0" } }, - "node_modules/eth-gas-reporter/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "dev": true, - "engines": { - "node": ">=6" + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, - "node_modules/eth-gas-reporter/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", + "dev": true + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true, - "engines": { - "node": ">=6" - } + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] }, - "node_modules/eth-gas-reporter/node_modules/chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "dev": true, "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" + "domelementtype": "^2.3.0" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 4" }, - "optionalDependencies": { - "fsevents": "~2.1.1" + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" } }, - "node_modules/eth-gas-reporter/node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "node_modules/domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "dev": true, "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" } }, - "node_modules/eth-gas-reporter/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "node_modules/dot-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz", + "integrity": "sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==", "dev": true, "dependencies": { - "ms": "^2.1.1" + "no-case": "^2.2.0" } }, - "node_modules/eth-gas-reporter/node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "node_modules/dotenv": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", + "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", "dev": true, "engines": { - "node": ">=0.3.1" + "node": ">=10" } }, - "node_modules/eth-gas-reporter/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, - "node_modules/eth-gas-reporter/node_modules/ethereum-cryptography": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", - "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, "dependencies": { - "@noble/hashes": "1.2.0", - "@noble/secp256k1": "1.7.1", - "@scure/bip32": "1.1.5", - "@scure/bip39": "1.1.1" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, - "node_modules/eth-gas-reporter/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true }, - "node_modules/eth-gas-reporter/node_modules/flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, "dependencies": { - "is-buffer": "~2.0.3" - }, - "bin": { - "flat": "cli.js" + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/eth-gas-reporter/node_modules/fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "deprecated": "\"Please update to latest v2.3 or v2.2\"", + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": ">= 0.8" } }, - "node_modules/eth-gas-reporter/node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" + "once": "^1.4.0" } }, - "node_modules/eth-gas-reporter/node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=8.6" } }, - "node_modules/eth-gas-reporter/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "node_modules/enquirer/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/eth-gas-reporter/node_modules/log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "node_modules/enquirer/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "chalk": "^2.4.2" + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, - "node_modules/eth-gas-reporter/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" + "engines": { + "node": ">=0.12" }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, "engines": { - "node": "*" + "node": ">=6" } }, - "node_modules/eth-gas-reporter/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "is-arrayish": "^0.2.1" } }, - "node_modules/eth-gas-reporter/node_modules/mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "node_modules/es-abstract": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", + "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", "dev": true, "dependencies": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.1", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.11" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eth-gas-reporter/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "node_modules/es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", "dev": true }, - "node_modules/eth-gas-reporter/node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", "dev": true, "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" } }, - "node_modules/eth-gas-reporter/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", "dev": true, "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "has": "^1.0.3" } }, - "node_modules/eth-gas-reporter/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "dependencies": { - "p-limit": "^2.0.0" + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" }, "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eth-gas-reporter/node_modules/readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", "dev": true, + "hasInstallScript": true, "dependencies": { - "picomatch": "^2.0.4" + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" }, "engines": { - "node": ">= 8" + "node": ">=0.10" } }, - "node_modules/eth-gas-reporter/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", "dev": true, "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, - "node_modules/eth-gas-reporter/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "dev": true + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", "dev": true, "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" + "d": "^1.0.1", + "ext": "^1.1.2" } }, - "node_modules/eth-gas-reporter/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/eth-gas-reporter/node_modules/supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, "engines": { - "node": ">=6" + "node": ">=0.8.0" } }, - "node_modules/eth-gas-reporter/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", "dev": true, "dependencies": { - "isexe": "^2.0.0" + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1" }, "bin": { - "which": "bin/which" + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=0.12.0" + }, + "optionalDependencies": { + "source-map": "~0.2.0" } }, - "node_modules/eth-gas-reporter/node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "node_modules/escodegen/node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/eth-gas-reporter/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/eth-gas-reporter/node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "node_modules/escodegen/node_modules/estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", "dev": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/eth-gas-reporter/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "node_modules/escodegen/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dev": true, "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" } }, - "node_modules/eth-gas-reporter/node_modules/yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "node_modules/escodegen/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" }, "engines": { - "node": ">=6" + "node": ">= 0.8.0" } }, - "node_modules/eth-lib": { - "version": "0.1.29", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", - "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "node_modules/escodegen/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", "dev": true, - "dependencies": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "nano-json-stream-parser": "^0.1.2", - "servify": "^0.1.12", - "ws": "^3.0.0", - "xhr-request-promise": "^0.1.2" + "engines": { + "node": ">= 0.8.0" } }, - "node_modules/eth-lib/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/eth-lib/node_modules/ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "node_modules/escodegen/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, "dependencies": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" } }, - "node_modules/eth-sig-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.1.tgz", - "integrity": "sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==", - "deprecated": "Deprecated in favor of '@metamask/eth-sig-util'", + "node_modules/eslint": { + "version": "8.49.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.49.0.tgz", + "integrity": "sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==", "dev": true, "dependencies": { - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^5.1.1", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.0" - } - }, - "node_modules/eth-sig-util/node_modules/ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "8.49.0", + "@humanwhocodes/config-array": "^0.11.11", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/ethereum-bloom-filters": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", - "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", + "node_modules/eslint-config-prettier": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", + "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", "dev": true, - "dependencies": { - "js-sha3": "^0.8.0" + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" } }, - "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/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "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" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/ethereum-ens": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/ethereum-ens/-/ethereum-ens-0.8.0.tgz", - "integrity": "sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, - "dependencies": { - "bluebird": "^3.4.7", - "eth-ens-namehash": "^2.0.0", - "js-sha3": "^0.5.7", - "pako": "^1.0.4", - "underscore": "^1.8.3", - "web3": "^1.0.0-beta.34" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/ethereum-ens/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, - "node_modules/ethereumjs-abi": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", - "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "dependencies": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/ethereumjs-abi/node_modules/@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "node_modules/eslint/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": { - "@types/node": "*" + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/eslint/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": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/ethereumjs-util": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", - "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "node_modules/eslint/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": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" + "color-name": "~1.1.4" }, "engines": { - "node": ">=10.0.0" + "node": ">=7.0.0" } }, - "node_modules/ethereumjs-util/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "node_modules/eslint/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/ethereumjs-wallet": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz", - "integrity": "sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA==", + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "aes-js": "^3.1.2", - "bs58check": "^2.1.2", - "ethereum-cryptography": "^0.1.3", - "ethereumjs-util": "^7.1.2", - "randombytes": "^2.1.0", - "scrypt-js": "^3.0.1", - "utf8": "^3.0.0", - "uuid": "^8.3.2" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" } }, - "node_modules/ethers/node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "dev": true - }, - "node_modules/ethers/node_modules/hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "node_modules/eslint/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, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/ethers/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, - "node_modules/ethers/node_modules/scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true - }, - "node_modules/ethers/node_modules/setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", - "dev": true - }, - "node_modules/ethers/node_modules/uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true - }, - "node_modules/ethjs-abi": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", - "integrity": "sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA==", + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "bn.js": "4.11.6", - "js-sha3": "0.5.5", - "number-to-bn": "1.7.0" + "argparse": "^2.0.1" }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/ethjs-abi/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - }, - "node_modules/ethjs-abi/node_modules/js-sha3": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", - "integrity": "sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA==", - "dev": true - }, - "node_modules/ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ethjs-unit/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - }, - "node_modules/ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true, - "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "dev": true - }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "node_modules/eslint/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "node_modules/eslint/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": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" + "has-flag": "^4.0.0" }, "engines": { - "node": ">= 0.10.0" + "node": ">=8" } }, - "node_modules/express/node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/express/node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, "engines": { - "node": ">= 0.6" + "node": ">=4" } }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { - "ms": "2.0.0" + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" } }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/express/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "dependencies": { - "side-channel": "^1.0.4" + "estraverse": "^5.2.0" }, "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4.0" } }, - "node_modules/express/node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, "engines": { - "node": ">= 0.8" + "node": ">=4.0" } }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "dependencies": { - "type": "^2.7.2" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "dev": true + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "node_modules/eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw==", + "dev": true, + "dependencies": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + } }, - "node_modules/extendable-error": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", - "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", + "node_modules/eth-ens-namehash/node_modules/js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", "dev": true }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "node_modules/eth-gas-reporter": { + "version": "0.2.25", + "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz", + "integrity": "sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ==", "dev": true, "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" + "@ethersproject/abi": "^5.0.0-beta.146", + "@solidity-parser/parser": "^0.14.0", + "cli-table3": "^0.5.0", + "colors": "1.4.0", + "ethereum-cryptography": "^1.0.3", + "ethers": "^4.0.40", + "fs-readdir-recursive": "^1.1.0", + "lodash": "^4.17.14", + "markdown-table": "^1.1.3", + "mocha": "^7.1.1", + "req-cwd": "^2.0.0", + "request": "^2.88.0", + "request-promise-native": "^1.0.5", + "sha1": "^1.1.1", + "sync-request": "^6.0.0" }, - "engines": { - "node": ">=4" + "peerDependencies": { + "@codechecks/client": "^0.1.0" + }, + "peerDependenciesMeta": { + "@codechecks/client": { + "optional": true + } } }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "node_modules/eth-gas-reporter/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", "dev": true, - "engines": [ - "node >=0.6.0" + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } ] }, - "node_modules/fast-check": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.1.1.tgz", - "integrity": "sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA==", + "node_modules/eth-gas-reporter/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "pure-rand": "^5.0.1" - }, - "engines": { - "node": ">=8.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", - "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", + "node_modules/eth-gas-reporter/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" } }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "node_modules/eth-gas-reporter/node_modules/ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", "dev": true, - "dependencies": { - "reusify": "^1.0.4" + "engines": { + "node": ">=6" } }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "node_modules/eth-gas-reporter/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=6" } }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "node_modules/eth-gas-reporter/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "node_modules/eth-gas-reporter/node_modules/chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", "dev": true, "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.1" } }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/eth-gas-reporter/node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, - "node_modules/find-yarn-workspace-root2": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz", - "integrity": "sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==", + "node_modules/eth-gas-reporter/node_modules/debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", "dev": true, "dependencies": { - "micromatch": "^4.0.2", - "pkg-dir": "^4.2.0" + "ms": "^2.1.1" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "node_modules/eth-gas-reporter/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true, - "bin": { - "flat": "cli.js" + "engines": { + "node": ">=0.3.1" } }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "node_modules/eth-gas-reporter/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/eth-gas-reporter/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", "dev": true, "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" } }, - "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "node_modules/eth-gas-reporter/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" + "dependencies": { + "locate-path": "^3.0.0" }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } + "engines": { + "node": ">=6" } }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "node_modules/eth-gas-reporter/node_modules/flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", "dev": true, "dependencies": { - "is-callable": "^1.1.3" + "is-buffer": "~2.0.3" + }, + "bin": { + "flat": "cli.js" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "node_modules/eth-gas-reporter/node_modules/fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "deprecated": "\"Please update to latest v2.3 or v2.2\"", "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": "*" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "node_modules/eth-gas-reporter/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">= 0.12" + "node": "*" } }, - "node_modules/form-data-encoder": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", - "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==", - "dev": true - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "node_modules/eth-gas-reporter/node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, - "engines": { - "node": ">= 0.6" + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/fp-ts": { - "version": "1.19.3", - "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", - "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", - "dev": true - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "node_modules/eth-gas-reporter/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, "engines": { - "node": ">= 0.6" + "node": ">=6" } }, - "node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "node_modules/eth-gas-reporter/node_modules/log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "chalk": "^2.4.2" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">=8" } }, - "node_modules/fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "node_modules/eth-gas-reporter/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "dependencies": { - "minipass": "^2.6.0" - } - }, - "node_modules/fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "dev": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], + "brace-expansion": "^1.1.7" + }, "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": "*" } }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "node_modules/eth-gas-reporter/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" + "minimist": "^1.2.5" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "mkdirp": "bin/cmd.js" } }, - "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", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "node_modules/eth-gas-reporter/node_modules/mocha": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", + "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", "dev": true, + "dependencies": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, "engines": { - "node": "6.* || 8.* || >= 10.*" + "node": ">= 8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" } }, - "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true, - "engines": { - "node": "*" - } + "node_modules/eth-gas-reporter/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true }, - "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "node_modules/eth-gas-reporter/node_modules/object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "dev": true, "dependencies": { + "define-properties": "^1.1.2", "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-port": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", - "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", - "dev": true, "engines": { - "node": ">=4" + "node": ">= 0.4" } }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "node_modules/eth-gas-reporter/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, "engines": { - "node": ">=10" + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "node_modules/eth-gas-reporter/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "p-limit": "^2.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" + "node": ">=6" } }, - "node_modules/ghost-testrpc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", - "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", + "node_modules/eth-gas-reporter/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "dev": true, - "dependencies": { - "chalk": "^2.4.2", - "node-emoji": "^1.10.0" - }, - "bin": { - "testrpc-sc": "index.js" + "engines": { + "node": ">=4" } }, - "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "node_modules/eth-gas-reporter/node_modules/readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "picomatch": "^2.0.4" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">= 8" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/eth-gas-reporter/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" }, "engines": { - "node": ">= 6" - } - }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" + "node": ">=6" } }, - "node_modules/glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "node_modules/eth-gas-reporter/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" + "ansi-regex": "^4.1.0" }, "engines": { - "node": ">=10" - } - }, - "node_modules/global": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", - "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", - "dev": true, - "dependencies": { - "min-document": "^2.19.0", - "process": "^0.11.10" + "node": ">=6" } }, - "node_modules/global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "node_modules/eth-gas-reporter/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true, - "dependencies": { - "global-prefix": "^3.0.0" - }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "node_modules/eth-gas-reporter/node_modules/supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", "dev": true, "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" + "has-flag": "^3.0.0" }, "engines": { "node": ">=6" } }, - "node_modules/global-prefix/node_modules/which": { + "node_modules/eth-gas-reporter/node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", @@ -7240,1124 +7141,1192 @@ "which": "bin/which" } }, - "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "node_modules/eth-gas-reporter/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "dependencies": { - "type-fest": "^0.20.2" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, - "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/eth-gas-reporter/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/eth-gas-reporter/node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "node_modules/eth-gas-reporter/node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } }, - "node_modules/got": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", - "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", + "node_modules/eth-gas-reporter/node_modules/yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", "dev": true, "dependencies": { - "@sindresorhus/is": "^4.6.0", - "@szmarczak/http-timer": "^5.0.1", - "@types/cacheable-request": "^6.0.2", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^6.0.4", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "form-data-encoder": "1.7.1", - "get-stream": "^6.0.1", - "http2-wrapper": "^2.1.10", - "lowercase-keys": "^3.0.0", - "p-cancelable": "^3.0.0", - "responselike": "^2.0.0" + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" }, "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" + "node": ">=6" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true + "node_modules/eth-lib": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", + "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", + "xhr-request-promise": "^0.1.2" + } }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "node_modules/eth-lib/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "node_modules/graphlib": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", - "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", + "node_modules/eth-lib/node_modules/ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", "dev": true, "dependencies": { - "lodash": "^4.17.15" + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" } }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "node_modules/eth-sig-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.1.tgz", + "integrity": "sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==", + "deprecated": "Deprecated in favor of '@metamask/eth-sig-util'", "dev": true, - "engines": { - "node": ">=4.x" + "dependencies": { + "ethereumjs-abi": "^0.6.8", + "ethereumjs-util": "^5.1.1", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.0" } }, - "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "node_modules/eth-sig-util/node_modules/ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", "dev": true, "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" } }, - "node_modules/handlebars/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/ethereum-bloom-filters": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", + "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "js-sha3": "^0.8.0" } }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "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, - "engines": { - "node": ">=4" + "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/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", + "node_modules/ethereum-ens": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/ethereum-ens/-/ethereum-ens-0.8.0.tgz", + "integrity": "sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg==", "dev": true, "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" + "bluebird": "^3.4.7", + "eth-ens-namehash": "^2.0.0", + "js-sha3": "^0.5.7", + "pako": "^1.0.4", + "underscore": "^1.8.3", + "web3": "^1.0.0-beta.34" } }, - "node_modules/hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "node_modules/ethereum-ens/node_modules/js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", + "dev": true + }, + "node_modules/ethereumjs-abi": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", "dev": true, - "engines": { - "node": ">=6" + "dependencies": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" } }, - "node_modules/hardhat": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.16.1.tgz", - "integrity": "sha512-QpBjGXFhhSYoYBGEHyoau/A63crZOP+i3GbNxzLGkL6IklzT+piN14+wGnINNCg5BLSKisQI/RAySPzaWRcx/g==", + "node_modules/ethereumjs-abi/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", "dev": true, "dependencies": { - "@ethersproject/abi": "^5.1.2", - "@metamask/eth-sig-util": "^4.0.0", - "@nomicfoundation/ethereumjs-block": "5.0.1", - "@nomicfoundation/ethereumjs-blockchain": "7.0.1", - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-evm": "2.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-statemanager": "2.0.1", - "@nomicfoundation/ethereumjs-trie": "6.0.1", - "@nomicfoundation/ethereumjs-tx": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", - "@nomicfoundation/ethereumjs-vm": "7.0.1", - "@nomicfoundation/solidity-analyzer": "^0.1.0", - "@sentry/node": "^5.18.1", - "@types/bn.js": "^5.1.0", - "@types/lru-cache": "^5.1.0", - "abort-controller": "^3.0.0", - "adm-zip": "^0.4.16", - "aggregate-error": "^3.0.0", - "ansi-escapes": "^4.3.0", - "chalk": "^2.4.2", - "chokidar": "^3.4.0", - "ci-info": "^2.0.0", - "debug": "^4.1.1", - "enquirer": "^2.3.0", - "env-paths": "^2.2.0", - "ethereum-cryptography": "^1.0.3", - "ethereumjs-abi": "^0.6.8", - "find-up": "^2.1.0", - "fp-ts": "1.19.3", - "fs-extra": "^7.0.1", - "glob": "7.2.0", - "immutable": "^4.0.0-rc.12", - "io-ts": "1.10.4", - "keccak": "^3.0.2", - "lodash": "^4.17.11", - "mnemonist": "^0.38.0", - "mocha": "^10.0.0", - "p-map": "^4.0.0", - "raw-body": "^2.4.1", - "resolve": "1.17.0", - "semver": "^6.3.0", - "solc": "0.7.3", - "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" - }, - "bin": { - "hardhat": "internal/cli/bootstrap.js" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "ts-node": "*", - "typescript": "*" - }, - "peerDependenciesMeta": { - "ts-node": { - "optional": true - }, - "typescript": { - "optional": true - } + "@types/node": "*" } }, - "node_modules/hardhat-exposed": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/hardhat-exposed/-/hardhat-exposed-0.3.11.tgz", - "integrity": "sha512-2Gwdfx1YpSWUX80kuq0zM1tNqDJoTBCd5Q5oXKPxz6STSy1TiDyDb1miUr4Dwc/Dp2lzWzM+fZjpUrMe5O08Hw==", + "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", "dev": true, "dependencies": { - "micromatch": "^4.0.4", - "solidity-ast": "^0.4.25" - }, - "peerDependencies": { - "hardhat": "^2.3.0" + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" } }, - "node_modules/hardhat-gas-reporter": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", - "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", + "node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", "dev": true, "dependencies": { - "array-uniq": "1.0.3", - "eth-gas-reporter": "^0.2.25", - "sha1": "^1.1.1" + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" }, - "peerDependencies": { - "hardhat": "^2.0.2" + "engines": { + "node": ">=10.0.0" } }, - "node_modules/hardhat-ignore-warnings": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/hardhat-ignore-warnings/-/hardhat-ignore-warnings-0.2.9.tgz", - "integrity": "sha512-q1oj6/ixiAx+lgIyGLBajVCSC7qUtAoK7LS9Nr8UVHYo8Iuh5naBiVGo4RDJ6wxbDGYBkeSukUGZrMqzC2DWwA==", + "node_modules/ethereumjs-util/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/ethereumjs-wallet": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz", + "integrity": "sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA==", "dev": true, "dependencies": { - "minimatch": "^5.1.0", - "node-interval-tree": "^2.0.1", - "solidity-comments": "^0.0.2" + "aes-js": "^3.1.2", + "bs58check": "^2.1.2", + "ethereum-cryptography": "^0.1.3", + "ethereumjs-util": "^7.1.2", + "randombytes": "^2.1.0", + "scrypt-js": "^3.0.1", + "utf8": "^3.0.0", + "uuid": "^8.3.2" } }, - "node_modules/hardhat-ignore-warnings/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0" + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" } }, - "node_modules/hardhat-ignore-warnings/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "node_modules/ethers/node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", + "dev": true + }, + "node_modules/ethers/node_modules/hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" } }, - "node_modules/hardhat/node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "node_modules/ethers/node_modules/js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", "dev": true }, - "node_modules/hardhat/node_modules/commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", + "node_modules/ethers/node_modules/scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", "dev": true }, - "node_modules/hardhat/node_modules/ethereum-cryptography": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", - "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "node_modules/ethers/node_modules/setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", + "dev": true + }, + "node_modules/ethers/node_modules/uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true + }, + "node_modules/ethjs-abi": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", + "integrity": "sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA==", "dev": true, "dependencies": { - "@noble/hashes": "1.2.0", - "@noble/secp256k1": "1.7.1", - "@scure/bip32": "1.1.5", - "@scure/bip39": "1.1.1" + "bn.js": "4.11.6", + "js-sha3": "0.5.5", + "number-to-bn": "1.7.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/hardhat/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "node_modules/ethjs-abi/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true + }, + "node_modules/ethjs-abi/node_modules/js-sha3": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", + "integrity": "sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA==", + "dev": true + }, + "node_modules/ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", "dev": true, "dependencies": { - "locate-path": "^2.0.0" + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" }, "engines": { - "node": ">=4" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/hardhat/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "node_modules/ethjs-unit/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true + }, + "node_modules/ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/hardhat/node_modules/jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } + "node_modules/eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", + "dev": true }, - "node_modules/hardhat/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, - "node_modules/hardhat/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dev": true, "dependencies": { - "p-try": "^1.0.0" + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" }, "engines": { - "node": ">=4" + "node": ">= 0.10.0" } }, - "node_modules/hardhat/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "node_modules/express/node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "dev": true, "dependencies": { - "p-limit": "^1.1.0" + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "engines": { - "node": ">=4" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/hardhat/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "node_modules/express/node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "dev": true, "engines": { - "node": ">=4" + "node": ">= 0.6" } }, - "node_modules/hardhat/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "ms": "2.0.0" } }, - "node_modules/hardhat/node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true }, - "node_modules/hardhat/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "node_modules/express/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, "dependencies": { - "glob": "^7.1.3" + "side-channel": "^1.0.4" }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/hardhat/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hardhat/node_modules/solc": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", - "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", + "node_modules/express/node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", "dev": true, "dependencies": { - "command-exists": "^1.2.8", - "commander": "3.0.2", - "follow-redirects": "^1.12.1", - "fs-extra": "^0.30.0", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", - "semver": "^5.5.0", - "tmp": "0.0.33" - }, - "bin": { - "solcjs": "solcjs" + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.8" } }, - "node_modules/hardhat/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==", + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" + "type": "^2.7.2" } }, - "node_modules/hardhat/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==", - "dev": true, - "bin": { - "semver": "bin/semver" - } + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extendable-error": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", + "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", + "dev": true + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "dev": true, "dependencies": { - "function-bind": "^1.1.1" + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" }, "engines": { - "node": ">= 0.4.0" + "node": ">=4" } }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "engines": [ + "node >=0.6.0" + ] }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/fast-check": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.1.1.tgz", + "integrity": "sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA==", "dev": true, + "dependencies": { + "pure-rand": "^5.0.1" + }, "engines": { - "node": ">=4" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.1" + "node": ">=8.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/fast-check" } }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, - "engines": { - "node": ">= 0.4" + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8.6.0" } }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "reusify": "^1.0.4" } }, - "node_modules/hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/he": { + "node_modules/finalhandler": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dev": true, - "bin": { - "he": "bin/he" + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" } }, - "node_modules/header-case": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz", - "integrity": "sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==", + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.1.3" + "ms": "2.0.0" } }, - "node_modules/heap": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", - "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/highlightjs-solidity": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz", - "integrity": "sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg==", - "dev": true - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "node_modules/find-yarn-workspace-root2": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz", + "integrity": "sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==", "dev": true, "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "micromatch": "^4.0.2", + "pkg-dir": "^4.2.0" } }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" + "bin": { + "flat": "cli.js" } }, - "node_modules/http-basic": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", - "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "node_modules/flat-cache": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", + "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", "dev": true, "dependencies": { - "caseless": "^0.12.0", - "concat-stream": "^1.6.2", - "http-response-object": "^3.0.1", - "parse-cache-control": "^1.0.1" + "flatted": "^3.2.7", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=12.0.0" } }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "dev": true - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "node_modules/flat-cache/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">= 0.8" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==", - "dev": true - }, - "node_modules/http-response-object": { + "node_modules/flat-cache/node_modules/rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", - "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", - "dev": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "dependencies": { - "@types/node": "^10.0.3" + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/http-response-object/node_modules/@types/node": { - "version": "10.17.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "node_modules/follow-redirects": { + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "dev": true, - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } } }, - "node_modules/http2-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", - "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.2.0" + "is-callable": "^1.1.3" + } + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" }, "engines": { - "node": ">=10.19.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/http2-wrapper/node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "dependencies": { - "agent-base": "6", - "debug": "4" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" }, "engines": { - "node": ">= 6" + "node": ">= 0.12" } }, - "node_modules/human-id": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz", - "integrity": "sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==", + "node_modules/form-data-encoder": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", + "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==", "dev": true }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.6" } }, - "node_modules/idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "node_modules/fp-ts": { + "version": "1.19.3", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", + "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", + "dev": true + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "dev": true, "dependencies": { - "punycode": "2.1.0" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" }, "engines": { - "node": ">=4.0.0" + "node": ">=6 <7 || >=8" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "node_modules/fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "dependencies": { + "minipass": "^2.6.0" + } }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "node_modules/fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 4" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/immutable": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", - "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==", + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { - "node": ">=6" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "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", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, - "engines": { - "node": ">=4" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, "engines": { - "node": ">=0.8.19" + "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "node_modules/get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - }, "engines": { - "node": ">= 0.4" + "node": ">=4" } }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, "engines": { - "node": ">= 0.10" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/invert-kv": { + "node_modules/get-symbol-description": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/io-ts": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", - "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, "dependencies": { - "fp-ts": "^1.0.0" + "assert-plus": "^1.0.0" } }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "node_modules/ghost-testrpc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", + "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", "dev": true, - "engines": { - "node": ">= 0.10" + "dependencies": { + "chalk": "^2.4.2", + "node-emoji": "^1.10.0" + }, + "bin": { + "testrpc-sc": "index.js" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "node_modules/glob": { + "version": "10.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.5.tgz", + "integrity": "sha512-bYUpUD7XDEHI4Q2O5a7PXGvyw4deKR70kHiDxzQbe925wbZknhOzUt2xBgTkYL6RBcVeXYuD9iNYeqoWbBZQnA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^2.0.3", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/cjs/src/bin.js" }, "engines": { - "node": ">= 0.4" + "node": ">=16 || 14 >=14.17" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "is-glob": "^4.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 6" } }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { - "has-bigints": "^1.0.1" + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/glob/node_modules/minipass": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", + "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==", "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" } }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "node_modules/global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "dependencies": { + "global-prefix": "^3.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6" } }, - "node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, - "engines": { - "node": ">= 0.4" + "dependencies": { + "isexe": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "which": "bin/which" } }, - "node_modules/is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "node_modules/globals": { + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", "dev": true, "dependencies": { - "ci-info": "^3.2.0" + "type-fest": "^0.20.2" }, - "bin": { - "is-ci": "bin.js" + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "define-properties": "^1.1.3" }, "engines": { "node": ">= 0.4" @@ -8366,1404 +8335,1372 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/is-function": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", - "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", - "dev": true - }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", - "dev": true, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-lower-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", - "integrity": "sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, "dependencies": { - "lower-case": "^1.1.0" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "engines": { - "node": ">= 0.4" + "get-intrinsic": "^1.1.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "node_modules/got": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", + "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "@sindresorhus/is": "^4.6.0", + "@szmarczak/http-timer": "^5.0.1", + "@types/cacheable-request": "^6.0.2", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^6.0.4", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "form-data-encoder": "1.7.1", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^2.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=14.16" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sindresorhus/got?sponsor=1" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true }, - "node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/graphlib": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", + "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "lodash": "^4.17.15" } }, - "node_modules/is-port-reachable": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-3.1.0.tgz", - "integrity": "sha512-vjc0SSRNZ32s9SbZBzGaiP6YVB+xglLShhgZD/FHMZUXBvQWaV9CtzgeVhjccFJrI6RAMV+LX7NYxueW/A8W5A==", + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=4.x" } }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" }, - "engines": { - "node": ">= 0.4" + "bin": { + "handlebars": "bin/handlebars" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" + "engines": { + "node": ">=0.4.7" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "optionalDependencies": { + "uglify-js": "^3.1.4" } }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-subdir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", - "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", "dev": true, - "dependencies": { - "better-path-resolve": "1.0.0" - }, "engines": { "node": ">=4" } }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "ajv": "^6.12.3", + "har-schema": "^2.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6" } }, - "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true + "node_modules/hardhat": { + "version": "2.17.3", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.17.3.tgz", + "integrity": "sha512-SFZoYVXW1bWJZrIIKXOA+IgcctfuKXDwENywiYNT2dM3YQc4fXNaTbuk/vpPzHIF50upByx4zW5EqczKYQubsA==", + "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/solidity-analyzer": "^0.1.0", + "@sentry/node": "^5.18.1", + "@types/bn.js": "^5.1.0", + "@types/lru-cache": "^5.1.0", + "adm-zip": "^0.4.16", + "aggregate-error": "^3.0.0", + "ansi-escapes": "^4.3.0", + "chalk": "^2.4.2", + "chokidar": "^3.4.0", + "ci-info": "^2.0.0", + "debug": "^4.1.1", + "enquirer": "^2.3.0", + "env-paths": "^2.2.0", + "ethereum-cryptography": "^1.0.3", + "ethereumjs-abi": "^0.6.8", + "find-up": "^2.1.0", + "fp-ts": "1.19.3", + "fs-extra": "^7.0.1", + "glob": "7.2.0", + "immutable": "^4.0.0-rc.12", + "io-ts": "1.10.4", + "keccak": "^3.0.2", + "lodash": "^4.17.11", + "mnemonist": "^0.38.0", + "mocha": "^10.0.0", + "p-map": "^4.0.0", + "raw-body": "^2.4.1", + "resolve": "1.17.0", + "semver": "^6.3.0", + "solc": "0.7.3", + "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" + }, + "bin": { + "hardhat": "internal/cli/bootstrap.js" + }, + "peerDependencies": { + "ts-node": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + }, + "typescript": { + "optional": true + } + } }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "node_modules/hardhat-exposed": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/hardhat-exposed/-/hardhat-exposed-0.3.12.tgz", + "integrity": "sha512-op/shZ6YQcQzPzxT4h0oD3x7M6fBna2rM/YUuhZLzJOtsu/DF9xK2o2thPSR1LAz8enx3wbjJZxl7b2+QXyDYw==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "micromatch": "^4.0.4", + "solidity-ast": "^0.4.25" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "hardhat": "^2.3.0" } }, - "node_modules/is-upper-case": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", - "integrity": "sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==", + "node_modules/hardhat-gas-reporter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", + "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", "dev": true, "dependencies": { - "upper-case": "^1.1.0" + "array-uniq": "1.0.3", + "eth-gas-reporter": "^0.2.25", + "sha1": "^1.1.1" + }, + "peerDependencies": { + "hardhat": "^2.0.2" } }, - "node_modules/is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true + "node_modules/hardhat-ignore-warnings": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/hardhat-ignore-warnings/-/hardhat-ignore-warnings-0.2.9.tgz", + "integrity": "sha512-q1oj6/ixiAx+lgIyGLBajVCSC7qUtAoK7LS9Nr8UVHYo8Iuh5naBiVGo4RDJ6wxbDGYBkeSukUGZrMqzC2DWwA==", + "dev": true, + "dependencies": { + "minimatch": "^5.1.0", + "node-interval-tree": "^2.0.1", + "solidity-comments": "^0.0.2" + } }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "node_modules/hardhat-ignore-warnings/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "balanced-match": "^1.0.0" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "node_modules/hardhat-ignore-warnings/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "node_modules/hardhat/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true + "node_modules/hardhat/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } }, - "node_modules/js-sdsl": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.1.tgz", - "integrity": "sha512-6Gsx8R0RucyePbWqPssR8DyfuXmLBooYN5cZFZKjHGnQuaf7pEzhtpceagJxVu4LqhYY5EYA7nko3FmeHZ1KbA==", + "node_modules/hardhat/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" } }, - "node_modules/js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "node_modules/hardhat/node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "node_modules/hardhat/node_modules/commander": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", + "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", "dev": true }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/hardhat/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, + "node_modules/hardhat/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=4" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true + "node_modules/hardhat/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "node_modules/hardhat/node_modules/jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", "dev": true, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, - "node_modules/jsonschema": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", - "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", + "node_modules/hardhat/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, "engines": { - "node": "*" + "node": ">=4" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "node_modules/hardhat/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" + "p-try": "^1.0.0" }, "engines": { - "node": ">=0.6.0" + "node": ">=4" } }, - "node_modules/keccak": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.3.tgz", - "integrity": "sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ==", + "node_modules/hardhat/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", "dev": true, - "hasInstallScript": true, "dependencies": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0", - "readable-stream": "^3.6.0" + "p-limit": "^1.1.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=4" } }, - "node_modules/keccak256": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/keccak256/-/keccak256-1.0.6.tgz", - "integrity": "sha512-8GLiM01PkdJVGUhR1e6M/AvWnSqYS0HaERI+K/QtStGDGlSTx2B1zTqZk4Zlqu5TxHJNTxWAdP9Y+WI50OApUw==", + "node_modules/hardhat/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", "dev": true, - "dependencies": { - "bn.js": "^5.2.0", - "buffer": "^6.0.3", - "keccak": "^3.0.2" + "engines": { + "node": ">=4" } }, - "node_modules/keccak256/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true + "node_modules/hardhat/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "engines": { + "node": ">=4" + } }, - "node_modules/keccak256/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "node_modules/hardhat/node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/keyv": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", - "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", + "node_modules/hardhat/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "dependencies": { - "json-buffer": "3.0.1" + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" } }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "node_modules/hardhat/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/hardhat/node_modules/solc": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", + "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", "dev": true, + "dependencies": { + "command-exists": "^1.2.8", + "commander": "3.0.2", + "follow-redirects": "^1.12.1", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solcjs" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8.0.0" } }, - "node_modules/klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", + "node_modules/hardhat/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, - "optionalDependencies": { - "graceful-fs": "^4.1.9" + "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/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "node_modules/hardhat/node_modules/solc/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "engines": { - "node": ">=6" + "bin": { + "semver": "bin/semver" } }, - "node_modules/lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "dependencies": { - "invert-kv": "^1.0.0" + "function-bind": "^1.1.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4.0" } }, - "node_modules/level": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", - "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==", + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, - "dependencies": { - "browser-level": "^1.0.1", - "classic-level": "^1.2.0" - }, - "engines": { - "node": ">=12" - }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/level" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/level-supports": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", - "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "engines": { - "node": ">=12" + "node": ">=4" } }, - "node_modules/level-transcoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", - "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", "dev": true, "dependencies": { - "buffer": "^6.0.3", - "module-error": "^1.0.1" + "get-intrinsic": "^1.1.1" }, - "engines": { - "node": ">=12" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/level-transcoder/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, "engines": { - "node": ">= 0.8.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "has-symbols": "^1.0.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/load-json-file/node_modules/parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "dependencies": { - "error-ex": "^1.2.0" + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/load-json-file/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/load-json-file/node_modules/strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "dependencies": { - "is-utf8": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" } }, - "node_modules/load-yaml-file": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", - "integrity": "sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==", + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, - "dependencies": { - "graceful-fs": "^4.1.5", - "js-yaml": "^3.13.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=6" + "bin": { + "he": "bin/he" } }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/header-case": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz", + "integrity": "sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" + "no-case": "^2.2.0", + "upper-case": "^1.1.3" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw==", - "dev": true - }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", + "node_modules/heap": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", + "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", "dev": true }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "dev": true, + "engines": { + "node": "*" + } }, - "node_modules/lodash.startcase": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", - "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "node_modules/highlightjs-solidity": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz", + "integrity": "sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg==", "dev": true }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dev": true, + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } }, - "node_modules/lodash.zip": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", - "integrity": "sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==", + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" } }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=6.0.0" } }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">= 0.8" } }, - "node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==", + "dev": true + }, + "node_modules/http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", "dev": true, "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "@types/node": "^10.0.3" } }, - "node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "node_modules/http-response-object/node_modules/@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", "dev": true }, - "node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, "engines": { - "node": ">=8" + "node": ">=0.8", + "npm": ">=1.3.7" } }, - "node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/http2-wrapper": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", + "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" }, "engines": { - "node": ">=8" + "node": ">=10.19.0" } }, - "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "node_modules/http2-wrapper/node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, "dependencies": { - "get-func-name": "^2.0.0" + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" } }, - "node_modules/lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==", + "node_modules/human-id": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz", + "integrity": "sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==", "dev": true }, - "node_modules/lower-case-first": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz", - "integrity": "sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==", + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "dependencies": { - "lower-case": "^1.1.2" + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/lowercase-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", - "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "node_modules/idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "dependencies": { + "punycode": "2.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=4.0.0" } }, - "node_modules/lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", - "dev": true + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "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==", + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, - "dependencies": { - "yallist": "^3.0.2" + "engines": { + "node": ">= 4" } }, - "node_modules/map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "node_modules/immutable": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", + "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", + "dev": true + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, "engines": { - "node": ">=8" + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/markdown-table": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", - "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", - "dev": 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==", + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, "engines": { - "node": ">=8.9.0" + "node": ">=4" } }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "engines": { + "node": ">=0.8.19" } }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "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==", + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "dependencies": { - "abstract-level": "^1.0.0", - "functional-red-black-tree": "^1.0.1", - "module-error": "^1.0.1" - }, - "engines": { - "node": ">=12" + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", - "dev": true, - "engines": { - "node": ">= 0.10.0" - } + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, - "node_modules/meow": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-6.1.1.tgz", - "integrity": "sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==", + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", "dev": true, "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "^4.0.2", - "normalize-package-data": "^2.5.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.13.1", - "yargs-parser": "^18.1.3" + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.4" } }, - "node_modules/meow/node_modules/type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.10" } }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", "dev": true, "engines": { - "node": ">= 8" + "node": ">=0.10.0" } }, - "node_modules/merkletreejs": { - "version": "0.2.32", - "resolved": "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.2.32.tgz", - "integrity": "sha512-TostQBiwYRIwSE5++jGmacu3ODcKAgqb0Y/pnIohXS7sWxh1gCkSptbmF1a43faehRDpcHf7J/kv0Ml2D/zblQ==", + "node_modules/io-ts": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", + "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", "dev": true, "dependencies": { - "bignumber.js": "^9.0.1", - "buffer-reverse": "^1.0.1", - "crypto-js": "^3.1.9-1", - "treeify": "^1.1.0", - "web3-utils": "^1.3.4" - }, - "engines": { - "node": ">= 7.6.0" + "fp-ts": "^1.0.0" } }, - "node_modules/merkletreejs/node_modules/bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true, "engines": { - "node": "*" + "node": ">= 0.10" } }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, "engines": { - "node": ">= 0.6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", "dev": true, "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" }, - "engines": { - "node": ">=8.6" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, - "bin": { - "mime": "cli.js" + "dependencies": { + "has-bigints": "^1.0.1" }, - "engines": { - "node": ">=4" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "dependencies": { - "mime-db": "1.52.0" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "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" + } + ], "engines": { "node": ">=4" } }, - "node_modules/min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==", + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, - "dependencies": { - "dom-walk": "^0.1.0" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "node_modules/is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "ci-info": "^3.2.0" + }, + "bin": { + "is-ci": "bin.js" } }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "dependencies": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - }, "engines": { - "node": ">= 6" + "node": ">=0.10.0" } }, - "node_modules/minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", + "dev": true + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", "dev": true, "dependencies": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { - "minipass": "^2.9.0" + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/mixme": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/mixme/-/mixme-0.5.9.tgz", - "integrity": "sha512-VC5fg6ySUscaWUpI4gxCBTQMH2RdUpNrk+MsbpCYtIvf9SBJdiUey4qE7BXviJsJR4nDQxCZ+3yaYNW3guz/Pw==", + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", "dev": true, "engines": { - "node": ">= 8.0.0" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "node_modules/is-lower-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", + "integrity": "sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==", "dev": true, "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "lower-case": "^1.1.0" } }, - "node_modules/mkdirp-promise": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", - "integrity": "sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w==", - "deprecated": "This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.", + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, - "dependencies": { - "mkdirp": "*" - }, "engines": { - "node": ">=4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mnemonist": { - "version": "0.38.5", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", - "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "dependencies": { - "obliterator": "^2.0.0" + "engines": { + "node": ">=0.12.0" } }, - "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">= 14.0.0" + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/mocha/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/mocha/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "node_modules/is-port-reachable": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-3.1.0.tgz", + "integrity": "sha512-vjc0SSRNZ32s9SbZBzGaiP6YVB+xglLShhgZD/FHMZUXBvQWaV9CtzgeVhjccFJrI6RAMV+LX7NYxueW/A8W5A==", "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/mocha/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" + "call-bind": "^1.0.2" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": "*" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/mocha/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/is-subdir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", + "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", "dev": true, "dependencies": { - "argparse": "^2.0.1" + "better-path-resolve": "1.0.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=4" } }, - "node_modules/mocha/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, "dependencies": { - "p-locate": "^5.0.0" + "has-symbols": "^1.0.2" }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" + "which-typed-array": "^1.1.11" }, "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, - "node_modules/mocha/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, "engines": { "node": ">=10" }, @@ -9771,4211 +9708,4090 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mocha/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/is-upper-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", + "integrity": "sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" + "upper-case": "^1.1.0" } }, - "node_modules/mocha/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", + "dev": true }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" + "call-bind": "^1.0.2" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/mocha/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "node_modules/mock-fs": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", - "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "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/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true }, - "node_modules/multibase": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", - "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", - "deprecated": "This module has been superseded by the multiformats module", + "node_modules/jackspeak": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.3.tgz", + "integrity": "sha512-R2bUw+kVZFS/h1AZqBKrSgDmdmjApzgY0AlCPumopFiAlbUxE2gf+SCuBzQ0cP5hHmUmFYF5yw55T97Th5Kstg==", "dev": true, "dependencies": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" } }, - "node_modules/multicodec": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", - "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", - "deprecated": "This module has been superseded by the multiformats module", + "node_modules/js-sdsl": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", + "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", "dev": true, - "dependencies": { - "varint": "^5.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" } }, - "node_modules/multihashes": { - "version": "0.4.21", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", - "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "dependencies": { - "buffer": "^5.5.0", - "multibase": "^0.7.0", - "varint": "^5.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/multihashes/node_modules/multibase": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", - "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", - "deprecated": "This module has been superseded by the multiformats module", - "dev": true, - "dependencies": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - }, - "node_modules/nano-base32": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nano-base32/-/nano-base32-1.0.1.tgz", - "integrity": "sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw==", + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true }, - "node_modules/nano-json-stream-parser": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", - "integrity": "sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew==", + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/napi-macros": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", - "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "node_modules/no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "dependencies": { - "lower-case": "^1.1.1" - } - }, - "node_modules/node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, - "node_modules/node-emoji": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", - "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", - "dev": true, - "dependencies": { - "lodash": "^4.17.21" - } - }, - "node_modules/node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, - "dependencies": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/node-environment-flags/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "node_modules/jsonschema": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", + "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", "dev": true, - "bin": { - "semver": "bin/semver" + "engines": { + "node": "*" } }, - "node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, "dependencies": { - "whatwg-url": "^5.0.0" + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", - "dev": true, - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" + "node": ">=0.6.0" } }, - "node_modules/node-interval-tree": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/node-interval-tree/-/node-interval-tree-2.1.2.tgz", - "integrity": "sha512-bJ9zMDuNGzVQg1xv0bCPzyEDxHgbrx7/xGj6CDokvizZZmastPsOh0JJLuY8wA5q2SfX1TLNMk7XNV8WxbGxzA==", + "node_modules/keccak": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", + "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", "dev": true, + "hasInstallScript": true, "dependencies": { - "shallowequal": "^1.1.0" + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" }, "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/nofilter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", - "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", - "dev": true, - "engines": { - "node": ">=12.19" + "node": ">=10.0.0" } }, - "node_modules/nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "node_modules/keccak256": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/keccak256/-/keccak256-1.0.6.tgz", + "integrity": "sha512-8GLiM01PkdJVGUhR1e6M/AvWnSqYS0HaERI+K/QtStGDGlSTx2B1zTqZk4Zlqu5TxHJNTxWAdP9Y+WI50OApUw==", "dev": true, "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" + "bn.js": "^5.2.0", + "buffer": "^6.0.3", + "keccak": "^3.0.2" } }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "node_modules/keccak256/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/keccak256/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "node_modules/keyv": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", + "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", "dev": true, - "bin": { - "semver": "bin/semver" + "dependencies": { + "json-buffer": "3.0.1" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "node_modules/klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "optionalDependencies": { + "graceful-fs": "^4.1.9" } }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", + "node_modules/lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", "dev": true, "dependencies": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" + "invert-kv": "^1.0.0" }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/number-to-bn/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "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": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" + "browser-level": "^1.0.1", + "classic-level": "^1.2.0" }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/level" } }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz", - "integrity": "sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==", + "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, - "dependencies": { - "array.prototype.reduce": "^1.0.5", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.21.2", - "safe-array-concat": "^1.0.0" - }, "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/obliterator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", - "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==", - "dev": true - }, - "node_modules/oboe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", - "integrity": "sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==", - "dev": true, - "dependencies": { - "http-https": "^1.0.0" + "node": ">=12" } }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "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": { - "ee-first": "1.1.1" + "buffer": "^6.0.3", + "module-error": "^1.0.1" }, "engines": { - "node": ">= 0.8" + "node": ">=12" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "node_modules/level-transcoder/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "wrappy": "1" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "~0.4.0" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", "dev": true, "dependencies": { - "lcid": "^1.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "node_modules/load-json-file/node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", "dev": true, + "dependencies": { + "error-ex": "^1.2.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/outdent": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", - "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", - "dev": true - }, - "node_modules/p-cancelable": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", - "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "node_modules/load-json-file/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, "engines": { - "node": ">=12.20" + "node": ">=0.10.0" } }, - "node_modules/p-filter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", - "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", + "node_modules/load-json-file/node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", "dev": true, "dependencies": { - "p-map": "^2.0.0" + "is-utf8": "^0.2.0" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/p-filter/node_modules/p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "node_modules/load-yaml-file": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", + "integrity": "sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==", "dev": true, + "dependencies": { + "graceful-fs": "^4.1.5", + "js-yaml": "^3.13.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" + }, "engines": { "node": ">=6" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "p-locate": "^4.1.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "node_modules/p-locate": { + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw==", + "dev": true + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true + }, + "node_modules/lodash.zip": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", + "integrity": "sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==", + "dev": true + }, + "node_modules/log-symbols": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "dependencies": { - "p-limit": "^2.2.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=6" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "aggregate-error": "^3.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, "engines": { - "node": ">=6" + "node": ">=7.0.0" } }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==", + "node_modules/log-symbols/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, - "dependencies": { - "no-case": "^2.2.0" + "engines": { + "node": ">=8" } }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "callsites": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/parse-cache-control": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", - "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", - "dev": true + "node_modules/loupe": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.0" + } }, - "node_modules/parse-headers": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz", - "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==", + "node_modules/lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==", "dev": true }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "node_modules/lower-case-first": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz", + "integrity": "sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, + "lower-case": "^1.1.2" + } + }, + "node_modules/lowercase-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "dev": true, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "node_modules/lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "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": { - "entities": "^4.4.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" + "yallist": "^3.0.2" } }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", "dev": true, - "dependencies": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" + "engines": { + "node": ">=8" }, "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "node_modules/markdown-table": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", + "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", + "dev": 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": ">= 0.8" + "node": ">=8.9.0" } }, - "node_modules/pascal-case": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz", - "integrity": "sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==", + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "dependencies": { - "camel-case": "^3.0.0", - "upper-case-first": "^1.1.0" + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, - "node_modules/path-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", - "integrity": "sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==", + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true, - "dependencies": { - "no-case": "^2.2.0" + "engines": { + "node": ">= 0.6" } }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "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": ">=8" + "node": ">=12" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 0.10.0" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "node_modules/meow": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-6.1.1.tgz", + "integrity": "sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==", "dev": true, + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "^4.0.2", + "normalize-package-data": "^2.5.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.13.1", + "yargs-parser": "^18.1.3" + }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "node_modules/meow/node_modules/type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", "dev": true }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "node_modules/merkletreejs": { + "version": "0.2.32", + "resolved": "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.2.32.tgz", + "integrity": "sha512-TostQBiwYRIwSE5++jGmacu3ODcKAgqb0Y/pnIohXS7sWxh1gCkSptbmF1a43faehRDpcHf7J/kv0Ml2D/zblQ==", + "dev": true, + "dependencies": { + "bignumber.js": "^9.0.1", + "buffer-reverse": "^1.0.1", + "crypto-js": "^3.1.9-1", + "treeify": "^1.1.0", + "web3-utils": "^1.3.4" + }, + "engines": { + "node": ">= 7.6.0" + } + }, + "node_modules/merkletreejs/node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", "dev": true, "engines": { "node": "*" } }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "dev": true, - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, "engines": { - "node": ">=0.12" + "node": ">= 0.6" } }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "node_modules/micro-ftch": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", "dev": true }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, "engines": { "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true, + "bin": { + "mime": "cli.js" + }, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 0.6" } }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "dependencies": { - "pinkie": "^2.0.0" + "mime-db": "1.52.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.6" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "node_modules/min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "dom-walk": "^0.1.0" } }, - "node_modules/preferred-pm": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.0.3.tgz", - "integrity": "sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==", + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true, - "dependencies": { - "find-up": "^5.0.0", - "find-yarn-workspace-root2": "1.2.16", - "path-exists": "^4.0.0", - "which-pm": "2.0.0" - }, "engines": { - "node": ">=10" + "node": ">=4" } }, - "node_modules/preferred-pm/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "*" } }, - "node_modules/preferred-pm/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/preferred-pm/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", "dev": true, "dependencies": { - "p-limit": "^3.0.2" + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 6" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "node_modules/minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "node_modules/minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "dev": true, + "dependencies": { + "minipass": "^2.9.0" + } + }, + "node_modules/mixme": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/mixme/-/mixme-0.5.9.tgz", + "integrity": "sha512-VC5fg6ySUscaWUpI4gxCBTQMH2RdUpNrk+MsbpCYtIvf9SBJdiUey4qE7BXviJsJR4nDQxCZ+3yaYNW3guz/Pw==", "dev": true, "engines": { - "node": ">= 0.8.0" + "node": ">= 8.0.0" } }, - "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, "bin": { - "prettier": "bin/prettier.cjs" + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w==", + "deprecated": "This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.", + "dev": true, + "dependencies": { + "mkdirp": "*" }, "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" + "node": ">=4" } }, - "node_modules/prettier-plugin-solidity": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.3.tgz", - "integrity": "sha512-fQ9yucPi2sBbA2U2Xjh6m4isUTJ7S7QLc/XDDsktqqxYfTwdYKJ0EnnywXHwCGAaYbQNK+HIYPL1OemxuMsgeg==", + "node_modules/mnemonist": { + "version": "0.38.5", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", + "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", "dev": true, "dependencies": { - "@solidity-parser/parser": "^0.16.0", - "semver": "^7.3.8", - "solidity-comments-extractor": "^0.0.7" + "obliterator": "^2.0.0" + } + }, + "node_modules/mocha": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "dev": true, + "dependencies": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" }, "engines": { - "node": ">=12" + "node": ">= 14.0.0" }, - "peerDependencies": { - "prettier": ">=2.3.0 || >=3.0.0-alpha.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" } }, - "node_modules/prettier-plugin-solidity/node_modules/@solidity-parser/parser": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.0.tgz", - "integrity": "sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q==", + "node_modules/mocha/node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, - "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" + "engines": { + "node": ">=6" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "node_modules/mocha/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": ">= 0.6.0" + "node": ">=8" } }, - "node_modules/process-nextick-args": { + "node_modules/mocha/node_modules/argparse": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/promise": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", - "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "dependencies": { - "asap": "~2.0.6" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "node_modules/proper-lockfile": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", - "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "retry": "^0.12.0", - "signal-exit": "^3.0.2" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "node_modules/mocha/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">= 0.10" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "node_modules/mocha/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==", + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=6" + "node": "*" } }, - "node_modules/pure-rand": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.5.tgz", - "integrity": "sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw==", + "node_modules/mocha/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ] - }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "dependencies": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "node_modules/mocha/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "node_modules/mocha/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "safe-buffer": "^5.1.0" + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "node_modules/mocha/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, "engines": { - "node": ">= 0.6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">= 0.8" + "node": ">=10" } }, - "node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" + "balanced-match": "^1.0.0" } }, - "node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "node_modules/mocha/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, "engines": { "node": ">=8" } }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "node_modules/mocha/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, "engines": { "node": ">=8" } }, - "node_modules/read-yaml-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", - "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.5", - "js-yaml": "^3.6.1", - "pify": "^4.0.1", - "strip-bom": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" }, "engines": { - "node": ">= 6" + "node": ">=10" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, "engines": { - "node": ">=8.10.0" + "node": ">=10" } }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "node_modules/mock-fs": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", + "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", + "dev": true + }, + "node_modules/module-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", + "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", "dev": true, - "dependencies": { - "resolve": "^1.1.6" - }, "engines": { - "node": ">= 0.10" + "node": ">=10" } }, - "node_modules/recursive-readdir": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", - "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/multibase": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", + "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", + "deprecated": "This module has been superseded by the multiformats module", "dev": true, "dependencies": { - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=6.0.0" + "base-x": "^3.0.8", + "buffer": "^5.5.0" } }, - "node_modules/redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, + "node_modules/multicodec": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", + "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", + "deprecated": "This module has been superseded by the multiformats module", + "dev": true, "dependencies": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - }, - "engines": { - "node": ">=8" + "varint": "^5.0.0" } }, - "node_modules/redent/node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "node_modules/multihashes": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", + "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", "dev": true, "dependencies": { - "min-indent": "^1.0.0" - }, - "engines": { - "node": ">=8" + "buffer": "^5.5.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" } }, - "node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "node_modules/multihashes/node_modules/multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "deprecated": "This module has been superseded by the multiformats module", + "dev": true, + "dependencies": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "node_modules/nano-base32": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nano-base32/-/nano-base32-1.0.1.tgz", + "integrity": "sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw==", "dev": true }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "node_modules/nano-json-stream-parser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", + "integrity": "sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "bin": { + "nanoid": "bin/nanoid.cjs" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/req-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", - "integrity": "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==", + "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", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, - "dependencies": { - "req-from": "^2.0.0" - }, "engines": { - "node": ">=4" + "node": ">= 0.6" } }, - "node_modules/req-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", - "integrity": "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==", + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, + "node_modules/no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", "dev": true, "dependencies": { - "resolve-from": "^3.0.0" - }, - "engines": { - "node": ">=4" + "lower-case": "^1.1.1" } }, - "node_modules/req-from/node_modules/resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "dev": true + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "lodash": "^4.17.21" } }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "node_modules/node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", "dev": true, "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" } }, - "node_modules/request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "node_modules/node-environment-flags/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "dependencies": { - "lodash": "^4.17.19" - }, - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "request": "^2.34" + "bin": { + "semver": "bin/semver" } }, - "node_modules/request-promise-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", - "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", - "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, "dependencies": { - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" + "whatwg-url": "^5.0.0" }, "engines": { - "node": ">=0.12.0" + "node": "4.x || >=6.0.0" }, "peerDependencies": { - "request": "^2.34" + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, - "node_modules/request/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "node_modules/node-gyp-build": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", "dev": true, "bin": { - "uuid": "bin/uuid" + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "node_modules/node-interval-tree": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/node-interval-tree/-/node-interval-tree-2.1.2.tgz", + "integrity": "sha512-bJ9zMDuNGzVQg1xv0bCPzyEDxHgbrx7/xGj6CDokvizZZmastPsOh0JJLuY8wA5q2SfX1TLNMk7XNV8WxbGxzA==", "dev": true, + "dependencies": { + "shallowequal": "^1.1.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 14.0.0" } }, - "node_modules/require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q==", + "node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=12.19" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "node_modules/resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, "dependencies": { - "path-parse": "^1.0.6" + "abbrev": "1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "nopt": "bin/nopt.js" } }, - "node_modules/resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "dependencies": { - "lowercase-keys": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, - "node_modules/responselike/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "engines": { - "node": ">=8" + "bin": { + "semver": "bin/semver" } }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "engines": { - "node": ">= 4" + "node": ">=0.10.0" } }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", "dev": true, "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" + "boolbase": "^1.0.0" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/fb55/nth-check?sponsor=1" } }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=0.10.0" } }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "node_modules/number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", "dev": true, "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/ripemd160-min": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/ripemd160-min/-/ripemd160-min-0.0.6.tgz", - "integrity": "sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==", + "node_modules/number-to-bn/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true, "engines": { - "node": ">=8" + "node": "*" } }, - "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==", + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, - "dependencies": { - "bn.js": "^5.2.0" - }, - "bin": { - "rlp": "bin/rlp" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/rlp/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "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==", + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" + "engines": { + "node": ">= 0.4" } }, - "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/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "dependencies": { - "queue-microtask": "^1.2.2" + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "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-array-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", - "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "node_modules/object.getownpropertydescriptors": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.7.tgz", + "integrity": "sha512-PrJz0C2xJ58FNn11XV2lr4Jt5Gzl94qpy9Lu0JlfEj14z88sqbSBJCBEzdlNUCzY2gburhbrwOZ5BHCmuNUy0g==", "dev": true, "dependencies": { + "array.prototype.reduce": "^1.0.6", "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "safe-array-concat": "^1.0.0" }, "engines": { - "node": ">=0.4" + "node": ">= 0.8" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "node_modules/obliterator": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", + "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==", "dev": true }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "node_modules/oboe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", + "integrity": "sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "dependencies": { + "http-https": "^1.0.0" + } }, - "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" + "ee-first": "1.1.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.8" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/sc-istanbul": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", - "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "istanbul": "lib/cli.js" + "wrappy": "1" } }, - "node_modules/sc-istanbul/node_modules/esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8.0" } }, - "node_modules/sc-istanbul/node_modules/glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "node_modules/os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", "dev": true, "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "lcid": "^1.0.0" }, "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "node_modules/sc-istanbul/node_modules/has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/sc-istanbul/node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", + "node_modules/outdent": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", + "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", "dev": true }, - "node_modules/sc-istanbul/node_modules/supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", + "node_modules/p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", "dev": true, - "dependencies": { - "has-flag": "^1.0.0" - }, "engines": { - "node": ">=0.8.0" + "node": ">=12.20" } }, - "node_modules/sc-istanbul/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/p-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", + "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", "dev": true, "dependencies": { - "isexe": "^2.0.0" + "p-map": "^2.0.0" }, - "bin": { - "which": "bin/which" + "engines": { + "node": ">=8" } }, - "node_modules/scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true + "node_modules/p-filter/node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true, + "engines": { + "node": ">=6" + } }, - "node_modules/secp256k1": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", - "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "hasInstallScript": true, "dependencies": { - "elliptic": "^6.5.4", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "p-limit": "^2.2.0" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "dependencies": { - "yallist": "^4.0.0" + "p-try": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/semver/node_modules/yallist": { + "node_modules/p-map": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" + "aggregate-error": "^3.0.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "dependencies": { - "ms": "2.0.0" + "engines": { + "node": ">=6" } }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "dev": true }, - "node_modules/sentence-case": { + "node_modules/param-case": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz", - "integrity": "sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==", "dev": true, "dependencies": { - "no-case": "^2.2.0", - "upper-case-first": "^1.1.2" + "no-case": "^2.2.0" } }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "dependencies": { - "randombytes": "^2.1.0" + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "node_modules/parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", + "dev": true + }, + "node_modules/parse-headers": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz", + "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==", + "dev": true + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { - "node": ">= 0.8.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/servify": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", - "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", "dev": true, "dependencies": { - "body-parser": "^1.16.0", - "cors": "^2.8.1", - "express": "^4.14.0", - "request": "^2.79.0", - "xhr": "^2.3.3" + "entities": "^4.4.0" }, - "engines": { - "node": ">=6" + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", "dev": true, "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "domhandler": "^5.0.2", + "parse5": "^7.0.0" }, - "bin": { - "sha.js": "bin.js" + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "node_modules/sha1": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", - "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true, - "dependencies": { - "charenc": ">= 0.0.1", - "crypt": ">= 0.0.1" - }, "engines": { - "node": "*" + "node": ">= 0.8" } }, - "node_modules/sha3": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", - "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", + "node_modules/pascal-case": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz", + "integrity": "sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==", "dev": true, "dependencies": { - "buffer": "6.0.3" + "camel-case": "^3.0.0", + "upper-case-first": "^1.1.0" } }, - "node_modules/sha3/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "node_modules/path-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", + "integrity": "sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "no-case": "^2.2.0" } }, - "node_modules/shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", - "dev": true - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/shelljs/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", + "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": "14 || >=16.14" } }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", + "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", "dev": true }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "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" - } - ] + "engines": { + "node": ">=8" + } }, - "node_modules/simple-get": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.2.tgz", - "integrity": "sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==", + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, - "dependencies": { - "decompress-response": "^3.3.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" + "engines": { + "node": "*" } }, - "node_modules/simple-get/node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "dev": true, "dependencies": { - "mimic-response": "^1.0.0" + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" }, "engines": { - "node": ">=4" + "node": ">=0.12" } }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" + "node": ">=6" } }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=0.10.0" } }, - "node_modules/slice-ansi/node_modules/color-convert": { + "node_modules/pinkie-promise": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "pinkie": "^2.0.0" }, "engines": { - "node": ">=7.0.0" + "node": ">=0.10.0" } }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, "engines": { "node": ">=8" } }, - "node_modules/smartwrap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/smartwrap/-/smartwrap-2.0.2.tgz", - "integrity": "sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==", + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true, - "dependencies": { - "array.prototype.flat": "^1.2.3", - "breakword": "^1.0.5", - "grapheme-splitter": "^1.0.4", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1", - "yargs": "^15.1.0" - }, - "bin": { - "smartwrap": "src/terminal-adapter.js" - }, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/smartwrap/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/preferred-pm": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.1.2.tgz", + "integrity": "sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q==", "dev": true, + "dependencies": { + "find-up": "^5.0.0", + "find-yarn-workspace-root2": "1.2.16", + "path-exists": "^4.0.0", + "which-pm": "2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/smartwrap/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==", + "node_modules/preferred-pm/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/smartwrap/node_modules/cliui": { + "node_modules/preferred-pm/node_modules/locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/smartwrap/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/preferred-pm/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=7.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/smartwrap/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/smartwrap/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 0.8.0" } }, - "node_modules/smartwrap/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/prettier": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "bin": { + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=8" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/smartwrap/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/prettier-plugin-solidity": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.3.tgz", + "integrity": "sha512-fQ9yucPi2sBbA2U2Xjh6m4isUTJ7S7QLc/XDDsktqqxYfTwdYKJ0EnnywXHwCGAaYbQNK+HIYPL1OemxuMsgeg==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1" + "@solidity-parser/parser": "^0.16.0", + "semver": "^7.3.8", + "solidity-comments-extractor": "^0.0.7" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "peerDependencies": { + "prettier": ">=2.3.0 || >=3.0.0-alpha.0" } }, - "node_modules/smartwrap/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "node_modules/prettier-plugin-solidity/node_modules/@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, + "antlr4ts": "^0.5.0-alpha.4" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, "engines": { - "node": ">=8" + "node": ">= 0.6.0" } }, - "node_modules/smartwrap/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "node_modules/smartwrap/node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "node_modules/promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", "dev": true, "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" + "asap": "~2.0.6" } }, - "node_modules/snake-case": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz", - "integrity": "sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==", + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", "dev": true, "dependencies": { - "no-case": "^2.2.0" + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" } }, - "node_modules/solc": { - "version": "0.4.26", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz", - "integrity": "sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA==", + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dev": true, "dependencies": { - "fs-extra": "^0.30.0", - "memorystream": "^0.3.1", - "require-from-string": "^1.1.0", - "semver": "^5.3.0", - "yargs": "^4.7.1" + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" }, - "bin": { - "solcjs": "solcjs" + "engines": { + "node": ">= 0.10" } }, - "node_modules/solc/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "node_modules/solc/node_modules/camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", + "node_modules/punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/solc/node_modules/cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", + "node_modules/pure-rand": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.5.tgz", + "integrity": "sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw==", "dev": true, - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, + "node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true, + "engines": { + "node": ">=0.6" } }, - "node_modules/solc/node_modules/find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", + "node_modules/query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/solc/node_modules/fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "node_modules/solc/node_modules/get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/solc/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=8" } }, - "node_modules/solc/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" + "safe-buffer": "^5.1.0" } }, - "node_modules/solc/node_modules/jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "engines": { + "node": ">= 0.6" } }, - "node_modules/solc/node_modules/path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "dependencies": { - "pinkie-promise": "^2.0.0" + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8" } }, - "node_modules/solc/node_modules/path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/solc/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/solc/node_modules/read-pkg": { + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-yaml-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", + "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", "dev": true, "dependencies": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "graceful-fs": "^4.1.5", + "js-yaml": "^3.6.1", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/solc/node_modules/read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "dependencies": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 6" } }, - "node_modules/solc/node_modules/require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==", - "dev": true - }, - "node_modules/solc/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "dependencies": { - "glob": "^7.1.3" + "picomatch": "^2.2.1" }, - "bin": { - "rimraf": "bin.js" + "engines": { + "node": ">=8.10.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==", + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, - "bin": { - "semver": "bin/semver" + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" } }, - "node_modules/solc/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "node_modules/recursive-readdir": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", + "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", "dev": true, "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "minimatch": "^3.0.5" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, - "node_modules/solc/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dev": true, "dependencies": { - "ansi-regex": "^2.0.0" + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/solc/node_modules/which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==", - "dev": true - }, - "node_modules/solc/node_modules/wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", + "node_modules/redent/node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "min-indent": "^1.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/solc/node_modules/y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", + "node_modules/regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", "dev": true }, - "node_modules/solc/node_modules/yargs": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", - "integrity": "sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA==", + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, "dependencies": { - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "lodash.assign": "^4.0.3", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.1", - "which-module": "^1.0.0", - "window-size": "^0.2.0", - "y18n": "^3.2.1", - "yargs-parser": "^2.4.1" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/solc/node_modules/yargs-parser": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", - "integrity": "sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA==", + "node_modules/req-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", + "integrity": "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==", "dev": true, "dependencies": { - "camelcase": "^3.0.0", - "lodash.assign": "^4.0.6" + "req-from": "^2.0.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/solhint": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.4.1.tgz", - "integrity": "sha512-pzZn2RlZhws1XwvLPVSsxfHrwsteFf5eySOhpAytzXwKQYbTCJV6z8EevYDiSVKMpWrvbKpEtJ055CuEmzp4Xg==", + "node_modules/req-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", + "integrity": "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==", "dev": true, "dependencies": { - "@solidity-parser/parser": "^0.16.0", - "ajv": "^6.12.6", - "antlr4": "^4.11.0", - "ast-parents": "^0.0.1", - "chalk": "^4.1.2", - "commander": "^10.0.0", - "cosmiconfig": "^8.0.0", - "fast-diff": "^1.2.0", - "glob": "^8.0.3", - "ignore": "^5.2.4", - "js-yaml": "^4.1.0", - "lodash": "^4.17.21", - "pluralize": "^8.0.0", - "semver": "^6.3.0", - "strip-ansi": "^6.0.1", - "table": "^6.8.1", - "text-table": "^0.2.0" - }, - "bin": { - "solhint": "solhint.js" + "resolve-from": "^3.0.0" }, - "optionalDependencies": { - "prettier": "^2.8.3" + "engines": { + "node": ">=4" } }, - "node_modules/solhint-plugin-openzeppelin": { - "resolved": "scripts/solhint-custom", - "link": true - }, - "node_modules/solhint/node_modules/@solidity-parser/parser": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.0.tgz", - "integrity": "sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q==", + "node_modules/req-from/node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", "dev": true, - "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" + "engines": { + "node": ">=4" } }, - "node_modules/solhint/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", "dev": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/solhint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "lodash": "^4.17.19" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "request": "^2.34" } }, - "node_modules/solhint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/solhint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" }, "engines": { - "node": ">=10" + "node": ">=0.12.0" }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "peerDependencies": { + "request": "^2.34" } }, - "node_modules/solhint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "path-parse": "^1.0.6" }, - "engines": { - "node": ">=7.0.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/solhint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", "dev": true }, - "node_modules/solhint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/solhint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", "dev": true, "dependencies": { - "argparse": "^2.0.1" + "lowercase-keys": "^2.0.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/solhint/node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "node_modules/responselike/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true, - "optional": true, - "bin": { - "prettier": "bin-prettier.js" - }, "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" + "node": ">=8" } }, - "node_modules/solhint/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">= 4" } }, - "node_modules/solhint/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, "engines": { - "node": ">=8" + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, - "node_modules/solhint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/rimraf": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", + "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "glob": "^10.2.5" + }, + "bin": { + "rimraf": "dist/cjs/src/bin.js" }, "engines": { - "node": ">=8" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/solidity-ast": { - "version": "0.4.50", - "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.50.tgz", - "integrity": "sha512-WpIhaUibbjcBY4bg8TO2UXFWl8PQPhtH1QtMYJUqFUGxx0rRiEFsVLV+ow8XiWEnSPeu4xPp1/K43P4esxuK1Q==", + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "dependencies": { - "array.prototype.findlast": "^1.2.2" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" } }, - "node_modules/solidity-comments": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments/-/solidity-comments-0.0.2.tgz", - "integrity": "sha512-G+aK6qtyUfkn1guS8uzqUeua1dURwPlcOjoTYW/TwmXAcE7z/1+oGCfZUdMSe4ZMKklNbVZNiG5ibnF8gkkFfw==", + "node_modules/ripemd160-min": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/ripemd160-min/-/ripemd160-min-0.0.6.tgz", + "integrity": "sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==", "dev": true, "engines": { - "node": ">= 12" - }, - "optionalDependencies": { - "solidity-comments-darwin-arm64": "0.0.2", - "solidity-comments-darwin-x64": "0.0.2", - "solidity-comments-freebsd-x64": "0.0.2", - "solidity-comments-linux-arm64-gnu": "0.0.2", - "solidity-comments-linux-arm64-musl": "0.0.2", - "solidity-comments-linux-x64-gnu": "0.0.2", - "solidity-comments-linux-x64-musl": "0.0.2", - "solidity-comments-win32-arm64-msvc": "0.0.2", - "solidity-comments-win32-ia32-msvc": "0.0.2", - "solidity-comments-win32-x64-msvc": "0.0.2" + "node": ">=8" } }, - "node_modules/solidity-comments-darwin-arm64": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-darwin-arm64/-/solidity-comments-darwin-arm64-0.0.2.tgz", - "integrity": "sha512-HidWkVLSh7v+Vu0CA7oI21GWP/ZY7ro8g8OmIxE8oTqyMwgMbE8F1yc58Sj682Hj199HCZsjmtn1BE4PCbLiGA==", - "cpu": [ - "arm64" - ], + "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, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" + "dependencies": { + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" } }, - "node_modules/solidity-comments-darwin-x64": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-darwin-x64/-/solidity-comments-darwin-x64-0.0.2.tgz", - "integrity": "sha512-Zjs0Ruz6faBTPT6fBecUt6qh4CdloT8Bwoc0+qxRoTn9UhYscmbPQkUgQEbS0FQPysYqVzzxJB4h1Ofbf4wwtA==", - "cpu": [ - "x64" + "node_modules/rlp/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/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" + } ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/run-parallel-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", + "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", "dev": true, - "optional": true, - "os": [ - "darwin" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } ], - "engines": { - "node": ">= 10" + "dependencies": { + "queue-microtask": "^1.2.2" } }, - "node_modules/solidity-comments-extractor": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz", - "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==", + "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/solidity-comments-freebsd-x64": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-freebsd-x64/-/solidity-comments-freebsd-x64-0.0.2.tgz", - "integrity": "sha512-8Qe4mpjuAxFSwZJVk7B8gAoLCdbtS412bQzBwk63L8dmlHogvE39iT70aAk3RHUddAppT5RMBunlPUCFYJ3ZTw==", - "cpu": [ - "x64" - ], + "node_modules/safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", "dev": true, - "optional": true, - "os": [ - "freebsd" - ], + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, "engines": { - "node": ">= 10" + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/solidity-comments-linux-arm64-gnu": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-gnu/-/solidity-comments-linux-arm64-gnu-0.0.2.tgz", - "integrity": "sha512-spkb0MZZnmrP+Wtq4UxP+nyPAVRe82idOjqndolcNR0S9Xvu4ebwq+LvF4HiUgjTDmeiqYiFZQ8T9KGdLSIoIg==", - "cpu": [ - "arm64" - ], + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/solidity-comments-linux-arm64-musl": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-musl/-/solidity-comments-linux-arm64-musl-0.0.2.tgz", - "integrity": "sha512-guCDbHArcjE+JDXYkxx5RZzY1YF6OnAKCo+sTC5fstyW/KGKaQJNPyBNWuwYsQiaEHpvhW1ha537IvlGek8GqA==", - "cpu": [ - "arm64" - ], + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/solidity-comments-linux-x64-gnu": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-gnu/-/solidity-comments-linux-x64-gnu-0.0.2.tgz", - "integrity": "sha512-zIqLehBK/g7tvrFmQljrfZXfkEeLt2v6wbe+uFu6kH/qAHZa7ybt8Vc0wYcmjo2U0PeBm15d79ee3AkwbIjFdQ==", - "cpu": [ - "x64" - ], + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sc-istanbul": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", + "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" + "dependencies": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "istanbul": "lib/cli.js" } }, - "node_modules/solidity-comments-linux-x64-musl": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-musl/-/solidity-comments-linux-x64-musl-0.0.2.tgz", - "integrity": "sha512-R9FeDloVlFGTaVkOlELDVC7+1Tjx5WBPI5L8r0AGOPHK3+jOcRh6sKYpI+VskSPDc3vOO46INkpDgUXrKydlIw==", - "cpu": [ - "x64" - ], + "node_modules/sc-istanbul/node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", "dev": true, - "optional": true, - "os": [ - "linux" - ], + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, "engines": { - "node": ">= 10" + "node": ">=0.10.0" } }, - "node_modules/solidity-comments-win32-arm64-msvc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-win32-arm64-msvc/-/solidity-comments-win32-arm64-msvc-0.0.2.tgz", - "integrity": "sha512-QnWJoCQcJj+rnutULOihN9bixOtYWDdF5Rfz9fpHejL1BtNjdLW1om55XNVHGAHPqBxV4aeQQ6OirKnp9zKsug==", - "cpu": [ - "arm64" - ], + "node_modules/sc-istanbul/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", "dev": true, - "optional": true, - "os": [ - "win32" - ], + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, "engines": { - "node": ">= 10" + "node": "*" } }, - "node_modules/solidity-comments-win32-ia32-msvc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-win32-ia32-msvc/-/solidity-comments-win32-ia32-msvc-0.0.2.tgz", - "integrity": "sha512-vUg4nADtm/NcOtlIymG23NWJUSuMsvX15nU7ynhGBsdKtt8xhdP3C/zA6vjDk8Jg+FXGQL6IHVQ++g/7rSQi0w==", - "cpu": [ - "ia32" - ], + "node_modules/sc-istanbul/node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", "dev": true, - "optional": true, - "os": [ - "win32" - ], "engines": { - "node": ">= 10" + "node": ">=0.10.0" } }, - "node_modules/solidity-comments-win32-x64-msvc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-win32-x64-msvc/-/solidity-comments-win32-x64-msvc-0.0.2.tgz", - "integrity": "sha512-36j+KUF4V/y0t3qatHm/LF5sCUCBx2UndxE1kq5bOzh/s+nQgatuyB+Pd5BfuPQHdWu2KaExYe20FlAa6NL7+Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } + "node_modules/sc-istanbul/node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", + "dev": true }, - "node_modules/solidity-coverage": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.4.tgz", - "integrity": "sha512-xeHOfBOjdMF6hWTbt42iH4x+7j1Atmrf5OldDPMxI+i/COdExUxszOswD9qqvcBTaLGiOrrpnh9UZjSpt4rBsg==", + "node_modules/sc-istanbul/node_modules/supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", "dev": true, "dependencies": { - "@ethersproject/abi": "^5.0.9", - "@solidity-parser/parser": "^0.16.0", - "chalk": "^2.4.2", - "death": "^1.1.0", - "detect-port": "^1.3.0", - "difflib": "^0.2.4", - "fs-extra": "^8.1.0", - "ghost-testrpc": "^0.0.2", - "global-modules": "^2.0.0", - "globby": "^10.0.1", - "jsonschema": "^1.2.4", - "lodash": "^4.17.15", - "mocha": "7.1.2", - "node-emoji": "^1.10.0", - "pify": "^4.0.1", - "recursive-readdir": "^2.2.2", - "sc-istanbul": "^0.4.5", - "semver": "^7.3.4", - "shelljs": "^0.8.3", - "web3-utils": "^1.3.6" - }, - "bin": { - "solidity-coverage": "plugins/bin.js" + "has-flag": "^1.0.0" }, - "peerDependencies": { - "hardhat": "^2.11.0" + "engines": { + "node": ">=0.8.0" } }, - "node_modules/solidity-coverage/node_modules/@solidity-parser/parser": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", - "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", + "node_modules/sc-istanbul/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" } }, - "node_modules/solidity-coverage/node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true + }, + "node_modules/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", "dev": true, + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.4", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, "engines": { - "node": ">=6" + "node": ">=10.0.0" } }, - "node_modules/solidity-coverage/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/solidity-coverage/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/solidity-coverage/node_modules/chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "node_modules/semver/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dev": true, "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" }, "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.1.1" + "node": ">= 0.8.0" } }, - "node_modules/solidity-coverage/node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "ms": "2.0.0" } }, - "node_modules/solidity-coverage/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/sentence-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz", + "integrity": "sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==", "dev": true, "dependencies": { - "ms": "^2.1.1" + "no-case": "^2.2.0", + "upper-case-first": "^1.1.2" } }, - "node_modules/solidity-coverage/node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "engines": { - "node": ">=0.3.1" + "dependencies": { + "randombytes": "^2.1.0" } }, - "node_modules/solidity-coverage/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/solidity-coverage/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dev": true, "dependencies": { - "locate-path": "^3.0.0" + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" }, "engines": { - "node": ">=6" + "node": ">= 0.8.0" } }, - "node_modules/solidity-coverage/node_modules/flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "node_modules/servify": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", + "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", "dev": true, "dependencies": { - "is-buffer": "~2.0.3" + "body-parser": "^1.16.0", + "cors": "^2.8.1", + "express": "^4.14.0", + "request": "^2.79.0", + "xhr": "^2.3.3" }, - "bin": { - "flat": "cli.js" + "engines": { + "node": ">=6" } }, - "node_modules/solidity-coverage/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", "dev": true, "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">= 0.4" } }, - "node_modules/solidity-coverage/node_modules/fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "deprecated": "\"Please update to latest v2.3 or v2.2\"", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true }, - "node_modules/solidity-coverage/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "bin": { + "sha.js": "bin.js" } }, - "node_modules/solidity-coverage/node_modules/globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "node_modules/sha1": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", + "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", "dev": true, "dependencies": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" + "charenc": ">= 0.0.1", + "crypt": ">= 0.0.1" }, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/solidity-coverage/node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "node_modules/sha3": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", + "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "buffer": "6.0.3" } }, - "node_modules/solidity-coverage/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "node_modules/sha3/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "node_modules/solidity-coverage/node_modules/log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "node_modules/shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "dev": true + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { - "chalk": "^2.4.2" + "shebang-regex": "^3.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/solidity-coverage/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "engines": { + "node": ">=8" } }, - "node_modules/solidity-coverage/node_modules/mocha": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", - "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dev": true, "dependencies": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" }, "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "shjs": "bin/shjs" }, "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "node": ">=4" } }, - "node_modules/solidity-coverage/node_modules/mocha/node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "node_modules/shelljs/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, "engines": { "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/solidity-coverage/node_modules/mocha/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" }, - "engines": { - "node": "*" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/solidity-coverage/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/solidity-coverage/node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "dev": true, - "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - }, - "engines": { - "node": ">= 0.4" - } + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/solidity-coverage/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/simple-get": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.2.tgz", + "integrity": "sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==", "dev": true, "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" } }, - "node_modules/solidity-coverage/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "node_modules/simple-get/node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", "dev": true, "dependencies": { - "p-limit": "^2.0.0" + "mimic-response": "^1.0.0" }, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/solidity-coverage/node_modules/path-exists": { + "node_modules/slash": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/solidity-coverage/node_modules/readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "dependencies": { - "picomatch": "^2.0.4" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "engines": { - "node": ">= 8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/solidity-coverage/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=6" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/solidity-coverage/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "ansi-regex": "^4.1.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6" + "node": ">=7.0.0" } }, - "node_modules/solidity-coverage/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/solidity-coverage/node_modules/supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "node_modules/smartwrap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/smartwrap/-/smartwrap-2.0.2.tgz", + "integrity": "sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "array.prototype.flat": "^1.2.3", + "breakword": "^1.0.5", + "grapheme-splitter": "^1.0.4", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1", + "yargs": "^15.1.0" + }, + "bin": { + "smartwrap": "src/terminal-adapter.js" }, "engines": { "node": ">=6" } }, - "node_modules/solidity-coverage/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/smartwrap/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" + "engines": { + "node": ">=8" } }, - "node_modules/solidity-coverage/node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "node_modules/smartwrap/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": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=6" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/solidity-coverage/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/solidity-coverage/node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "node_modules/smartwrap/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" } }, - "node_modules/solidity-coverage/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "node_modules/smartwrap/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": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "node_modules/solidity-coverage/node_modules/yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "node_modules/smartwrap/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/smartwrap/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/solidity-docgen": { - "version": "0.6.0-beta.35", - "resolved": "https://registry.npmjs.org/solidity-docgen/-/solidity-docgen-0.6.0-beta.35.tgz", - "integrity": "sha512-9QdwK1THk/MWIdq1PEW/6dvtND0pUqpFTsbKwwU9YQIMYuRhH1lek9SsgnsGGYtdJ0VTrXXcVT30q20a8Y610A==", + "node_modules/smartwrap/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "handlebars": "^4.7.7", - "solidity-ast": "^0.4.38" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, - "peerDependencies": { - "hardhat": "^2.8.0" + "engines": { + "node": ">=8" } }, - "node_modules/source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", + "node_modules/smartwrap/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "optional": true, "dependencies": { - "amdefine": ">=0.0.4" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=0.8.0" + "node": ">=8" } }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "node_modules/smartwrap/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/spawndamnit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", - "integrity": "sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==", + "node_modules/smartwrap/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/smartwrap/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "dependencies": { - "cross-spawn": "^5.1.0", - "signal-exit": "^3.0.2" + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" } }, - "node_modules/spawndamnit/node_modules/cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", + "node_modules/snake-case": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz", + "integrity": "sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==", "dev": true, "dependencies": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "no-case": "^2.2.0" } }, - "node_modules/spawndamnit/node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "node_modules/solc": { + "version": "0.4.26", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz", + "integrity": "sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA==", "dev": true, "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "fs-extra": "^0.30.0", + "memorystream": "^0.3.1", + "require-from-string": "^1.1.0", + "semver": "^5.3.0", + "yargs": "^4.7.1" + }, + "bin": { + "solcjs": "solcjs" } }, - "node_modules/spawndamnit/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "node_modules/solc/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/spawndamnit/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "node_modules/solc/node_modules/camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/spawndamnit/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/solc/node_modules/cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", "dev": true, "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, - "node_modules/spawndamnit/node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "node_modules/solc/node_modules/find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", "dev": true, "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "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": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "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/spdx-license-ids": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", - "dev": true - }, - "node_modules/sprintf-js": { + "node_modules/solc/node_modules/get-caller-file": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, - "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "node_modules/solc/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=0.10.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/sshpk/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, - "node_modules/stacktrace-parser": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", - "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", + "node_modules/solc/node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", "dev": true, "dependencies": { - "type-fest": "^0.7.1" + "number-is-nan": "^1.0.0" }, "engines": { - "node": ">=6" - } - }, - "node_modules/stacktrace-parser/node_modules/type-fest": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", - "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", - "dev": true, - "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "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, - "engines": { - "node": ">= 0.8" + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", + "node_modules/solc/node_modules/path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", "dev": true, + "dependencies": { + "pinkie-promise": "^2.0.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/stream-transform": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-2.1.3.tgz", - "integrity": "sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==", - "dev": true, - "dependencies": { - "mixme": "^0.5.1" - } - }, - "node_modules/streamsearch": { + "node_modules/solc/node_modules/path-type": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, "engines": { - "node": ">=10.0.0" + "node": ">=0.10.0" } }, - "node_modules/strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==", + "node_modules/solc/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "node_modules/solc/node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", "dev": true, "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "node_modules/solc/node_modules/read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "node_modules/solc/node_modules/require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==", + "dev": true + }, + "node_modules/solc/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "glob": "^7.1.3" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "rimraf": "bin.js" } }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "node_modules/solc/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "semver": "bin/semver" } }, - "node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "node_modules/solc/node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", "dev": true, "dependencies": { - "ansi-regex": "^3.0.0" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "node_modules/solc/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/strip-hex-prefix": { + "node_modules/solc/node_modules/which-module": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==", + "dev": true + }, + "node_modules/solc/node_modules/wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", "dev": true, "dependencies": { - "is-hex-prefixed": "1.0.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">=0.10.0" } }, - "node_modules/strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA==", - "dev": true, - "engines": { - "node": ">=4" - } + "node_modules/solc/node_modules/y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", + "dev": true }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "node_modules/solc/node_modules/yargs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA==", "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "lodash.assign": "^4.0.3", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.1", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^2.4.1" } }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/solc/node_modules/yargs-parser": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" + "camelcase": "^3.0.0", + "lodash.assign": "^4.0.6" } }, - "node_modules/swap-case": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz", - "integrity": "sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==", + "node_modules/solhint": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.6.2.tgz", + "integrity": "sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==", "dev": true, "dependencies": { - "lower-case": "^1.1.1", - "upper-case": "^1.1.1" + "@solidity-parser/parser": "^0.16.0", + "ajv": "^6.12.6", + "antlr4": "^4.11.0", + "ast-parents": "^0.0.1", + "chalk": "^4.1.2", + "commander": "^10.0.0", + "cosmiconfig": "^8.0.0", + "fast-diff": "^1.2.0", + "glob": "^8.0.3", + "ignore": "^5.2.4", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "pluralize": "^8.0.0", + "semver": "^7.5.2", + "strip-ansi": "^6.0.1", + "table": "^6.8.1", + "text-table": "^0.2.0" + }, + "bin": { + "solhint": "solhint.js" + }, + "optionalDependencies": { + "prettier": "^2.8.3" } }, - "node_modules/swarm-js": { - "version": "0.1.42", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.42.tgz", - "integrity": "sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ==", + "node_modules/solhint-plugin-openzeppelin": { + "resolved": "scripts/solhint-custom", + "link": true + }, + "node_modules/solhint/node_modules/@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", "dev": true, "dependencies": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^11.8.5", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request": "^1.0.1" + "antlr4ts": "^0.5.0-alpha.4" } }, - "node_modules/swarm-js/node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "node_modules/solhint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "dependencies": { - "defer-to-connect": "^2.0.0" - }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/swarm-js/node_modules/cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "node_modules/solhint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=10.6.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/swarm-js/node_modules/fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } + "node_modules/solhint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, - "node_modules/swarm-js/node_modules/got": { - "version": "11.8.6", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", - "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "node_modules/solhint/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=10.19.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" + "balanced-match": "^1.0.0" } }, - "node_modules/swarm-js/node_modules/http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "node_modules/solhint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, - "engines": { - "node": ">=10.19.0" - } - }, - "node_modules/swarm-js/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/swarm-js/node_modules/p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/swarm-js/node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/sync-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", - "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "node_modules/solhint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "http-response-object": "^3.0.1", - "sync-rpc": "^1.2.1", - "then-request": "^6.0.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=8.0.0" + "node": ">=7.0.0" } }, - "node_modules/sync-rpc": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", - "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", - "dev": true, - "dependencies": { - "get-port": "^3.1.0" - } + "node_modules/solhint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, - "node_modules/table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "node_modules/solhint/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "node": ">=12" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/table/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/solhint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/table/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/solhint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/table/node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "node_modules/solhint/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/table/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/solhint/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "optional": true, + "bin": { + "prettier": "bin-prettier.js" }, "engines": { - "node": ">=8" + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/table/node_modules/strip-ansi": { + "node_modules/solhint/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -13987,1096 +13803,1071 @@ "node": ">=8" } }, - "node_modules/tar": { - "version": "4.4.19", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", - "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", + "node_modules/solhint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "chownr": "^1.1.4", - "fs-minipass": "^1.2.7", - "minipass": "^2.9.0", - "minizlib": "^1.3.3", - "mkdirp": "^0.5.5", - "safe-buffer": "^5.2.1", - "yallist": "^3.1.1" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4.5" + "node": ">=8" } }, - "node_modules/term-size": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", - "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "node_modules/solidity-ast": { + "version": "0.4.52", + "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.52.tgz", + "integrity": "sha512-iOya9BSiB9jhM8Vf40n8lGELGzwrUc57rl5BhfNtJ5cvAaMvRcNlHeAMNvqJJyjoUnczqRbHqdivEqK89du3Cw==", + "dev": true, + "dependencies": { + "array.prototype.findlast": "^1.2.2" + } + }, + "node_modules/solidity-comments": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments/-/solidity-comments-0.0.2.tgz", + "integrity": "sha512-G+aK6qtyUfkn1guS8uzqUeua1dURwPlcOjoTYW/TwmXAcE7z/1+oGCfZUdMSe4ZMKklNbVZNiG5ibnF8gkkFfw==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 12" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "optionalDependencies": { + "solidity-comments-darwin-arm64": "0.0.2", + "solidity-comments-darwin-x64": "0.0.2", + "solidity-comments-freebsd-x64": "0.0.2", + "solidity-comments-linux-arm64-gnu": "0.0.2", + "solidity-comments-linux-arm64-musl": "0.0.2", + "solidity-comments-linux-x64-gnu": "0.0.2", + "solidity-comments-linux-x64-musl": "0.0.2", + "solidity-comments-win32-arm64-msvc": "0.0.2", + "solidity-comments-win32-ia32-msvc": "0.0.2", + "solidity-comments-win32-x64-msvc": "0.0.2" } }, - "node_modules/testrpc": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/testrpc/-/testrpc-0.0.1.tgz", - "integrity": "sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA==", - "deprecated": "testrpc has been renamed to ganache-cli, please use this package from now on.", - "dev": true - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/then-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", - "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "node_modules/solidity-comments-darwin-arm64": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-darwin-arm64/-/solidity-comments-darwin-arm64-0.0.2.tgz", + "integrity": "sha512-HidWkVLSh7v+Vu0CA7oI21GWP/ZY7ro8g8OmIxE8oTqyMwgMbE8F1yc58Sj682Hj199HCZsjmtn1BE4PCbLiGA==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@types/concat-stream": "^1.6.0", - "@types/form-data": "0.0.33", - "@types/node": "^8.0.0", - "@types/qs": "^6.2.31", - "caseless": "~0.12.0", - "concat-stream": "^1.6.0", - "form-data": "^2.2.0", - "http-basic": "^8.1.1", - "http-response-object": "^3.0.1", - "promise": "^8.0.0", - "qs": "^6.4.0" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=6.0.0" + "node": ">= 10" } }, - "node_modules/then-request/node_modules/@types/node": { - "version": "8.10.66", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", - "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", - "dev": true - }, - "node_modules/timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", + "node_modules/solidity-comments-darwin-x64": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-darwin-x64/-/solidity-comments-darwin-x64-0.0.2.tgz", + "integrity": "sha512-Zjs0Ruz6faBTPT6fBecUt6qh4CdloT8Bwoc0+qxRoTn9UhYscmbPQkUgQEbS0FQPysYqVzzxJB4h1Ofbf4wwtA==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=0.10.0" + "node": ">= 10" } }, - "node_modules/title-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", - "integrity": "sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.0.3" - } + "node_modules/solidity-comments-extractor": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz", + "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==", + "dev": true }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "node_modules/solidity-comments-freebsd-x64": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-freebsd-x64/-/solidity-comments-freebsd-x64-0.0.2.tgz", + "integrity": "sha512-8Qe4mpjuAxFSwZJVk7B8gAoLCdbtS412bQzBwk63L8dmlHogvE39iT70aAk3RHUddAppT5RMBunlPUCFYJ3ZTw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "os-tmpdir": "~1.0.2" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=0.6.0" + "node": ">= 10" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/solidity-comments-linux-arm64-gnu": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-gnu/-/solidity-comments-linux-arm64-gnu-0.0.2.tgz", + "integrity": "sha512-spkb0MZZnmrP+Wtq4UxP+nyPAVRe82idOjqndolcNR0S9Xvu4ebwq+LvF4HiUgjTDmeiqYiFZQ8T9KGdLSIoIg==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8.0" + "node": ">= 10" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "node_modules/solidity-comments-linux-arm64-musl": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-musl/-/solidity-comments-linux-arm64-musl-0.0.2.tgz", + "integrity": "sha512-guCDbHArcjE+JDXYkxx5RZzY1YF6OnAKCo+sTC5fstyW/KGKaQJNPyBNWuwYsQiaEHpvhW1ha537IvlGek8GqA==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.6" + "node": ">= 10" } }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "node_modules/solidity-comments-linux-x64-gnu": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-gnu/-/solidity-comments-linux-x64-gnu-0.0.2.tgz", + "integrity": "sha512-zIqLehBK/g7tvrFmQljrfZXfkEeLt2v6wbe+uFu6kH/qAHZa7ybt8Vc0wYcmjo2U0PeBm15d79ee3AkwbIjFdQ==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.8" + "node": ">= 10" } }, - "node_modules/tough-cookie/node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "node_modules/solidity-comments-linux-x64-musl": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-musl/-/solidity-comments-linux-x64-musl-0.0.2.tgz", + "integrity": "sha512-R9FeDloVlFGTaVkOlELDVC7+1Tjx5WBPI5L8r0AGOPHK3+jOcRh6sKYpI+VskSPDc3vOO46INkpDgUXrKydlIw==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6" + "node": ">= 10" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/treeify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", - "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", + "node_modules/solidity-comments-win32-arm64-msvc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-win32-arm64-msvc/-/solidity-comments-win32-arm64-msvc-0.0.2.tgz", + "integrity": "sha512-QnWJoCQcJj+rnutULOihN9bixOtYWDdF5Rfz9fpHejL1BtNjdLW1om55XNVHGAHPqBxV4aeQQ6OirKnp9zKsug==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=0.6" + "node": ">= 10" } }, - "node_modules/trim-newlines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "node_modules/solidity-comments-win32-ia32-msvc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-win32-ia32-msvc/-/solidity-comments-win32-ia32-msvc-0.0.2.tgz", + "integrity": "sha512-vUg4nADtm/NcOtlIymG23NWJUSuMsvX15nU7ynhGBsdKtt8xhdP3C/zA6vjDk8Jg+FXGQL6IHVQ++g/7rSQi0w==", + "cpu": [ + "ia32" + ], "dev": true, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=8" + "node": ">= 10" } }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/tsort": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", - "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", - "dev": true - }, - "node_modules/tty-table": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/tty-table/-/tty-table-4.2.1.tgz", - "integrity": "sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g==", + "node_modules/solidity-comments-win32-x64-msvc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-win32-x64-msvc/-/solidity-comments-win32-x64-msvc-0.0.2.tgz", + "integrity": "sha512-36j+KUF4V/y0t3qatHm/LF5sCUCBx2UndxE1kq5bOzh/s+nQgatuyB+Pd5BfuPQHdWu2KaExYe20FlAa6NL7+Q==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "chalk": "^4.1.2", - "csv": "^5.5.3", - "kleur": "^4.1.5", - "smartwrap": "^2.0.2", - "strip-ansi": "^6.0.1", - "wcwidth": "^1.0.1", - "yargs": "^17.7.1" - }, - "bin": { - "tty-table": "adapters/terminal-adapter.js" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=8.0.0" + "node": ">= 10" } }, - "node_modules/tty-table/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/tty-table/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==", + "node_modules/solidity-coverage": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.4.tgz", + "integrity": "sha512-xeHOfBOjdMF6hWTbt42iH4x+7j1Atmrf5OldDPMxI+i/COdExUxszOswD9qqvcBTaLGiOrrpnh9UZjSpt4rBsg==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "@ethersproject/abi": "^5.0.9", + "@solidity-parser/parser": "^0.16.0", + "chalk": "^2.4.2", + "death": "^1.1.0", + "detect-port": "^1.3.0", + "difflib": "^0.2.4", + "fs-extra": "^8.1.0", + "ghost-testrpc": "^0.0.2", + "global-modules": "^2.0.0", + "globby": "^10.0.1", + "jsonschema": "^1.2.4", + "lodash": "^4.17.15", + "mocha": "7.1.2", + "node-emoji": "^1.10.0", + "pify": "^4.0.1", + "recursive-readdir": "^2.2.2", + "sc-istanbul": "^0.4.5", + "semver": "^7.3.4", + "shelljs": "^0.8.3", + "web3-utils": "^1.3.6" }, - "engines": { - "node": ">=8" + "bin": { + "solidity-coverage": "plugins/bin.js" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "hardhat": "^2.11.0" } }, - "node_modules/tty-table/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/solidity-coverage/node_modules/@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", "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" + "antlr4ts": "^0.5.0-alpha.4" } }, - "node_modules/tty-table/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/solidity-coverage/node_modules/ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, "engines": { - "node": ">=7.0.0" + "node": ">=6" } }, - "node_modules/tty-table/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/tty-table/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/solidity-coverage/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/tty-table/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/solidity-coverage/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/tty-table/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/solidity-coverage/node_modules/chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" }, "engines": { - "node": ">=8" + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.1" } }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "node_modules/solidity-coverage/node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, - "node_modules/tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "dev": true + "node_modules/solidity-coverage/node_modules/debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } }, - "node_modules/tweetnacl-util": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", - "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", - "dev": true + "node_modules/solidity-coverage/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } }, - "node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "node_modules/solidity-coverage/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "node_modules/solidity-coverage/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "dependencies": { - "prelude-ls": "^1.2.1" + "locate-path": "^3.0.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">=6" } }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "node_modules/solidity-coverage/node_modules/flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "is-buffer": "~2.0.3" + }, + "bin": { + "flat": "cli.js" } }, - "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==", + "node_modules/solidity-coverage/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=6 <7 || >=8" } }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "node_modules/solidity-coverage/node_modules/fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "deprecated": "\"Please update to latest v2.3 or v2.2\"", "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 0.6" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "node_modules/solidity-coverage/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "node_modules/solidity-coverage/node_modules/globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", "dev": true, "dependencies": { - "is-typedarray": "^1.0.0" + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "node_modules/solidity-coverage/node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, - "optional": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, "bin": { - "uglifyjs": "bin/uglifyjs" + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/solidity-coverage/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" }, "engines": { - "node": ">=0.8.0" + "node": ">=6" } }, - "node_modules/ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true - }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "node_modules/solidity-coverage/node_modules/log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "chalk": "^2.4.2" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, - "node_modules/underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true + "node_modules/solidity-coverage/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } }, - "node_modules/undici": { - "version": "5.22.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz", - "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==", + "node_modules/solidity-coverage/node_modules/mocha": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", + "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", "dev": true, "dependencies": { - "busboy": "^1.6.0" + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" }, "engines": { - "node": ">=14.0" + "node": ">= 8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" } }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "node_modules/solidity-coverage/node_modules/mocha/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, "engines": { - "node": ">= 4.0.0" + "node": "*" } }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "node_modules/solidity-coverage/node_modules/mocha/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">= 0.8" + "node": "*" } }, - "node_modules/upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==", + "node_modules/solidity-coverage/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, - "node_modules/upper-case-first": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz", - "integrity": "sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==", + "node_modules/solidity-coverage/node_modules/object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "dev": true, "dependencies": { - "upper-case": "^1.1.1" + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + }, + "engines": { + "node": ">= 0.4" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "node_modules/solidity-coverage/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "dependencies": { - "punycode": "^2.1.0" + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/url-set-query": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==", - "dev": true - }, - "node_modules/utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "node_modules/solidity-coverage/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, - "hasInstallScript": true, "dependencies": { - "node-gyp-build": "^4.3.0" + "p-limit": "^2.0.0" }, "engines": { - "node": ">=6.14.2" + "node": ">=6" } }, - "node_modules/utf8": { + "node_modules/solidity-coverage/node_modules/path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", - "dev": true + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "engines": { + "node": ">=4" + } }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "node_modules/solidity-coverage/node_modules/readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "node_modules/solidity-coverage/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" + "node": ">=6" } }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "node_modules/solidity-coverage/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" } }, - "node_modules/varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "node_modules/solidity-coverage/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true, "engines": { - "node": ">= 0.8" + "node": ">=0.10.0" } }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "node_modules/solidity-coverage/node_modules/supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", "dev": true, - "engines": [ - "node >=0.6.0" - ], "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "node_modules/solidity-coverage/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "dependencies": { - "defaults": "^1.0.3" + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" } }, - "node_modules/web3": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.0.tgz", - "integrity": "sha512-YfKY9wSkGcM8seO+daR89oVTcbu18NsVfvOngzqMYGUU0pPSQmE57qQDvQzUeoIOHAnXEBNzrhjQJmm8ER0rng==", + "node_modules/solidity-coverage/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, - "hasInstallScript": true, "dependencies": { - "web3-bzz": "1.10.0", - "web3-core": "1.10.0", - "web3-eth": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-shh": "1.10.0", - "web3-utils": "1.10.0" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=6" } }, - "node_modules/web3-bzz": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.0.tgz", - "integrity": "sha512-o9IR59io3pDUsXTsps5pO5hW1D5zBmg46iNc2t4j2DkaYHNdDLwk2IP9ukoM2wg47QILfPEJYzhTfkS/CcX0KA==", + "node_modules/solidity-coverage/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/solidity-coverage/node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, - "hasInstallScript": true, "dependencies": { - "@types/node": "^12.12.6", - "got": "12.1.0", - "swarm-js": "^0.1.40" - }, - "engines": { - "node": ">=8.0.0" + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" } }, - "node_modules/web3-core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.0.tgz", - "integrity": "sha512-fWySwqy2hn3TL89w5TM8wXF1Z2Q6frQTKHWmP0ppRQorEK8NcHJRfeMiv/mQlSKoTS1F6n/nv2uyZsixFycjYQ==", + "node_modules/solidity-coverage/node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "dependencies": { - "@types/bn.js": "^5.1.1", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-requestmanager": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } }, - "node_modules/web3-core-helpers": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.0.tgz", - "integrity": "sha512-pIxAzFDS5vnbXvfvLSpaA1tfRykAe9adw43YCKsEYQwH0gCLL0kMLkaCX3q+Q8EVmAh+e1jWL/nl9U0de1+++g==", + "node_modules/solidity-coverage/node_modules/yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", "dev": true, "dependencies": { - "web3-eth-iban": "1.10.0", - "web3-utils": "1.10.0" + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=6" } }, - "node_modules/web3-core-method": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.0.tgz", - "integrity": "sha512-4R700jTLAMKDMhQ+nsVfIXvH6IGJlJzGisIfMKWAIswH31h5AZz7uDUW2YctI+HrYd+5uOAlS4OJeeT9bIpvkA==", + "node_modules/solidity-docgen": { + "version": "0.6.0-beta.36", + "resolved": "https://registry.npmjs.org/solidity-docgen/-/solidity-docgen-0.6.0-beta.36.tgz", + "integrity": "sha512-f/I5G2iJgU1h0XrrjRD0hHMr7C10u276vYvm//rw1TzFcYQ4xTOyAoi9oNAHRU0JU4mY9eTuxdVc2zahdMuhaQ==", "dev": true, "dependencies": { - "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-utils": "1.10.0" + "handlebars": "^4.7.7", + "solidity-ast": "^0.4.38" }, - "engines": { - "node": ">=8.0.0" + "peerDependencies": { + "hardhat": "^2.8.0" } }, - "node_modules/web3-core-promievent": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.0.tgz", - "integrity": "sha512-68N7k5LWL5R38xRaKFrTFT2pm2jBNFaM4GioS00YjAKXRQ3KjmhijOMG3TICz6Aa5+6GDWYelDNx21YAeZ4YTg==", + "node_modules/source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", "dev": true, + "optional": true, "dependencies": { - "eventemitter3": "4.0.4" + "amdefine": ">=0.0.4" }, "engines": { - "node": ">=8.0.0" + "node": ">=0.8.0" } }, - "node_modules/web3-core-requestmanager": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.0.tgz", - "integrity": "sha512-3z/JKE++Os62APml4dvBM+GAuId4h3L9ckUrj7ebEtS2AR0ixyQPbrBodgL91Sv7j7cQ3Y+hllaluqjguxvSaQ==", + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "dependencies": { - "util": "^0.12.5", - "web3-core-helpers": "1.10.0", - "web3-providers-http": "1.10.0", - "web3-providers-ipc": "1.10.0", - "web3-providers-ws": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, - "node_modules/web3-core-subscriptions": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.0.tgz", - "integrity": "sha512-HGm1PbDqsxejI075gxBc5OSkwymilRWZufIy9zEpnWKNmfbuv5FfHgW1/chtJP6aP3Uq2vHkvTDl3smQBb8l+g==", + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" } }, - "node_modules/web3-core/node_modules/bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "node_modules/spawndamnit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", + "integrity": "sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==", "dev": true, - "engines": { - "node": "*" + "dependencies": { + "cross-spawn": "^5.1.0", + "signal-exit": "^3.0.2" } }, - "node_modules/web3-eth": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.0.tgz", - "integrity": "sha512-Z5vT6slNMLPKuwRyKGbqeGYC87OAy8bOblaqRTgg94CXcn/mmqU7iPIlG4506YdcdK3x6cfEDG7B6w+jRxypKA==", + "node_modules/spawndamnit/node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", "dev": true, "dependencies": { - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-accounts": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-eth-ens": "1.10.0", - "web3-eth-iban": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, - "node_modules/web3-eth-abi": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.0.tgz", - "integrity": "sha512-cwS+qRBWpJ43aI9L3JS88QYPfFcSJJ3XapxOQ4j40v6mk7ATpA8CVK1vGTzpihNlOfMVRBkR95oAj7oL6aiDOg==", + "node_modules/spawndamnit/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", "dev": true, "dependencies": { - "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, - "node_modules/web3-eth-accounts": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.0.tgz", - "integrity": "sha512-wiq39Uc3mOI8rw24wE2n15hboLE0E9BsQLdlmsL4Zua9diDS6B5abXG0XhFcoNsXIGMWXVZz4TOq3u4EdpXF/Q==", + "node_modules/spawndamnit/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", "dev": true, "dependencies": { - "@ethereumjs/common": "2.5.0", - "@ethereumjs/tx": "3.3.2", - "eth-lib": "0.2.8", - "ethereumjs-util": "^7.1.5", - "scrypt-js": "^3.0.1", - "uuid": "^9.0.0", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" + "shebang-regex": "^1.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" } }, - "node_modules/web3-eth-accounts/node_modules/eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "node_modules/spawndamnit/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", "dev": true, - "dependencies": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/web3-eth-accounts/node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "node_modules/spawndamnit/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, "bin": { - "uuid": "dist/bin/uuid" + "which": "bin/which" } }, - "node_modules/web3-eth-contract": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.0.tgz", - "integrity": "sha512-MIC5FOzP/+2evDksQQ/dpcXhSqa/2hFNytdl/x61IeWxhh6vlFeSjq0YVTAyIzdjwnL7nEmZpjfI6y6/Ufhy7w==", + "node_modules/spawndamnit/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, "dependencies": { - "@types/bn.js": "^5.1.1", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "node_modules/web3-eth-ens": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.0.tgz", - "integrity": "sha512-3hpGgzX3qjgxNAmqdrC2YUQMTfnZbs4GeLEmy8aCWziVwogbuqQZ+Gzdfrym45eOZodk+lmXyLuAdqkNlvkc1g==", + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "dependencies": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, - "node_modules/web3-eth-iban": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.0.tgz", - "integrity": "sha512-0l+SP3IGhInw7Q20LY3IVafYEuufo4Dn75jAHT7c2aDJsIolvf2Lc6ugHkBajlwUneGfbRQs/ccYPQ9JeMUbrg==", + "node_modules/spdx-license-ids": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.15.tgz", + "integrity": "sha512-lpT8hSQp9jAKp9mhtBU4Xjon8LPGBvLIuBiSVhMEtmLecTh2mO0tlqrAMp47tBXzMr13NJMQ2lf7RpQGLJ3HsQ==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dev": true, "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.0" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" }, "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" } }, - "node_modules/web3-eth-iban/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "node_modules/sshpk/node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, - "node_modules/web3-eth-personal": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.0.tgz", - "integrity": "sha512-anseKn98w/d703eWq52uNuZi7GhQeVjTC5/svrBWEKob0WZ5kPdo+EZoFN0sp5a5ubbrk/E0xSl1/M5yORMtpg==", + "node_modules/stacktrace-parser": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", + "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", "dev": true, "dependencies": { - "@types/node": "^12.12.6", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" + "type-fest": "^0.7.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=6" } }, - "node_modules/web3-net": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.0.tgz", - "integrity": "sha512-NLH/N3IshYWASpxk4/18Ge6n60GEvWBVeM8inx2dmZJVmRI6SJIlUxbL8jySgiTn3MMZlhbdvrGo8fpUW7a1GA==", + "node_modules/stacktrace-parser/node_modules/type-fest": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", + "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", "dev": true, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/web3-providers-http": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.0.tgz", - "integrity": "sha512-eNr965YB8a9mLiNrkjAWNAPXgmQWfpBfkkn7tpEFlghfww0u3I0tktMZiaToJVcL2+Xq+81cxbkpeWJ5XQDwOA==", + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true, - "dependencies": { - "abortcontroller-polyfill": "^1.7.3", - "cross-fetch": "^3.1.4", - "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.8" } }, - "node_modules/web3-providers-ipc": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.0.tgz", - "integrity": "sha512-OfXG1aWN8L1OUqppshzq8YISkWrYHaATW9H8eh0p89TlWMc1KZOL9vttBuaBEi96D/n0eYDn2trzt22bqHWfXA==", + "node_modules/stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", "dev": true, - "dependencies": { - "oboe": "2.1.5", - "web3-core-helpers": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" } }, - "node_modules/web3-providers-ws": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.0.tgz", - "integrity": "sha512-sK0fNcglW36yD5xjnjtSGBnEtf59cbw4vZzJ+CmOWIKGIR96mP5l684g0WD0Eo+f4NQc2anWWXG74lRc9OVMCQ==", + "node_modules/stream-transform": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-2.1.3.tgz", + "integrity": "sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==", "dev": true, "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0", - "websocket": "^1.0.32" - }, - "engines": { - "node": ">=8.0.0" + "mixme": "^0.5.1" } }, - "node_modules/web3-shh": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.0.tgz", - "integrity": "sha512-uNUUuNsO2AjX41GJARV9zJibs11eq6HtOe6Wr0FtRUcj8SN6nHeYIzwstAvJ4fXA53gRqFMTxdntHEt9aXVjpg==", + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", "dev": true, - "hasInstallScript": true, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-net": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=10.0.0" } }, - "node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", + "node_modules/strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==", "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" } }, - "node_modules/web3-utils/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/websocket": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", - "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "dependencies": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - }, - "engines": { - "node": ">=4.0.0" + "safe-buffer": "~5.2.0" } }, - "node_modules/websocket/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "dependencies": { - "ms": "2.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/websocket/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, "engines": { - "node": ">= 8" + "node": ">=8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true - }, - "node_modules/which-pm": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.0.0.tgz", - "integrity": "sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==", + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "load-yaml-file": "^0.2.0", - "path-exists": "^4.0.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=8.15" + "node": ">=8" } }, - "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -15085,66 +14876,60 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", "dev": true, "dependencies": { - "string-width": "^1.0.2 || 2" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/window-size": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw==", + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", "dev": true, - "bin": { - "window-size": "cli.js" + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, - "engines": { - "node": ">= 0.10.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", + "node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", "dev": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true - }, - "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", @@ -15153,238 +14938,182 @@ "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=4" } }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "is-hex-prefixed": "1.0.0" }, "engines": { - "node": ">=7.0.0" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "node": ">=4" } }, - "node_modules/xhr": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", - "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", + "node_modules/swap-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz", + "integrity": "sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==", "dev": true, "dependencies": { - "global": "~4.4.0", - "is-function": "^1.0.1", - "parse-headers": "^2.0.0", - "xtend": "^4.0.0" + "lower-case": "^1.1.1", + "upper-case": "^1.1.1" } }, - "node_modules/xhr-request": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", - "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "node_modules/swarm-js": { + "version": "0.1.42", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.42.tgz", + "integrity": "sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ==", "dev": true, "dependencies": { - "buffer-to-arraybuffer": "^0.0.5", - "object-assign": "^4.1.1", - "query-string": "^5.0.1", - "simple-get": "^2.7.0", - "timed-out": "^4.0.1", - "url-set-query": "^1.0.0", - "xhr": "^2.0.4" + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^11.8.5", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request": "^1.0.1" } }, - "node_modules/xhr-request-promise": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", - "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", + "node_modules/swarm-js/node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", "dev": true, "dependencies": { - "xhr-request": "^1.1.0" - } - }, - "node_modules/xmlhttprequest": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, + "defer-to-connect": "^2.0.0" + }, "engines": { - "node": ">=0.4" + "node": ">=10" } }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "node_modules/swarm-js/node_modules/cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", "dev": true, "engines": { - "node": ">=10" + "node": ">=10.6.0" } }, - "node_modules/yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", + "node_modules/swarm-js/node_modules/fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", "dev": true, - "engines": { - "node": ">=0.10.32" + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "node_modules/swarm-js/node_modules/got": { + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "dev": true, "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" }, "engines": { - "node": ">=12" + "node": ">=10.19.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" } }, - "node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "node_modules/swarm-js/node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", "dev": true, "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" }, "engines": { - "node": ">=6" + "node": ">=10.19.0" } }, - "node_modules/yargs-parser/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/swarm-js/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "node_modules/swarm-js/node_modules/p-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "node_modules/swarm-js/node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "dev": true, "engines": { "node": ">=10" @@ -15393,28 +15122,62 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "node_modules/sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=8.0.0" } }, - "node_modules/yargs-unparser/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "node_modules/sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "dev": true, + "dependencies": { + "get-port": "^3.1.0" + } + }, + "node_modules/table": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", "dev": true, + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, "engines": { - "node": ">=8" + "node": ">=10.0.0" } }, - "node_modules/yargs/node_modules/ansi-regex": { + "node_modules/table/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", @@ -15423,7 +15186,7 @@ "node": ">=8" } }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "node_modules/table/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", @@ -15432,7 +15195,22 @@ "node": ">=8" } }, - "node_modules/yargs/node_modules/string-width": { + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/table/node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/table/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", @@ -15446,7 +15224,7 @@ "node": ">=8" } }, - "node_modules/yargs/node_modules/strip-ansi": { + "node_modules/table/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -15458,11630 +15236,1528 @@ "node": ">=8" } }, - "node_modules/yargs/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "node_modules/tar": { + "version": "4.4.19", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", + "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", "dev": true, + "dependencies": { + "chownr": "^1.1.4", + "fs-minipass": "^1.2.7", + "minipass": "^2.9.0", + "minizlib": "^1.3.3", + "mkdirp": "^0.5.5", + "safe-buffer": "^5.2.1", + "yallist": "^3.1.1" + }, "engines": { - "node": ">=12" + "node": ">=4.5" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "node_modules/term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", "dev": true, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "scripts/lints": { - "version": "1.0.2", - "extraneous": true, - "license": "MIT" - }, - "scripts/solhint-custom": { - "name": "solhint-plugin-openzeppelin", + "node_modules/testrpc": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/testrpc/-/testrpc-0.0.1.tgz", + "integrity": "sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA==", + "deprecated": "testrpc has been renamed to ganache-cli, please use this package from now on.", "dev": true - } - }, - "dependencies": { - "@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, - "@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "node_modules/then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", "dev": true, - "requires": { - "@babel/highlight": "^7.22.5" + "dependencies": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "engines": { + "node": ">=6.0.0" } }, - "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "node_modules/then-request/node_modules/@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", "dev": true }, - "@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "node_modules/timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "engines": { + "node": ">=0.10.0" } }, - "@babel/runtime": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz", - "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==", + "node_modules/title-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", + "integrity": "sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==", "dev": true, - "requires": { - "regenerator-runtime": "^0.13.11" + "dependencies": { + "no-case": "^2.2.0", + "upper-case": "^1.0.3" } }, - "@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/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } }, - "@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==", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "requires": { - "@chainsafe/as-sha256": "^0.3.1" + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" } }, - "@chainsafe/ssz": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.9.4.tgz", - "integrity": "sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==", + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true, - "requires": { - "@chainsafe/as-sha256": "^0.3.1", - "@chainsafe/persistent-merkle-tree": "^0.4.2", - "case": "^1.6.3" + "engines": { + "node": ">=0.6" } }, - "@changesets/apply-release-plan": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-6.1.4.tgz", - "integrity": "sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==", + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, - "requires": { - "@babel/runtime": "^7.20.1", - "@changesets/config": "^2.3.1", - "@changesets/get-version-range-type": "^0.3.2", - "@changesets/git": "^2.0.0", - "@changesets/types": "^5.2.1", - "@manypkg/get-packages": "^1.1.3", - "detect-indent": "^6.0.0", - "fs-extra": "^7.0.1", - "lodash.startcase": "^4.4.0", - "outdent": "^0.5.0", - "prettier": "^2.7.1", - "resolve-from": "^5.0.0", - "semver": "^7.5.3" - }, "dependencies": { - "prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true - } + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" } }, - "@changesets/assemble-release-plan": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-5.2.4.tgz", - "integrity": "sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg==", + "node_modules/tough-cookie/node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, - "requires": { - "@babel/runtime": "^7.20.1", - "@changesets/errors": "^0.1.4", - "@changesets/get-dependents-graph": "^1.3.6", - "@changesets/types": "^5.2.1", - "@manypkg/get-packages": "^1.1.3", - "semver": "^7.5.3" + "engines": { + "node": ">=6" } }, - "@changesets/changelog-git": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/@changesets/changelog-git/-/changelog-git-0.1.14.tgz", - "integrity": "sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA==", + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/treeify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", + "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", "dev": true, - "requires": { - "@changesets/types": "^5.2.1" + "engines": { + "node": ">=0.6" } }, - "@changesets/changelog-github": { - "version": "0.4.8", - "resolved": "https://registry.npmjs.org/@changesets/changelog-github/-/changelog-github-0.4.8.tgz", - "integrity": "sha512-jR1DHibkMAb5v/8ym77E4AMNWZKB5NPzw5a5Wtqm1JepAuIF+hrKp2u04NKM14oBZhHglkCfrla9uq8ORnK/dw==", - "dev": true, - "requires": { - "@changesets/get-github-info": "^0.5.2", - "@changesets/types": "^5.2.1", - "dotenv": "^8.1.0" - } - }, - "@changesets/cli": { - "version": "2.26.2", - "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.26.2.tgz", - "integrity": "sha512-dnWrJTmRR8bCHikJHl9b9HW3gXACCehz4OasrXpMp7sx97ECuBGGNjJhjPhdZNCvMy9mn4BWdplI323IbqsRig==", - "dev": true, - "requires": { - "@babel/runtime": "^7.20.1", - "@changesets/apply-release-plan": "^6.1.4", - "@changesets/assemble-release-plan": "^5.2.4", - "@changesets/changelog-git": "^0.1.14", - "@changesets/config": "^2.3.1", - "@changesets/errors": "^0.1.4", - "@changesets/get-dependents-graph": "^1.3.6", - "@changesets/get-release-plan": "^3.0.17", - "@changesets/git": "^2.0.0", - "@changesets/logger": "^0.0.5", - "@changesets/pre": "^1.0.14", - "@changesets/read": "^0.5.9", - "@changesets/types": "^5.2.1", - "@changesets/write": "^0.2.3", - "@manypkg/get-packages": "^1.1.3", - "@types/is-ci": "^3.0.0", - "@types/semver": "^7.5.0", - "ansi-colors": "^4.1.3", - "chalk": "^2.1.0", - "enquirer": "^2.3.0", - "external-editor": "^3.1.0", - "fs-extra": "^7.0.1", - "human-id": "^1.0.2", - "is-ci": "^3.0.1", - "meow": "^6.0.0", - "outdent": "^0.5.0", - "p-limit": "^2.2.0", - "preferred-pm": "^3.0.0", - "resolve-from": "^5.0.0", - "semver": "^7.5.3", - "spawndamnit": "^2.0.0", - "term-size": "^2.1.0", - "tty-table": "^4.1.5" - }, - "dependencies": { - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - } - } - }, - "@changesets/config": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@changesets/config/-/config-2.3.1.tgz", - "integrity": "sha512-PQXaJl82CfIXddUOppj4zWu+987GCw2M+eQcOepxN5s+kvnsZOwjEJO3DH9eVy+OP6Pg/KFEWdsECFEYTtbg6w==", - "dev": true, - "requires": { - "@changesets/errors": "^0.1.4", - "@changesets/get-dependents-graph": "^1.3.6", - "@changesets/logger": "^0.0.5", - "@changesets/types": "^5.2.1", - "@manypkg/get-packages": "^1.1.3", - "fs-extra": "^7.0.1", - "micromatch": "^4.0.2" - } - }, - "@changesets/errors": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.1.4.tgz", - "integrity": "sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q==", - "dev": true, - "requires": { - "extendable-error": "^0.1.5" - } - }, - "@changesets/get-dependents-graph": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-1.3.6.tgz", - "integrity": "sha512-Q/sLgBANmkvUm09GgRsAvEtY3p1/5OCzgBE5vX3vgb5CvW0j7CEljocx5oPXeQSNph6FXulJlXV3Re/v3K3P3Q==", - "dev": true, - "requires": { - "@changesets/types": "^5.2.1", - "@manypkg/get-packages": "^1.1.3", - "chalk": "^2.1.0", - "fs-extra": "^7.0.1", - "semver": "^7.5.3" - } - }, - "@changesets/get-github-info": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@changesets/get-github-info/-/get-github-info-0.5.2.tgz", - "integrity": "sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==", - "dev": true, - "requires": { - "dataloader": "^1.4.0", - "node-fetch": "^2.5.0" - } - }, - "@changesets/get-release-plan": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-3.0.17.tgz", - "integrity": "sha512-6IwKTubNEgoOZwDontYc2x2cWXfr6IKxP3IhKeK+WjyD6y3M4Gl/jdQvBw+m/5zWILSOCAaGLu2ZF6Q+WiPniw==", + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true, - "requires": { - "@babel/runtime": "^7.20.1", - "@changesets/assemble-release-plan": "^5.2.4", - "@changesets/config": "^2.3.1", - "@changesets/pre": "^1.0.14", - "@changesets/read": "^0.5.9", - "@changesets/types": "^5.2.1", - "@manypkg/get-packages": "^1.1.3" + "engines": { + "node": ">=8" } }, - "@changesets/get-version-range-type": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.3.2.tgz", - "integrity": "sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg==", + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "@changesets/git": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@changesets/git/-/git-2.0.0.tgz", - "integrity": "sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==", - "dev": true, - "requires": { - "@babel/runtime": "^7.20.1", - "@changesets/errors": "^0.1.4", - "@changesets/types": "^5.2.1", - "@manypkg/get-packages": "^1.1.3", - "is-subdir": "^1.1.1", - "micromatch": "^4.0.2", - "spawndamnit": "^2.0.0" - } - }, - "@changesets/logger": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.0.5.tgz", - "integrity": "sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw==", - "dev": true, - "requires": { - "chalk": "^2.1.0" - } - }, - "@changesets/parse": { - "version": "0.3.16", - "resolved": "https://registry.npmjs.org/@changesets/parse/-/parse-0.3.16.tgz", - "integrity": "sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg==", - "dev": true, - "requires": { - "@changesets/types": "^5.2.1", - "js-yaml": "^3.13.1" - } - }, - "@changesets/pre": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-1.0.14.tgz", - "integrity": "sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==", - "dev": true, - "requires": { - "@babel/runtime": "^7.20.1", - "@changesets/errors": "^0.1.4", - "@changesets/types": "^5.2.1", - "@manypkg/get-packages": "^1.1.3", - "fs-extra": "^7.0.1" - } - }, - "@changesets/read": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.5.9.tgz", - "integrity": "sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==", - "dev": true, - "requires": { - "@babel/runtime": "^7.20.1", - "@changesets/git": "^2.0.0", - "@changesets/logger": "^0.0.5", - "@changesets/parse": "^0.3.16", - "@changesets/types": "^5.2.1", - "chalk": "^2.1.0", - "fs-extra": "^7.0.1", - "p-filter": "^2.1.0" - } - }, - "@changesets/types": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@changesets/types/-/types-5.2.1.tgz", - "integrity": "sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg==", + "node_modules/tsort": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", + "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", "dev": true }, - "@changesets/write": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@changesets/write/-/write-0.2.3.tgz", - "integrity": "sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==", + "node_modules/tty-table": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/tty-table/-/tty-table-4.2.1.tgz", + "integrity": "sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g==", "dev": true, - "requires": { - "@babel/runtime": "^7.20.1", - "@changesets/types": "^5.2.1", - "fs-extra": "^7.0.1", - "human-id": "^1.0.2", - "prettier": "^2.7.1" - }, "dependencies": { - "prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true - } - } - }, - "@ensdomains/address-encoder": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz", - "integrity": "sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg==", - "dev": true, - "requires": { - "bech32": "^1.1.3", - "blakejs": "^1.1.0", - "bn.js": "^4.11.8", - "bs58": "^4.0.1", - "crypto-addr-codec": "^0.1.7", - "nano-base32": "^1.0.1", - "ripemd160": "^2.0.2" - } - }, - "@ensdomains/ens": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/@ensdomains/ens/-/ens-0.4.5.tgz", - "integrity": "sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw==", - "dev": true, - "requires": { - "bluebird": "^3.5.2", - "eth-ens-namehash": "^2.0.8", - "solc": "^0.4.20", - "testrpc": "0.0.1", - "web3-utils": "^1.0.0-beta.31" - } - }, - "@ensdomains/ensjs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@ensdomains/ensjs/-/ensjs-2.1.0.tgz", - "integrity": "sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog==", - "dev": true, - "requires": { - "@babel/runtime": "^7.4.4", - "@ensdomains/address-encoder": "^0.1.7", - "@ensdomains/ens": "0.4.5", - "@ensdomains/resolver": "0.2.4", - "content-hash": "^2.5.2", - "eth-ens-namehash": "^2.0.8", - "ethers": "^5.0.13", - "js-sha3": "^0.8.0" + "chalk": "^4.1.2", + "csv": "^5.5.3", + "kleur": "^4.1.5", + "smartwrap": "^2.0.2", + "strip-ansi": "^6.0.1", + "wcwidth": "^1.0.1", + "yargs": "^17.7.1" }, - "dependencies": { - "ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - } + "bin": { + "tty-table": "adapters/terminal-adapter.js" + }, + "engines": { + "node": ">=8.0.0" } }, - "@ensdomains/resolver": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@ensdomains/resolver/-/resolver-0.2.4.tgz", - "integrity": "sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA==", - "dev": true - }, - "@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "node_modules/tty-table/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "requires": { - "eslint-visitor-keys": "^3.3.0" + "engines": { + "node": ">=8" } }, - "@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", - "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - } - } - }, - "@eslint/js": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", - "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", - "dev": true - }, - "@ethereumjs/common": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.5.0.tgz", - "integrity": "sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg==", - "dev": true, - "requires": { - "crc-32": "^1.2.0", - "ethereumjs-util": "^7.1.1" - } - }, - "@ethereumjs/tx": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.2.tgz", - "integrity": "sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.5.0", - "ethereumjs-util": "^7.1.2" - } - }, - "@ethersproject/abi": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", - "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "@ethersproject/abstract-provider": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", - "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/networks": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/web": "^5.7.0" - } - }, - "@ethersproject/abstract-signer": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", - "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0" - } - }, - "@ethersproject/address": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", - "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/rlp": "^5.7.0" - } - }, - "@ethersproject/base64": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", - "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0" - } - }, - "@ethersproject/basex": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", - "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/properties": "^5.7.0" - } - }, - "@ethersproject/bignumber": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", - "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "bn.js": "^5.2.1" - }, - "dependencies": { - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - } - } - }, - "@ethersproject/bytes": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", - "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/constants": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", - "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.7.0" - } - }, - "@ethersproject/contracts": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz", - "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==", - "dev": true, - "requires": { - "@ethersproject/abi": "^5.7.0", - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/transactions": "^5.7.0" - } - }, - "@ethersproject/hash": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", - "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "@ethersproject/hdnode": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", - "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/basex": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/pbkdf2": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/wordlists": "^5.7.0" - } - }, - "@ethersproject/json-wallets": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", - "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hdnode": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/pbkdf2": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "aes-js": "3.0.0", - "scrypt-js": "3.0.1" - }, - "dependencies": { - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "dev": true - } - } - }, - "@ethersproject/keccak256": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", - "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "js-sha3": "0.8.0" - } - }, - "@ethersproject/logger": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", - "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", - "dev": true - }, - "@ethersproject/networks": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", - "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/pbkdf2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz", - "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/sha2": "^5.7.0" - } - }, - "@ethersproject/properties": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", - "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/providers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz", - "integrity": "sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/basex": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/networks": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/rlp": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/web": "^5.7.0", - "bech32": "1.1.4", - "ws": "7.4.6" - }, - "dependencies": { - "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true, - "requires": {} - } - } - }, - "@ethersproject/random": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", - "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/rlp": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", - "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/sha2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", - "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "hash.js": "1.1.7" - } - }, - "@ethersproject/signing-key": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", - "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "bn.js": "^5.2.1", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - }, - "dependencies": { - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - } - } - }, - "@ethersproject/solidity": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", - "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "@ethersproject/strings": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", - "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/transactions": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", - "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/rlp": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0" - } - }, - "@ethersproject/units": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz", - "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/wallet": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz", - "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/hdnode": "^5.7.0", - "@ethersproject/json-wallets": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/wordlists": "^5.7.0" - } - }, - "@ethersproject/web": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", - "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", - "dev": true, - "requires": { - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "@ethersproject/wordlists": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz", - "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "@frangio/servbot": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@frangio/servbot/-/servbot-0.2.5.tgz", - "integrity": "sha512-ogja4iAPZ1VwM5MU3C1ZhB88358F0PGbmSTGOkIZwOyLaDoMHIqOVCnavHjR7DV5h+oAI4Z4KDqlam3myQUrmg==", - "dev": true - }, - "@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - } - }, - "@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@manypkg/find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==", - "dev": true, - "requires": { - "@babel/runtime": "^7.5.5", - "@types/node": "^12.7.1", - "find-up": "^4.1.0", - "fs-extra": "^8.1.0" - }, - "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - } - } - }, - "@manypkg/get-packages": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", - "integrity": "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==", - "dev": true, - "requires": { - "@babel/runtime": "^7.5.5", - "@changesets/types": "^4.0.1", - "@manypkg/find-root": "^1.1.0", - "fs-extra": "^8.1.0", - "globby": "^11.0.0", - "read-yaml-file": "^1.1.0" - }, - "dependencies": { - "@changesets/types": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@changesets/types/-/types-4.1.0.tgz", - "integrity": "sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==", - "dev": true - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - } - } - }, - "@metamask/eth-sig-util": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz", - "integrity": "sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==", - "dev": true, - "requires": { - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^6.2.1", - "ethjs-util": "^0.1.6", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.1" - }, - "dependencies": { - "@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - } - } - }, - "@noble/hashes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", - "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", - "dev": true - }, - "@noble/secp256k1": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", - "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", - "dev": true - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@nomicfoundation/ethereumjs-block": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz", - "integrity": "sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-trie": "6.0.1", - "@nomicfoundation/ethereumjs-tx": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", - "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1" - }, - "dependencies": { - "ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - } - } - }, - "@nomicfoundation/ethereumjs-blockchain": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz", - "integrity": "sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-block": "5.0.1", - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-ethash": "3.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-trie": "6.0.1", - "@nomicfoundation/ethereumjs-tx": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", - "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" - } - }, - "@nomicfoundation/ethereumjs-common": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz", - "integrity": "sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-util": "9.0.1", - "crc-32": "^1.2.0" - } - }, - "@nomicfoundation/ethereumjs-ethash": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz", - "integrity": "sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-block": "5.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", - "abstract-level": "^1.0.3", - "bigint-crypto-utils": "^3.0.23", - "ethereum-cryptography": "0.1.3" - } - }, - "@nomicfoundation/ethereumjs-evm": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz", - "integrity": "sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ==", - "dev": true, - "requires": { - "@ethersproject/providers": "^5.7.1", - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-tx": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" - } - }, - "@nomicfoundation/ethereumjs-rlp": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz", - "integrity": "sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ==", - "dev": true - }, - "@nomicfoundation/ethereumjs-statemanager": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz", - "integrity": "sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1", - "js-sdsl": "^4.1.4" - }, - "dependencies": { - "ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - } - } - }, - "@nomicfoundation/ethereumjs-trie": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz", - "integrity": "sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", - "@types/readable-stream": "^2.3.13", - "ethereum-cryptography": "0.1.3", - "readable-stream": "^3.6.0" - } - }, - "@nomicfoundation/ethereumjs-tx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz", - "integrity": "sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w==", - "dev": true, - "requires": { - "@chainsafe/ssz": "^0.9.2", - "@ethersproject/providers": "^5.7.2", - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", - "ethereum-cryptography": "0.1.3" - } - }, - "@nomicfoundation/ethereumjs-util": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz", - "integrity": "sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA==", - "dev": true, - "requires": { - "@chainsafe/ssz": "^0.10.0", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "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" - } - } - } - }, - "@nomicfoundation/ethereumjs-vm": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz", - "integrity": "sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-block": "5.0.1", - "@nomicfoundation/ethereumjs-blockchain": "7.0.1", - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-evm": "2.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-statemanager": "2.0.1", - "@nomicfoundation/ethereumjs-trie": "6.0.1", - "@nomicfoundation/ethereumjs-tx": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" - } - }, - "@nomicfoundation/hardhat-network-helpers": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.8.tgz", - "integrity": "sha512-MNqQbzUJZnCMIYvlniC3U+kcavz/PhhQSsY90tbEtUyMj/IQqsLwIRZa4ctjABh3Bz0KCh9OXUZ7Yk/d9hr45Q==", - "dev": true, - "requires": { - "ethereumjs-util": "^7.1.4" - } - }, - "@nomicfoundation/solidity-analyzer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz", - "integrity": "sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg==", - "dev": true, - "requires": { - "@nomicfoundation/solidity-analyzer-darwin-arm64": "0.1.1", - "@nomicfoundation/solidity-analyzer-darwin-x64": "0.1.1", - "@nomicfoundation/solidity-analyzer-freebsd-x64": "0.1.1", - "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "0.1.1", - "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "0.1.1", - "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "0.1.1", - "@nomicfoundation/solidity-analyzer-linux-x64-musl": "0.1.1", - "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": "0.1.1", - "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": "0.1.1", - "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "0.1.1" - } - }, - "@nomicfoundation/solidity-analyzer-darwin-arm64": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz", - "integrity": "sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w==", - "dev": true, - "optional": true - }, - "@nomicfoundation/solidity-analyzer-darwin-x64": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.1.tgz", - "integrity": "sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA==", - "dev": true, - "optional": true - }, - "@nomicfoundation/solidity-analyzer-freebsd-x64": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.1.tgz", - "integrity": "sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA==", - "dev": true, - "optional": true - }, - "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.1.tgz", - "integrity": "sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg==", - "dev": true, - "optional": true - }, - "@nomicfoundation/solidity-analyzer-linux-arm64-musl": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.1.tgz", - "integrity": "sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w==", - "dev": true, - "optional": true - }, - "@nomicfoundation/solidity-analyzer-linux-x64-gnu": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.1.tgz", - "integrity": "sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA==", - "dev": true, - "optional": true - }, - "@nomicfoundation/solidity-analyzer-linux-x64-musl": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.1.tgz", - "integrity": "sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w==", - "dev": true, - "optional": true - }, - "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.1.tgz", - "integrity": "sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg==", - "dev": true, - "optional": true - }, - "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.1.tgz", - "integrity": "sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ==", - "dev": true, - "optional": true - }, - "@nomicfoundation/solidity-analyzer-win32-x64-msvc": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.1.tgz", - "integrity": "sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw==", - "dev": true, - "optional": true - }, - "@nomiclabs/hardhat-truffle5": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-truffle5/-/hardhat-truffle5-2.0.7.tgz", - "integrity": "sha512-Pw8451IUZp1bTp0QqCHCYfCHs66sCnyxPcaorapu9mfOV9xnZsVaFdtutnhNEiXdiZwbed7LFKpRsde4BjFwig==", - "dev": true, - "requires": { - "@nomiclabs/truffle-contract": "^4.2.23", - "@types/chai": "^4.2.0", - "chai": "^4.2.0", - "ethereumjs-util": "^7.1.4", - "fs-extra": "^7.0.1" - } - }, - "@nomiclabs/hardhat-web3": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-web3/-/hardhat-web3-2.0.0.tgz", - "integrity": "sha512-zt4xN+D+fKl3wW2YlTX3k9APR3XZgPkxJYf36AcliJn3oujnKEVRZaHu0PhgLjO+gR+F/kiYayo9fgd2L8970Q==", - "dev": true, - "requires": { - "@types/bignumber.js": "^5.0.0" - } - }, - "@nomiclabs/truffle-contract": { - "version": "4.5.10", - "resolved": "https://registry.npmjs.org/@nomiclabs/truffle-contract/-/truffle-contract-4.5.10.tgz", - "integrity": "sha512-nF/6InFV+0hUvutyFgsdOMCoYlr//2fJbRER4itxYtQtc4/O1biTwZIKRu+5l2J5Sq6LU2WX7vZHtDgQdhWxIQ==", - "dev": true, - "requires": { - "@ensdomains/ensjs": "^2.0.1", - "@truffle/blockchain-utils": "^0.1.3", - "@truffle/contract-schema": "^3.4.7", - "@truffle/debug-utils": "^6.0.22", - "@truffle/error": "^0.1.0", - "@truffle/interface-adapter": "^0.5.16", - "bignumber.js": "^7.2.1", - "ethereum-ens": "^0.8.0", - "ethers": "^4.0.0-beta.1", - "source-map-support": "^0.5.19" - } - }, - "@openzeppelin/contract-loader": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contract-loader/-/contract-loader-0.6.3.tgz", - "integrity": "sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg==", - "dev": true, - "requires": { - "find-up": "^4.1.0", - "fs-extra": "^8.1.0" - }, - "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - } - } - }, - "@openzeppelin/docs-utils": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@openzeppelin/docs-utils/-/docs-utils-0.1.4.tgz", - "integrity": "sha512-2I56U1GhnNlymz0gGmJbyZKhnErGIaJ+rqtKTGyNf7YX3jgeS9/Twv8H0T+OgLV4dimtCHPz/27w6CYhWQ/TGg==", - "dev": true, - "requires": { - "@frangio/servbot": "^0.2.5", - "chalk": "^3.0.0", - "chokidar": "^3.5.3", - "env-paths": "^2.2.0", - "find-up": "^4.1.0", - "is-port-reachable": "^3.0.0", - "js-yaml": "^3.13.1", - "lodash.startcase": "^4.4.0", - "minimist": "^1.2.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": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "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" - } - } - } - }, - "@openzeppelin/test-helpers": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/@openzeppelin/test-helpers/-/test-helpers-0.5.16.tgz", - "integrity": "sha512-T1EvspSfH1qQO/sgGlskLfYVBbqzJR23SZzYl/6B2JnT4EhThcI85UpvDk0BkLWKaDScQTabGHt4GzHW+3SfZg==", - "dev": true, - "requires": { - "@openzeppelin/contract-loader": "^0.6.2", - "@truffle/contract": "^4.0.35", - "ansi-colors": "^3.2.3", - "chai": "^4.2.0", - "chai-bn": "^0.2.1", - "ethjs-abi": "^0.2.1", - "lodash.flatten": "^4.4.0", - "semver": "^5.6.0", - "web3": "^1.2.5", - "web3-utils": "^1.2.5" - }, - "dependencies": { - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "@openzeppelin/upgrades-core": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@openzeppelin/upgrades-core/-/upgrades-core-1.27.1.tgz", - "integrity": "sha512-6tLcu6jt0nYdJNr+LRicBgP3jp+//B+dixgB3KsvycSglCHNfmBNDf0ZQ3ZquDdLL0QQmKzIs1EBRVp6lNvPnQ==", - "dev": true, - "requires": { - "cbor": "^8.0.0", - "chalk": "^4.1.0", - "compare-versions": "^5.0.0", - "debug": "^4.1.1", - "ethereumjs-util": "^7.0.3", - "minimist": "^1.2.7", - "proper-lockfile": "^4.1.1", - "solidity-ast": "^0.4.15" - }, - "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" - } - } - } - }, - "@scure/base": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz", - "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==", - "dev": true - }, - "@scure/bip32": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", - "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", - "dev": true, - "requires": { - "@noble/hashes": "~1.2.0", - "@noble/secp256k1": "~1.7.0", - "@scure/base": "~1.1.0" - } - }, - "@scure/bip39": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", - "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", - "dev": true, - "requires": { - "@noble/hashes": "~1.2.0", - "@scure/base": "~1.1.0" - } - }, - "@sentry/core": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz", - "integrity": "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==", - "dev": true, - "requires": { - "@sentry/hub": "5.30.0", - "@sentry/minimal": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - } - }, - "@sentry/hub": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz", - "integrity": "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==", - "dev": true, - "requires": { - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - } - }, - "@sentry/minimal": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz", - "integrity": "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==", - "dev": true, - "requires": { - "@sentry/hub": "5.30.0", - "@sentry/types": "5.30.0", - "tslib": "^1.9.3" - } - }, - "@sentry/node": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz", - "integrity": "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==", - "dev": true, - "requires": { - "@sentry/core": "5.30.0", - "@sentry/hub": "5.30.0", - "@sentry/tracing": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "cookie": "^0.4.1", - "https-proxy-agent": "^5.0.0", - "lru_map": "^0.3.3", - "tslib": "^1.9.3" - } - }, - "@sentry/tracing": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz", - "integrity": "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==", - "dev": true, - "requires": { - "@sentry/hub": "5.30.0", - "@sentry/minimal": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - } - }, - "@sentry/types": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", - "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", - "dev": true - }, - "@sentry/utils": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", - "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", - "dev": true, - "requires": { - "@sentry/types": "5.30.0", - "tslib": "^1.9.3" - } - }, - "@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", - "dev": true - }, - "@solidity-parser/parser": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.5.tgz", - "integrity": "sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "@szmarczak/http-timer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", - "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", - "dev": true, - "requires": { - "defer-to-connect": "^2.0.1" - } - }, - "@truffle/abi-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@truffle/abi-utils/-/abi-utils-1.0.1.tgz", - "integrity": "sha512-ZQUY3XUxEPdqxNaoXsOqF0spTtb6f5RNlnN4MUrVsJ64sOh0FJsY7rxZiUI3khfePmNh4i2qcJrQlKT36YcWUA==", - "dev": true, - "requires": { - "change-case": "3.0.2", - "fast-check": "3.1.1", - "web3-utils": "1.10.0" - } - }, - "@truffle/blockchain-utils": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.8.tgz", - "integrity": "sha512-ZskpYDNHkXD3ota4iU3pZz6kLth87RC+wDn66Rp2Or+DqqJCKdnmS9GDctBi1EcMPDEi0BqpkdrfBuzA9uIkGg==", - "dev": true - }, - "@truffle/codec": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.17.0.tgz", - "integrity": "sha512-0Z7DQNCnvW++JuvNj35v/CuJoaFSAp7/+lXWwe+Zoe++E27V+hzRI88ZYxRJa0/q1HE81epd1r0ipqc7WBotig==", - "dev": true, - "requires": { - "@truffle/abi-utils": "^1.0.1", - "@truffle/compile-common": "^0.9.6", - "big.js": "^6.0.3", - "bn.js": "^5.1.3", - "cbor": "^5.2.0", - "debug": "^4.3.1", - "lodash": "^4.17.21", - "semver": "7.5.2", - "utf8": "^3.0.0", - "web3-utils": "1.10.0" - }, - "dependencies": { - "bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", - "dev": true - }, - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "cbor": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-5.2.0.tgz", - "integrity": "sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==", - "dev": true, - "requires": { - "bignumber.js": "^9.0.1", - "nofilter": "^1.0.4" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "nofilter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz", - "integrity": "sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==", - "dev": true - }, - "semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "@truffle/compile-common": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/@truffle/compile-common/-/compile-common-0.9.6.tgz", - "integrity": "sha512-TCcmr1E0GqMZJ2tOaCRNEllxTBJ/g7TuD6jDJpw5Gt9Bw0YO3Cmp6yPQRynRSO4xMJbHUgiEsSfRgIhswut5UA==", - "dev": true, - "requires": { - "@truffle/error": "^0.2.1", - "colors": "1.4.0" - }, - "dependencies": { - "@truffle/error": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.1.tgz", - "integrity": "sha512-5Qy+z9dg9hP37WNdLnXH4b9MzemWrjTufRq7/DTKqimjyxCP/1zlL8gQEMdiSx1BBtAZz0xypkID/jb7AF/Osg==", - "dev": true - } - } - }, - "@truffle/contract": { - "version": "4.6.26", - "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.6.26.tgz", - "integrity": "sha512-B3KM8fW9dKJCzMRD40r+u+iqQtBGFbcMr2GML31iUkjC77Wn/KlM9cCGZiuXcOquWmBlKrpD4nJCoGirPhyPTQ==", - "dev": true, - "requires": { - "@ensdomains/ensjs": "^2.1.0", - "@truffle/blockchain-utils": "^0.1.8", - "@truffle/contract-schema": "^3.4.14", - "@truffle/debug-utils": "^6.0.54", - "@truffle/error": "^0.2.1", - "@truffle/interface-adapter": "^0.5.34", - "bignumber.js": "^7.2.1", - "debug": "^4.3.1", - "ethers": "^4.0.32", - "web3": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-utils": "1.10.0" - }, - "dependencies": { - "@truffle/error": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.1.tgz", - "integrity": "sha512-5Qy+z9dg9hP37WNdLnXH4b9MzemWrjTufRq7/DTKqimjyxCP/1zlL8gQEMdiSx1BBtAZz0xypkID/jb7AF/Osg==", - "dev": true - } - } - }, - "@truffle/contract-schema": { - "version": "3.4.14", - "resolved": "https://registry.npmjs.org/@truffle/contract-schema/-/contract-schema-3.4.14.tgz", - "integrity": "sha512-IwVQZG9RVNwTdn321+jbFIcky3/kZLkCtq8tqil4jZwivvmZQg8rIVC8GJ7Lkrmixl9/yTyQNL6GtIUUvkZxyA==", - "dev": true, - "requires": { - "ajv": "^6.10.0", - "debug": "^4.3.1" - } - }, - "@truffle/debug-utils": { - "version": "6.0.54", - "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.54.tgz", - "integrity": "sha512-ENv5TQQv+CJrwSX9AdXXTDHVNHpPfH+yCpRSnM3Sg0dx7IeWJAjGA66/BiucNBUiAgLhV2EcvkMo+4tEPoR+YQ==", - "dev": true, - "requires": { - "@truffle/codec": "^0.17.0", - "@trufflesuite/chromafi": "^3.0.0", - "bn.js": "^5.1.3", - "chalk": "^2.4.2", - "debug": "^4.3.1", - "highlightjs-solidity": "^2.0.6" - }, - "dependencies": { - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - } - } - }, - "@truffle/error": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.1.1.tgz", - "integrity": "sha512-sE7c9IHIGdbK4YayH4BC8i8qMjoAOeg6nUXUDZZp8wlU21/EMpaG+CLx+KqcIPyR+GSWIW3Dm0PXkr2nlggFDA==", - "dev": true - }, - "@truffle/interface-adapter": { - "version": "0.5.34", - "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.34.tgz", - "integrity": "sha512-gPxabfMi2TueE4VxnNuyeudOfvGJQ1ofVC02PFw14cnRQhzH327JikjjQbZ1bT6S7kWl9H6P3hQPFeYFMHdm1g==", - "dev": true, - "requires": { - "bn.js": "^5.1.3", - "ethers": "^4.0.32", - "web3": "1.10.0" - }, - "dependencies": { - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - } - } - }, - "@trufflesuite/chromafi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz", - "integrity": "sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0", - "chalk": "^2.3.2", - "cheerio": "^1.0.0-rc.2", - "detect-indent": "^5.0.0", - "highlight.js": "^10.4.1", - "lodash.merge": "^4.6.2", - "strip-ansi": "^4.0.0", - "strip-indent": "^2.0.0" - }, - "dependencies": { - "detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==", - "dev": true - } - } - }, - "@types/bignumber.js": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-5.0.0.tgz", - "integrity": "sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA==", - "dev": true, - "requires": { - "bignumber.js": "*" - } - }, - "@types/bn.js": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", - "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/cacheable-request": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", - "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", - "dev": true, - "requires": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" - } - }, - "@types/chai": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz", - "integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==", - "dev": true - }, - "@types/concat-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", - "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/form-data": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", - "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", - "dev": true, - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", - "dev": true - }, - "@types/is-ci": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/is-ci/-/is-ci-3.0.0.tgz", - "integrity": "sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==", - "dev": true, - "requires": { - "ci-info": "^3.1.0" - } - }, - "@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", - "dev": true - }, - "@types/minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "dev": true - }, - "@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, - "@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", - "dev": true - }, - "@types/pbkdf2": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", - "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", - "dev": 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", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/secp256k1": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", - "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", - "dev": true - }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", - "dev": true - }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dev": true, - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "abortcontroller-polyfill": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", - "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==", - "dev": true - }, - "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" - }, - "dependencies": { - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - } - } - }, - "accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "requires": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - } - }, - "acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "address": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz", - "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", - "dev": true - }, - "adm-zip": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", - "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", - "dev": true - }, - "aes-js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", - "dev": true - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "requires": { - "debug": "4" - } - }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true, - "optional": true - }, - "ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - }, - "dependencies": { - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - } - } - }, - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "antlr4": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.0.tgz", - "integrity": "sha512-zooUbt+UscjnWyOrsuY/tVFL4rwrAGwOivpQmvmUDE22hy/lUA467Rc1rcixyRwcRUIXFYBwv7+dClDSHdmmew==", - "dev": true - }, - "antlr4ts": { - "version": "0.5.0-alpha.4", - "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", - "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", - "dev": true - }, - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" - } - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", - "dev": true - }, - "array.prototype.at": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array.prototype.at/-/array.prototype.at-1.1.1.tgz", - "integrity": "sha512-n/wYNLJy/fVEU9EGPt2ww920hy1XX3XB2yTREFy1QsxctBgQV/tZIwg1G8jVxELna4pLCzg/xvvS/DDXtI4NNg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0" - } - }, - "array.prototype.findlast": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.2.tgz", - "integrity": "sha512-p1YDNPNqA+P6cPX9ATsxg7DKir7gOmJ+jh5dEP3LlumMNYVC1F2Jgnyh6oI3n/qD9FeIkqR2jXfd73G68ImYUQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.1.3" - } - }, - "array.prototype.flat": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", - "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0" - } - }, - "array.prototype.reduce": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz", - "integrity": "sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - } - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true - }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "ast-parents": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", - "integrity": "sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==", - "dev": true - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", - "dev": true - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "dev": true - }, - "aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base-x": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", - "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - }, - "dependencies": { - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - } - } - }, - "bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", - "dev": true - }, - "better-path-resolve": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", - "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", - "dev": true, - "requires": { - "is-windows": "^1.0.0" - } - }, - "big-integer": { - "version": "1.6.36", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz", - "integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==", - "dev": true - }, - "big.js": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", - "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", - "dev": true - }, - "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", - "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", - "dev": true - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "blakejs": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", - "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", - "dev": true - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", - "dev": true, - "requires": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } - } - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "breakword": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/breakword/-/breakword-1.0.6.tgz", - "integrity": "sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==", - "dev": true, - "requires": { - "wcwidth": "^1.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "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", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", - "dev": true, - "requires": { - "base-x": "^3.0.2" - } - }, - "bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "dev": true, - "requires": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "buffer-reverse": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-reverse/-/buffer-reverse-1.0.1.tgz", - "integrity": "sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg==", - "dev": true - }, - "buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true - }, - "bufferutil": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", - "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", - "dev": true, - "requires": { - "node-gyp-build": "^4.3.0" - } - }, - "busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dev": true, - "requires": { - "streamsearch": "^1.1.0" - } - }, - "bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true - }, - "cacheable-lookup": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz", - "integrity": "sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==", - "dev": true - }, - "cacheable-request": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", - "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", - "dev": true, - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - } - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==", - "dev": true - }, - "camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "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", - "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", - "dev": true, - "requires": { - "nofilter": "^3.1.0" - } - }, - "chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - } - }, - "chai-bn": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/chai-bn/-/chai-bn-0.2.2.tgz", - "integrity": "sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg==", - "dev": true, - "requires": {} - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "change-case": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.0.2.tgz", - "integrity": "sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==", - "dev": true, - "requires": { - "camel-case": "^3.0.0", - "constant-case": "^2.0.0", - "dot-case": "^2.1.0", - "header-case": "^1.0.0", - "is-lower-case": "^1.1.0", - "is-upper-case": "^1.1.0", - "lower-case": "^1.1.1", - "lower-case-first": "^1.0.0", - "no-case": "^2.3.2", - "param-case": "^2.1.0", - "pascal-case": "^2.0.0", - "path-case": "^2.1.0", - "sentence-case": "^2.1.0", - "snake-case": "^2.1.0", - "swap-case": "^1.1.0", - "title-case": "^2.1.0", - "upper-case": "^1.1.1", - "upper-case-first": "^1.1.0" - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", - "dev": true - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", - "dev": true - }, - "cheerio": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", - "dev": true, - "requires": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0" - } - }, - "cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - } - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true - }, - "cids": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", - "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "class-is": "^1.1.0", - "multibase": "~0.6.0", - "multicodec": "^1.0.0", - "multihashes": "~0.4.15" - }, - "dependencies": { - "multicodec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", - "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", - "dev": true, - "requires": { - "buffer": "^5.6.0", - "varint": "^5.0.0" - } - } - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-is": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", - "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-table3": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", - "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", - "dev": true, - "requires": { - "colors": "^1.1.2", - "object-assign": "^4.1.0", - "string-width": "^2.1.1" - } - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true - }, - "clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", - "dev": true - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", - "dev": true - }, - "commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true - }, - "compare-versions": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-5.0.3.tgz", - "integrity": "sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "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 - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "constant-case": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz", - "integrity": "sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==", - "dev": true, - "requires": { - "snake-case": "^2.1.0", - "upper-case": "^1.1.1" - } - }, - "content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, - "requires": { - "safe-buffer": "5.2.1" - } - }, - "content-hash": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", - "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", - "dev": true, - "requires": { - "cids": "^0.7.1", - "multicodec": "^0.5.5", - "multihashes": "^0.4.15" - } - }, - "content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true - }, - "cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "cosmiconfig": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.2.0.tgz", - "integrity": "sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==", - "dev": true, - "requires": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - } - } - }, - "crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "dev": true - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", - "dev": true, - "requires": { - "node-fetch": "^2.6.12" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", - "dev": true - }, - "crypto-addr-codec": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz", - "integrity": "sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg==", - "dev": true, - "requires": { - "base-x": "^3.0.8", - "big-integer": "1.6.36", - "blakejs": "^1.1.0", - "bs58": "^4.0.1", - "ripemd160-min": "0.0.6", - "safe-buffer": "^5.2.0", - "sha3": "^2.1.1" - } - }, - "crypto-js": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", - "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", - "dev": true - }, - "css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - } - }, - "css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true - }, - "csv": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/csv/-/csv-5.5.3.tgz", - "integrity": "sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==", - "dev": true, - "requires": { - "csv-generate": "^3.4.3", - "csv-parse": "^4.16.3", - "csv-stringify": "^5.6.5", - "stream-transform": "^2.1.3" - } - }, - "csv-generate": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/csv-generate/-/csv-generate-3.4.3.tgz", - "integrity": "sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==", - "dev": true - }, - "csv-parse": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.3.tgz", - "integrity": "sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==", - "dev": true - }, - "csv-stringify": { - "version": "5.6.5", - "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-5.6.5.tgz", - "integrity": "sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==", - "dev": true - }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dev": true, - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "dataloader": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", - "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", - "dev": true - }, - "death": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", - "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", - "dev": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true - }, - "decamelize-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", - "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", - "dev": true, - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", - "dev": true - } - } - }, - "decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true - }, - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "requires": { - "mimic-response": "^3.1.0" - }, - "dependencies": { - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true - } - } - }, - "deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, - "requires": { - "clone": "^1.0.2" - } - }, - "defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true - }, - "define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true - }, - "destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true - }, - "detect-indent": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", - "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", - "dev": true - }, - "detect-port": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", - "integrity": "sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ==", - "dev": true, - "requires": { - "address": "^1.0.1", - "debug": "4" - } - }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "difflib": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", - "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", - "dev": true, - "requires": { - "heap": ">= 0.2.0" - } - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - } - }, - "dom-walk": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", - "dev": true - }, - "domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true - }, - "domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0" - } - }, - "domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, - "requires": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - } - }, - "dot-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz", - "integrity": "sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "dotenv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", - "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true - }, - "env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", - "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", - "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.0", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.0", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" - } - }, - "es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, - "es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" - } - }, - "es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", - "dev": true, - "requires": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "dev": true - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dev": true, - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", - "dev": true, - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - }, - "dependencies": { - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", - "dev": true - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - } - } - }, - "eslint": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz", - "integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.1.0", - "@eslint/js": "8.44.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.6.0", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "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" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "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 - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "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 - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "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" - } - } - } - }, - "eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", - "dev": true, - "requires": {} - }, - "eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", - "dev": true - }, - "espree": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.0.tgz", - "integrity": "sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==", - "dev": true, - "requires": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true - }, - "eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw==", - "dev": true, - "requires": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" - }, - "dependencies": { - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - } - } - }, - "eth-gas-reporter": { - "version": "0.2.25", - "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz", - "integrity": "sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ==", - "dev": true, - "requires": { - "@ethersproject/abi": "^5.0.0-beta.146", - "@solidity-parser/parser": "^0.14.0", - "cli-table3": "^0.5.0", - "colors": "1.4.0", - "ethereum-cryptography": "^1.0.3", - "ethers": "^4.0.40", - "fs-readdir-recursive": "^1.1.0", - "lodash": "^4.17.14", - "markdown-table": "^1.1.3", - "mocha": "^7.1.1", - "req-cwd": "^2.0.0", - "request": "^2.88.0", - "request-promise-native": "^1.0.5", - "sha1": "^1.1.1", - "sync-request": "^6.0.0" - }, - "dependencies": { - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "ethereum-cryptography": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", - "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", - "dev": true, - "requires": { - "@noble/hashes": "1.2.0", - "@noble/secp256k1": "1.7.1", - "@scure/bip32": "1.1.5", - "@scure/bip39": "1.1.1" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true - }, - "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "requires": { - "picomatch": "^2.0.4" - } - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - } - } - } - }, - "eth-lib": { - "version": "0.1.29", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", - "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "nano-json-stream-parser": "^0.1.2", - "servify": "^0.1.12", - "ws": "^3.0.0", - "xhr-request-promise": "^0.1.2" - }, - "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 - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - } - } - }, - "eth-sig-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.1.tgz", - "integrity": "sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==", - "dev": true, - "requires": { - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^5.1.1", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.0" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - } - } - }, - "ethereum-bloom-filters": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", - "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", - "dev": true, - "requires": { - "js-sha3": "^0.8.0" - } - }, - "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" - } - }, - "ethereum-ens": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/ethereum-ens/-/ethereum-ens-0.8.0.tgz", - "integrity": "sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg==", - "dev": true, - "requires": { - "bluebird": "^3.4.7", - "eth-ens-namehash": "^2.0.0", - "js-sha3": "^0.5.7", - "pako": "^1.0.4", - "underscore": "^1.8.3", - "web3": "^1.0.0-beta.34" - }, - "dependencies": { - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - } - } - }, - "ethereumjs-abi": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", - "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", - "dev": true, - "requires": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - }, - "dependencies": { - "@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - } - } - }, - "ethereumjs-util": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", - "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - }, - "dependencies": { - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - } - } - }, - "ethereumjs-wallet": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz", - "integrity": "sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA==", - "dev": true, - "requires": { - "aes-js": "^3.1.2", - "bs58check": "^2.1.2", - "ethereum-cryptography": "^0.1.3", - "ethereumjs-util": "^7.1.2", - "randombytes": "^2.1.0", - "scrypt-js": "^3.0.1", - "utf8": "^3.0.0", - "uuid": "^8.3.2" - } - }, - "ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", - "dev": true, - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "dev": true - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", - "dev": true - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", - "dev": true - } - } - }, - "ethjs-abi": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", - "integrity": "sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA==", - "dev": true, - "requires": { - "bn.js": "4.11.6", - "js-sha3": "0.5.5", - "number-to-bn": "1.7.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - }, - "js-sha3": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", - "integrity": "sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA==", - "dev": true - } - } - }, - "ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", - "dev": true, - "requires": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - } - } - }, - "ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", - "dev": true, - "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - } - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true - }, - "eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "dev": true - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "dev": true, - "requires": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "dev": true, - "requires": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - } - }, - "cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } - }, - "raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dev": true, - "requires": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - } - } - }, - "ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "dev": true, - "requires": { - "type": "^2.7.2" - }, - "dependencies": { - "type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extendable-error": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", - "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", - "dev": true - }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true - }, - "fast-check": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.1.1.tgz", - "integrity": "sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA==", - "dev": true, - "requires": { - "pure-rand": "^5.0.1" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true - }, - "fast-glob": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", - "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - } - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "find-yarn-workspace-root2": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz", - "integrity": "sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==", - "dev": true, - "requires": { - "micromatch": "^4.0.2", - "pkg-dir": "^4.2.0" - } - }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "dev": true - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "requires": { - "is-callable": "^1.1.3" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "form-data-encoder": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", - "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==", - "dev": true - }, - "forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true - }, - "fp-ts": { - "version": "1.19.3", - "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", - "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", - "dev": true - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", - "dev": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "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", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true - }, - "get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - } - }, - "get-port": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", - "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", - "dev": true - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "ghost-testrpc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", - "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "node-emoji": "^1.10.0" - } - }, - "glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "global": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", - "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", - "dev": true, - "requires": { - "min-document": "^2.19.0", - "process": "^0.11.10" - } - }, - "global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "dev": true, - "requires": { - "global-prefix": "^3.0.0" - } - }, - "global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dev": true, - "requires": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - }, - "dependencies": { - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3" - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, - "gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.3" - } - }, - "got": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", - "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", - "dev": true, - "requires": { - "@sindresorhus/is": "^4.6.0", - "@szmarczak/http-timer": "^5.0.1", - "@types/cacheable-request": "^6.0.2", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^6.0.4", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "form-data-encoder": "1.7.1", - "get-stream": "^6.0.1", - "http2-wrapper": "^2.1.10", - "lowercase-keys": "^3.0.0", - "p-cancelable": "^3.0.0", - "responselike": "^2.0.0" - } - }, - "graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "graphlib": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", - "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", - "dev": true, - "requires": { - "lodash": "^4.17.15" - } - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "dev": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", - "dev": true - }, - "hardhat": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.16.1.tgz", - "integrity": "sha512-QpBjGXFhhSYoYBGEHyoau/A63crZOP+i3GbNxzLGkL6IklzT+piN14+wGnINNCg5BLSKisQI/RAySPzaWRcx/g==", - "dev": true, - "requires": { - "@ethersproject/abi": "^5.1.2", - "@metamask/eth-sig-util": "^4.0.0", - "@nomicfoundation/ethereumjs-block": "5.0.1", - "@nomicfoundation/ethereumjs-blockchain": "7.0.1", - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-evm": "2.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-statemanager": "2.0.1", - "@nomicfoundation/ethereumjs-trie": "6.0.1", - "@nomicfoundation/ethereumjs-tx": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", - "@nomicfoundation/ethereumjs-vm": "7.0.1", - "@nomicfoundation/solidity-analyzer": "^0.1.0", - "@sentry/node": "^5.18.1", - "@types/bn.js": "^5.1.0", - "@types/lru-cache": "^5.1.0", - "abort-controller": "^3.0.0", - "adm-zip": "^0.4.16", - "aggregate-error": "^3.0.0", - "ansi-escapes": "^4.3.0", - "chalk": "^2.4.2", - "chokidar": "^3.4.0", - "ci-info": "^2.0.0", - "debug": "^4.1.1", - "enquirer": "^2.3.0", - "env-paths": "^2.2.0", - "ethereum-cryptography": "^1.0.3", - "ethereumjs-abi": "^0.6.8", - "find-up": "^2.1.0", - "fp-ts": "1.19.3", - "fs-extra": "^7.0.1", - "glob": "7.2.0", - "immutable": "^4.0.0-rc.12", - "io-ts": "1.10.4", - "keccak": "^3.0.2", - "lodash": "^4.17.11", - "mnemonist": "^0.38.0", - "mocha": "^10.0.0", - "p-map": "^4.0.0", - "raw-body": "^2.4.1", - "resolve": "1.17.0", - "semver": "^6.3.0", - "solc": "0.7.3", - "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": { - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", - "dev": true - }, - "ethereum-cryptography": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", - "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", - "dev": true, - "requires": { - "@noble/hashes": "1.2.0", - "@noble/secp256k1": "1.7.1", - "@scure/bip32": "1.1.5", - "@scure/bip39": "1.1.1" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "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" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "solc": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", - "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", - "dev": true, - "requires": { - "command-exists": "^1.2.8", - "commander": "3.0.2", - "follow-redirects": "^1.12.1", - "fs-extra": "^0.30.0", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", - "semver": "^5.5.0", - "tmp": "0.0.33" - }, - "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" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - } - } - }, - "hardhat-exposed": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/hardhat-exposed/-/hardhat-exposed-0.3.11.tgz", - "integrity": "sha512-2Gwdfx1YpSWUX80kuq0zM1tNqDJoTBCd5Q5oXKPxz6STSy1TiDyDb1miUr4Dwc/Dp2lzWzM+fZjpUrMe5O08Hw==", - "dev": true, - "requires": { - "micromatch": "^4.0.4", - "solidity-ast": "^0.4.25" - } - }, - "hardhat-gas-reporter": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", - "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", - "dev": true, - "requires": { - "array-uniq": "1.0.3", - "eth-gas-reporter": "^0.2.25", - "sha1": "^1.1.1" - } - }, - "hardhat-ignore-warnings": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/hardhat-ignore-warnings/-/hardhat-ignore-warnings-0.2.9.tgz", - "integrity": "sha512-q1oj6/ixiAx+lgIyGLBajVCSC7qUtAoK7LS9Nr8UVHYo8Iuh5naBiVGo4RDJ6wxbDGYBkeSukUGZrMqzC2DWwA==", - "dev": true, - "requires": { - "minimatch": "^5.1.0", - "node-interval-tree": "^2.0.1", - "solidity-comments": "^0.0.2" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "header-case": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz", - "integrity": "sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.3" - } - }, - "heap": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", - "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", - "dev": true - }, - "highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "dev": true - }, - "highlightjs-solidity": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz", - "integrity": "sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" - } - }, - "http-basic": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", - "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", - "dev": true, - "requires": { - "caseless": "^0.12.0", - "concat-stream": "^1.6.2", - "http-response-object": "^3.0.1", - "parse-cache-control": "^1.0.1" - } - }, - "http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "dev": true - }, - "http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "requires": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - } - }, - "http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==", - "dev": true - }, - "http-response-object": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", - "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", - "dev": true, - "requires": { - "@types/node": "^10.0.3" - }, - "dependencies": { - "@types/node": { - "version": "10.17.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", - "dev": true - } - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "http2-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", - "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", - "dev": true, - "requires": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.2.0" - }, - "dependencies": { - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true - } - } - }, - "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "human-id": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz", - "integrity": "sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", - "dev": true, - "requires": { - "punycode": "2.1.0" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true - }, - "immutable": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", - "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - } - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", - "dev": true - }, - "io-ts": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", - "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", - "dev": true, - "requires": { - "fp-ts": "^1.0.0" - } - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true - }, - "is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true - }, - "is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true - }, - "is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dev": true, - "requires": { - "ci-info": "^3.2.0" - } - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "is-function": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", - "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", - "dev": true - }, - "is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", - "dev": true - }, - "is-lower-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", - "integrity": "sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==", - "dev": true, - "requires": { - "lower-case": "^1.1.0" - } - }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", - "dev": true - }, - "is-port-reachable": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-3.1.0.tgz", - "integrity": "sha512-vjc0SSRNZ32s9SbZBzGaiP6YVB+xglLShhgZD/FHMZUXBvQWaV9CtzgeVhjccFJrI6RAMV+LX7NYxueW/A8W5A==", - "dev": true - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-subdir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", - "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", - "dev": true, - "requires": { - "better-path-resolve": "1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "is-upper-case": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", - "integrity": "sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==", - "dev": true, - "requires": { - "upper-case": "^1.1.0" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true - }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true - }, - "js-sdsl": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.1.tgz", - "integrity": "sha512-6Gsx8R0RucyePbWqPssR8DyfuXmLBooYN5cZFZKjHGnQuaf7pEzhtpceagJxVu4LqhYY5EYA7nko3FmeHZ1KbA==", - "dev": true - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonschema": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", - "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", - "dev": true - }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "keccak": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.3.tgz", - "integrity": "sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ==", - "dev": true, - "requires": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0", - "readable-stream": "^3.6.0" - } - }, - "keccak256": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/keccak256/-/keccak256-1.0.6.tgz", - "integrity": "sha512-8GLiM01PkdJVGUhR1e6M/AvWnSqYS0HaERI+K/QtStGDGlSTx2B1zTqZk4Zlqu5TxHJNTxWAdP9Y+WI50OApUw==", - "dev": true, - "requires": { - "bn.js": "^5.2.0", - "buffer": "^6.0.3", - "keccak": "^3.0.2" - }, - "dependencies": { - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - } - } - }, - "keyv": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", - "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", - "dev": true, - "requires": { - "json-buffer": "3.0.1" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "dev": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", - "dev": true, - "requires": { - "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" - }, - "dependencies": { - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - } - } - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - } - } - }, - "load-yaml-file": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", - "integrity": "sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.5", - "js-yaml": "^3.13.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw==", - "dev": true - }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lodash.startcase": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", - "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", - "dev": true - }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true - }, - "lodash.zip": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", - "integrity": "sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==", - "dev": true - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.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" - } - } - } - }, - "loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", - "dev": true, - "requires": { - "get-func-name": "^2.0.0" - } - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==", - "dev": true - }, - "lower-case-first": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz", - "integrity": "sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==", - "dev": true, - "requires": { - "lower-case": "^1.1.2" - } - }, - "lowercase-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", - "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", - "dev": true - }, - "lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "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" - } - }, - "map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "dev": true - }, - "markdown-table": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", - "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", - "dev": 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", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true - }, - "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", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", - "dev": true - }, - "meow": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-6.1.1.tgz", - "integrity": "sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==", - "dev": true, - "requires": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "^4.0.2", - "normalize-package-data": "^2.5.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.13.1", - "yargs-parser": "^18.1.3" - }, - "dependencies": { - "type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "dev": true - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "merkletreejs": { - "version": "0.2.32", - "resolved": "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.2.32.tgz", - "integrity": "sha512-TostQBiwYRIwSE5++jGmacu3ODcKAgqb0Y/pnIohXS7sWxh1gCkSptbmF1a43faehRDpcHf7J/kv0Ml2D/zblQ==", - "dev": true, - "requires": { - "bignumber.js": "^9.0.1", - "buffer-reverse": "^1.0.1", - "crypto-js": "^3.1.9-1", - "treeify": "^1.1.0", - "web3-utils": "^1.3.4" - }, - "dependencies": { - "bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", - "dev": true - } - } - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "requires": { - "mime-db": "1.52.0" - } - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true - }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==", - "dev": true, - "requires": { - "dom-walk": "^0.1.0" - } - }, - "min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true - }, - "minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - } - }, - "minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", - "dev": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mixme": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/mixme/-/mixme-0.5.9.tgz", - "integrity": "sha512-VC5fg6ySUscaWUpI4gxCBTQMH2RdUpNrk+MsbpCYtIvf9SBJdiUey4qE7BXviJsJR4nDQxCZ+3yaYNW3guz/Pw==", - "dev": true - }, - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } - }, - "mkdirp-promise": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", - "integrity": "sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w==", - "dev": true, - "requires": { - "mkdirp": "*" - } - }, - "mnemonist": { - "version": "0.38.5", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", - "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", - "dev": true, - "requires": { - "obliterator": "^2.0.0" - } - }, - "mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", - "dev": true, - "requires": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "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 - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - } - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true - } - } - }, - "mock-fs": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", - "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", - "dev": true - }, - "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", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "multibase": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", - "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", - "dev": true, - "requires": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - }, - "multicodec": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", - "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", - "dev": true, - "requires": { - "varint": "^5.0.0" - } - }, - "multihashes": { - "version": "0.4.21", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", - "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "multibase": "^0.7.0", - "varint": "^5.0.0" - }, - "dependencies": { - "multibase": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", - "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", - "dev": true, - "requires": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - } - } - }, - "nano-base32": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nano-base32/-/nano-base32-1.0.1.tgz", - "integrity": "sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw==", - "dev": true - }, - "nano-json-stream-parser": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", - "integrity": "sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew==", - "dev": true - }, - "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "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", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "dev": true - }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, - "node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "dev": true - }, - "node-emoji": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", - "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", - "dev": true, - "requires": { - "lodash": "^4.17.21" - } - }, - "node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "dev": true, - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", - "dev": true - }, - "node-interval-tree": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/node-interval-tree/-/node-interval-tree-2.1.2.tgz", - "integrity": "sha512-bJ9zMDuNGzVQg1xv0bCPzyEDxHgbrx7/xGj6CDokvizZZmastPsOh0JJLuY8wA5q2SfX1TLNMk7XNV8WxbGxzA==", - "dev": true, - "requires": { - "shallowequal": "^1.1.0" - } - }, - "nofilter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", - "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", - "dev": true - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", - "dev": true - }, - "nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "requires": { - "boolbase": "^1.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", - "dev": true - }, - "number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", - "dev": true, - "requires": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - } - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true - }, - "object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz", - "integrity": "sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==", - "dev": true, - "requires": { - "array.prototype.reduce": "^1.0.5", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.21.2", - "safe-array-concat": "^1.0.0" - } - }, - "obliterator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", - "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==", - "dev": true - }, - "oboe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", - "integrity": "sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==", - "dev": true, - "requires": { - "http-https": "^1.0.0" - } - }, - "on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "requires": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - } - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true - }, - "outdent": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", - "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", - "dev": true - }, - "p-cancelable": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", - "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", - "dev": true - }, - "p-filter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", - "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", - "dev": true, - "requires": { - "p-map": "^2.0.0" - }, - "dependencies": { - "p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", - "dev": true - } - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - }, - "dependencies": { - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - } - } - }, - "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-cache-control": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", - "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", - "dev": true - }, - "parse-headers": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz", - "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==", - "dev": true - }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, - "requires": { - "entities": "^4.4.0" - } - }, - "parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", - "dev": true, - "requires": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true - }, - "pascal-case": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz", - "integrity": "sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==", - "dev": true, - "requires": { - "camel-case": "^3.0.0", - "upper-case-first": "^1.1.0" - } - }, - "path-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", - "integrity": "sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "dev": true - }, - "preferred-pm": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.0.3.tgz", - "integrity": "sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==", - "dev": true, - "requires": { - "find-up": "^5.0.0", - "find-yarn-workspace-root2": "1.2.16", - "path-exists": "^4.0.0", - "which-pm": "2.0.0" - }, - "dependencies": { - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - } - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", - "dev": true - }, - "prettier-plugin-solidity": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.3.tgz", - "integrity": "sha512-fQ9yucPi2sBbA2U2Xjh6m4isUTJ7S7QLc/XDDsktqqxYfTwdYKJ0EnnywXHwCGAaYbQNK+HIYPL1OemxuMsgeg==", - "dev": true, - "requires": { - "@solidity-parser/parser": "^0.16.0", - "semver": "^7.3.8", - "solidity-comments-extractor": "^0.0.7" - }, - "dependencies": { - "@solidity-parser/parser": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.0.tgz", - "integrity": "sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - } - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "promise": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", - "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", - "dev": true, - "requires": { - "asap": "~2.0.6" - } - }, - "proper-lockfile": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", - "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "retry": "^0.12.0", - "signal-exit": "^3.0.2" - } - }, - "proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "requires": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true - }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==", - "dev": true - }, - "pure-rand": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.5.tgz", - "integrity": "sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw==", - "dev": true - }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true - }, - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true - }, - "raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dev": true, - "requires": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "dependencies": { - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - } - } - }, - "read-yaml-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", - "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.5", - "js-yaml": "^3.6.1", - "pify": "^4.0.1", - "strip-bom": "^3.0.0" - } - }, - "readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "recursive-readdir": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", - "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", - "dev": true, - "requires": { - "minimatch": "^3.0.5" - } - }, - "redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, - "requires": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - }, - "dependencies": { - "strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "requires": { - "min-indent": "^1.0.0" - } - } - } - }, - "regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "dev": true - }, - "regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" - } - }, - "req-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", - "integrity": "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==", - "dev": true, - "requires": { - "req-from": "^2.0.0" - } - }, - "req-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", - "integrity": "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", - "dev": true - } - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - } - } - }, - "request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", - "dev": true, - "requires": { - "lodash": "^4.17.19" - } - }, - "request-promise-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", - "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", - "dev": true, - "requires": { - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true - }, - "require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q==", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", - "dev": true, - "requires": { - "lowercase-keys": "^2.0.0" - }, - "dependencies": { - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - } - } - }, - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "ripemd160-min": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/ripemd160-min/-/ripemd160-min-0.0.6.tgz", - "integrity": "sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==", - "dev": true - }, - "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, - "requires": { - "bn.js": "^5.2.0" - }, - "dependencies": { - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - } - } - }, - "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, - "requires": { - "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-array-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", - "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - } - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "sc-istanbul": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", - "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", - "dev": true - }, - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", - "dev": true - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true - }, - "secp256k1": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", - "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", - "dev": true, - "requires": { - "elliptic": "^6.5.4", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - } - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } - } - }, - "sentence-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz", - "integrity": "sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case-first": "^1.1.2" - } - }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - } - }, - "servify": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", - "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", - "dev": true, - "requires": { - "body-parser": "^1.16.0", - "cors": "^2.8.1", - "express": "^4.14.0", - "request": "^2.79.0", - "xhr": "^2.3.3" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true - }, - "setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "sha1": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", - "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", - "dev": true, - "requires": { - "charenc": ">= 0.0.1", - "crypt": ">= 0.0.1" - } - }, - "sha3": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", - "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", - "dev": true, - "requires": { - "buffer": "6.0.3" - }, - "dependencies": { - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - } - } - }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "dependencies": { - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true - }, - "simple-get": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.2.tgz", - "integrity": "sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==", - "dev": true, - "requires": { - "decompress-response": "^3.3.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - }, - "dependencies": { - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - } - } - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.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" - } - }, - "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 - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - } - } - }, - "smartwrap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/smartwrap/-/smartwrap-2.0.2.tgz", - "integrity": "sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==", - "dev": true, - "requires": { - "array.prototype.flat": "^1.2.3", - "breakword": "^1.0.5", - "grapheme-splitter": "^1.0.4", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1", - "yargs": "^15.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "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" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.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 - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - } - } - }, - "snake-case": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz", - "integrity": "sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "solc": { - "version": "0.4.26", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz", - "integrity": "sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA==", - "dev": true, - "requires": { - "fs-extra": "^0.30.0", - "memorystream": "^0.3.1", - "require-from-string": "^1.1.0", - "semver": "^5.3.0", - "yargs": "^4.7.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "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" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "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" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==", - "dev": true - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", - "dev": true - }, - "yargs": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", - "integrity": "sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA==", - "dev": true, - "requires": { - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "lodash.assign": "^4.0.3", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.1", - "which-module": "^1.0.0", - "window-size": "^0.2.0", - "y18n": "^3.2.1", - "yargs-parser": "^2.4.1" - } - }, - "yargs-parser": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", - "integrity": "sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA==", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "lodash.assign": "^4.0.6" - } - } - } - }, - "solhint": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.4.1.tgz", - "integrity": "sha512-pzZn2RlZhws1XwvLPVSsxfHrwsteFf5eySOhpAytzXwKQYbTCJV6z8EevYDiSVKMpWrvbKpEtJ055CuEmzp4Xg==", - "dev": true, - "requires": { - "@solidity-parser/parser": "^0.16.0", - "ajv": "^6.12.6", - "antlr4": "^4.11.0", - "ast-parents": "^0.0.1", - "chalk": "^4.1.2", - "commander": "^10.0.0", - "cosmiconfig": "^8.0.0", - "fast-diff": "^1.2.0", - "glob": "^8.0.3", - "ignore": "^5.2.4", - "js-yaml": "^4.1.0", - "lodash": "^4.17.21", - "pluralize": "^8.0.0", - "prettier": "^2.8.3", - "semver": "^6.3.0", - "strip-ansi": "^6.0.1", - "table": "^6.8.1", - "text-table": "^0.2.0" - }, - "dependencies": { - "@solidity-parser/parser": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.0.tgz", - "integrity": "sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "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" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "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 - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "optional": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "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" - } - } - } - }, - "solhint-plugin-openzeppelin": { - "version": "file:scripts/solhint-custom" - }, - "solidity-ast": { - "version": "0.4.50", - "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.50.tgz", - "integrity": "sha512-WpIhaUibbjcBY4bg8TO2UXFWl8PQPhtH1QtMYJUqFUGxx0rRiEFsVLV+ow8XiWEnSPeu4xPp1/K43P4esxuK1Q==", - "dev": true, - "requires": { - "array.prototype.findlast": "^1.2.2" - } - }, - "solidity-comments": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments/-/solidity-comments-0.0.2.tgz", - "integrity": "sha512-G+aK6qtyUfkn1guS8uzqUeua1dURwPlcOjoTYW/TwmXAcE7z/1+oGCfZUdMSe4ZMKklNbVZNiG5ibnF8gkkFfw==", - "dev": true, - "requires": { - "solidity-comments-darwin-arm64": "0.0.2", - "solidity-comments-darwin-x64": "0.0.2", - "solidity-comments-freebsd-x64": "0.0.2", - "solidity-comments-linux-arm64-gnu": "0.0.2", - "solidity-comments-linux-arm64-musl": "0.0.2", - "solidity-comments-linux-x64-gnu": "0.0.2", - "solidity-comments-linux-x64-musl": "0.0.2", - "solidity-comments-win32-arm64-msvc": "0.0.2", - "solidity-comments-win32-ia32-msvc": "0.0.2", - "solidity-comments-win32-x64-msvc": "0.0.2" - } - }, - "solidity-comments-darwin-arm64": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-darwin-arm64/-/solidity-comments-darwin-arm64-0.0.2.tgz", - "integrity": "sha512-HidWkVLSh7v+Vu0CA7oI21GWP/ZY7ro8g8OmIxE8oTqyMwgMbE8F1yc58Sj682Hj199HCZsjmtn1BE4PCbLiGA==", - "dev": true, - "optional": true - }, - "solidity-comments-darwin-x64": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-darwin-x64/-/solidity-comments-darwin-x64-0.0.2.tgz", - "integrity": "sha512-Zjs0Ruz6faBTPT6fBecUt6qh4CdloT8Bwoc0+qxRoTn9UhYscmbPQkUgQEbS0FQPysYqVzzxJB4h1Ofbf4wwtA==", - "dev": true, - "optional": true - }, - "solidity-comments-extractor": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz", - "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==", - "dev": true - }, - "solidity-comments-freebsd-x64": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-freebsd-x64/-/solidity-comments-freebsd-x64-0.0.2.tgz", - "integrity": "sha512-8Qe4mpjuAxFSwZJVk7B8gAoLCdbtS412bQzBwk63L8dmlHogvE39iT70aAk3RHUddAppT5RMBunlPUCFYJ3ZTw==", - "dev": true, - "optional": true - }, - "solidity-comments-linux-arm64-gnu": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-gnu/-/solidity-comments-linux-arm64-gnu-0.0.2.tgz", - "integrity": "sha512-spkb0MZZnmrP+Wtq4UxP+nyPAVRe82idOjqndolcNR0S9Xvu4ebwq+LvF4HiUgjTDmeiqYiFZQ8T9KGdLSIoIg==", - "dev": true, - "optional": true - }, - "solidity-comments-linux-arm64-musl": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-musl/-/solidity-comments-linux-arm64-musl-0.0.2.tgz", - "integrity": "sha512-guCDbHArcjE+JDXYkxx5RZzY1YF6OnAKCo+sTC5fstyW/KGKaQJNPyBNWuwYsQiaEHpvhW1ha537IvlGek8GqA==", - "dev": true, - "optional": true - }, - "solidity-comments-linux-x64-gnu": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-gnu/-/solidity-comments-linux-x64-gnu-0.0.2.tgz", - "integrity": "sha512-zIqLehBK/g7tvrFmQljrfZXfkEeLt2v6wbe+uFu6kH/qAHZa7ybt8Vc0wYcmjo2U0PeBm15d79ee3AkwbIjFdQ==", - "dev": true, - "optional": true - }, - "solidity-comments-linux-x64-musl": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-musl/-/solidity-comments-linux-x64-musl-0.0.2.tgz", - "integrity": "sha512-R9FeDloVlFGTaVkOlELDVC7+1Tjx5WBPI5L8r0AGOPHK3+jOcRh6sKYpI+VskSPDc3vOO46INkpDgUXrKydlIw==", - "dev": true, - "optional": true - }, - "solidity-comments-win32-arm64-msvc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-win32-arm64-msvc/-/solidity-comments-win32-arm64-msvc-0.0.2.tgz", - "integrity": "sha512-QnWJoCQcJj+rnutULOihN9bixOtYWDdF5Rfz9fpHejL1BtNjdLW1om55XNVHGAHPqBxV4aeQQ6OirKnp9zKsug==", - "dev": true, - "optional": true - }, - "solidity-comments-win32-ia32-msvc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-win32-ia32-msvc/-/solidity-comments-win32-ia32-msvc-0.0.2.tgz", - "integrity": "sha512-vUg4nADtm/NcOtlIymG23NWJUSuMsvX15nU7ynhGBsdKtt8xhdP3C/zA6vjDk8Jg+FXGQL6IHVQ++g/7rSQi0w==", - "dev": true, - "optional": true - }, - "solidity-comments-win32-x64-msvc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-win32-x64-msvc/-/solidity-comments-win32-x64-msvc-0.0.2.tgz", - "integrity": "sha512-36j+KUF4V/y0t3qatHm/LF5sCUCBx2UndxE1kq5bOzh/s+nQgatuyB+Pd5BfuPQHdWu2KaExYe20FlAa6NL7+Q==", - "dev": true, - "optional": true - }, - "solidity-coverage": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.4.tgz", - "integrity": "sha512-xeHOfBOjdMF6hWTbt42iH4x+7j1Atmrf5OldDPMxI+i/COdExUxszOswD9qqvcBTaLGiOrrpnh9UZjSpt4rBsg==", - "dev": true, - "requires": { - "@ethersproject/abi": "^5.0.9", - "@solidity-parser/parser": "^0.16.0", - "chalk": "^2.4.2", - "death": "^1.1.0", - "detect-port": "^1.3.0", - "difflib": "^0.2.4", - "fs-extra": "^8.1.0", - "ghost-testrpc": "^0.0.2", - "global-modules": "^2.0.0", - "globby": "^10.0.1", - "jsonschema": "^1.2.4", - "lodash": "^4.17.15", - "mocha": "7.1.2", - "node-emoji": "^1.10.0", - "pify": "^4.0.1", - "recursive-readdir": "^2.2.2", - "sc-istanbul": "^0.4.5", - "semver": "^7.3.4", - "shelljs": "^0.8.3", - "web3-utils": "^1.3.6" - }, - "dependencies": { - "@solidity-parser/parser": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", - "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" - } - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mocha": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", - "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "dependencies": { - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true - }, - "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "requires": { - "picomatch": "^2.0.4" - } - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - } - } + "node_modules/tty-table/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" } }, - "solidity-docgen": { - "version": "0.6.0-beta.35", - "resolved": "https://registry.npmjs.org/solidity-docgen/-/solidity-docgen-0.6.0-beta.35.tgz", - "integrity": "sha512-9QdwK1THk/MWIdq1PEW/6dvtND0pUqpFTsbKwwU9YQIMYuRhH1lek9SsgnsGGYtdJ0VTrXXcVT30q20a8Y610A==", + "node_modules/tty-table/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, - "requires": { - "handlebars": "^4.7.7", - "solidity-ast": "^0.4.38" + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", + "node_modules/tty-table/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, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "node_modules/tty-table/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/tty-table/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, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "engines": { + "node": ">=8" } }, - "spawndamnit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", - "integrity": "sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==", + "node_modules/tty-table/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "requires": { - "cross-spawn": "^5.1.0", - "signal-exit": "^3.0.2" - }, "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - } + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "node_modules/tty-table/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, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" } }, - "spdx-license-ids": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", "dev": true }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "node_modules/tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", "dev": true }, - "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, "dependencies": { - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - } + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" } }, - "stacktrace-parser": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", - "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "requires": { - "type-fest": "^0.7.1" + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, "dependencies": { - "type-fest": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", - "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", - "dev": true - } + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" } }, - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", - "dev": true + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "stream-transform": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-2.1.3.tgz", - "integrity": "sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==", + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", "dev": true, - "requires": { - "mixme": "^0.5.1" + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "dev": true + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==", + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", "dev": true }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, - "requires": { - "safe-buffer": "~5.2.0" + "dependencies": { + "is-typedarray": "^1.0.0" } }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" } }, - "string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - } + "node_modules/ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true }, - "string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "node_modules/underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "dev": true + }, + "node_modules/undici": { + "version": "5.25.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.25.1.tgz", + "integrity": "sha512-nTw6b2G2OqP6btYPyghCgV4hSwjJlL/78FMJatVLCa3otj6PCOQSt6dVtYt82OtNqFz8XsnJ+vsXLADPXjPhqw==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "dependencies": { + "busboy": "^1.6.0" + }, + "engines": { + "node": ">=14.0" } }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, - "requires": { - "ansi-regex": "^3.0.0" + "engines": { + "node": ">= 4.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true - }, - "strip-hex-prefix": { + "node_modules/unpipe": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true, - "requires": { - "is-hex-prefixed": "1.0.0" + "engines": { + "node": ">= 0.8" } }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "node_modules/upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "swap-case": { + "node_modules/upper-case-first": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz", - "integrity": "sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==", + "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz", + "integrity": "sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==", "dev": true, - "requires": { - "lower-case": "^1.1.1", + "dependencies": { "upper-case": "^1.1.1" } }, - "swarm-js": { - "version": "0.1.42", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.42.tgz", - "integrity": "sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ==", + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "requires": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^11.8.5", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request": "^1.0.1" - }, "dependencies": { - "@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "dev": true, - "requires": { - "defer-to-connect": "^2.0.0" - } - }, - "cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", - "dev": true - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "got": { - "version": "11.8.6", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", - "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", - "dev": true, - "requires": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - } - }, - "http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", - "dev": true, - "requires": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - }, - "p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", - "dev": true - }, - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true - } - } - }, - "sync-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", - "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", - "dev": true, - "requires": { - "http-response-object": "^3.0.1", - "sync-rpc": "^1.2.1", - "then-request": "^6.0.0" + "punycode": "^2.1.0" } }, - "sync-rpc": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", - "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", - "dev": true, - "requires": { - "get-port": "^3.1.0" - } + "node_modules/url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==", + "dev": true }, - "table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, + "hasInstallScript": true, "dependencies": { - "ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" } }, - "tar": { - "version": "4.4.19", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", - "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", + "dev": true + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", "dev": true, - "requires": { - "chownr": "^1.1.4", - "fs-minipass": "^1.2.7", - "minipass": "^2.9.0", - "minizlib": "^1.3.3", - "mkdirp": "^0.5.5", - "safe-buffer": "^5.2.1", - "yallist": "^3.1.1" + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" } }, - "term-size": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", - "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", - "dev": true - }, - "testrpc": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/testrpc/-/testrpc-0.0.1.tgz", - "integrity": "sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA==", + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } }, - "then-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", - "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, - "requires": { - "@types/concat-stream": "^1.6.0", - "@types/form-data": "0.0.33", - "@types/node": "^8.0.0", - "@types/qs": "^6.2.31", - "caseless": "~0.12.0", - "concat-stream": "^1.6.0", - "form-data": "^2.2.0", - "http-basic": "^8.1.1", - "http-response-object": "^3.0.1", - "promise": "^8.0.0", - "qs": "^6.4.0" - }, "dependencies": { - "@types/node": { - "version": "8.10.66", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", - "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", - "dev": true - } + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", + "node_modules/varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", "dev": true }, - "title-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", - "integrity": "sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==", + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.0.3" + "engines": { + "node": ">= 0.8" } }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" } }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "dev": true, - "requires": { - "is-number": "^7.0.0" + "dependencies": { + "defaults": "^1.0.3" } }, - "toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "node_modules/web3": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.2.tgz", + "integrity": "sha512-DAtZ3a3ruPziE80uZ3Ob0YDZxt6Vk2un/F5BcBrxO70owJ9Z1Y2+loZmbh1MoAmoLGjA/SUSHeUtid3fYmBaog==", "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, + "hasInstallScript": true, "dependencies": { - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true - } + "web3-bzz": "1.10.2", + "web3-core": "1.10.2", + "web3-eth": "1.10.2", + "web3-eth-personal": "1.10.2", + "web3-net": "1.10.2", + "web3-shh": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "treeify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", - "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", - "dev": true + "node_modules/web3-bzz": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.2.tgz", + "integrity": "sha512-vLOfDCj6198Qc7esDrCKeFA/M3ZLbowsaHQ0hIL4NmIHoq7lU8aSRTa5AI+JBh8cKN1gVryJsuW2ZCc5bM4I4Q==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@types/node": "^12.12.6", + "got": "12.1.0", + "swarm-js": "^0.1.40" + }, + "engines": { + "node": ">=8.0.0" + } }, - "trim-newlines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", - "dev": true + "node_modules/web3-core": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.2.tgz", + "integrity": "sha512-qTn2UmtE8tvwMRsC5pXVdHxrQ4uZ6jiLgF5DRUVtdi7dPUmX18Dp9uxKfIfhGcA011EAn8P6+X7r3pvi2YRxBw==", + "dev": true, + "dependencies": { + "@types/bn.js": "^5.1.1", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.10.2", + "web3-core-method": "1.10.2", + "web3-core-requestmanager": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" + } }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "node_modules/web3-core-helpers": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.0.tgz", + "integrity": "sha512-pIxAzFDS5vnbXvfvLSpaA1tfRykAe9adw43YCKsEYQwH0gCLL0kMLkaCX3q+Q8EVmAh+e1jWL/nl9U0de1+++g==", + "dev": true, + "dependencies": { + "web3-eth-iban": "1.10.0", + "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" + } }, - "tsort": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", - "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", + "node_modules/web3-core-helpers/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, - "tty-table": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/tty-table/-/tty-table-4.2.1.tgz", - "integrity": "sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g==", + "node_modules/web3-core-helpers/node_modules/web3-utils": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", + "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", "dev": true, - "requires": { - "chalk": "^4.1.2", - "csv": "^5.5.3", - "kleur": "^4.1.5", - "smartwrap": "^2.0.2", - "strip-ansi": "^6.0.1", - "wcwidth": "^1.0.1", - "yargs": "^17.7.1" - }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "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 - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "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" - } - } + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereumjs-util": "^7.1.0", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "node_modules/web3-core-method": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.2.tgz", + "integrity": "sha512-gG6ES+LOuo01MJHML4gnEt702M8lcPGMYZoX8UjZzmEebGrPYOY9XccpCrsFgCeKgQzM12SVnlwwpMod1+lcLg==", "dev": true, - "requires": { - "safe-buffer": "^5.0.1" + "dependencies": { + "@ethersproject/transactions": "^5.6.2", + "web3-core-helpers": "1.10.2", + "web3-core-promievent": "1.10.2", + "web3-core-subscriptions": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "dev": true - }, - "tweetnacl-util": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", - "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", - "dev": true - }, - "type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "node_modules/web3-core-method/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "node_modules/web3-core-method/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", "dev": true, - "requires": { - "prelude-ls": "^1.2.1" + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true + "node_modules/web3-core-method/node_modules/web3-core-promievent": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.2.tgz", + "integrity": "sha512-Qkkb1dCDOU8dZeORkcwJBQRAX+mdsjx8LqFBB+P4W9QgwMqyJ6LXda+y1XgyeEVeKEmY1RCeTq9Y94q1v62Sfw==", + "dev": true, + "dependencies": { + "eventemitter3": "4.0.4" + }, + "engines": { + "node": ">=8.0.0" + } }, - "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 + "node_modules/web3-core-method/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "dev": true, + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" + } }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "node_modules/web3-core-promievent": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.0.tgz", + "integrity": "sha512-68N7k5LWL5R38xRaKFrTFT2pm2jBNFaM4GioS00YjAKXRQ3KjmhijOMG3TICz6Aa5+6GDWYelDNx21YAeZ4YTg==", "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" + "dependencies": { + "eventemitter3": "4.0.4" + }, + "engines": { + "node": ">=8.0.0" } }, - "typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "node_modules/web3-core-requestmanager": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.2.tgz", + "integrity": "sha512-nlLeNJUu6fR+ZbJr2k9Du/nN3VWwB4AJPY4r6nxUODAmykgJq57T21cLP/BEk6mbiFQYGE9TrrPhh4qWxQEtAw==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "dependencies": { + "util": "^0.12.5", + "web3-core-helpers": "1.10.2", + "web3-providers-http": "1.10.2", + "web3-providers-ipc": "1.10.2", + "web3-providers-ws": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "node_modules/web3-core-requestmanager/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "node_modules/web3-core-requestmanager/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "dev": true, + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-requestmanager/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", "dev": true, - "requires": { - "is-typedarray": "^1.0.0" + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "node_modules/web3-core-subscriptions": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.2.tgz", + "integrity": "sha512-MiWcKjz4tco793EPPPLc/YOJmYUV3zAfxeQH/UVTfBejMfnNvmfwKa2SBKfPIvKQHz/xI5bV2TF15uvJEucU7w==", "dev": true, - "optional": true + "dependencies": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" + } }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "node_modules/web3-core-subscriptions/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, - "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "node_modules/web3-core-subscriptions/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true - }, - "undici": { - "version": "5.22.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz", - "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==", + "node_modules/web3-core-subscriptions/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", "dev": true, - "requires": { - "busboy": "^1.6.0" + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true + "node_modules/web3-core/node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "dev": true, + "engines": { + "node": "*" + } }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "node_modules/web3-core/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==", - "dev": true + "node_modules/web3-core/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "dev": true, + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" + } }, - "upper-case-first": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz", - "integrity": "sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==", + "node_modules/web3-core/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", "dev": true, - "requires": { - "upper-case": "^1.1.1" + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "node_modules/web3-eth": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.2.tgz", + "integrity": "sha512-s38rhrntyhGShmXC4R/aQtfkpcmev9c7iZwgb9CDIBFo7K8nrEJvqIOyajeZTxnDIiGzTJmrHxiKSadii5qTRg==", "dev": true, - "requires": { - "punycode": "^2.1.0" + "dependencies": { + "web3-core": "1.10.2", + "web3-core-helpers": "1.10.2", + "web3-core-method": "1.10.2", + "web3-core-subscriptions": "1.10.2", + "web3-eth-abi": "1.10.2", + "web3-eth-accounts": "1.10.2", + "web3-eth-contract": "1.10.2", + "web3-eth-ens": "1.10.2", + "web3-eth-iban": "1.10.2", + "web3-eth-personal": "1.10.2", + "web3-net": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "url-set-query": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==", - "dev": true + "node_modules/web3-eth-abi": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.2.tgz", + "integrity": "sha512-pY4fQUio7W7ZRSLf+vsYkaxJqaT/jHcALZjIxy+uBQaYAJ3t6zpQqMZkJB3Dw7HUODRJ1yI0NPEFGTnkYf/17A==", + "dev": true, + "dependencies": { + "@ethersproject/abi": "^5.6.3", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" + } }, - "utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "node_modules/web3-eth-accounts": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.2.tgz", + "integrity": "sha512-6/HhCBYAXN/f553/SyxS9gY62NbLgpD1zJpENcvRTDpJN3Znvli1cmpl5Q3ZIUJkvHnG//48EWfWh0cbb3fbKQ==", "dev": true, - "requires": { - "node-gyp-build": "^4.3.0" + "dependencies": { + "@ethereumjs/common": "2.5.0", + "@ethereumjs/tx": "3.3.2", + "@ethereumjs/util": "^8.1.0", + "eth-lib": "0.2.8", + "scrypt-js": "^3.0.1", + "uuid": "^9.0.0", + "web3-core": "1.10.2", + "web3-core-helpers": "1.10.2", + "web3-core-method": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", - "dev": true + "node_modules/web3-eth-accounts/node_modules/eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } }, - "util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "node_modules/web3-eth-accounts/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", "dev": true, - "requires": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" } }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "node_modules/web3-eth-accounts/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "dev": true, + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" + } }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true + "node_modules/web3-eth-accounts/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "dev": true, + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" + } }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "node_modules/web3-eth-accounts/node_modules/web3-eth-iban/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "node_modules/web3-eth-contract": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.2.tgz", + "integrity": "sha512-CZLKPQRmupP/+OZ5A/CBwWWkBiz5B/foOpARz0upMh1yjb0dEud4YzRW2gJaeNu0eGxDLsWVaXhUimJVGYprQw==", "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "dependencies": { + "@types/bn.js": "^5.1.1", + "web3-core": "1.10.2", + "web3-core-helpers": "1.10.2", + "web3-core-method": "1.10.2", + "web3-core-promievent": "1.10.2", + "web3-core-subscriptions": "1.10.2", + "web3-eth-abi": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "node_modules/web3-eth-contract/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "node_modules/web3-eth-contract/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "node_modules/web3-eth-contract/node_modules/web3-core-promievent": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.2.tgz", + "integrity": "sha512-Qkkb1dCDOU8dZeORkcwJBQRAX+mdsjx8LqFBB+P4W9QgwMqyJ6LXda+y1XgyeEVeKEmY1RCeTq9Y94q1v62Sfw==", "dev": true, - "requires": { - "defaults": "^1.0.3" + "dependencies": { + "eventemitter3": "4.0.4" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.0.tgz", - "integrity": "sha512-YfKY9wSkGcM8seO+daR89oVTcbu18NsVfvOngzqMYGUU0pPSQmE57qQDvQzUeoIOHAnXEBNzrhjQJmm8ER0rng==", + "node_modules/web3-eth-contract/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", "dev": true, - "requires": { - "web3-bzz": "1.10.0", - "web3-core": "1.10.0", - "web3-eth": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-shh": "1.10.0", - "web3-utils": "1.10.0" + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-bzz": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.0.tgz", - "integrity": "sha512-o9IR59io3pDUsXTsps5pO5hW1D5zBmg46iNc2t4j2DkaYHNdDLwk2IP9ukoM2wg47QILfPEJYzhTfkS/CcX0KA==", + "node_modules/web3-eth-ens": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.2.tgz", + "integrity": "sha512-kTQ42UdNHy4BQJHgWe97bHNMkc3zCMBKKY7t636XOMxdI/lkRdIjdE5nQzt97VjQvSVasgIWYKRAtd8aRaiZiQ==", "dev": true, - "requires": { - "@types/node": "^12.12.6", - "got": "12.1.0", - "swarm-js": "^0.1.40" + "dependencies": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "web3-core": "1.10.2", + "web3-core-helpers": "1.10.2", + "web3-core-promievent": "1.10.2", + "web3-eth-abi": "1.10.2", + "web3-eth-contract": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.0.tgz", - "integrity": "sha512-fWySwqy2hn3TL89w5TM8wXF1Z2Q6frQTKHWmP0ppRQorEK8NcHJRfeMiv/mQlSKoTS1F6n/nv2uyZsixFycjYQ==", + "node_modules/web3-eth-ens/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-eth-ens/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", "dev": true, - "requires": { - "@types/bn.js": "^5.1.1", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-requestmanager": "1.10.0", - "web3-utils": "1.10.0" + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-ens/node_modules/web3-core-promievent": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.2.tgz", + "integrity": "sha512-Qkkb1dCDOU8dZeORkcwJBQRAX+mdsjx8LqFBB+P4W9QgwMqyJ6LXda+y1XgyeEVeKEmY1RCeTq9Y94q1v62Sfw==", + "dev": true, "dependencies": { - "bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", - "dev": true - } + "eventemitter3": "4.0.4" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-core-helpers": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.0.tgz", - "integrity": "sha512-pIxAzFDS5vnbXvfvLSpaA1tfRykAe9adw43YCKsEYQwH0gCLL0kMLkaCX3q+Q8EVmAh+e1jWL/nl9U0de1+++g==", + "node_modules/web3-eth-ens/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", "dev": true, - "requires": { - "web3-eth-iban": "1.10.0", - "web3-utils": "1.10.0" + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-core-method": { + "node_modules/web3-eth-iban": { "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.0.tgz", - "integrity": "sha512-4R700jTLAMKDMhQ+nsVfIXvH6IGJlJzGisIfMKWAIswH31h5AZz7uDUW2YctI+HrYd+5uOAlS4OJeeT9bIpvkA==", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.0.tgz", + "integrity": "sha512-0l+SP3IGhInw7Q20LY3IVafYEuufo4Dn75jAHT7c2aDJsIolvf2Lc6ugHkBajlwUneGfbRQs/ccYPQ9JeMUbrg==", "dev": true, - "requires": { - "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", + "dependencies": { + "bn.js": "^5.2.1", "web3-utils": "1.10.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-core-promievent": { + "node_modules/web3-eth-iban/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-eth-iban/node_modules/web3-utils": { "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.0.tgz", - "integrity": "sha512-68N7k5LWL5R38xRaKFrTFT2pm2jBNFaM4GioS00YjAKXRQ3KjmhijOMG3TICz6Aa5+6GDWYelDNx21YAeZ4YTg==", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", + "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", "dev": true, - "requires": { - "eventemitter3": "4.0.4" + "dependencies": { + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereumjs-util": "^7.1.0", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-core-requestmanager": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.0.tgz", - "integrity": "sha512-3z/JKE++Os62APml4dvBM+GAuId4h3L9ckUrj7ebEtS2AR0ixyQPbrBodgL91Sv7j7cQ3Y+hllaluqjguxvSaQ==", + "node_modules/web3-eth-personal": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.2.tgz", + "integrity": "sha512-+vEbJsPUJc5J683y0c2aN645vXC+gPVlFVCQu4IjPvXzJrAtUfz26+IZ6AUOth4fDJPT0f1uSLS5W2yrUdw9BQ==", "dev": true, - "requires": { - "util": "^0.12.5", - "web3-core-helpers": "1.10.0", - "web3-providers-http": "1.10.0", - "web3-providers-ipc": "1.10.0", - "web3-providers-ws": "1.10.0" + "dependencies": { + "@types/node": "^12.12.6", + "web3-core": "1.10.2", + "web3-core-helpers": "1.10.2", + "web3-core-method": "1.10.2", + "web3-net": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-core-subscriptions": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.0.tgz", - "integrity": "sha512-HGm1PbDqsxejI075gxBc5OSkwymilRWZufIy9zEpnWKNmfbuv5FfHgW1/chtJP6aP3Uq2vHkvTDl3smQBb8l+g==", + "node_modules/web3-eth-personal/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-eth-personal/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0" + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-eth": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.0.tgz", - "integrity": "sha512-Z5vT6slNMLPKuwRyKGbqeGYC87OAy8bOblaqRTgg94CXcn/mmqU7iPIlG4506YdcdK3x6cfEDG7B6w+jRxypKA==", + "node_modules/web3-eth-personal/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", "dev": true, - "requires": { - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-accounts": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-eth-ens": "1.10.0", - "web3-eth-iban": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-eth-abi": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.0.tgz", - "integrity": "sha512-cwS+qRBWpJ43aI9L3JS88QYPfFcSJJ3XapxOQ4j40v6mk7ATpA8CVK1vGTzpihNlOfMVRBkR95oAj7oL6aiDOg==", + "node_modules/web3-eth/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-eth/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", "dev": true, - "requires": { - "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.0" + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-eth-accounts": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.0.tgz", - "integrity": "sha512-wiq39Uc3mOI8rw24wE2n15hboLE0E9BsQLdlmsL4Zua9diDS6B5abXG0XhFcoNsXIGMWXVZz4TOq3u4EdpXF/Q==", + "node_modules/web3-eth/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", "dev": true, - "requires": { - "@ethereumjs/common": "2.5.0", - "@ethereumjs/tx": "3.3.2", - "eth-lib": "0.2.8", - "ethereumjs-util": "^7.1.5", - "scrypt-js": "^3.0.1", - "uuid": "^9.0.0", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.2" }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-net": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.2.tgz", + "integrity": "sha512-w9i1t2z7dItagfskhaCKwpp6W3ylUR88gs68u820y5f8yfK5EbPmHc6c2lD8X9ZrTnmDoeOpIRCN/RFPtZCp+g==", + "dev": true, "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", - "dev": true - } + "web3-core": "1.10.2", + "web3-core-method": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-eth-contract": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.0.tgz", - "integrity": "sha512-MIC5FOzP/+2evDksQQ/dpcXhSqa/2hFNytdl/x61IeWxhh6vlFeSjq0YVTAyIzdjwnL7nEmZpjfI6y6/Ufhy7w==", + "node_modules/web3-providers-http": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.2.tgz", + "integrity": "sha512-G8abKtpkyKGpRVKvfjIF3I4O/epHP7mxXWN8mNMQLkQj1cjMFiZBZ13f+qI77lNJN7QOf6+LtNdKrhsTGU72TA==", "dev": true, - "requires": { - "@types/bn.js": "^5.1.1", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-utils": "1.10.0" + "dependencies": { + "abortcontroller-polyfill": "^1.7.5", + "cross-fetch": "^4.0.0", + "es6-promise": "^4.2.8", + "web3-core-helpers": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-eth-ens": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.0.tgz", - "integrity": "sha512-3hpGgzX3qjgxNAmqdrC2YUQMTfnZbs4GeLEmy8aCWziVwogbuqQZ+Gzdfrym45eOZodk+lmXyLuAdqkNlvkc1g==", + "node_modules/web3-providers-http/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-providers-http/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", "dev": true, - "requires": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-utils": "1.10.0" + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-eth-iban": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.0.tgz", - "integrity": "sha512-0l+SP3IGhInw7Q20LY3IVafYEuufo4Dn75jAHT7c2aDJsIolvf2Lc6ugHkBajlwUneGfbRQs/ccYPQ9JeMUbrg==", + "node_modules/web3-providers-http/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", "dev": true, - "requires": { + "dependencies": { "bn.js": "^5.2.1", - "web3-utils": "1.10.0" + "web3-utils": "1.10.2" }, - "dependencies": { - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - } + "engines": { + "node": ">=8.0.0" } }, - "web3-eth-personal": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.0.tgz", - "integrity": "sha512-anseKn98w/d703eWq52uNuZi7GhQeVjTC5/svrBWEKob0WZ5kPdo+EZoFN0sp5a5ubbrk/E0xSl1/M5yORMtpg==", + "node_modules/web3-providers-ipc": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.2.tgz", + "integrity": "sha512-lWbn6c+SgvhLymU8u4Ea/WOVC0Gqs7OJUvauejWz+iLycxeF0xFNyXnHVAi42ZJDPVI3vnfZotafoxcNNL7Sug==", "dev": true, - "requires": { - "@types/node": "^12.12.6", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" + "dependencies": { + "oboe": "2.1.5", + "web3-core-helpers": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-net": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.0.tgz", - "integrity": "sha512-NLH/N3IshYWASpxk4/18Ge6n60GEvWBVeM8inx2dmZJVmRI6SJIlUxbL8jySgiTn3MMZlhbdvrGo8fpUW7a1GA==", + "node_modules/web3-providers-ipc/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-providers-ipc/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", "dev": true, - "requires": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-providers-http": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.0.tgz", - "integrity": "sha512-eNr965YB8a9mLiNrkjAWNAPXgmQWfpBfkkn7tpEFlghfww0u3I0tktMZiaToJVcL2+Xq+81cxbkpeWJ5XQDwOA==", + "node_modules/web3-providers-ipc/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", "dev": true, - "requires": { - "abortcontroller-polyfill": "^1.7.3", - "cross-fetch": "^3.1.4", - "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.0" + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-providers-ipc": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.0.tgz", - "integrity": "sha512-OfXG1aWN8L1OUqppshzq8YISkWrYHaATW9H8eh0p89TlWMc1KZOL9vttBuaBEi96D/n0eYDn2trzt22bqHWfXA==", + "node_modules/web3-providers-ws": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.2.tgz", + "integrity": "sha512-3nYSiP6grI5GvpkSoehctSywfCTodU21VY8bUtXyFHK/IVfDooNtMpd5lVIMvXVAlaxwwrCfjebokaJtKH2Iag==", "dev": true, - "requires": { - "oboe": "2.1.5", - "web3-core-helpers": "1.10.0" + "dependencies": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.10.2", + "websocket": "^1.0.32" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-providers-ws": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.0.tgz", - "integrity": "sha512-sK0fNcglW36yD5xjnjtSGBnEtf59cbw4vZzJ+CmOWIKGIR96mP5l684g0WD0Eo+f4NQc2anWWXG74lRc9OVMCQ==", + "node_modules/web3-providers-ws/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-providers-ws/node_modules/web3-core-helpers": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", + "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "dev": true, + "dependencies": { + "web3-eth-iban": "1.10.2", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-providers-ws/node_modules/web3-eth-iban": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", + "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0", - "websocket": "^1.0.32" + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-shh": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.0.tgz", - "integrity": "sha512-uNUUuNsO2AjX41GJARV9zJibs11eq6HtOe6Wr0FtRUcj8SN6nHeYIzwstAvJ4fXA53gRqFMTxdntHEt9aXVjpg==", + "node_modules/web3-shh": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.2.tgz", + "integrity": "sha512-UP0Kc3pHv9uULFu0+LOVfPwKBSJ6B+sJ5KflF7NyBk6TvNRxlpF3hUhuaVDCjjB/dDUR6T0EQeg25FA2uzJbag==", "dev": true, - "requires": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-net": "1.10.0" + "hasInstallScript": true, + "dependencies": { + "web3-core": "1.10.2", + "web3-core-method": "1.10.2", + "web3-core-subscriptions": "1.10.2", + "web3-net": "1.10.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", + "node_modules/web3-utils": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.2.tgz", + "integrity": "sha512-TdApdzdse5YR+5GCX/b/vQnhhbj1KSAtfrDtRW7YS0kcWp1gkJsN62gw6GzCaNTeXookB7UrLtmDUuMv65qgow==", "dev": true, - "requires": { + "dependencies": { + "@ethereumjs/util": "^8.1.0", "bn.js": "^5.2.1", "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", + "ethereum-cryptography": "^2.1.2", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", "randombytes": "^2.1.0", "utf8": "3.0.0" }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-utils/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-utils/node_modules/ethereum-cryptography": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", + "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", + "dev": true, "dependencies": { - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - } + "@noble/curves": "1.1.0", + "@noble/hashes": "1.3.1", + "@scure/bip32": "1.3.1", + "@scure/bip39": "1.2.1" } }, - "webidl-conversions": { + "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, - "websocket": { + "node_modules/websocket": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", "dev": true, - "requires": { + "dependencies": { "bufferutil": "^4.0.1", "debug": "^2.2.0", "es5-ext": "^0.10.50", @@ -27089,219 +16765,380 @@ "utf-8-validate": "^5.0.2", "yaeti": "^0.0.6" }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/websocket/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - } + "ms": "2.0.0" } }, - "whatwg-url": { + "node_modules/websocket/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, - "requires": { + "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, - "which": { + "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "requires": { + "dependencies": { "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "which-boxed-primitive": { + "node_modules/which-boxed-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, - "requires": { + "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", "is-number-object": "^1.0.4", "is-string": "^1.0.5", "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "which-module": { + "node_modules/which-module": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", "dev": true }, - "which-pm": { + "node_modules/which-pm": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.0.0.tgz", "integrity": "sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==", "dev": true, - "requires": { + "dependencies": { "load-yaml-file": "^0.2.0", "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8.15" } }, - "which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "node_modules/which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", "dev": true, - "requires": { + "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw==", + "dev": true, + "bin": { + "window-size": "cli.js" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true + }, + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/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/wrap-ansi-cjs/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/wrap-ansi-cjs/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/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "window-size": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw==", - "dev": true - }, - "word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", - "dev": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "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" - } - }, - "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 - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "ws": { + "node_modules/ws": { "version": "7.5.9", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "dev": true, - "requires": {} + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } }, - "xhr": { + "node_modules/xhr": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", "dev": true, - "requires": { + "dependencies": { "global": "~4.4.0", "is-function": "^1.0.1", "parse-headers": "^2.0.0", "xtend": "^4.0.0" } }, - "xhr-request": { + "node_modules/xhr-request": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", "dev": true, - "requires": { + "dependencies": { "buffer-to-arraybuffer": "^0.0.5", "object-assign": "^4.1.1", "query-string": "^5.0.1", @@ -27311,51 +17148,63 @@ "xhr": "^2.0.4" } }, - "xhr-request-promise": { + "node_modules/xhr-request-promise": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", "dev": true, - "requires": { + "dependencies": { "xhr-request": "^1.1.0" } }, - "xmlhttprequest": { + "node_modules/xmlhttprequest": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", "integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.4.0" + } }, - "xtend": { + "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.4" + } }, - "y18n": { + "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true + "dev": true, + "engines": { + "node": ">=10" + } }, - "yaeti": { + "node_modules/yaeti": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.32" + } }, - "yallist": { + "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "yargs": { + "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "requires": { + "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", @@ -27364,101 +17213,147 @@ "y18n": "^5.0.5", "yargs-parser": "^21.1.1" }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true - } + "engines": { + "node": ">=12" } }, - "yargs-parser": { + "node_modules/yargs-parser": { "version": "18.1.3", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, - "requires": { + "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - } + "engines": { + "node": ">=6" } }, - "yargs-unparser": { + "node_modules/yargs-parser/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs-unparser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "requires": { + "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - } + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" } }, - "yocto-queue": { + "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "scripts/solhint-custom": { + "name": "solhint-plugin-openzeppelin", "dev": true } } diff --git a/package.json b/package.json index cdb65dbf7..2ccca9e0e 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "eth-sig-util": "^3.0.0", "ethereumjs-util": "^7.0.7", "ethereumjs-wallet": "^1.0.1", - "glob": "^8.0.3", + "glob": "^10.3.5", "graphlib": "^2.1.8", "hardhat": "^2.9.1", "hardhat-exposed": "^0.3.11", @@ -81,7 +81,7 @@ "p-limit": "^3.1.0", "prettier": "^3.0.0", "prettier-plugin-solidity": "^1.1.0", - "rimraf": "^3.0.2", + "rimraf": "^5.0.1", "semver": "^7.3.5", "solhint": "^3.3.6", "solhint-plugin-openzeppelin": "file:scripts/solhint-custom", diff --git a/scripts/checks/extract-layout.js b/scripts/checks/extract-layout.js index d0c9cf36b..d0b99653a 100644 --- a/scripts/checks/extract-layout.js +++ b/scripts/checks/extract-layout.js @@ -1,7 +1,5 @@ const fs = require('fs'); -const { findAll } = require('solidity-ast/utils'); -const { astDereferencer } = require('@openzeppelin/upgrades-core/dist/ast-dereferencer'); -const { solcInputOutputDecoder } = require('@openzeppelin/upgrades-core/dist/src-decoder'); +const { findAll, astDereferencer, srcDecoder } = require('solidity-ast/utils'); const { extractStorageLayout } = require('@openzeppelin/upgrades-core/dist/storage/extract'); const { _ } = require('yargs').argv; @@ -13,7 +11,7 @@ function extractLayouts(path) { const layout = {}; const { input, output } = JSON.parse(fs.readFileSync(path)); - const decoder = solcInputOutputDecoder(input, output); + const decoder = srcDecoder(input, output); const deref = astDereferencer(output); for (const src in output.contracts) { From ce7e6042a8cb522ef6598778fe4b9483c8bc6d00 Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 21 Sep 2023 22:25:08 -0300 Subject: [PATCH 064/167] Add version to custom Solhint plugin --- scripts/solhint-custom/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/solhint-custom/package.json b/scripts/solhint-custom/package.json index d91e327a4..075eb929d 100644 --- a/scripts/solhint-custom/package.json +++ b/scripts/solhint-custom/package.json @@ -1,4 +1,5 @@ { "name": "solhint-plugin-openzeppelin", + "version": "0.0.0", "private": true } From bd4169bb15588ade629fa75302c80f0f1818c795 Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 21 Sep 2023 22:57:34 -0300 Subject: [PATCH 065/167] Update solidity-coverage (#4623) --- package-lock.json | 445 +--------------------------------------------- package.json | 2 +- 2 files changed, 6 insertions(+), 441 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1fd5230af..f668e9d28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "solhint": "^3.3.6", "solhint-plugin-openzeppelin": "file:scripts/solhint-custom", "solidity-ast": "^0.4.50", - "solidity-coverage": "^0.8.0", + "solidity-coverage": "^0.8.5", "solidity-docgen": "^0.6.0-beta.29", "undici": "^5.22.1", "web3": "^1.3.0", @@ -14012,9 +14012,9 @@ } }, "node_modules/solidity-coverage": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.4.tgz", - "integrity": "sha512-xeHOfBOjdMF6hWTbt42iH4x+7j1Atmrf5OldDPMxI+i/COdExUxszOswD9qqvcBTaLGiOrrpnh9UZjSpt4rBsg==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.5.tgz", + "integrity": "sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ==", "dev": true, "dependencies": { "@ethersproject/abi": "^5.0.9", @@ -14029,7 +14029,7 @@ "globby": "^10.0.1", "jsonschema": "^1.2.4", "lodash": "^4.17.15", - "mocha": "7.1.2", + "mocha": "10.2.0", "node-emoji": "^1.10.0", "pify": "^4.0.1", "recursive-readdir": "^2.2.2", @@ -14054,114 +14054,6 @@ "antlr4ts": "^0.5.0-alpha.4" } }, - "node_modules/solidity-coverage/node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.1.1" - } - }, - "node_modules/solidity-coverage/node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/solidity-coverage/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/solidity-coverage/node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/solidity-coverage/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/solidity-coverage/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "dependencies": { - "is-buffer": "~2.0.3" - }, - "bin": { - "flat": "cli.js" - } - }, "node_modules/solidity-coverage/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -14176,21 +14068,6 @@ "node": ">=6 <7 || >=8" } }, - "node_modules/solidity-coverage/node_modules/fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "deprecated": "\"Please update to latest v2.3 or v2.2\"", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/solidity-coverage/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -14230,318 +14107,6 @@ "node": ">=8" } }, - "node_modules/solidity-coverage/node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/solidity-coverage/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "dependencies": { - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/solidity-coverage/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/solidity-coverage/node_modules/mocha": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", - "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", - "dev": true, - "dependencies": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/solidity-coverage/node_modules/mocha/node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/solidity-coverage/node_modules/mocha/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/solidity-coverage/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "node_modules/solidity-coverage/node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/solidity-coverage/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/solidity-coverage/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/solidity-coverage/node_modules/readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "dependencies": { - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/solidity-coverage/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solidity-coverage/node_modules/supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/solidity-coverage/node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/solidity-coverage/node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/solidity-coverage/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/solidity-coverage/node_modules/yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/solidity-docgen": { "version": "0.6.0-beta.36", "resolved": "https://registry.npmjs.org/solidity-docgen/-/solidity-docgen-0.6.0-beta.36.tgz", diff --git a/package.json b/package.json index 2ccca9e0e..e6804c4cd 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "solhint": "^3.3.6", "solhint-plugin-openzeppelin": "file:scripts/solhint-custom", "solidity-ast": "^0.4.50", - "solidity-coverage": "^0.8.0", + "solidity-coverage": "^0.8.5", "solidity-docgen": "^0.6.0-beta.29", "undici": "^5.22.1", "web3": "^1.3.0", From 33ceb2320c6ebd987933aabb1b7095b9bb12902b Mon Sep 17 00:00:00 2001 From: Vittorio Minacori Date: Wed, 27 Sep 2023 10:12:37 +0200 Subject: [PATCH 066/167] Fix typo in tests (#4625) --- test/utils/introspection/SupportsInterface.behavior.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/utils/introspection/SupportsInterface.behavior.js b/test/utils/introspection/SupportsInterface.behavior.js index 49a30e755..7ef2c533f 100644 --- a/test/utils/introspection/SupportsInterface.behavior.js +++ b/test/utils/introspection/SupportsInterface.behavior.js @@ -114,7 +114,7 @@ function shouldSupportInterfaces(interfaces = []) { }); describe('when the interfaceId is not supported', function () { - it('uses less thank 30k', async function () { + it('uses less than 30k', async function () { expect(await this.contractUnderTest.supportsInterface.estimateGas(INVALID_ID)).to.be.lte(30000); }); From 2472e51e80e581a90370cfd59d6bba6a12bfdf52 Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 28 Sep 2023 12:54:44 -0300 Subject: [PATCH 067/167] Improve documentation about backwards compatibility (#4627) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hadrien Croubois Co-authored-by: Ernesto García --- README.md | 5 +- RELEASING.md | 2 - docs/modules/ROOT/nav.adoc | 2 +- .../ROOT/pages/backwards-compatibility.adoc | 48 +++++++++++ docs/modules/ROOT/pages/index.adoc | 4 +- .../ROOT/pages/releases-stability.adoc | 85 ------------------- scripts/upgradeable/upgradeable.patch | 36 ++++---- 7 files changed, 72 insertions(+), 110 deletions(-) create mode 100644 docs/modules/ROOT/pages/backwards-compatibility.adoc delete mode 100644 docs/modules/ROOT/pages/releases-stability.adoc diff --git a/README.md b/README.md index 6446c4f7e..53c29e5f8 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,9 @@ :building_construction: **Want to scale your decentralized application?** Check out [OpenZeppelin Defender](https://openzeppelin.com/defender) — a secure platform for automating and monitoring your operations. +> [!IMPORTANT] +> OpenZeppelin Contracts uses semantic versioning to communicate backwards compatibility of its API and storage layout. For upgradeable contracts, the storage layout of different major versions should be assumed incompatible, for example, it is unsafe to upgrade from 4.9.3 to 5.0.0. Learn more at [Backwards Compatibility](https://docs.openzeppelin.com/contracts/backwards-compatibility). + ## Overview ### Installation @@ -30,8 +33,6 @@ $ npm install @openzeppelin/contracts ``` -OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/contracts/releases-stability#api-stability), which means that your contracts won't break unexpectedly when upgrading to a newer minor version. - #### Foundry (git) > **Warning** When installing via git, it is a common error to use the `master` branch. This is a development branch that should be avoided in favor of tagged releases. The release process involves security measures that the `master` branch does not guarantee. diff --git a/RELEASING.md b/RELEASING.md index 0318f6338..06dd218e8 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,7 +1,5 @@ # Releasing -> Visit the documentation for [details about release schedule](https://docs.openzeppelin.com/contracts/releases-stability). - OpenZeppelin Contracts uses a fully automated release process that takes care of compiling, packaging, and publishing the library, all of which is carried out in a clean CI environment (GitHub Actions), implemented in the ([`release-cycle`](.github/workflows/release-cycle.yml)) workflow. This helps to reduce the potential for human error and inconsistencies, and ensures that the release process is ongoing and reliable. ## Changesets diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index fc38e8953..918c60a95 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -3,7 +3,7 @@ * xref:extending-contracts.adoc[Extending Contracts] * xref:upgradeable.adoc[Using with Upgrades] -* xref:releases-stability.adoc[Releases & Stability] +* xref:backwards-compatibility.adoc[Backwards Compatibility] * xref:access-control.adoc[Access Control] diff --git a/docs/modules/ROOT/pages/backwards-compatibility.adoc b/docs/modules/ROOT/pages/backwards-compatibility.adoc new file mode 100644 index 000000000..3737a9962 --- /dev/null +++ b/docs/modules/ROOT/pages/backwards-compatibility.adoc @@ -0,0 +1,48 @@ += Backwards Compatibility +:page-aliases: releases-stability.adoc + +OpenZeppelin Contracts uses semantic versioning to communicate backwards compatibility of its API and storage layout. Patch and minor updates will generally be backwards compatible, with rare exceptions as detailed below. Major updates should be assumed incompatible with previous releases. On this page, we provide details about these guarantees. + +== API + +In backwards compatible releases, all changes should be either additions or modifications to internal implementation details. Most code should continue to compile and behave as expected. The exceptions to this rule are listed below. + +=== Security + +Infrequently a patch or minor update will remove or change an API in a breaking way, but only if the previous API is considered insecure. These breaking changes will be noted in the changelog and release notes, and published along with a security advisory. + +=== Draft or Pre-Final ERCs + +ERCs that are not Final can change in incompatible ways. For this reason, we avoid shipping implementations of ERCs before they are Final. Some exceptions are made for ERCs that have been published for a long time and that seem unlikely to change. Breaking changes to the ERC specification are still technically possible in those cases, so these implementations are published in files named `draft-*.sol` to make that condition explicit. + +=== Virtual & Overrides + +Almost all functions in this library are virtual with some exceptions, but this does not mean that overrides are encouraged. There is a subset of functions that are designed to be overridden. By defining overrides outside of this subset you are potentially relying on internal implementation details. We make efforts to preserve backwards compatibility even in these cases but it is extremely difficult and easy to accidentally break. Caution is advised. + +Additionally, some minor updates may result in new compilation errors of the kind "two or more base classes define function with same name and parameter types" or "need to specify overridden contract", due to what Solidity considers ambiguity in inherited functions. This should be resolved by adding an override that invokes the function via `super`. + +See xref:extending-contracts.adoc[Extending Contracts] for more about virtual and overrides. + +=== Structs + +Struct members with an underscore prefix should be considered "private" and may break in minor versions. Struct data should only be accessed and modified through library functions. + +=== Errors + +The specific error format and data that is included with reverts should not be assumed stable unless otherwise specified. + +=== Major Releases + +Major releases should be assumed incompatible. Nevertheless, the external interfaces of contracts will remain compatible if they are standardized, or if the maintainers judge that changing them would cause significant strain on the ecosystem. + +An important aspect that major releases may break is "upgrade compatibility", in particular storage layout compatibility. It will never be safe for a live contract to upgrade from one major release to another. + +== Storage Layout + +Minor and patch updates always preserve storage layout compatibility. This means that a live contract can be upgraded from one minor to another without corrupting the storage layout. In some cases it may be necessary to initialize new state variables when upgrading, although we expect this to be infrequent. + +We recommend using xref:upgrades-plugins::index.adoc[OpenZeppelin Upgrades Plugins or CLI] to ensure storage layout safety of upgrades. + +== Solidity Version + +The minimum Solidity version required to compile the contracts will remain unchanged in minor and patch updates. New contracts introduced in minor releases may make use of newer Solidity features and require a more recent version of the compiler. diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index 905ce231d..b1e68e955 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -6,6 +6,8 @@ * Flexible xref:access-control.adoc[role-based permissioning] scheme. * Reusable xref:utilities.adoc[Solidity components] to build custom contracts and complex decentralized systems. +IMPORTANT: OpenZeppelin Contracts uses semantic versioning to communicate backwards compatibility of its API and storage layout. For upgradeable contracts, the storage layout of different major versions should be assumed incompatible, for example, it is unsafe to upgrade from 4.9.3 to 5.0.0. Learn more at xref:backwards-compatibility.adoc[Backwards Compatibility]. + == Overview [[install]] @@ -17,8 +19,6 @@ $ npm install @openzeppelin/contracts ``` -OpenZeppelin Contracts features a xref:releases-stability.adoc#api-stability[stable API], which means that your contracts won't break unexpectedly when upgrading to a newer minor version. - ==== Foundry (git) WARNING: When installing via git, it is a common error to use the `master` branch. This is a development branch that should be avoided in favor of tagged releases. The release process involves security measures that the `master` branch does not guarantee. diff --git a/docs/modules/ROOT/pages/releases-stability.adoc b/docs/modules/ROOT/pages/releases-stability.adoc deleted file mode 100644 index 9a3310377..000000000 --- a/docs/modules/ROOT/pages/releases-stability.adoc +++ /dev/null @@ -1,85 +0,0 @@ -= New Releases and API Stability - -Developing smart contracts is hard, and a conservative approach towards dependencies is sometimes favored. However, it is also very important to stay on top of new releases: these may include bug fixes, or deprecate old patterns in favor of newer and better practices. - -Here we describe when you should expect new releases to come out, and how this affects you as a user of OpenZeppelin Contracts. - -[[release-schedule]] -== Release Schedule - -OpenZeppelin Contracts follows a <>. - -We aim for a new minor release every 1 or 2 months. - -[[minor-releases]] -=== Release Candidates - -Before every release, we publish a feature-frozen release candidate. The purpose of the release candidate is to have a period where the community can review the new code before the actual release. If important problems are discovered, several more release candidates may be required. After a week of no more changes to the release candidate, the new version is published. - -[[major-releases]] -=== Major Releases - -After several months or a year, a new major release may come out. These are not scheduled, but will be based on the need to release breaking changes such as a redesign of a core feature of the library (e.g. https://github.com/OpenZeppelin/openzeppelin-contracts/pulls/2112[access control] in 3.0). Since we value stability, we aim for these to happen infrequently (expect no less than six months between majors). However, we may be forced to release one when there are big changes to the Solidity language. - -[[api-stability]] -== API Stability - -On the https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v2.0.0[OpenZeppelin Contracts 2.0 release], we committed ourselves to keeping a stable API. We aim to more precisely define what we understand by _stable_ and _API_ here, so users of the library can understand these guarantees and be confident their project won't break unexpectedly. - -In a nutshell, the API being stable means _if your project is working today, it will continue to do so after a minor upgrade_. New contracts and features will be added in minor releases, but only in a backwards compatible way. - -[[versioning-scheme]] -=== Versioning Scheme - -We follow https://semver.org/[SemVer], which means API breakage may occur between major releases (which <>). - -[[solidity-functions]] -=== Solidity Functions - -While the internal implementation of functions may change, their semantics and signature will remain the same. The domain of their arguments will not be less restrictive (e.g. if transferring a value of 0 is disallowed, it will remain disallowed), nor will general state restrictions be lifted (e.g. `whenPaused` modifiers). - -If new functions are added to a contract, it will be in a backwards-compatible way: their usage won't be mandatory, and they won't extend functionality in ways that may foreseeably break an application (e.g. https://github.com/OpenZeppelin/openzeppelin-contracts/issues/1512[an `internal` method may be added to make it easier to retrieve information that was already available]). - -[[internal]] -==== `internal` - -This extends not only to `external` and `public` functions, but also `internal` ones: many contracts are meant to be used by inheriting them (e.g. `Pausable`, `PullPayment`, `AccessControl`), and are therefore used by calling these functions. Similarly, since all OpenZeppelin Contracts state variables are `private`, they can only be accessed this way (e.g. to create new `ERC20` tokens, instead of manually modifying `totalSupply` and `balances`, `_mint` should be called). - -`private` functions have no guarantees on their behavior, usage, or existence. - -Finally, sometimes language limitations will force us to e.g. make `internal` a function that should be `private` in order to implement features the way we want to. These cases will be well documented, and the normal stability guarantees won't apply. - -[[libraries]] -=== Libraries - -Some of our Solidity libraries use ``struct``s to handle internal data that should not be accessed directly (e.g. `Counter`). There's an https://github.com/ethereum/solidity/issues/4637[open issue] in the Solidity repository requesting a language feature to prevent said access, but it looks like it won't be implemented any time soon. Because of this, we will use leading underscores and mark said `struct` s to make it clear to the user that its contents and layout are _not_ part of the API. - -[[events]] -=== Events - -No events will be removed, and their arguments won't be changed in any way. New events may be added in later versions, and existing events may be emitted under new, reasonable circumstances (e.g. https://github.com/OpenZeppelin/openzeppelin-contracts/issues/707[from 2.1 on, `ERC20` also emits `Approval` on `transferFrom` calls]). - -[[drafts]] -=== Drafts - -Some contracts implement EIPs that are still in Draft status, recognizable by a file name beginning with `draft-`, such as `utils/cryptography/draft-EIP712.sol`. Due to their nature as drafts, the details of these contracts may change and we cannot guarantee their stability. Minor releases of OpenZeppelin Contracts may contain breaking changes for the contracts labelled as Drafts, which will be duly announced in the https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md[changelog]. The EIPs included are used by projects in production and this may make them less likely to change significantly. - -[[gas-costs]] -=== Gas Costs - -While attempts will generally be made to lower the gas costs of working with OpenZeppelin Contracts, there are no guarantees regarding this. In particular, users should not assume gas costs will not increase when upgrading library versions. - -[[bugfixes]] -=== Bug Fixes - -The API stability guarantees may need to be broken in order to fix a bug, and we will do so. This decision won't be made lightly however, and all options will be explored to make the change as non-disruptive as possible. When sufficient, contracts or functions which may result in unsafe behavior will be deprecated instead of removed (e.g. https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1543[#1543] and https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1550[#1550]). - -[[solidity-compiler-version]] -=== Solidity Compiler Version - -Starting on version 0.5.0, the Solidity team switched to a faster release cycle, with minor releases every few weeks (v0.5.0 was released on November 2018, and v0.5.5 on March 2019), and major, breaking-change releases every couple of months (with v0.6.0 released on December 2019 and v0.7.0 on July 2020). Including the compiler version in OpenZeppelin Contract's stability guarantees would therefore force the library to either stick to old compilers, or release frequent major updates simply to keep up with newer Solidity releases. - -Because of this, *the minimum required Solidity compiler version is not part of the stability guarantees*, and users may be required to upgrade their compiler when using newer versions of Contracts. Bug fixes will still be backported to past major releases so that all versions currently in use receive these updates. - -You can read more about the rationale behind this, the other options we considered and why we went down this path https://github.com/OpenZeppelin/openzeppelin-contracts/issues/1498#issuecomment-449191611[here]. - diff --git a/scripts/upgradeable/upgradeable.patch b/scripts/upgradeable/upgradeable.patch index 125272a25..18384b94a 100644 --- a/scripts/upgradeable/upgradeable.patch +++ b/scripts/upgradeable/upgradeable.patch @@ -1,6 +1,6 @@ diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 -index 2797a088..00000000 +index 2797a0889..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,21 +0,0 @@ @@ -26,7 +26,7 @@ index 2797a088..00000000 - - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml -index 4018cef2..d343a53d 100644 +index 4018cef29..d343a53d8 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,8 @@ @@ -40,7 +40,7 @@ index 4018cef2..d343a53d 100644 about: Ask in the OpenZeppelin Forum diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 -index ff596b0c..00000000 +index ff596b0c3..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,14 +0,0 @@ @@ -59,20 +59,20 @@ index ff596b0c..00000000 - - diff --git a/README.md b/README.md -index 38197f3a..bc934d1c 100644 +index 53c29e5f8..666a667d3 100644 --- a/README.md +++ b/README.md -@@ -19,6 +19,9 @@ +@@ -23,6 +23,9 @@ + > [!IMPORTANT] + > OpenZeppelin Contracts uses semantic versioning to communicate backwards compatibility of its API and storage layout. For upgradeable contracts, the storage layout of different major versions should be assumed incompatible, for example, it is unsafe to upgrade from 4.9.3 to 5.0.0. Learn more at [Backwards Compatibility](https://docs.openzeppelin.com/contracts/backwards-compatibility). - :building_construction: **Want to scale your decentralized application?** Check out [OpenZeppelin Defender](https://openzeppelin.com/defender) — a secure platform for automating and monitoring your operations. - -+> **Note** -+> You are looking at the upgradeable variant of OpenZeppelin Contracts. Be sure to review the documentation on [Using OpenZeppelin Contracts with Upgrades](https://docs.openzeppelin.com/contracts/4.x/upgradeable). -+ +++> [!NOTE] +++> You are looking at the upgradeable variant of OpenZeppelin Contracts. Be sure to review the documentation on [Using OpenZeppelin Contracts with Upgrades](https://docs.openzeppelin.com/contracts/upgradeable). +++ ## Overview ### Installation -@@ -26,7 +29,7 @@ +@@ -30,7 +33,7 @@ #### Hardhat, Truffle (npm) ``` @@ -80,8 +80,8 @@ index 38197f3a..bc934d1c 100644 +$ npm install @openzeppelin/contracts-upgradeable ``` - OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/contracts/releases-stability#api-stability), which means that your contracts won't break unexpectedly when upgrading to a newer minor version. -@@ -38,10 +41,10 @@ OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/con + #### Foundry (git) +@@ -40,10 +43,10 @@ $ npm install @openzeppelin/contracts > **Warning** Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch. ``` @@ -94,7 +94,7 @@ index 38197f3a..bc934d1c 100644 ### Usage -@@ -50,10 +53,11 @@ Once installed, you can use the contracts in the library by importing them: +@@ -52,10 +55,11 @@ Once installed, you can use the contracts in the library by importing them: ```solidity pragma solidity ^0.8.20; @@ -110,7 +110,7 @@ index 38197f3a..bc934d1c 100644 } ``` diff --git a/contracts/package.json b/contracts/package.json -index df141192..1cf90ad1 100644 +index df141192d..1cf90ad14 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,5 +1,5 @@ @@ -130,7 +130,7 @@ index df141192..1cf90ad1 100644 "keywords": [ "solidity", diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol -index 3800804a..90c1db78 100644 +index 644f6f531..ab8ba05ff 100644 --- a/contracts/utils/cryptography/EIP712.sol +++ b/contracts/utils/cryptography/EIP712.sol @@ -4,7 +4,6 @@ @@ -297,7 +297,7 @@ index 3800804a..90c1db78 100644 } } diff --git a/package.json b/package.json -index ffa868ac..e254d962 100644 +index e6804c4cd..612ec513e 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ @@ -310,7 +310,7 @@ index ffa868ac..e254d962 100644 "keywords": [ "solidity", diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js -index 7ea535b7..32e3a370 100644 +index faf01f1a3..b25171a56 100644 --- a/test/utils/cryptography/EIP712.test.js +++ b/test/utils/cryptography/EIP712.test.js @@ -47,26 +47,6 @@ contract('EIP712', function (accounts) { From 57865f8b20cfa67963101dba382c65b265c16db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 28 Sep 2023 13:52:42 -0600 Subject: [PATCH 068/167] Add named return parameters and `_checkSelector` function to AccessManager (#4624) --- contracts/access/manager/AccessManaged.sol | 21 +++---- contracts/access/manager/AccessManager.sol | 61 +++++++++++++------ .../extensions/GovernorTimelockAccess.sol | 3 + contracts/mocks/AccessManagedTarget.sol | 5 ++ .../extensions/GovernorTimelockAccess.test.js | 15 ++++- 5 files changed, 75 insertions(+), 30 deletions(-) diff --git a/contracts/access/manager/AccessManaged.sol b/contracts/access/manager/AccessManaged.sol index c207c5e51..cbf9e0810 100644 --- a/contracts/access/manager/AccessManaged.sol +++ b/contracts/access/manager/AccessManaged.sol @@ -41,17 +41,15 @@ abstract contract AccessManaged is Context, IAccessManaged { * function at the bottom of the call stack, and not the function where the modifier is visible in the source code. * ==== * - * [NOTE] + * [WARNING] * ==== - * Selector collisions are mitigated by scoping permissions per contract, but some edge cases must be considered: + * Avoid adding this modifier to the https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`] + * function or the https://docs.soliditylang.org/en/v0.8.20/contracts.html#fallback-function[`fallback()`]. These + * functions are the only execution paths where a function selector cannot be unambiguosly determined from the calldata + * since the selector defaults to `0x00000000` in the `receive()` function and similarly in the `fallback()` function + * if no calldata is provided. (See {_checkCanCall}). * - * * If the https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`] function - * is restricted, any other function with a `0x00000000` selector will share permissions with `receive()`. - * * Similarly, if there's no `receive()` function but a `fallback()` instead, the fallback might be called with - * empty `calldata`, sharing the `0x00000000` selector permissions as well. - * * For any other selector, if the restricted function is set on an upgradeable contract, an upgrade may remove - * the restricted function and replace it with a new method whose selector replaces the last one, keeping the - * previous permissions. + * The `receive()` function will always panic whereas the `fallback()` may panic depending on the calldata length. * ==== */ modifier restricted() { @@ -99,14 +97,15 @@ abstract contract AccessManaged is Context, IAccessManaged { } /** - * @dev Reverts if the caller is not allowed to call the function identified by a selector. + * @dev Reverts if the caller is not allowed to call the function identified by a selector. Panics if the calldata + * is less than 4 bytes long. */ function _checkCanCall(address caller, bytes calldata data) internal virtual { (bool immediate, uint32 delay) = AuthorityUtils.canCallWithDelay( authority(), caller, address(this), - bytes4(data) + bytes4(data[0:4]) ); if (!immediate) { if (delay > 0) { diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 47dc47f73..31ef86c3f 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -130,7 +130,11 @@ contract AccessManager is Context, Multicall, IAccessManager { * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail * to identify the indirect workflow, and will consider calls that require a delay to be forbidden. */ - function canCall(address caller, address target, bytes4 selector) public view virtual returns (bool, uint32) { + function canCall( + address caller, + address target, + bytes4 selector + ) public view virtual returns (bool immediate, uint32 delay) { if (isTargetClosed(target)) { return (false, 0); } else if (caller == address(this)) { @@ -220,11 +224,14 @@ contract AccessManager is Context, Multicall, IAccessManager { * [2] Pending execution delay for the account. * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled. */ - function getAccess(uint64 roleId, address account) public view virtual returns (uint48, uint32, uint32, uint48) { + function getAccess( + uint64 roleId, + address account + ) public view virtual returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect) { Access storage access = _roles[roleId].members[account]; - uint48 since = access.since; - (uint32 currentDelay, uint32 pendingDelay, uint48 effect) = access.delay.getFull(); + since = access.since; + (currentDelay, pendingDelay, effect) = access.delay.getFull(); return (since, currentDelay, pendingDelay, effect); } @@ -233,7 +240,10 @@ contract AccessManager is Context, Multicall, IAccessManager { * @dev Check if a given account currently had the permission level corresponding to a given role. Note that this * permission might be associated with a delay. {getAccess} can provide more details. */ - function hasRole(uint64 roleId, address account) public view virtual returns (bool, uint32) { + function hasRole( + uint64 roleId, + address account + ) public view virtual returns (bool isMember, uint32 executionDelay) { if (roleId == PUBLIC_ROLE) { return (true, 0); } else { @@ -578,7 +588,7 @@ contract AccessManager is Context, Multicall, IAccessManager { // if call is not authorized, or if requested timing is too soon if ((!immediate && setback == 0) || (when > 0 && when < minWhen)) { - revert AccessManagerUnauthorizedCall(caller, target, bytes4(data[0:4])); + revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data)); } // Reuse variable due to stack too deep @@ -631,7 +641,7 @@ contract AccessManager is Context, Multicall, IAccessManager { // If caller is not authorised, revert if (!immediate && setback == 0) { - revert AccessManagerUnauthorizedCall(caller, target, bytes4(data)); + revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data)); } // If caller is authorised, check operation was scheduled early enough @@ -644,7 +654,7 @@ contract AccessManager is Context, Multicall, IAccessManager { // Mark the target and selector as authorised bytes32 executionIdBefore = _executionId; - _executionId = _hashExecutionId(target, bytes4(data)); + _executionId = _hashExecutionId(target, _checkSelector(data)); // Perform call Address.functionCallWithValue(target, data, msg.value); @@ -707,7 +717,7 @@ contract AccessManager is Context, Multicall, IAccessManager { */ function cancel(address caller, address target, bytes calldata data) public virtual returns (uint32) { address msgsender = _msgSender(); - bytes4 selector = bytes4(data[0:4]); + bytes4 selector = _checkSelector(data); bytes32 operationId = hashOperation(caller, target, data); if (_schedules[operationId].timepoint == 0) { @@ -779,13 +789,15 @@ contract AccessManager is Context, Multicall, IAccessManager { * - uint64: which role is this operation restricted to * - uint32: minimum delay to enforce for that operation (on top of the admin's execution delay) */ - function _getAdminRestrictions(bytes calldata data) private view returns (bool, uint64, uint32) { - bytes4 selector = bytes4(data); - + function _getAdminRestrictions( + bytes calldata data + ) private view returns (bool restricted, uint64 roleAdminId, uint32 executionDelay) { if (data.length < 4) { return (false, 0, 0); } + bytes4 selector = _checkSelector(data); + // Restricted to ADMIN with no delay beside any execution delay the caller may have if ( selector == this.labelRole.selector || @@ -813,8 +825,7 @@ contract AccessManager is Context, Multicall, IAccessManager { if (selector == this.grantRole.selector || selector == this.revokeRole.selector) { // First argument is a roleId. uint64 roleId = abi.decode(data[0x04:0x24], (uint64)); - uint64 roleAdminId = getRoleAdmin(roleId); - return (true, roleAdminId, 0); + return (true, getRoleAdmin(roleId), 0); } return (false, 0, 0); @@ -831,12 +842,15 @@ contract AccessManager is Context, Multicall, IAccessManager { * If immediate is true, the delay can be disregarded and the operation can be immediately executed. * If immediate is false, the operation can be executed if and only if delay is greater than 0. */ - function _canCallExtended(address caller, address target, bytes calldata data) private view returns (bool, uint32) { + function _canCallExtended( + address caller, + address target, + bytes calldata data + ) private view returns (bool immediate, uint32 delay) { if (target == address(this)) { return _canCallSelf(caller, data); } else { - bytes4 selector = bytes4(data); - return canCall(caller, target, selector); + return data.length < 4 ? (false, 0) : canCall(caller, target, _checkSelector(data)); } } @@ -844,10 +858,14 @@ contract AccessManager is Context, Multicall, IAccessManager { * @dev A version of {canCall} that checks for admin restrictions in this contract. */ function _canCallSelf(address caller, bytes calldata data) private view returns (bool immediate, uint32 delay) { + if (data.length < 4) { + return (false, 0); + } + if (caller == address(this)) { // Caller is AccessManager, this means the call was sent through {execute} and it already checked // permissions. We verify that the call "identifier", which is set during {execute}, is correct. - return (_isExecuting(address(this), bytes4(data)), 0); + return (_isExecuting(address(this), _checkSelector(data)), 0); } (bool enabled, uint64 roleId, uint32 operationDelay) = _getAdminRestrictions(data); @@ -878,4 +896,11 @@ contract AccessManager is Context, Multicall, IAccessManager { function _isExpired(uint48 timepoint) private view returns (bool) { return timepoint + expiration() <= Time.timestamp(); } + + /** + * @dev Extracts the selector from calldata. Panics if data is not at least 4 bytes + */ + function _checkSelector(bytes calldata data) private pure returns (bytes4) { + return bytes4(data[0:4]); + } } diff --git a/contracts/governance/extensions/GovernorTimelockAccess.sol b/contracts/governance/extensions/GovernorTimelockAccess.sol index 08e295c74..0c6dbeab2 100644 --- a/contracts/governance/extensions/GovernorTimelockAccess.sol +++ b/contracts/governance/extensions/GovernorTimelockAccess.sol @@ -191,6 +191,9 @@ abstract contract GovernorTimelockAccess is Governor { plan.length = SafeCast.toUint16(targets.length); for (uint256 i = 0; i < targets.length; ++i) { + if (calldatas[i].length < 4) { + continue; + } address target = targets[i]; bytes4 selector = bytes4(calldatas[i]); (bool immediate, uint32 delay) = AuthorityUtils.canCallWithDelay( diff --git a/contracts/mocks/AccessManagedTarget.sol b/contracts/mocks/AccessManagedTarget.sol index 305c989f6..0f7c7a193 100644 --- a/contracts/mocks/AccessManagedTarget.sol +++ b/contracts/mocks/AccessManagedTarget.sol @@ -7,6 +7,7 @@ import {AccessManaged} from "../access/manager/AccessManaged.sol"; abstract contract AccessManagedTarget is AccessManaged { event CalledRestricted(address caller); event CalledUnrestricted(address caller); + event CalledFallback(address caller); function fnRestricted() public restricted { emit CalledRestricted(msg.sender); @@ -15,4 +16,8 @@ abstract contract AccessManagedTarget is AccessManaged { function fnUnrestricted() public { emit CalledUnrestricted(msg.sender); } + + fallback() external { + emit CalledFallback(msg.sender); + } } diff --git a/test/governance/extensions/GovernorTimelockAccess.test.js b/test/governance/extensions/GovernorTimelockAccess.test.js index 59ddf6dac..9734a2f5c 100644 --- a/test/governance/extensions/GovernorTimelockAccess.test.js +++ b/test/governance/extensions/GovernorTimelockAccess.test.js @@ -84,6 +84,18 @@ contract('GovernorTimelockAccess', function (accounts) { this.unrestricted.operation.target, this.unrestricted.operation.data, ); + + this.fallback = {}; + this.fallback.operation = { + target: this.receiver.address, + value: '0', + data: '0x1234', + }; + this.fallback.operationId = hashOperation( + this.mock.address, + this.fallback.operation.target, + this.fallback.operation.data, + ); }); it('accepts ether transfers', async function () { @@ -180,7 +192,7 @@ contract('GovernorTimelockAccess', function (accounts) { await this.manager.grantRole(roleId, this.mock.address, managerDelay, { from: admin }); this.proposal = await this.helper.setProposal( - [this.restricted.operation, this.unrestricted.operation], + [this.restricted.operation, this.unrestricted.operation, this.fallback.operation], 'descr', ); @@ -209,6 +221,7 @@ contract('GovernorTimelockAccess', function (accounts) { }); await expectEvent.inTransaction(txExecute.tx, this.receiver, 'CalledRestricted'); await expectEvent.inTransaction(txExecute.tx, this.receiver, 'CalledUnrestricted'); + await expectEvent.inTransaction(txExecute.tx, this.receiver, 'CalledFallback'); }); describe('cancel', function () { From dee645e914c54bd5ede06a7c75c189d6fbb32694 Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 28 Sep 2023 16:58:08 -0300 Subject: [PATCH 069/167] Fix warning format in the readme (#4634) --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 53c29e5f8..549891e3f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> **Note** +> [!NOTE] > Version 5.0 is currently in release candidate period. Bug bounty rewards are boosted 50% until the release. > [See more details on Immunefi.](https://immunefi.com/bounty/openzeppelin/) @@ -35,9 +35,11 @@ $ npm install @openzeppelin/contracts #### Foundry (git) -> **Warning** When installing via git, it is a common error to use the `master` branch. This is a development branch that should be avoided in favor of tagged releases. The release process involves security measures that the `master` branch does not guarantee. +> [!WARNING] +> When installing via git, it is a common error to use the `master` branch. This is a development branch that should be avoided in favor of tagged releases. The release process involves security measures that the `master` branch does not guarantee. -> **Warning** Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch. +> [!WARNING] +> Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch. ``` $ forge install OpenZeppelin/openzeppelin-contracts From 970a7184ad16ae070eefaf9e9434ce0aba826b3a Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 28 Sep 2023 18:29:50 -0300 Subject: [PATCH 070/167] Add changesets for #4624 (#4635) --- .changeset/dull-ghosts-sip.md | 6 ++++++ .changeset/purple-squids-attend.md | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 .changeset/dull-ghosts-sip.md create mode 100644 .changeset/purple-squids-attend.md diff --git a/.changeset/dull-ghosts-sip.md b/.changeset/dull-ghosts-sip.md new file mode 100644 index 000000000..6c362332e --- /dev/null +++ b/.changeset/dull-ghosts-sip.md @@ -0,0 +1,6 @@ +--- +'openzeppelin-solidity': patch +--- + +`AccessManager`, `AccessManaged`, `GovernorTimelockAccess`: Ensure that calldata shorter than 4 bytes is not padded to 4 bytes. +pr: #4624 diff --git a/.changeset/purple-squids-attend.md b/.changeset/purple-squids-attend.md new file mode 100644 index 000000000..7a13c7b93 --- /dev/null +++ b/.changeset/purple-squids-attend.md @@ -0,0 +1,6 @@ +--- +'openzeppelin-solidity': patch +--- + +`AccessManager`: Use named return parameters in functions that return multiple values. +pr: #4624 From 58463a9823d2165379a1d6d25a86cc086aeb058f Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 28 Sep 2023 18:31:49 -0300 Subject: [PATCH 071/167] Enable partial transpilation for upgradeable package (#4628) Co-authored-by: Hadrien Croubois --- .changeset/grumpy-poets-rush.md | 5 + .github/actions/setup/action.yml | 2 - .github/workflows/checks.yml | 3 + contracts/mocks/Stateless.sol | 36 +++++++ contracts/package.json | 2 +- contracts/proxy/utils/UUPSUpgradeable.sol | 2 + .../token/ERC1155/utils/ERC1155Holder.sol | 2 + contracts/token/ERC721/utils/ERC721Holder.sol | 2 + contracts/utils/Context.sol | 2 + contracts/utils/Multicall.sol | 2 + contracts/utils/introspection/ERC165.sol | 2 + hardhat.config.js | 1 + package-lock.json | 97 ++++++++++++++++++- package.json | 6 +- scripts/prepack.sh | 17 +++- scripts/prepare-contracts-package.sh | 15 --- scripts/prepare.sh | 10 -- scripts/remove-ignored-artifacts.js | 2 +- scripts/upgradeable/transpile.sh | 9 +- scripts/upgradeable/upgradeable.patch | 24 +++-- 20 files changed, 192 insertions(+), 49 deletions(-) create mode 100644 .changeset/grumpy-poets-rush.md create mode 100644 contracts/mocks/Stateless.sol delete mode 100755 scripts/prepare-contracts-package.sh delete mode 100755 scripts/prepare.sh diff --git a/.changeset/grumpy-poets-rush.md b/.changeset/grumpy-poets-rush.md new file mode 100644 index 000000000..e566a10fe --- /dev/null +++ b/.changeset/grumpy-poets-rush.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': major +--- + +Upgradeable Contracts: No longer transpile interfaces, libraries, and stateless contracts. diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 84ebe823a..3154e9931 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -15,5 +15,3 @@ runs: run: npm ci shell: bash if: steps.cache.outputs.cache-hit != 'true' - env: - SKIP_COMPILE: true diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 3d9b199fb..3e7cba120 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -56,6 +56,9 @@ jobs: fetch-depth: 0 # Include history so patch conflicts are resolved automatically - name: Set up environment uses: ./.github/actions/setup + - name: Copy non-upgradeable contracts as dependency + run: + cp -rnT contracts node_modules/@openzeppelin/contracts - name: Transpile to upgradeable run: bash scripts/upgradeable/transpile.sh - name: Run tests diff --git a/contracts/mocks/Stateless.sol b/contracts/mocks/Stateless.sol new file mode 100644 index 000000000..56f5b4c66 --- /dev/null +++ b/contracts/mocks/Stateless.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +// We keep these imports and a dummy contract just to we can run the test suite after transpilation. + +import {Address} from "../utils/Address.sol"; +import {Arrays} from "../utils/Arrays.sol"; +import {AuthorityUtils} from "../access/manager/AuthorityUtils.sol"; +import {Base64} from "../utils/Base64.sol"; +import {BitMaps} from "../utils/structs/BitMaps.sol"; +import {Checkpoints} from "../utils/structs/Checkpoints.sol"; +import {Clones} from "../proxy/Clones.sol"; +import {Create2} from "../utils/Create2.sol"; +import {DoubleEndedQueue} from "../utils/structs/DoubleEndedQueue.sol"; +import {ECDSA} from "../utils/cryptography/ECDSA.sol"; +import {EnumerableMap} from "../utils/structs/EnumerableMap.sol"; +import {EnumerableSet} from "../utils/structs/EnumerableSet.sol"; +import {ERC1155Holder} from "../token/ERC1155/utils/ERC1155Holder.sol"; +import {ERC165} from "../utils/introspection/ERC165.sol"; +import {ERC165Checker} from "../utils/introspection/ERC165Checker.sol"; +import {ERC1967Utils} from "../proxy/ERC1967/ERC1967Utils.sol"; +import {ERC721Holder} from "../token/ERC721/utils/ERC721Holder.sol"; +import {Math} from "../utils/math/Math.sol"; +import {MerkleProof} from "../utils/cryptography/MerkleProof.sol"; +import {MessageHashUtils} from "../utils/cryptography/MessageHashUtils.sol"; +import {SafeCast} from "../utils/math/SafeCast.sol"; +import {SafeERC20} from "../token/ERC20/utils/SafeERC20.sol"; +import {ShortStrings} from "../utils/ShortStrings.sol"; +import {SignatureChecker} from "../utils/cryptography/SignatureChecker.sol"; +import {SignedMath} from "../utils/math/SignedMath.sol"; +import {StorageSlot} from "../utils/StorageSlot.sol"; +import {Strings} from "../utils/Strings.sol"; +import {Time} from "../utils/types/Time.sol"; + +contract Dummy1234 {} diff --git a/contracts/package.json b/contracts/package.json index df141192d..9017953ca 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -8,7 +8,7 @@ "!/mocks/**/*" ], "scripts": { - "prepare": "bash ../scripts/prepare-contracts-package.sh", + "prepack": "bash ../scripts/prepack.sh", "prepare-docs": "cd ..; npm run prepare-docs" }, "repository": { diff --git a/contracts/proxy/utils/UUPSUpgradeable.sol b/contracts/proxy/utils/UUPSUpgradeable.sol index f08e61c1e..045d6a326 100644 --- a/contracts/proxy/utils/UUPSUpgradeable.sol +++ b/contracts/proxy/utils/UUPSUpgradeable.sol @@ -15,6 +15,8 @@ import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol"; * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. + * + * @custom:stateless */ abstract contract UUPSUpgradeable is IERC1822Proxiable { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable diff --git a/contracts/token/ERC1155/utils/ERC1155Holder.sol b/contracts/token/ERC1155/utils/ERC1155Holder.sol index 7c8d470e0..6f353aa59 100644 --- a/contracts/token/ERC1155/utils/ERC1155Holder.sol +++ b/contracts/token/ERC1155/utils/ERC1155Holder.sol @@ -11,6 +11,8 @@ import {IERC1155Receiver} from "../IERC1155Receiver.sol"; * * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be * stuck. + * + * @custom:stateless */ abstract contract ERC1155Holder is ERC165, IERC1155Receiver { /** diff --git a/contracts/token/ERC721/utils/ERC721Holder.sol b/contracts/token/ERC721/utils/ERC721Holder.sol index 4ffd16146..a7c4b03b5 100644 --- a/contracts/token/ERC721/utils/ERC721Holder.sol +++ b/contracts/token/ERC721/utils/ERC721Holder.sol @@ -11,6 +11,8 @@ import {IERC721Receiver} from "../IERC721Receiver.sol"; * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or * {IERC721-setApprovalForAll}. + * + * @custom:stateless */ abstract contract ERC721Holder is IERC721Receiver { /** diff --git a/contracts/utils/Context.sol b/contracts/utils/Context.sol index 25e115925..8a74f2487 100644 --- a/contracts/utils/Context.sol +++ b/contracts/utils/Context.sol @@ -12,6 +12,8 @@ pragma solidity ^0.8.20; * is concerned). * * This contract is only required for intermediate, library-like contracts. + * + * @custom:stateless */ abstract contract Context { function _msgSender() internal view virtual returns (address) { diff --git a/contracts/utils/Multicall.sol b/contracts/utils/Multicall.sol index a9a3d3acf..aa23e635b 100644 --- a/contracts/utils/Multicall.sol +++ b/contracts/utils/Multicall.sol @@ -7,6 +7,8 @@ import {Address} from "./Address.sol"; /** * @dev Provides a function to batch together multiple calls in a single external call. + * + * @custom:stateless */ abstract contract Multicall { /** diff --git a/contracts/utils/introspection/ERC165.sol b/contracts/utils/introspection/ERC165.sol index 71c8e4a4f..1963a257d 100644 --- a/contracts/utils/introspection/ERC165.sol +++ b/contracts/utils/introspection/ERC165.sol @@ -16,6 +16,8 @@ import {IERC165} from "./IERC165.sol"; * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` + * + * @custom:stateless */ abstract contract ERC165 is IERC165 { /** diff --git a/hardhat.config.js b/hardhat.config.js index 1c87aac94..aca9d7273 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -93,6 +93,7 @@ module.exports = { }, }, exposed: { + imports: true, initializers: true, exclude: ['vendor/**/*'], }, diff --git a/package-lock.json b/package-lock.json index f668e9d28..b1b911815 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.4", "@openzeppelin/test-helpers": "^0.5.13", + "@openzeppelin/upgrade-safe-transpiler": "^0.3.30", "@openzeppelin/upgrades-core": "^1.20.6", "array.prototype.at": "^1.1.1", "chai": "^4.2.0", @@ -29,7 +30,7 @@ "glob": "^10.3.5", "graphlib": "^2.1.8", "hardhat": "^2.9.1", - "hardhat-exposed": "^0.3.11", + "hardhat-exposed": "^0.3.12-1", "hardhat-gas-reporter": "^1.0.4", "hardhat-ignore-warnings": "^0.2.0", "keccak256": "^1.0.2", @@ -2407,6 +2408,91 @@ "semver": "bin/semver" } }, + "node_modules/@openzeppelin/upgrade-safe-transpiler": { + "version": "0.3.30", + "resolved": "https://registry.npmjs.org/@openzeppelin/upgrade-safe-transpiler/-/upgrade-safe-transpiler-0.3.30.tgz", + "integrity": "sha512-nkJ4r+W+FUp0eAvE18uHh/smwD1NS3KLAGJ59+Vgmx3VlCvCDNaS0rTJ1FpwxDYD3J0Whx0ZVtHz2ySq4YsnNQ==", + "dev": true, + "dependencies": { + "ajv": "^8.0.0", + "compare-versions": "^6.0.0", + "ethereum-cryptography": "^2.0.0", + "lodash": "^4.17.20", + "minimatch": "^9.0.0", + "minimist": "^1.2.5", + "solidity-ast": "^0.4.51" + }, + "bin": { + "upgrade-safe-transpiler": "dist/cli.js" + } + }, + "node_modules/@openzeppelin/upgrade-safe-transpiler/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@openzeppelin/upgrade-safe-transpiler/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@openzeppelin/upgrade-safe-transpiler/node_modules/ethereum-cryptography": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", + "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", + "dev": true, + "dependencies": { + "@noble/curves": "1.1.0", + "@noble/hashes": "1.3.1", + "@scure/bip32": "1.3.1", + "@scure/bip39": "1.2.1" + } + }, + "node_modules/@openzeppelin/upgrade-safe-transpiler/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/@openzeppelin/upgrade-safe-transpiler/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@openzeppelin/upgrade-safe-transpiler/node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@openzeppelin/upgrades-core": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/@openzeppelin/upgrades-core/-/upgrades-core-1.29.0.tgz", @@ -8564,13 +8650,13 @@ } }, "node_modules/hardhat-exposed": { - "version": "0.3.12", - "resolved": "https://registry.npmjs.org/hardhat-exposed/-/hardhat-exposed-0.3.12.tgz", - "integrity": "sha512-op/shZ6YQcQzPzxT4h0oD3x7M6fBna2rM/YUuhZLzJOtsu/DF9xK2o2thPSR1LAz8enx3wbjJZxl7b2+QXyDYw==", + "version": "0.3.12-1", + "resolved": "https://registry.npmjs.org/hardhat-exposed/-/hardhat-exposed-0.3.12-1.tgz", + "integrity": "sha512-hDhh+wC6usu/OPT4v6hi+JdBxZJDgi6gVAw/45ApY7rgODCqpan7+8GuVwOtu0YK/9wPN9Y065MzAVFqJtylgA==", "dev": true, "dependencies": { "micromatch": "^4.0.4", - "solidity-ast": "^0.4.25" + "solidity-ast": "^0.4.52" }, "peerDependencies": { "hardhat": "^2.3.0" @@ -16919,6 +17005,7 @@ }, "scripts/solhint-custom": { "name": "solhint-plugin-openzeppelin", + "version": "0.0.0", "dev": true } } diff --git a/package.json b/package.json index e6804c4cd..3a1617c09 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "openzeppelin-solidity", "description": "Secure Smart Contract library for Solidity", "version": "4.9.2", + "private": true, "files": [ "/contracts/**/*.sol", - "/build/contracts/*.json", "!/contracts/mocks/**/*" ], "scripts": { @@ -20,7 +20,6 @@ "lint:sol": "prettier --log-level warn --ignore-path .gitignore '{contracts,test}/**/*.sol' --check && solhint '{contracts,test}/**/*.sol'", "lint:sol:fix": "prettier --log-level warn --ignore-path .gitignore '{contracts,test}/**/*.sol' --write", "clean": "hardhat clean && rimraf build contracts/build", - "prepare": "scripts/prepare.sh", "prepack": "scripts/prepack.sh", "generate": "scripts/generate/run.js", "release": "scripts/release/release.sh", @@ -59,6 +58,7 @@ "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.4", "@openzeppelin/test-helpers": "^0.5.13", + "@openzeppelin/upgrade-safe-transpiler": "^0.3.30", "@openzeppelin/upgrades-core": "^1.20.6", "array.prototype.at": "^1.1.1", "chai": "^4.2.0", @@ -70,7 +70,7 @@ "glob": "^10.3.5", "graphlib": "^2.1.8", "hardhat": "^2.9.1", - "hardhat-exposed": "^0.3.11", + "hardhat-exposed": "^0.3.12-1", "hardhat-gas-reporter": "^1.0.4", "hardhat-ignore-warnings": "^0.2.0", "keccak256": "^1.0.2", diff --git a/scripts/prepack.sh b/scripts/prepack.sh index 6f1bd4c32..6af10329f 100755 --- a/scripts/prepack.sh +++ b/scripts/prepack.sh @@ -4,9 +4,20 @@ set -euo pipefail shopt -s globstar # cross platform `mkdir -p` -node -e 'fs.mkdirSync("build/contracts", { recursive: true })' +mkdirp() { + node -e "fs.mkdirSync('$1', { recursive: true })" +} -cp artifacts/contracts/**/*.json build/contracts -rm build/contracts/*.dbg.json +# cd to the root of the repo +cd "$(git rev-parse --show-toplevel)" +npm run clean + +env COMPILE_MODE=production npm run compile + +mkdirp contracts/build/contracts +cp artifacts/contracts/**/*.json contracts/build/contracts +rm contracts/build/contracts/*.dbg.json node scripts/remove-ignored-artifacts.js + +cp README.md contracts/ diff --git a/scripts/prepare-contracts-package.sh b/scripts/prepare-contracts-package.sh deleted file mode 100755 index 3f62fd419..000000000 --- a/scripts/prepare-contracts-package.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -# cd to the root of the repo -cd "$(git rev-parse --show-toplevel)" - -# avoids re-compilation during publishing of both packages -if [[ ! -v ALREADY_COMPILED ]]; then - npm run clean - npm run prepare - npm run prepack -fi - -cp README.md contracts/ -mkdir contracts/build contracts/build/contracts -cp -r build/contracts/*.json contracts/build/contracts diff --git a/scripts/prepare.sh b/scripts/prepare.sh deleted file mode 100755 index 7014a7076..000000000 --- a/scripts/prepare.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -if [ "${SKIP_COMPILE:-}" == true ]; then - exit -fi - -npm run clean -env COMPILE_MODE=production npm run compile diff --git a/scripts/remove-ignored-artifacts.js b/scripts/remove-ignored-artifacts.js index f3e45b8d1..e156032b1 100644 --- a/scripts/remove-ignored-artifacts.js +++ b/scripts/remove-ignored-artifacts.js @@ -23,7 +23,7 @@ const ignorePatternsSubtrees = ignorePatterns .concat(ignorePatterns.map(pat => path.join(pat, '**/*'))) .map(p => p.replace(/^\//, '')); -const artifactsDir = 'build/contracts'; +const artifactsDir = 'contracts/build/contracts'; const buildinfo = 'artifacts/build-info'; const filenames = fs.readdirSync(buildinfo); diff --git a/scripts/upgradeable/transpile.sh b/scripts/upgradeable/transpile.sh index 05de96d34..f2126936c 100644 --- a/scripts/upgradeable/transpile.sh +++ b/scripts/upgradeable/transpile.sh @@ -2,9 +2,12 @@ set -euo pipefail -x +VERSION="$(jq -r .version contracts/package.json)" DIRNAME="$(dirname -- "${BASH_SOURCE[0]}")" bash "$DIRNAME/patch-apply.sh" +sed -i "s//$VERSION/g" contracts/package.json +git add contracts/package.json npm run clean npm run compile @@ -24,7 +27,8 @@ fi # -p: emit public initializer # -n: use namespaces # -N: exclude from namespaces transformation -npx @openzeppelin/upgrade-safe-transpiler@latest -D \ +# -q: partial transpilation using @openzeppelin/contracts as peer project +npx @openzeppelin/upgrade-safe-transpiler -D \ -b "$build_info" \ -i contracts/proxy/utils/Initializable.sol \ -x 'contracts-exposed/**/*' \ @@ -36,7 +40,8 @@ npx @openzeppelin/upgrade-safe-transpiler@latest -D \ -x '!contracts/proxy/beacon/IBeacon.sol' \ -p 'contracts/**/presets/**/*' \ -n \ - -N 'contracts/mocks/**/*' + -N 'contracts/mocks/**/*' \ + -q '@openzeppelin/' # delete compilation artifacts of vanilla code npm run clean diff --git a/scripts/upgradeable/upgradeable.patch b/scripts/upgradeable/upgradeable.patch index 18384b94a..f25710cde 100644 --- a/scripts/upgradeable/upgradeable.patch +++ b/scripts/upgradeable/upgradeable.patch @@ -59,7 +59,7 @@ index ff596b0c3..000000000 - - diff --git a/README.md b/README.md -index 53c29e5f8..666a667d3 100644 +index 549891e3f..a6b24078e 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,9 @@ @@ -81,8 +81,8 @@ index 53c29e5f8..666a667d3 100644 ``` #### Foundry (git) -@@ -40,10 +43,10 @@ $ npm install @openzeppelin/contracts - > **Warning** Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch. +@@ -42,10 +45,10 @@ $ npm install @openzeppelin/contracts + > Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch. ``` -$ forge install OpenZeppelin/openzeppelin-contracts @@ -94,7 +94,7 @@ index 53c29e5f8..666a667d3 100644 ### Usage -@@ -52,10 +55,11 @@ Once installed, you can use the contracts in the library by importing them: +@@ -54,10 +57,11 @@ Once installed, you can use the contracts in the library by importing them: ```solidity pragma solidity ^0.8.20; @@ -110,7 +110,7 @@ index 53c29e5f8..666a667d3 100644 } ``` diff --git a/contracts/package.json b/contracts/package.json -index df141192d..1cf90ad14 100644 +index 9017953ca..f51c1d38b 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,5 +1,5 @@ @@ -129,6 +129,16 @@ index df141192d..1cf90ad14 100644 }, "keywords": [ "solidity", +@@ -28,5 +28,8 @@ + "bugs": { + "url": "https://github.com/OpenZeppelin/openzeppelin-contracts/issues" + }, +- "homepage": "https://openzeppelin.com/contracts/" ++ "homepage": "https://openzeppelin.com/contracts/", ++ "peerDependencies": { ++ "@openzeppelin/contracts": "" ++ } + } diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol index 644f6f531..ab8ba05ff 100644 --- a/contracts/utils/cryptography/EIP712.sol @@ -297,10 +307,10 @@ index 644f6f531..ab8ba05ff 100644 } } diff --git a/package.json b/package.json -index e6804c4cd..612ec513e 100644 +index 3a1617c09..97e59c2d9 100644 --- a/package.json +++ b/package.json -@@ -33,7 +33,7 @@ +@@ -32,7 +32,7 @@ }, "repository": { "type": "git", From ef3e7771a7e2d9b30234a57f96ee7acf5dddb9ed Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 28 Sep 2023 19:43:33 -0300 Subject: [PATCH 072/167] Fix upgradeable patch in release branches (#4637) --- .github/workflows/upgradeable.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/upgradeable.yml b/.github/workflows/upgradeable.yml index ed63a6dbe..acbd71166 100644 --- a/.github/workflows/upgradeable.yml +++ b/.github/workflows/upgradeable.yml @@ -18,10 +18,12 @@ jobs: token: ${{ secrets.GH_TOKEN_UPGRADEABLE }} - name: Fetch current non-upgradeable branch run: | - git fetch "https://github.com/${{ github.repository }}.git" "$REF" + git fetch "$REMOTE" master # Fetch default branch first for patch to apply cleanly + git fetch "$REMOTE" "$REF" git checkout FETCH_HEAD env: REF: ${{ github.ref }} + REMOTE: https://github.com/${{ github.repository }}.git - name: Set up environment uses: ./.github/actions/setup - run: bash scripts/git-user-config.sh From 5ed5a86d1d22f387ce69ab4e0ace405de8bc888d Mon Sep 17 00:00:00 2001 From: Francisco Date: Sun, 1 Oct 2023 16:43:47 -0300 Subject: [PATCH 073/167] Update eth-gas-reporter (#4643) --- package-lock.json | 643 ++++++---------------------------------------- package.json | 2 +- 2 files changed, 82 insertions(+), 563 deletions(-) diff --git a/package-lock.json b/package-lock.json index b1b911815..3e1d9bded 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "graphlib": "^2.1.8", "hardhat": "^2.9.1", "hardhat-exposed": "^0.3.12-1", - "hardhat-gas-reporter": "^1.0.4", + "hardhat-gas-reporter": "^1.0.9", "hardhat-ignore-warnings": "^0.2.0", "keccak256": "^1.0.2", "lodash.startcase": "^4.4.0", @@ -4243,25 +4243,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.reduce": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.6.tgz", - "integrity": "sha512-UW+Mz8LG/sPSU8jRDCjVr6J/ZKAGpHfwrZ6kWTG5qCxIEiXdVshqGnu5vEZA8S1y6X4aCSbQZ0/EEsfvEvBiSg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", @@ -4385,6 +4366,31 @@ "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", "dev": true }, + "node_modules/axios": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", + "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -6189,12 +6195,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, "node_modules/es-set-tostringtag": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", @@ -6767,24 +6767,22 @@ "dev": true }, "node_modules/eth-gas-reporter": { - "version": "0.2.25", - "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz", - "integrity": "sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ==", + "version": "0.2.27", + "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.27.tgz", + "integrity": "sha512-femhvoAM7wL0GcI8ozTdxfuBtBFJ9qsyIAsmKVjlWAHUbdnnXHt+lKzz/kmldM5lA9jLuNHGwuIxorNpLbR1Zw==", "dev": true, "dependencies": { - "@ethersproject/abi": "^5.0.0-beta.146", "@solidity-parser/parser": "^0.14.0", + "axios": "^1.5.1", "cli-table3": "^0.5.0", "colors": "1.4.0", "ethereum-cryptography": "^1.0.3", - "ethers": "^4.0.40", + "ethers": "^5.7.2", "fs-readdir-recursive": "^1.1.0", "lodash": "^4.17.14", "markdown-table": "^1.1.3", - "mocha": "^7.1.1", + "mocha": "^10.2.0", "req-cwd": "^2.0.0", - "request": "^2.88.0", - "request-promise-native": "^1.0.5", "sha1": "^1.1.1", "sync-request": "^6.0.0" }, @@ -6842,90 +6840,6 @@ "@scure/base": "~1.1.0" } }, - "node_modules/eth-gas-reporter/node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.1.1" - } - }, - "node_modules/eth-gas-reporter/node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/eth-gas-reporter/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eth-gas-reporter/node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/eth-gas-reporter/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, "node_modules/eth-gas-reporter/node_modules/ethereum-cryptography": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", @@ -6938,355 +6852,52 @@ "@scure/bip39": "1.1.1" } }, - "node_modules/eth-gas-reporter/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "dependencies": { - "is-buffer": "~2.0.3" - }, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/eth-gas-reporter/node_modules/fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "deprecated": "\"Please update to latest v2.3 or v2.2\"", + "node_modules/eth-gas-reporter/node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/eth-gas-reporter/node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eth-gas-reporter/node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/eth-gas-reporter/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "dependencies": { - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eth-gas-reporter/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eth-gas-reporter/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/eth-gas-reporter/node_modules/mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", - "dev": true, - "dependencies": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/eth-gas-reporter/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "node_modules/eth-gas-reporter/node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/eth-gas-reporter/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eth-gas-reporter/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eth-gas-reporter/node_modules/readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "dependencies": { - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/eth-gas-reporter/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eth-gas-reporter/node_modules/supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/eth-gas-reporter/node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/eth-gas-reporter/node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/eth-gas-reporter/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/eth-gas-reporter/node_modules/yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, - "engines": { - "node": ">=6" + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" } }, "node_modules/eth-lib": { @@ -8507,15 +8118,6 @@ "lodash": "^4.17.15" } }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, "node_modules/handlebars": { "version": "4.7.8", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", @@ -11196,25 +10798,6 @@ "lodash": "^4.17.21" } }, - "node_modules/node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "dependencies": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, - "node_modules/node-environment-flags/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -11416,25 +10999,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.7.tgz", - "integrity": "sha512-PrJz0C2xJ58FNn11XV2lr4Jt5Gzl94qpy9Lu0JlfEj14z88sqbSBJCBEzdlNUCzY2gburhbrwOZ5BHCmuNUy0g==", - "dev": true, - "dependencies": { - "array.prototype.reduce": "^1.0.6", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "safe-array-concat": "^1.0.0" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/obliterator": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", @@ -12056,6 +11620,12 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -12416,39 +11986,6 @@ "node": ">= 6" } }, - "node_modules/request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", - "dev": true, - "dependencies": { - "lodash": "^4.17.19" - }, - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "request": "^2.34" - } - }, - "node_modules/request-promise-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", - "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", - "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", - "dev": true, - "dependencies": { - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - }, - "engines": { - "node": ">=0.12.0" - }, - "peerDependencies": { - "request": "^2.34" - } - }, "node_modules/request/node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -14407,15 +13944,6 @@ "node": ">= 0.8" } }, - "node_modules/stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/stream-transform": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-2.1.3.tgz", @@ -16514,15 +16042,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, "node_modules/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 3a1617c09..3a53270a5 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "graphlib": "^2.1.8", "hardhat": "^2.9.1", "hardhat-exposed": "^0.3.12-1", - "hardhat-gas-reporter": "^1.0.4", + "hardhat-gas-reporter": "^1.0.9", "hardhat-ignore-warnings": "^0.2.0", "keccak256": "^1.0.2", "lodash.startcase": "^4.4.0", From abba0d047a24c8feaadf35589ea81a433c86ec0a Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 2 Oct 2023 15:41:18 -0300 Subject: [PATCH 074/167] Update remappings.txt for upgradeable contracts and set up submodule (#4639) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hadrien Croubois Co-authored-by: Ernesto García --- .github/actions/setup/action.yml | 4 +++ .github/workflows/checks.yml | 11 ++++--- .github/workflows/upgradeable.yml | 2 ++ .gitignore | 1 + contracts/proxy/utils/UUPSUpgradeable.sol | 2 -- .../token/ERC1155/utils/ERC1155Holder.sol | 2 -- contracts/token/ERC721/utils/ERC721Holder.sol | 2 -- contracts/utils/Context.sol | 2 -- contracts/utils/Multicall.sol | 2 -- contracts/utils/introspection/ERC165.sol | 2 -- foundry.toml | 7 +++++ hardhat.config.js | 13 ++++++++- package-lock.json | 29 ++++++++++++++----- package.json | 5 ++-- scripts/upgradeable/transpile-onto.sh | 20 +++++++++---- scripts/upgradeable/upgradeable.patch | 8 +++++ 16 files changed, 78 insertions(+), 34 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 3154e9931..cab1188ac 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -15,3 +15,7 @@ runs: run: npm ci shell: bash if: steps.cache.outputs.cache-hit != 'true' + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 3e7cba120..5b32bdb1d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -57,8 +57,9 @@ jobs: - name: Set up environment uses: ./.github/actions/setup - name: Copy non-upgradeable contracts as dependency - run: - cp -rnT contracts node_modules/@openzeppelin/contracts + run: | + mkdir -p lib/openzeppelin-contracts + cp -rnT contracts lib/openzeppelin-contracts/contracts - name: Transpile to upgradeable run: bash scripts/upgradeable/transpile.sh - name: Run tests @@ -78,10 +79,8 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly + - name: Set up environment + uses: ./.github/actions/setup - name: Run tests run: forge test -vv diff --git a/.github/workflows/upgradeable.yml b/.github/workflows/upgradeable.yml index acbd71166..46bf15a4e 100644 --- a/.github/workflows/upgradeable.yml +++ b/.github/workflows/upgradeable.yml @@ -29,4 +29,6 @@ jobs: - run: bash scripts/git-user-config.sh - name: Transpile to upgradeable run: bash scripts/upgradeable/transpile-onto.sh ${{ github.ref_name }} origin/${{ github.ref_name }} + env: + SUBMODULE_REMOTE: https://github.com/${{ github.repository }}.git - run: git push origin ${{ github.ref_name }} diff --git a/.gitignore b/.gitignore index 2aac74485..a6caa9fc7 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,7 @@ contracts-exposed # Foundry /out +/cache_forge # Certora .certora* diff --git a/contracts/proxy/utils/UUPSUpgradeable.sol b/contracts/proxy/utils/UUPSUpgradeable.sol index 045d6a326..f08e61c1e 100644 --- a/contracts/proxy/utils/UUPSUpgradeable.sol +++ b/contracts/proxy/utils/UUPSUpgradeable.sol @@ -15,8 +15,6 @@ import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol"; * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. - * - * @custom:stateless */ abstract contract UUPSUpgradeable is IERC1822Proxiable { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable diff --git a/contracts/token/ERC1155/utils/ERC1155Holder.sol b/contracts/token/ERC1155/utils/ERC1155Holder.sol index 6f353aa59..7c8d470e0 100644 --- a/contracts/token/ERC1155/utils/ERC1155Holder.sol +++ b/contracts/token/ERC1155/utils/ERC1155Holder.sol @@ -11,8 +11,6 @@ import {IERC1155Receiver} from "../IERC1155Receiver.sol"; * * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be * stuck. - * - * @custom:stateless */ abstract contract ERC1155Holder is ERC165, IERC1155Receiver { /** diff --git a/contracts/token/ERC721/utils/ERC721Holder.sol b/contracts/token/ERC721/utils/ERC721Holder.sol index a7c4b03b5..4ffd16146 100644 --- a/contracts/token/ERC721/utils/ERC721Holder.sol +++ b/contracts/token/ERC721/utils/ERC721Holder.sol @@ -11,8 +11,6 @@ import {IERC721Receiver} from "../IERC721Receiver.sol"; * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or * {IERC721-setApprovalForAll}. - * - * @custom:stateless */ abstract contract ERC721Holder is IERC721Receiver { /** diff --git a/contracts/utils/Context.sol b/contracts/utils/Context.sol index 8a74f2487..25e115925 100644 --- a/contracts/utils/Context.sol +++ b/contracts/utils/Context.sol @@ -12,8 +12,6 @@ pragma solidity ^0.8.20; * is concerned). * * This contract is only required for intermediate, library-like contracts. - * - * @custom:stateless */ abstract contract Context { function _msgSender() internal view virtual returns (address) { diff --git a/contracts/utils/Multicall.sol b/contracts/utils/Multicall.sol index aa23e635b..a9a3d3acf 100644 --- a/contracts/utils/Multicall.sol +++ b/contracts/utils/Multicall.sol @@ -7,8 +7,6 @@ import {Address} from "./Address.sol"; /** * @dev Provides a function to batch together multiple calls in a single external call. - * - * @custom:stateless */ abstract contract Multicall { /** diff --git a/contracts/utils/introspection/ERC165.sol b/contracts/utils/introspection/ERC165.sol index 1963a257d..71c8e4a4f 100644 --- a/contracts/utils/introspection/ERC165.sol +++ b/contracts/utils/introspection/ERC165.sol @@ -16,8 +16,6 @@ import {IERC165} from "./IERC165.sol"; * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` - * - * @custom:stateless */ abstract contract ERC165 is IERC165 { /** diff --git a/foundry.toml b/foundry.toml index d0aa4ea39..859f210cf 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,3 +1,10 @@ +[profile.default] +src = 'contracts' +out = 'out' +libs = ['node_modules', 'lib'] +test = 'test' +cache_path = 'cache_forge' + [fuzz] runs = 10000 max_test_rejects = 150000 diff --git a/hardhat.config.js b/hardhat.config.js index aca9d7273..f5d9527b3 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -8,6 +8,8 @@ const fs = require('fs'); const path = require('path'); +const proc = require('child_process'); + const argv = require('yargs/yargs')() .env('') .options({ @@ -37,6 +39,11 @@ const argv = require('yargs/yargs')() type: 'boolean', default: false, }, + foundry: { + alias: 'hasFoundry', + type: 'boolean', + default: hasFoundry(), + }, compiler: { alias: 'compileVersion', type: 'string', @@ -51,8 +58,8 @@ const argv = require('yargs/yargs')() require('@nomiclabs/hardhat-truffle5'); require('hardhat-ignore-warnings'); require('hardhat-exposed'); - require('solidity-docgen'); +argv.foundry && require('@nomicfoundation/hardhat-foundry'); for (const f of fs.readdirSync(path.join(__dirname, 'hardhat'))) { require(path.join(__dirname, 'hardhat', f)); @@ -114,3 +121,7 @@ if (argv.coverage) { require('solidity-coverage'); module.exports.networks.hardhat.initialBaseFeePerGas = 0; } + +function hasFoundry() { + return proc.spawnSync('forge', ['-V'], { stdio: 'ignore' }).error === undefined; +} diff --git a/package-lock.json b/package-lock.json index 3e1d9bded..30d6561d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,12 +13,13 @@ "@changesets/cli": "^2.26.0", "@changesets/pre": "^1.0.14", "@changesets/read": "^0.5.9", + "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.4", "@openzeppelin/test-helpers": "^0.5.13", - "@openzeppelin/upgrade-safe-transpiler": "^0.3.30", + "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", "array.prototype.at": "^1.1.1", "chai": "^4.2.0", @@ -30,7 +31,7 @@ "glob": "^10.3.5", "graphlib": "^2.1.8", "hardhat": "^2.9.1", - "hardhat-exposed": "^0.3.12-1", + "hardhat-exposed": "^0.3.13", "hardhat-gas-reporter": "^1.0.9", "hardhat-ignore-warnings": "^0.2.0", "keccak256": "^1.0.2", @@ -2012,6 +2013,18 @@ "node": ">=14" } }, + "node_modules/@nomicfoundation/hardhat-foundry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-foundry/-/hardhat-foundry-1.1.1.tgz", + "integrity": "sha512-cXGCBHAiXas9Pg9MhMOpBVQCkWRYoRFG7GJJAph+sdQsfd22iRs5U5Vs9XmpGEQd1yEvYISQZMeE68Nxj65iUQ==", + "dev": true, + "dependencies": { + "chalk": "^2.4.2" + }, + "peerDependencies": { + "hardhat": "^2.17.2" + } + }, "node_modules/@nomicfoundation/hardhat-network-helpers": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.9.tgz", @@ -2409,9 +2422,9 @@ } }, "node_modules/@openzeppelin/upgrade-safe-transpiler": { - "version": "0.3.30", - "resolved": "https://registry.npmjs.org/@openzeppelin/upgrade-safe-transpiler/-/upgrade-safe-transpiler-0.3.30.tgz", - "integrity": "sha512-nkJ4r+W+FUp0eAvE18uHh/smwD1NS3KLAGJ59+Vgmx3VlCvCDNaS0rTJ1FpwxDYD3J0Whx0ZVtHz2ySq4YsnNQ==", + "version": "0.3.32", + "resolved": "https://registry.npmjs.org/@openzeppelin/upgrade-safe-transpiler/-/upgrade-safe-transpiler-0.3.32.tgz", + "integrity": "sha512-ypgj6MXXcDG0dOuMwENXt0H4atCtCsPgpDgWZYewb2egfUCMpj6d2GO4pcNZgdn1zYsmUHfm5ZA/Nga/8qkdKA==", "dev": true, "dependencies": { "ajv": "^8.0.0", @@ -8252,9 +8265,9 @@ } }, "node_modules/hardhat-exposed": { - "version": "0.3.12-1", - "resolved": "https://registry.npmjs.org/hardhat-exposed/-/hardhat-exposed-0.3.12-1.tgz", - "integrity": "sha512-hDhh+wC6usu/OPT4v6hi+JdBxZJDgi6gVAw/45ApY7rgODCqpan7+8GuVwOtu0YK/9wPN9Y065MzAVFqJtylgA==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/hardhat-exposed/-/hardhat-exposed-0.3.13.tgz", + "integrity": "sha512-hY2qCYSi2wD2ChZ0WP0oEPS4zlZ2vGaLOVXvfosGcy6mNeQ+pWsxTge35tTumCHwCzk/dYxLZq+KW0Z5t08yDA==", "dev": true, "dependencies": { "micromatch": "^4.0.4", diff --git a/package.json b/package.json index 3a53270a5..f2e8acfad 100644 --- a/package.json +++ b/package.json @@ -53,12 +53,13 @@ "@changesets/cli": "^2.26.0", "@changesets/pre": "^1.0.14", "@changesets/read": "^0.5.9", + "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.4", "@openzeppelin/test-helpers": "^0.5.13", - "@openzeppelin/upgrade-safe-transpiler": "^0.3.30", + "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", "array.prototype.at": "^1.1.1", "chai": "^4.2.0", @@ -70,7 +71,7 @@ "glob": "^10.3.5", "graphlib": "^2.1.8", "hardhat": "^2.9.1", - "hardhat-exposed": "^0.3.12-1", + "hardhat-exposed": "^0.3.13", "hardhat-gas-reporter": "^1.0.9", "hardhat-ignore-warnings": "^0.2.0", "keccak256": "^1.0.2", diff --git a/scripts/upgradeable/transpile-onto.sh b/scripts/upgradeable/transpile-onto.sh index a966a9b9a..b8508f0c2 100644 --- a/scripts/upgradeable/transpile-onto.sh +++ b/scripts/upgradeable/transpile-onto.sh @@ -15,7 +15,7 @@ base="${2-}" bash scripts/upgradeable/transpile.sh commit="$(git rev-parse --short HEAD)" -branch="$(git rev-parse --abbrev-ref HEAD)" +start_branch="$(git rev-parse --abbrev-ref HEAD)" git add contracts @@ -36,9 +36,19 @@ else fi fi -# commit if there are changes to commit -if ! git diff --quiet --cached; then - git commit -m "Transpile $commit" +# abort if there are no changes to commit at this point +if git diff --quiet --cached; then + exit fi -git checkout "$branch" +if [[ -v SUBMODULE_REMOTE ]]; then + lib=lib/openzeppelin-contracts + git submodule add -b "${base#origin/}" "$SUBMODULE_REMOTE" "$lib" + git -C "$lib" checkout "$commit" + git add "$lib" +fi + +git commit -m "Transpile $commit" + +# return to original branch +git checkout "$start_branch" diff --git a/scripts/upgradeable/upgradeable.patch b/scripts/upgradeable/upgradeable.patch index f25710cde..522f82ca4 100644 --- a/scripts/upgradeable/upgradeable.patch +++ b/scripts/upgradeable/upgradeable.patch @@ -319,6 +319,14 @@ index 3a1617c09..97e59c2d9 100644 }, "keywords": [ "solidity", +diff --git a/remappings.txt b/remappings.txt +index 304d1386a..a1cd63bee 100644 +--- a/remappings.txt ++++ b/remappings.txt +@@ -1 +1,2 @@ +-@openzeppelin/contracts/=contracts/ ++@openzeppelin/contracts-upgradeable/=contracts/ ++@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js index faf01f1a3..b25171a56 100644 --- a/test/utils/cryptography/EIP712.test.js From b849906ce430059a768842674b48ff53ab3a1218 Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 2 Oct 2023 16:43:12 -0300 Subject: [PATCH 075/167] Make AccessManager.execute/schedule more conservative when delay is 0 (#4644) --- .changeset/thirty-drinks-happen.md | 5 +++++ contracts/access/manager/AccessManager.sol | 11 ++++++----- test/access/manager/AccessManager.test.js | 2 ++ 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 .changeset/thirty-drinks-happen.md diff --git a/.changeset/thirty-drinks-happen.md b/.changeset/thirty-drinks-happen.md new file mode 100644 index 000000000..85be9732e --- /dev/null +++ b/.changeset/thirty-drinks-happen.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': major +--- + +`AccessManager`: Make `schedule` and `execute` more conservative when delay is 0. diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 31ef86c3f..234164f21 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -582,12 +582,12 @@ contract AccessManager is Context, Multicall, IAccessManager { address caller = _msgSender(); // Fetch restrictions that apply to the caller on the targeted function - (bool immediate, uint32 setback) = _canCallExtended(caller, target, data); + (, uint32 setback) = _canCallExtended(caller, target, data); uint48 minWhen = Time.timestamp() + setback; - // if call is not authorized, or if requested timing is too soon - if ((!immediate && setback == 0) || (when > 0 && when < minWhen)) { + // if call with delay is not authorized, or if requested timing is too soon + if (setback == 0 || (when > 0 && when < minWhen)) { revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data)); } @@ -644,11 +644,12 @@ contract AccessManager is Context, Multicall, IAccessManager { revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data)); } - // If caller is authorised, check operation was scheduled early enough bytes32 operationId = hashOperation(caller, target, data); uint32 nonce; - if (setback != 0) { + // If caller is authorised, check operation was scheduled early enough + // Consume an available schedule even if there is no currently enforced delay + if (setback != 0 || getSchedule(operationId) != 0) { nonce = _consumeScheduledOp(operationId); } diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 1da7b3ced..5d8ed5de9 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -636,6 +636,8 @@ contract('AccessManager', function (accounts) { describe(description, function () { beforeEach(async function () { + if (!delay || fnRole === ROLES.PUBLIC) this.skip(); // TODO: Fixed in #4613 + // setup await Promise.all([ this.manager.$_setTargetClosed(this.target.address, closed), From b4a9c47e9bebc9bb9aef0a07338abcd5d3ea2744 Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Mon, 2 Oct 2023 17:43:51 -0300 Subject: [PATCH 076/167] Fix typos --- SECURITY.md | 2 +- contracts/mocks/token/ERC20ForceApproveMock.sol | 2 +- docs/modules/ROOT/pages/erc4626.adoc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 4d6ff96ed..e9a5148ec 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -39,4 +39,4 @@ Note as well that the Solidity language itself only guarantees security updates ## Legal -Smart contracts are a nascent techology and carry a high level of technical risk and uncertainty. OpenZeppelin Contracts is made available under the MIT License, which disclaims all warranties in relation to the project and which limits the liability of those that contribute and maintain the project, including OpenZeppelin. Your use of the project is also governed by the terms found at www.openzeppelin.com/tos (the "Terms"). As set out in the Terms, you are solely responsible for any use of OpenZeppelin Contracts and you assume all risks associated with any such use. This Security Policy in no way evidences or represents an on-going duty by any contributor, including OpenZeppelin, to correct any flaws or alert you to all or any of the potential risks of utilizing the project. +Smart contracts are a nascent technology and carry a high level of technical risk and uncertainty. OpenZeppelin Contracts is made available under the MIT License, which disclaims all warranties in relation to the project and which limits the liability of those that contribute and maintain the project, including OpenZeppelin. Your use of the project is also governed by the terms found at www.openzeppelin.com/tos (the "Terms"). As set out in the Terms, you are solely responsible for any use of OpenZeppelin Contracts and you assume all risks associated with any such use. This Security Policy in no way evidences or represents an on-going duty by any contributor, including OpenZeppelin, to correct any flaws or alert you to all or any of the potential risks of utilizing the project. diff --git a/contracts/mocks/token/ERC20ForceApproveMock.sol b/contracts/mocks/token/ERC20ForceApproveMock.sol index 9fbca9727..36c0f574d 100644 --- a/contracts/mocks/token/ERC20ForceApproveMock.sol +++ b/contracts/mocks/token/ERC20ForceApproveMock.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; import {ERC20} from "../../token/ERC20/ERC20.sol"; -// contract that replicate USDT (0xdac17f958d2ee523a2206206994597c13d831ec7) approval beavior +// contract that replicate USDT (0xdac17f958d2ee523a2206206994597c13d831ec7) approval behavior abstract contract ERC20ForceApproveMock is ERC20 { function approve(address spender, uint256 amount) public virtual override returns (bool) { require(amount == 0 || allowance(msg.sender, spender) == 0, "USDT approval failure"); diff --git a/docs/modules/ROOT/pages/erc4626.adoc b/docs/modules/ROOT/pages/erc4626.adoc index 43ec3ebb9..c42426add 100644 --- a/docs/modules/ROOT/pages/erc4626.adoc +++ b/docs/modules/ROOT/pages/erc4626.adoc @@ -23,7 +23,7 @@ When plotted in log-log scale, the rate is defined similarly, but appears differ image::erc4626-rate-loglog.png[Exchange rates in logarithmic scale] -In such a reprentation, widely different rates can be clearly visible in the same graph. This wouldn't be the case in linear scale. +In such a representation, widely different rates can be clearly visible in the same graph. This wouldn't be the case in linear scale. image::erc4626-rate-loglogext.png[More exchange rates in logarithmic scale] From 5d43060cdc17f72b1c25b6ff0d98f77b7fb79ea5 Mon Sep 17 00:00:00 2001 From: Francisco Date: Tue, 3 Oct 2023 15:46:18 -0300 Subject: [PATCH 077/167] Fix release tagging (#4646) --- .github/workflows/release-cycle.yml | 4 ---- scripts/release/workflow/github-release.js | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/release-cycle.yml b/.github/workflows/release-cycle.yml index 21d77abb9..12da449f9 100644 --- a/.github/workflows/release-cycle.yml +++ b/.github/workflows/release-cycle.yml @@ -147,16 +147,12 @@ jobs: with: name: ${{ github.ref_name }} path: ${{ steps.pack.outputs.tarball }} - - name: Tag - run: npx changeset tag - name: Publish run: bash scripts/release/workflow/publish.sh env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} TARBALL: ${{ steps.pack.outputs.tarball }} TAG: ${{ steps.pack.outputs.tag }} - - name: Push tags - run: git push --tags - name: Create Github Release uses: actions/github-script@v6 env: diff --git a/scripts/release/workflow/github-release.js b/scripts/release/workflow/github-release.js index 92a47d9d7..f213106b8 100644 --- a/scripts/release/workflow/github-release.js +++ b/scripts/release/workflow/github-release.js @@ -9,6 +9,7 @@ module.exports = async ({ github, context }) => { owner: context.repo.owner, repo: context.repo.repo, tag_name: `v${version}`, + target_commitish: github.ref_name, body: extractSection(changelog, version), prerelease: process.env.PRERELEASE === 'true', }); From 2c6b859dd02f872959cff58d89c979c363778cce Mon Sep 17 00:00:00 2001 From: Francisco Date: Tue, 3 Oct 2023 17:43:12 -0300 Subject: [PATCH 078/167] Fix coverage analysis (#4648) --- hardhat.config.js | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hardhat.config.js b/hardhat.config.js index f5d9527b3..4d5ab944a 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -61,6 +61,10 @@ require('hardhat-exposed'); require('solidity-docgen'); argv.foundry && require('@nomicfoundation/hardhat-foundry'); +if (argv.foundry && argv.coverage) { + throw Error('Coverage analysis is incompatible with Foundry. Disable with `FOUNDRY=false` in the environment'); +} + for (const f of fs.readdirSync(path.join(__dirname, 'hardhat'))) { require(path.join(__dirname, 'hardhat', f)); } diff --git a/package.json b/package.json index f2e8acfad..d5ab8289b 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ ], "scripts": { "compile": "hardhat compile", - "coverage": "env COVERAGE=true hardhat coverage", + "coverage": "env COVERAGE=true FOUNDRY=false hardhat coverage", "docs": "npm run prepare-docs && oz-docs", "docs:watch": "oz-docs watch contracts docs/templates docs/config.js", "prepare-docs": "scripts/prepare-docs.sh", From 39400b78bac7562e4c600787fc22be3c9c4d58d8 Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 4 Oct 2023 12:54:49 -0300 Subject: [PATCH 079/167] Ensure constant getters show in docs (#4649) --- docs/templates/contract.hbs | 2 +- docs/templates/helpers.js | 2 +- docs/templates/properties.js | 17 ++++++++++++++++- package-lock.json | 8 ++++---- package.json | 2 +- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/templates/contract.hbs b/docs/templates/contract.hbs index a4716825a..e4c8e9206 100644 --- a/docs/templates/contract.hbs +++ b/docs/templates/contract.hbs @@ -86,7 +86,7 @@ import "@openzeppelin/{{__item_context.file.absolutePath}}"; {{#each functions}} [.contract-item] [[{{anchor}}]] -==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}}){{#if returns}} → {{typed-params returns}}{{/if}}++` [.item-kind]#{{visibility}}# +==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}}){{#if returns2}} → {{typed-params returns2}}{{/if}}++` [.item-kind]#{{visibility}}# {{{natspec.dev}}} diff --git a/docs/templates/helpers.js b/docs/templates/helpers.js index 65f168eba..1b6383549 100644 --- a/docs/templates/helpers.js +++ b/docs/templates/helpers.js @@ -6,7 +6,7 @@ module.exports['readme-path'] = opts => { return 'contracts/' + opts.data.root.id.replace(/\.adoc$/, '') + '/README.adoc'; }; -module.exports.names = params => params.map(p => p.name).join(', '); +module.exports.names = params => params?.map(p => p.name).join(', '); module.exports['typed-params'] = params => { return params?.map(p => `${p.type}${p.indexed ? ' indexed' : ''}${p.name ? ' ' + p.name : ''}`).join(', '); diff --git a/docs/templates/properties.js b/docs/templates/properties.js index 584c0abca..7e0410567 100644 --- a/docs/templates/properties.js +++ b/docs/templates/properties.js @@ -1,4 +1,4 @@ -const { isNodeType } = require('solidity-ast/utils'); +const { isNodeType, findAll } = require('solidity-ast/utils'); const { slug } = require('./helpers'); module.exports.anchor = function anchor({ item, contract }) { @@ -39,6 +39,21 @@ module.exports['has-errors'] = function ({ item }) { return item.inheritance.some(c => c.errors.length > 0); }; +module.exports.functions = function ({ item }) { + return [ + ...[...findAll('FunctionDefinition', item)].filter(f => f.visibility !== 'private'), + ...[...findAll('VariableDeclaration', item)].filter(f => f.visibility === 'public'), + ]; +}; + +module.exports.returns2 = function ({ item }) { + if (isNodeType('VariableDeclaration', item)) { + return [{ type: item.typeDescriptions.typeString }]; + } else { + return item.returns; + } +}; + module.exports['inherited-functions'] = function ({ item }) { const { inheritance } = item; const baseFunctions = new Set(inheritance.flatMap(c => c.functions.flatMap(f => f.baseFunctions ?? []))); diff --git a/package-lock.json b/package-lock.json index 30d6561d9..0f4f9f55e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", - "@openzeppelin/docs-utils": "^0.1.4", + "@openzeppelin/docs-utils": "^0.1.5", "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", @@ -2299,9 +2299,9 @@ } }, "node_modules/@openzeppelin/docs-utils": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@openzeppelin/docs-utils/-/docs-utils-0.1.4.tgz", - "integrity": "sha512-2I56U1GhnNlymz0gGmJbyZKhnErGIaJ+rqtKTGyNf7YX3jgeS9/Twv8H0T+OgLV4dimtCHPz/27w6CYhWQ/TGg==", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@openzeppelin/docs-utils/-/docs-utils-0.1.5.tgz", + "integrity": "sha512-GfqXArKmdq8rv+hsP+g8uS1VEkvMIzWs31dCONffzmqFwJ+MOsaNQNZNXQnLRgUkzk8i5mTNDjJuxDy+aBZImQ==", "dev": true, "dependencies": { "@frangio/servbot": "^0.2.5", diff --git a/package.json b/package.json index d5ab8289b..55a89746e 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", - "@openzeppelin/docs-utils": "^0.1.4", + "@openzeppelin/docs-utils": "^0.1.5", "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", From aca4030e4a9b3b6585669bcdfac8518a18c2ec47 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Wed, 4 Oct 2023 21:17:15 +0200 Subject: [PATCH 080/167] Formal verification of AccessManager (#4611) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto García Co-authored-by: Francisco Giordano --- certora/Makefile | 4 +- .../access_manager_AccessManager.sol.patch | 98 +++ certora/harnesses/AccessManagedHarness.sol | 36 + certora/harnesses/AccessManagerHarness.sol | 116 +++ certora/specs.json | 19 + certora/specs/AccessManaged.spec | 34 + certora/specs/AccessManager.spec | 826 ++++++++++++++++++ certora/specs/helpers/helpers.spec | 5 + certora/specs/methods/IAccessManaged.spec | 5 + certora/specs/methods/IAccessManager.spec | 33 + contracts/access/manager/AccessManager.sol | 4 +- requirements.txt | 2 +- 12 files changed, 1177 insertions(+), 5 deletions(-) create mode 100644 certora/diff/access_manager_AccessManager.sol.patch create mode 100644 certora/harnesses/AccessManagedHarness.sol create mode 100644 certora/harnesses/AccessManagerHarness.sol create mode 100644 certora/specs/AccessManaged.spec create mode 100644 certora/specs/AccessManager.spec create mode 100644 certora/specs/methods/IAccessManaged.spec create mode 100644 certora/specs/methods/IAccessManager.spec diff --git a/certora/Makefile b/certora/Makefile index 50fd6da08..d57d2ffdc 100644 --- a/certora/Makefile +++ b/certora/Makefile @@ -17,7 +17,7 @@ $(DST): FORCE @cp -r $(SRC) $@ # Update a solidity file in the $DST directory using the corresponding patch -$(DST)/%.sol: FORCE +$(DST)/%.sol: FORCE | $(DST) @echo Applying patch to $@ @patch -p0 -d $(DST) < $(patsubst $(DST)_%,$(DIFF)/%.patch,$(subst /,_,$@)) @@ -31,7 +31,7 @@ $(DIFF): FORCE @mkdir $@ # Create the patch file by comparing the source and the destination -$(DIFF)/%.patch: FORCE +$(DIFF)/%.patch: FORCE | $(DIFF) @echo Generating patch $@ @diff -ruN \ $(patsubst $(DIFF)/%.patch,$(SRC)/%,$(subst _,/,$@)) \ diff --git a/certora/diff/access_manager_AccessManager.sol.patch b/certora/diff/access_manager_AccessManager.sol.patch new file mode 100644 index 000000000..8a9232bc7 --- /dev/null +++ b/certora/diff/access_manager_AccessManager.sol.patch @@ -0,0 +1,98 @@ +--- access/manager/AccessManager.sol 2023-10-04 11:20:52.802378968 +0200 ++++ access/manager/AccessManager.sol 2023-10-04 14:49:43.126279234 +0200 +@@ -6,7 +6,6 @@ + import {IAccessManaged} from "./IAccessManaged.sol"; + import {Address} from "../../utils/Address.sol"; + import {Context} from "../../utils/Context.sol"; +-import {Multicall} from "../../utils/Multicall.sol"; + import {Math} from "../../utils/math/Math.sol"; + import {Time} from "../../utils/types/Time.sol"; + +@@ -48,7 +47,8 @@ + * mindful of the danger associated with functions such as {{Ownable-renounceOwnership}} or + * {{AccessControl-renounceRole}}. + */ +-contract AccessManager is Context, Multicall, IAccessManager { ++// NOTE: The FV version of this contract doesn't include Multicall because CVL HAVOCs on any `delegatecall`. ++contract AccessManager is Context, IAccessManager { + using Time for *; + + // Structure that stores the details for a target contract. +@@ -93,7 +93,7 @@ + mapping(bytes32 operationId => Schedule) private _schedules; + + // This should be transient storage when supported by the EVM. +- bytes32 private _executionId; ++ bytes32 internal _executionId; // private → internal for FV + + /** + * @dev Check that the caller is authorized to perform the operation, following the restrictions encoded in +@@ -185,6 +185,11 @@ + return _targets[target].adminDelay.get(); + } + ++ // Exposed for FV ++ function _getTargetAdminDelayFull(address target) internal view virtual returns (uint32, uint32, uint48) { ++ return _targets[target].adminDelay.getFull(); ++ } ++ + /** + * @dev Get the id of the role that acts as an admin for given role. + * +@@ -213,6 +218,11 @@ + return _roles[roleId].grantDelay.get(); + } + ++ // Exposed for FV ++ function _getRoleGrantDelayFull(uint64 roleId) internal view virtual returns (uint32, uint32, uint48) { ++ return _roles[roleId].grantDelay.getFull(); ++ } ++ + /** + * @dev Get the access details for a given account for a given role. These details include the timepoint at which + * membership becomes active, and the delay applied to all operation by this user that requires this permission +@@ -749,7 +759,7 @@ + /** + * @dev Hashing function for execute protection + */ +- function _hashExecutionId(address target, bytes4 selector) private pure returns (bytes32) { ++ function _hashExecutionId(address target, bytes4 selector) internal pure returns (bytes32) { // private → internal for FV + return keccak256(abi.encode(target, selector)); + } + +@@ -769,7 +779,7 @@ + /** + * @dev Check if the current call is authorized according to admin logic. + */ +- function _checkAuthorized() private { ++ function _checkAuthorized() internal virtual { // private → internal virtual for FV + address caller = _msgSender(); + (bool immediate, uint32 delay) = _canCallSelf(caller, _msgData()); + if (!immediate) { +@@ -792,7 +802,7 @@ + */ + function _getAdminRestrictions( + bytes calldata data +- ) private view returns (bool restricted, uint64 roleAdminId, uint32 executionDelay) { ++ ) internal view returns (bool restricted, uint64 roleAdminId, uint32 executionDelay) { // private → internal for FV + if (data.length < 4) { + return (false, 0, 0); + } +@@ -847,7 +857,7 @@ + address caller, + address target, + bytes calldata data +- ) private view returns (bool immediate, uint32 delay) { ++ ) internal view returns (bool immediate, uint32 delay) { // private → internal for FV + if (target == address(this)) { + return _canCallSelf(caller, data); + } else { +@@ -901,7 +911,7 @@ + /** + * @dev Extracts the selector from calldata. Panics if data is not at least 4 bytes + */ +- function _checkSelector(bytes calldata data) private pure returns (bytes4) { ++ function _checkSelector(bytes calldata data) internal pure returns (bytes4) { // private → internal for FV + return bytes4(data[0:4]); + } + } diff --git a/certora/harnesses/AccessManagedHarness.sol b/certora/harnesses/AccessManagedHarness.sol new file mode 100644 index 000000000..50be23ad5 --- /dev/null +++ b/certora/harnesses/AccessManagedHarness.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import "../patched/access/manager/IAccessManager.sol"; +import "../patched/access/manager/AccessManaged.sol"; + +contract AccessManagedHarness is AccessManaged { + bytes internal SOME_FUNCTION_CALLDATA = abi.encodeCall(this.someFunction, ()); + + constructor(address initialAuthority) AccessManaged(initialAuthority) {} + + function someFunction() public restricted() { + // Sanity for FV: the msg.data when calling this function should be the same as the data used when checking + // the schedule. This is a reformulation of `msg.data == SOME_FUNCTION_CALLDATA` that focuses on the operation + // hash for this call. + require( + IAccessManager(authority()).hashOperation(_msgSender(), address(this), msg.data) + == + IAccessManager(authority()).hashOperation(_msgSender(), address(this), SOME_FUNCTION_CALLDATA) + ); + } + + function authority_canCall_immediate(address caller) public view returns (bool result) { + (result,) = AuthorityUtils.canCallWithDelay(authority(), caller, address(this), this.someFunction.selector); + } + + function authority_canCall_delay(address caller) public view returns (uint32 result) { + (,result) = AuthorityUtils.canCallWithDelay(authority(), caller, address(this), this.someFunction.selector); + } + + function authority_getSchedule(address caller) public view returns (uint48) { + IAccessManager manager = IAccessManager(authority()); + return manager.getSchedule(manager.hashOperation(caller, address(this), SOME_FUNCTION_CALLDATA)); + } +} diff --git a/certora/harnesses/AccessManagerHarness.sol b/certora/harnesses/AccessManagerHarness.sol new file mode 100644 index 000000000..69295d467 --- /dev/null +++ b/certora/harnesses/AccessManagerHarness.sol @@ -0,0 +1,116 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import "../patched/access/manager/AccessManager.sol"; + +contract AccessManagerHarness is AccessManager { + // override with a storage slot that can basically take any value. + uint32 private _minSetback; + + constructor(address initialAdmin) AccessManager(initialAdmin) {} + + // FV + function minSetback() public view override returns (uint32) { + return _minSetback; + } + + function canCall_immediate(address caller, address target, bytes4 selector) external view returns (bool result) { + (result,) = canCall(caller, target, selector); + } + + function canCall_delay(address caller, address target, bytes4 selector) external view returns (uint32 result) { + (,result) = canCall(caller, target, selector); + } + + function canCallExtended(address caller, address target, bytes calldata data) external view returns (bool, uint32) { + return _canCallExtended(caller, target, data); + } + + function canCallExtended_immediate(address caller, address target, bytes calldata data) external view returns (bool result) { + (result,) = _canCallExtended(caller, target, data); + } + + function canCallExtended_delay(address caller, address target, bytes calldata data) external view returns (uint32 result) { + (,result) = _canCallExtended(caller, target, data); + } + + function getAdminRestrictions_restricted(bytes calldata data) external view returns (bool result) { + (result,,) = _getAdminRestrictions(data); + } + + function getAdminRestrictions_roleAdminId(bytes calldata data) external view returns (uint64 result) { + (,result,) = _getAdminRestrictions(data); + } + + function getAdminRestrictions_executionDelay(bytes calldata data) external view returns (uint32 result) { + (,,result) = _getAdminRestrictions(data); + } + + function hasRole_isMember(uint64 roleId, address account) external view returns (bool result) { + (result,) = hasRole(roleId, account); + } + + function hasRole_executionDelay(uint64 roleId, address account) external view returns (uint32 result) { + (,result) = hasRole(roleId, account); + } + + function getAccess_since(uint64 roleId, address account) external view returns (uint48 result) { + (result,,,) = getAccess(roleId, account); + } + + function getAccess_currentDelay(uint64 roleId, address account) external view returns (uint32 result) { + (,result,,) = getAccess(roleId, account); + } + + function getAccess_pendingDelay(uint64 roleId, address account) external view returns (uint32 result) { + (,,result,) = getAccess(roleId, account); + } + + function getAccess_effect(uint64 roleId, address account) external view returns (uint48 result) { + (,,,result) = getAccess(roleId, account); + } + + function getTargetAdminDelay_after(address target) public view virtual returns (uint32 result) { + (,result,) = _getTargetAdminDelayFull(target); + } + + function getTargetAdminDelay_effect(address target) public view virtual returns (uint48 result) { + (,,result) = _getTargetAdminDelayFull(target); + } + + function getRoleGrantDelay_after(uint64 roleId) public view virtual returns (uint32 result) { + (,result,) = _getRoleGrantDelayFull(roleId); + } + + function getRoleGrantDelay_effect(uint64 roleId) public view virtual returns (uint48 result) { + (,,result) = _getRoleGrantDelayFull(roleId); + } + + function hashExecutionId(address target, bytes4 selector) external pure returns (bytes32) { + return _hashExecutionId(target, selector); + } + + function executionId() external view returns (bytes32) { + return _executionId; + } + + // Pad with zeros (and don't revert) if data is too short. + function getSelector(bytes calldata data) external pure returns (bytes4) { + return bytes4(data); + } + + function getFirstArgumentAsAddress(bytes calldata data) external pure returns (address) { + return abi.decode(data[0x04:0x24], (address)); + } + + function getFirstArgumentAsUint64(bytes calldata data) external pure returns (uint64) { + return abi.decode(data[0x04:0x24], (uint64)); + } + + function _checkAuthorized() internal override { + // We need this hack otherwise certora will assume _checkSelector(_msgData()) can return anything :/ + require(msg.sig == _checkSelector(_msgData())); + super._checkAuthorized(); + } +} diff --git a/certora/specs.json b/certora/specs.json index 3e5acb568..20b02a03a 100644 --- a/certora/specs.json +++ b/certora/specs.json @@ -14,6 +14,25 @@ "contract": "AccessControlDefaultAdminRulesHarness", "files": ["certora/harnesses/AccessControlDefaultAdminRulesHarness.sol"] }, + { + "spec": "AccessManager", + "contract": "AccessManagerHarness", + "files": ["certora/harnesses/AccessManagerHarness.sol"], + "options": ["--optimistic_hashing", "--optimistic_loop"] + }, + { + "spec": "AccessManaged", + "contract": "AccessManagedHarness", + "files": [ + "certora/harnesses/AccessManagedHarness.sol", + "certora/harnesses/AccessManagerHarness.sol" + ], + "options": [ + "--optimistic_hashing", + "--optimistic_loop", + "--link AccessManagedHarness:_authority=AccessManagerHarness" + ] + }, { "spec": "DoubleEndedQueue", "contract": "DoubleEndedQueueHarness", diff --git a/certora/specs/AccessManaged.spec b/certora/specs/AccessManaged.spec new file mode 100644 index 000000000..adcb85936 --- /dev/null +++ b/certora/specs/AccessManaged.spec @@ -0,0 +1,34 @@ +import "helpers/helpers.spec"; +import "methods/IAccessManaged.spec"; + +methods { + // FV + function someFunction() external; + function authority_canCall_immediate(address) external returns (bool); + function authority_canCall_delay(address) external returns (uint32); + function authority_getSchedule(address) external returns (uint48); +} + +invariant isConsumingScheduledOpClean() + isConsumingScheduledOp() == to_bytes4(0); + +rule callRestrictedFunction(env e) { + bool immediate = authority_canCall_immediate(e, e.msg.sender); + uint32 delay = authority_canCall_delay(e, e.msg.sender); + uint48 scheduleBefore = authority_getSchedule(e, e.msg.sender); + + someFunction@withrevert(e); + bool success = !lastReverted; + + uint48 scheduleAfter = authority_getSchedule(e, e.msg.sender); + + // can only call if immediate, or (with delay) by consuming a scheduled op + assert success => ( + immediate || + ( + delay > 0 && + isSetAndPast(e, scheduleBefore) && + scheduleAfter == 0 + ) + ); +} diff --git a/certora/specs/AccessManager.spec b/certora/specs/AccessManager.spec new file mode 100644 index 000000000..cc4b0132a --- /dev/null +++ b/certora/specs/AccessManager.spec @@ -0,0 +1,826 @@ +import "helpers/helpers.spec"; +import "methods/IAccessManager.spec"; + +methods { + // FV + function canCall_immediate(address,address,bytes4) external returns (bool); + function canCall_delay(address,address,bytes4) external returns (uint32); + function canCallExtended(address,address,bytes) external returns (bool,uint32); + function canCallExtended_immediate(address,address,bytes) external returns (bool); + function canCallExtended_delay(address,address,bytes) external returns (uint32); + function getAdminRestrictions_restricted(bytes) external returns (bool); + function getAdminRestrictions_roleAdminId(bytes) external returns (uint64); + function getAdminRestrictions_executionDelay(bytes) external returns (uint32); + function hasRole_isMember(uint64,address) external returns (bool); + function hasRole_executionDelay(uint64,address) external returns (uint32); + function getAccess_since(uint64,address) external returns (uint48); + function getAccess_currentDelay(uint64,address) external returns (uint32); + function getAccess_pendingDelay(uint64,address) external returns (uint32); + function getAccess_effect(uint64,address) external returns (uint48); + function getTargetAdminDelay_after(address target) external returns (uint32); + function getTargetAdminDelay_effect(address target) external returns (uint48); + function getRoleGrantDelay_after(uint64 roleId) external returns (uint32); + function getRoleGrantDelay_effect(uint64 roleId) external returns (uint48); + function hashExecutionId(address,bytes4) external returns (bytes32) envfree; + function executionId() external returns (bytes32) envfree; + function getSelector(bytes) external returns (bytes4) envfree; + function getFirstArgumentAsAddress(bytes) external returns (address) envfree; + function getFirstArgumentAsUint64(bytes) external returns (uint64) envfree; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Helpers │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +definition isOnlyAuthorized(bytes4 selector) returns bool = + selector == to_bytes4(sig:labelRole(uint64,string).selector ) || + selector == to_bytes4(sig:setRoleAdmin(uint64,uint64).selector ) || + selector == to_bytes4(sig:setRoleGuardian(uint64,uint64).selector ) || + selector == to_bytes4(sig:setGrantDelay(uint64,uint32).selector ) || + selector == to_bytes4(sig:setTargetAdminDelay(address,uint32).selector ) || + selector == to_bytes4(sig:updateAuthority(address,address).selector ) || + selector == to_bytes4(sig:setTargetClosed(address,bool).selector ) || + selector == to_bytes4(sig:setTargetFunctionRole(address,bytes4[],uint64).selector) || + selector == to_bytes4(sig:grantRole(uint64,address,uint32).selector ) || + selector == to_bytes4(sig:revokeRole(uint64,address).selector ); + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Invariant: executionId must be clean when not in the middle of a call │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +invariant cleanExecutionId() + executionId() == to_bytes32(0); + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Invariant: public role │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +invariant publicRole(env e, address account) + hasRole_isMember(e, PUBLIC_ROLE(), account) && + hasRole_executionDelay(e, PUBLIC_ROLE(), account) == 0 && + getAccess_since(e, PUBLIC_ROLE(), account) == 0 && + getAccess_currentDelay(e, PUBLIC_ROLE(), account) == 0 && + getAccess_pendingDelay(e, PUBLIC_ROLE(), account) == 0 && + getAccess_effect(e, PUBLIC_ROLE(), account) == 0; + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Invariant: hasRole is consistent with getAccess │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +invariant hasRoleGetAccessConsistency(env e, uint64 roleId, address account) + hasRole_isMember(e, roleId, account) == (roleId == PUBLIC_ROLE() || isSetAndPast(e, getAccess_since(e, roleId, account))) && + hasRole_executionDelay(e, roleId, account) == getAccess_currentDelay(e, roleId, account); + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Functions: canCall, canCallExtended, getAccess, hasRole, isTargetClosed and getTargetFunctionRole do NOT revert │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule noRevert(env e) { + require nonpayable(e); + require sanity(e); + + address caller; + address target; + bytes data; + bytes4 selector; + uint64 roleId; + + canCall@withrevert(e, caller, target, selector); + assert !lastReverted; + + // require data.length <= max_uint64; + // + // canCallExtended@withrevert(e, caller, target, data); + // assert !lastReverted; + + getAccess@withrevert(e, roleId, caller); + assert !lastReverted; + + hasRole@withrevert(e, roleId, caller); + assert !lastReverted; + + isTargetClosed@withrevert(target); + assert !lastReverted; + + getTargetFunctionRole@withrevert(target, selector); + assert !lastReverted; + + // Not covered: + // - getAdminRestrictions (_1, _2 & _3) + // - getSelector +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Functions: admin restrictions are correct │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule getAdminRestrictions(env e, bytes data) { + bool restricted = getAdminRestrictions_restricted(e, data); + uint64 roleId = getAdminRestrictions_roleAdminId(e, data); + uint32 delay = getAdminRestrictions_executionDelay(e, data); + bytes4 selector = getSelector(data); + + if (data.length < 4) { + assert restricted == false; + assert roleId == 0; + assert delay == 0; + } else { + assert restricted == + isOnlyAuthorized(selector); + + assert roleId == ( + (restricted && selector == to_bytes4(sig:grantRole(uint64,address,uint32).selector)) || + (restricted && selector == to_bytes4(sig:revokeRole(uint64,address).selector )) + ? getRoleAdmin(getFirstArgumentAsUint64(data)) + : ADMIN_ROLE() + ); + + assert delay == ( + (restricted && selector == to_bytes4(sig:updateAuthority(address,address).selector )) || + (restricted && selector == to_bytes4(sig:setTargetClosed(address,bool).selector )) || + (restricted && selector == to_bytes4(sig:setTargetFunctionRole(address,bytes4[],uint64).selector)) + ? getTargetAdminDelay(e, getFirstArgumentAsAddress(data)) + : 0 + ); + } +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Functions: canCall │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule canCall(env e) { + address caller; + address target; + bytes4 selector; + + // Get relevant values + bool immediate = canCall_immediate(e, caller, target, selector); + uint32 delay = canCall_delay(e, caller, target, selector); + bool closed = isTargetClosed(target); + uint64 roleId = getTargetFunctionRole(target, selector); + bool isMember = hasRole_isMember(e, roleId, caller); + uint32 currentDelay = hasRole_executionDelay(e, roleId, caller); + + // Can only execute without delay in specific cases: + // - target not closed + // - if self-execution: `executionId` must match + // - if third party execution: must be member with no delay + assert immediate <=> ( + !closed && + ( + (caller == currentContract && executionId() == hashExecutionId(target, selector)) + || + (caller != currentContract && isMember && currentDelay == 0) + ) + ); + + // Can only execute with delay in specific cases: + // - target not closed + // - third party execution + // - caller is a member and has an execution delay + assert delay > 0 <=> ( + !closed && + caller != currentContract && + isMember && + currentDelay > 0 + ); + + // If there is a delay, then it must be the caller's execution delay + assert delay > 0 => delay == currentDelay; + + // Immediate execute means no delayed execution + assert immediate => delay == 0; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Functions: canCallExtended │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule canCallExtended(env e) { + address caller; + address target; + bytes data; + bytes4 selector = getSelector(data); + + bool immediate = canCallExtended_immediate(e, caller, target, data); + uint32 delay = canCallExtended_delay(e, caller, target, data); + bool enabled = getAdminRestrictions_restricted(e, data); + uint64 roleId = getAdminRestrictions_roleAdminId(e, data); + uint32 operationDelay = getAdminRestrictions_executionDelay(e, data); + bool inRole = hasRole_isMember(e, roleId, caller); + uint32 executionDelay = hasRole_executionDelay(e, roleId, caller); + + if (target == currentContract) { + // Can only execute without delay in the specific cases: + // - caller is the AccessManager and the executionId is set + // or + // - data matches an admin restricted function + // - caller has the necessary role + // - operation delay is not set + // - execution delay is not set + assert immediate <=> ( + ( + caller == currentContract && + data.length >= 4 && + executionId() == hashExecutionId(target, selector) + ) || ( + caller != currentContract && + enabled && + inRole && + operationDelay == 0 && + executionDelay == 0 + ) + ); + + // Immediate execute means no delayed execution + // This is equivalent to "delay > 0 => !immediate" + assert immediate => delay == 0; + + // Can only execute with delay in specific cases: + // - caller is a third party + // - data matches an admin restricted function + // - caller has the necessary role + // -operation delay or execution delay is set + assert delay > 0 <=> ( + caller != currentContract && + enabled && + inRole && + (operationDelay > 0 || executionDelay > 0) + ); + + // If there is a delay, then it must be the maximum of caller's execution delay and the operation delay + assert delay > 0 => to_mathint(delay) == max(operationDelay, executionDelay); + } else if (data.length < 4) { + assert immediate == false; + assert delay == 0; + } else { + // results are equivalent when targeting third party contracts + assert immediate == canCall_immediate(e, caller, target, selector); + assert delay == canCall_delay(e, caller, target, selector); + } +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ State transitions: getAccess │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule getAccessChangeTime(uint64 roleId, address account) { + env e1; + env e2; + + // values before + mathint getAccess1Before = getAccess_since(e1, roleId, account); + mathint getAccess2Before = getAccess_currentDelay(e1, roleId, account); + mathint getAccess3Before = getAccess_pendingDelay(e1, roleId, account); + mathint getAccess4Before = getAccess_effect(e1, roleId, account); + + // time pass: e1 → e2 + require clock(e1) <= clock(e2); + + // values after + mathint getAccess1After = getAccess_since(e2, roleId, account); + mathint getAccess2After = getAccess_currentDelay(e2, roleId, account); + mathint getAccess3After = getAccess_pendingDelay(e2, roleId, account); + mathint getAccess4After = getAccess_effect(e2, roleId, account); + + // member "since" cannot change as a consequence of time passing + assert getAccess1Before == getAccess1After; + + // any change of any other value should be a consequence of the effect timepoint being reached + assert ( + getAccess2Before != getAccess2After || + getAccess3Before != getAccess3After || + getAccess4Before != getAccess4After + ) => ( + getAccess4Before != 0 && + getAccess4Before > clock(e1) && + getAccess4Before <= clock(e2) && + getAccess2After == getAccess3Before && + getAccess3After == 0 && + getAccess4After == 0 + ); +} + +rule getAccessChangeCall(uint64 roleId, address account) { + env e; + + // sanity + require sanity(e); + + // values before + mathint getAccess1Before = getAccess_since(e, roleId, account); + mathint getAccess2Before = getAccess_currentDelay(e, roleId, account); + mathint getAccess3Before = getAccess_pendingDelay(e, roleId, account); + mathint getAccess4Before = getAccess_effect(e, roleId, account); + + // arbitrary function call + method f; calldataarg args; f(e, args); + + // values before + mathint getAccess1After = getAccess_since(e, roleId, account); + mathint getAccess2After = getAccess_currentDelay(e, roleId, account); + mathint getAccess3After = getAccess_pendingDelay(e, roleId, account); + mathint getAccess4After = getAccess_effect(e, roleId, account); + + // transitions + assert ( + getAccess1Before != getAccess1After || + getAccess2Before != getAccess2After || + getAccess3Before != getAccess3After || + getAccess4Before != getAccess4After + ) => ( + ( + f.selector == sig:grantRole(uint64,address,uint32).selector && + getAccess1After > 0 + ) || ( + ( + f.selector == sig:revokeRole(uint64,address).selector || + f.selector == sig:renounceRole(uint64,address).selector + ) && + getAccess1After == 0 && + getAccess2After == 0 && + getAccess3After == 0 && + getAccess4After == 0 + ) + ); +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ State transitions: isTargetClosed │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule isTargetClosedChangeTime(address target) { + env e1; + env e2; + + // values before + bool isClosedBefore = isTargetClosed(e1, target); + + // time pass: e1 → e2 + require clock(e1) <= clock(e2); + + // values after + bool isClosedAfter = isTargetClosed(e2, target); + + // transitions + assert isClosedBefore == isClosedAfter; +} + +rule isTargetClosedChangeCall(address target) { + env e; + + // values before + bool isClosedBefore = isTargetClosed(e, target); + + // arbitrary function call + method f; calldataarg args; f(e, args); + + // values after + bool isClosedAfter = isTargetClosed(e, target); + + // transitions + assert isClosedBefore != isClosedAfter => ( + f.selector == sig:setTargetClosed(address,bool).selector + ); +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ State transitions: getTargetFunctionRole │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule getTargetFunctionRoleChangeTime(address target, bytes4 selector) { + env e1; + env e2; + + // values before + mathint roleIdBefore = getTargetFunctionRole(e1, target, selector); + + // time pass: e1 → e2 + require clock(e1) <= clock(e2); + + // values after + mathint roleIdAfter = getTargetFunctionRole(e2, target, selector); + + // transitions + assert roleIdBefore == roleIdAfter; +} + +rule getTargetFunctionRoleChangeCall(address target, bytes4 selector) { + env e; + + // values before + mathint roleIdBefore = getTargetFunctionRole(e, target, selector); + + // arbitrary function call + method f; calldataarg args; f(e, args); + + // values after + mathint roleIdAfter = getTargetFunctionRole(e, target, selector); + + // transitions + assert roleIdBefore != roleIdAfter => ( + f.selector == sig:setTargetFunctionRole(address,bytes4[],uint64).selector + ); +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ State transitions: getTargetAdminDelay │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule getTargetAdminDelayChangeTime(address target) { + env e1; + env e2; + + // values before + mathint delayBefore = getTargetAdminDelay(e1, target); + mathint delayPendingBefore = getTargetAdminDelay_after(e1, target); + mathint delayEffectBefore = getTargetAdminDelay_effect(e1, target); + + // time pass: e1 → e2 + require clock(e1) <= clock(e2); + + // values after + mathint delayAfter = getTargetAdminDelay(e2, target); + mathint delayPendingAfter = getTargetAdminDelay_after(e2, target); + mathint delayEffectAfter = getTargetAdminDelay_effect(e2, target); + + assert ( + delayBefore != delayAfter || + delayPendingBefore != delayPendingAfter || + delayEffectBefore != delayEffectAfter + ) => ( + delayEffectBefore > clock(e1) && + delayEffectBefore <= clock(e2) && + delayAfter == delayPendingBefore && + delayPendingAfter == 0 && + delayEffectAfter == 0 + ); +} + +rule getTargetAdminDelayChangeCall(address target) { + env e; + + // values before + mathint delayBefore = getTargetAdminDelay(e, target); + mathint delayPendingBefore = getTargetAdminDelay_after(e, target); + mathint delayEffectBefore = getTargetAdminDelay_effect(e, target); + + // arbitrary function call + method f; calldataarg args; f(e, args); + + // values after + mathint delayAfter = getTargetAdminDelay(e, target); + mathint delayPendingAfter = getTargetAdminDelay_after(e, target); + mathint delayEffectAfter = getTargetAdminDelay_effect(e, target); + + // if anything changed ... + assert ( + delayBefore != delayAfter || + delayPendingBefore != delayPendingAfter || + delayEffectBefore != delayEffectAfter + ) => ( + ( + // ... it was the consequence of a call to setTargetAdminDelay + f.selector == sig:setTargetAdminDelay(address,uint32).selector + ) && ( + // ... delay cannot decrease instantly + delayAfter >= delayBefore + ) && ( + // ... if setback is not 0, value cannot change instantly + minSetback() > 0 => ( + delayBefore == delayAfter + ) + ) && ( + // ... if the value did not change and there is a minSetback, there must be something scheduled in the future + delayAfter == delayBefore && minSetback() > 0 => ( + delayEffectAfter >= clock(e) + minSetback() + ) + // note: if there is no minSetback, and if the caller "confirms" the current value, + // then this as immediate effect and nothing is scheduled + ) && ( + // ... if the value changed, then no further change should be scheduled + delayAfter != delayBefore => ( + delayPendingAfter == 0 && + delayEffectAfter == 0 + ) + ) + ); +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ State transitions: getRoleGrantDelay │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule getRoleGrantDelayChangeTime(uint64 roleId) { + env e1; + env e2; + + // values before + mathint delayBefore = getRoleGrantDelay(e1, roleId); + mathint delayPendingBefore = getRoleGrantDelay_after(e1, roleId); + mathint delayEffectBefore = getRoleGrantDelay_effect(e1, roleId); + + // time pass: e1 → e2 + require clock(e1) <= clock(e2); + + // values after + mathint delayAfter = getRoleGrantDelay(e2, roleId); + mathint delayPendingAfter = getRoleGrantDelay_after(e2, roleId); + mathint delayEffectAfter = getRoleGrantDelay_effect(e2, roleId); + + assert ( + delayBefore != delayAfter || + delayPendingBefore != delayPendingAfter || + delayEffectBefore != delayEffectAfter + ) => ( + delayEffectBefore > clock(e1) && + delayEffectBefore <= clock(e2) && + delayAfter == delayPendingBefore && + delayPendingAfter == 0 && + delayEffectAfter == 0 + ); +} + +rule getRoleGrantDelayChangeCall(uint64 roleId) { + env e; + + // values before + mathint delayBefore = getRoleGrantDelay(e, roleId); + mathint delayPendingBefore = getRoleGrantDelay_after(e, roleId); + mathint delayEffectBefore = getRoleGrantDelay_effect(e, roleId); + + // arbitrary function call + method f; calldataarg args; f(e, args); + + // values after + mathint delayAfter = getRoleGrantDelay(e, roleId); + mathint delayPendingAfter = getRoleGrantDelay_after(e, roleId); + mathint delayEffectAfter = getRoleGrantDelay_effect(e, roleId); + + // if anything changed ... + assert ( + delayBefore != delayAfter || + delayPendingBefore != delayPendingAfter || + delayEffectBefore != delayEffectAfter + ) => ( + ( + // ... it was the consequence of a call to setTargetAdminDelay + f.selector == sig:setGrantDelay(uint64,uint32).selector + ) && ( + // ... delay cannot decrease instantly + delayAfter >= delayBefore + ) && ( + // ... if setback is not 0, value cannot change instantly + minSetback() > 0 => ( + delayBefore == delayAfter + ) + ) && ( + // ... if the value did not change and there is a minSetback, there must be something scheduled in the future + delayAfter == delayBefore && minSetback() > 0 => ( + delayEffectAfter >= clock(e) + minSetback() + ) + // note: if there is no minSetback, and if the caller "confirms" the current value, + // then this as immediate effect and nothing is scheduled + ) && ( + // ... if the value changed, then no further change should be scheduled + delayAfter != delayBefore => ( + delayPendingAfter == 0 && + delayEffectAfter == 0 + ) + ) + ); +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ State transitions: getRoleAdmin & getRoleGuardian │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule getRoleAdminChangeCall(uint64 roleId) { + // values before + mathint adminIdBefore = getRoleAdmin(roleId); + + // arbitrary function call + env e; method f; calldataarg args; f(e, args); + + // values after + mathint adminIdAfter = getRoleAdmin(roleId); + + // transitions + assert adminIdBefore != adminIdAfter => f.selector == sig:setRoleAdmin(uint64,uint64).selector; +} + +rule getRoleGuardianChangeCall(uint64 roleId) { + // values before + mathint guardianIdBefore = getRoleGuardian(roleId); + + // arbitrary function call + env e; method f; calldataarg args; f(e, args); + + // values after + mathint guardianIdAfter = getRoleGuardian(roleId); + + // transitions + assert guardianIdBefore != guardianIdAfter => ( + f.selector == sig:setRoleGuardian(uint64,uint64).selector + ); +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ State transitions: getNonce │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule getNonceChangeCall(bytes32 operationId) { + // values before + mathint nonceBefore = getNonce(operationId); + + // reasonable assumption + require nonceBefore < max_uint32; + + // arbitrary function call + env e; method f; calldataarg args; f(e, args); + + // values after + mathint nonceAfter = getNonce(operationId); + + // transitions + assert nonceBefore != nonceAfter => ( + f.selector == sig:schedule(address,bytes,uint48).selector && + nonceAfter == nonceBefore + 1 + ); +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ State transitions: getSchedule │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule getScheduleChangeTime(bytes32 operationId) { + env e1; + env e2; + + // values before + mathint scheduleBefore = getSchedule(e1, operationId); + + // time pass: e1 → e2 + require clock(e1) <= clock(e2); + + // values after + mathint scheduleAfter = getSchedule(e2, operationId); + + // transition + assert scheduleBefore != scheduleAfter => ( + scheduleBefore + expiration() > clock(e1) && + scheduleBefore + expiration() <= clock(e2) && + scheduleAfter == 0 + ); +} + +rule getScheduleChangeCall(bytes32 operationId) { + env e; + + // values before + mathint scheduleBefore = getSchedule(e, operationId); + + // arbitrary function call + method f; calldataarg args; f(e, args); + + // values after + mathint scheduleAfter = getSchedule(e, operationId); + + // transitions + assert scheduleBefore != scheduleAfter => ( + (f.selector == sig:schedule(address,bytes,uint48).selector && scheduleAfter >= clock(e)) || + (f.selector == sig:execute(address,bytes).selector && scheduleAfter == 0 ) || + (f.selector == sig:cancel(address,address,bytes).selector && scheduleAfter == 0 ) || + (f.selector == sig:consumeScheduledOp(address,bytes).selector && scheduleAfter == 0 ) || + (isOnlyAuthorized(to_bytes4(f.selector)) && scheduleAfter == 0 ) + ); +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Functions: restricted functions can only be called by owner │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule restrictedFunctions(env e) { + require nonpayable(e); + require sanity(e); + + method f; + calldataarg args; + + f(e,args); + + assert ( + f.selector == sig:labelRole(uint64,string).selector || + f.selector == sig:setRoleAdmin(uint64,uint64).selector || + f.selector == sig:setRoleGuardian(uint64,uint64).selector || + f.selector == sig:setGrantDelay(uint64,uint32).selector || + f.selector == sig:setTargetAdminDelay(address,uint32).selector || + f.selector == sig:updateAuthority(address,address).selector || + f.selector == sig:setTargetClosed(address,bool).selector || + f.selector == sig:setTargetFunctionRole(address,bytes4[],uint64).selector + ) => ( + hasRole_isMember(e, ADMIN_ROLE(), e.msg.sender) || e.msg.sender == currentContract + ); +} + +rule restrictedFunctionsGrantRole(env e) { + require nonpayable(e); + require sanity(e); + + uint64 roleId; + address account; + uint32 executionDelay; + + // We want to check that the caller has the admin role before we possibly grant it. + bool hasAdminRoleBefore = hasRole_isMember(e, getRoleAdmin(roleId), e.msg.sender); + + grantRole(e, roleId, account, executionDelay); + + assert hasAdminRoleBefore || e.msg.sender == currentContract; +} + +rule restrictedFunctionsRevokeRole(env e) { + require nonpayable(e); + require sanity(e); + + uint64 roleId; + address account; + + // This is needed if roleId is self-administered, the `revokeRole` call could target + // e.msg.sender and remove the very role that is necessary for authorizing the call. + bool hasAdminRoleBefore = hasRole_isMember(e, getRoleAdmin(roleId), e.msg.sender); + + revokeRole(e, roleId, account); + + assert hasAdminRoleBefore || e.msg.sender == currentContract; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Functions: canCall delay is enforced for calls to execute (only for others target) │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +// getScheduleChangeCall proves that only {schedule} can set an operation schedule to a non 0 value +rule callDelayEnforce_scheduleInTheFuture(env e) { + address target; + bytes data; + uint48 when; + + // Condition: calling a third party with a delay + mathint delay = canCallExtended_delay(e, e.msg.sender, target, data); + require delay > 0; + + // Schedule + schedule(e, target, data, when); + + // Get operation schedule + mathint timepoint = getSchedule(e, hashOperation(e.msg.sender, target, data)); + + // Schedule is far enough in the future + assert timepoint == max(clock(e) + delay, when); +} + +rule callDelayEnforce_executeAfterDelay(env e) { + address target; + bytes data; + + // Condition: calling a third party with a delay + mathint delay = canCallExtended_delay(e, e.msg.sender, target, data); + + // Get operation schedule before + mathint scheduleBefore = getSchedule(e, hashOperation(e.msg.sender, target, data)); + + // Do call + execute@withrevert(e, target, data); + bool success = !lastReverted; + + // Get operation schedule after + mathint scheduleAfter = getSchedule(e, hashOperation(e.msg.sender, target, data)); + + // Can only execute if delay is set and has passed + assert success => ( + delay > 0 => ( + scheduleBefore != 0 && + scheduleBefore <= clock(e) + ) && + scheduleAfter == 0 + ); +} diff --git a/certora/specs/helpers/helpers.spec b/certora/specs/helpers/helpers.spec index a6c1e2302..7125ce2d8 100644 --- a/certora/specs/helpers/helpers.spec +++ b/certora/specs/helpers/helpers.spec @@ -1,7 +1,12 @@ // environment definition nonpayable(env e) returns bool = e.msg.value == 0; definition nonzerosender(env e) returns bool = e.msg.sender != 0; +definition sanity(env e) returns bool = clock(e) > 0 && clock(e) <= max_uint48; // math definition min(mathint a, mathint b) returns mathint = a < b ? a : b; definition max(mathint a, mathint b) returns mathint = a > b ? a : b; + +// time +definition clock(env e) returns mathint = to_mathint(e.block.timestamp); +definition isSetAndPast(env e, uint48 timepoint) returns bool = timepoint != 0 && to_mathint(timepoint) <= clock(e); diff --git a/certora/specs/methods/IAccessManaged.spec b/certora/specs/methods/IAccessManaged.spec new file mode 100644 index 000000000..886d917d4 --- /dev/null +++ b/certora/specs/methods/IAccessManaged.spec @@ -0,0 +1,5 @@ +methods { + function authority() external returns (address) envfree; + function isConsumingScheduledOp() external returns (bytes4) envfree; + function setAuthority(address) external; +} diff --git a/certora/specs/methods/IAccessManager.spec b/certora/specs/methods/IAccessManager.spec new file mode 100644 index 000000000..5d305f7b4 --- /dev/null +++ b/certora/specs/methods/IAccessManager.spec @@ -0,0 +1,33 @@ +methods { + function ADMIN_ROLE() external returns (uint64) envfree; + function PUBLIC_ROLE() external returns (uint64) envfree; + function canCall(address,address,bytes4) external returns (bool,uint32); + function expiration() external returns (uint32) envfree; + function minSetback() external returns (uint32) envfree; + function isTargetClosed(address) external returns (bool) envfree; + function getTargetFunctionRole(address,bytes4) external returns (uint64) envfree; + function getTargetAdminDelay(address) external returns (uint32); + function getRoleAdmin(uint64) external returns (uint64) envfree; + function getRoleGuardian(uint64) external returns (uint64) envfree; + function getRoleGrantDelay(uint64) external returns (uint32); + function getAccess(uint64,address) external returns (uint48,uint32,uint32,uint48); + function hasRole(uint64,address) external returns (bool,uint32); + function labelRole(uint64,string) external; + function grantRole(uint64,address,uint32) external; + function revokeRole(uint64,address) external; + function renounceRole(uint64,address) external; + function setRoleAdmin(uint64,uint64) external; + function setRoleGuardian(uint64,uint64) external; + function setGrantDelay(uint64,uint32) external; + function setTargetFunctionRole(address,bytes4[],uint64) external; + function setTargetAdminDelay(address,uint32) external; + function setTargetClosed(address,bool) external; + function hashOperation(address,address,bytes) external returns (bytes32) envfree; + function getNonce(bytes32) external returns (uint32) envfree; + function getSchedule(bytes32) external returns (uint48); + function schedule(address,bytes,uint48) external returns (bytes32,uint32); + function execute(address,bytes) external returns (uint32); + function cancel(address,address,bytes) external returns (uint32); + function consumeScheduledOp(address,bytes) external; + function updateAuthority(address,address) external; +} diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 234164f21..af223b45c 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -586,7 +586,7 @@ contract AccessManager is Context, Multicall, IAccessManager { uint48 minWhen = Time.timestamp() + setback; - // if call with delay is not authorized, or if requested timing is too soon + // If call with delay is not authorized, or if requested timing is too soon, revert if (setback == 0 || (when > 0 && when < minWhen)) { revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data)); } @@ -639,7 +639,7 @@ contract AccessManager is Context, Multicall, IAccessManager { // Fetch restrictions that apply to the caller on the targeted function (bool immediate, uint32 setback) = _canCallExtended(caller, target, data); - // If caller is not authorised, revert + // If call is not authorized, revert if (!immediate && setback == 0) { revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data)); } diff --git a/requirements.txt b/requirements.txt index fd0ec3019..bdea09aa8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -certora-cli==4.8.0 +certora-cli==4.13.1 From baf0e91279fd9f1c2b8a05925593ba4107df97ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Wed, 4 Oct 2023 14:34:18 -0600 Subject: [PATCH 081/167] Improve AccessManager tests (#4613) Co-authored-by: Hadrien Croubois Co-authored-by: Francisco Giordano --- contracts/access/manager/AccessManager.sol | 130 +- contracts/access/manager/IAccessManager.sol | 7 + contracts/mocks/AccessManagedTarget.sol | 11 + contracts/utils/types/Time.sol | 16 +- scripts/upgradeable/transpile.sh | 2 +- test/access/manager/AccessManager.behavior.js | 711 ++++ test/access/manager/AccessManager.test.js | 3270 ++++++++++++----- test/helpers/access-manager.js | 69 + 8 files changed, 3284 insertions(+), 932 deletions(-) create mode 100644 test/access/manager/AccessManager.behavior.js create mode 100644 test/helpers/access-manager.js diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index af223b45c..78492697c 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -13,23 +13,32 @@ import {Time} from "../../utils/types/Time.sol"; /** * @dev AccessManager is a central contract to store the permissions of a system. * - * The smart contracts under the control of an AccessManager instance will have a set of "restricted" functions, and the - * exact details of how access is restricted for each of those functions is configurable by the admins of the instance. - * These restrictions are expressed in terms of "roles". + * A smart contract under the control of an AccessManager instance is known as a target, and will inherit from the + * {AccessManaged} contract, be connected to this contract as its manager and implement the {AccessManaged-restricted} + * modifier on a set of functions selected to be permissioned. Note that any function without this setup won't be + * effectively restricted. * - * An AccessManager instance will define a set of roles. Accounts can be added into any number of these roles. Each of - * them defines a role, and may confer access to some of the restricted functions in the system, as configured by admins - * through the use of {setFunctionAllowedRoles}. + * The restriction rules for such functions are defined in terms of "roles" identified by an `uint64` and scoped + * by target (`address`) and function selectors (`bytes4`). These roles are stored in this contract and can be + * configured by admins (`ADMIN_ROLE` members) after a delay (see {getTargetAdminDelay}). * - * Note that a function in a target contract may become permissioned in this way only when: 1) said contract is - * {AccessManaged} and is connected to this contract as its manager, and 2) said function is decorated with the - * `restricted` modifier. + * For each target contract, admins can configure the following without any delay: * - * There is a special role defined by default named "public" which all accounts automatically have. + * * The target's {AccessManaged-authority} via {updateAuthority}. + * * Close or open a target via {setTargetClosed} keeping the permissions intact. + * * The roles that are allowed (or disallowed) to call a given function (identified by its selector) through {setTargetFunctionRole}. * - * In addition to the access rules defined by each target's functions being assigned to roles, then entire target can - * be "closed". This "closed" mode is set/unset by the admin using {setTargetClosed} and can be used to lock a contract - * while permissions are being (re-)configured. + * By default every address is member of the `PUBLIC_ROLE` and every target function is restricted to the `ADMIN_ROLE` until configured otherwise. + * Additionally, each role has the following configuration options restricted to this manager's admins: + * + * * A role's admin role via {setRoleAdmin} who can grant or revoke roles. + * * A role's guardian role via {setRoleGuardian} who's allowed to cancel operations. + * * A delay in which a role takes effect after being granted through {setGrantDelay}. + * * A delay of any target's admin action via {setTargetAdminDelay}. + * * A role label for discoverability purposes with {labelRole}. + * + * Any account can be added and removed into any number of these roles by using the {grantRole} and {revokeRole} functions + * restricted to each role's admin (see {getRoleAdmin}). * * Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that * they will be highly secured (e.g., a multisig or a well-configured DAO). @@ -60,28 +69,30 @@ contract AccessManager is Context, Multicall, IAccessManager { // Structure that stores the details for a role/account pair. This structures fit into a single slot. struct Access { - // Timepoint at which the user gets the permission. If this is either 0, or in the future, the role - // permission is not available. + // Timepoint at which the user gets the permission. + // If this is either 0 or in the future, then the role permission is not available. uint48 since; // Delay for execution. Only applies to restricted() / execute() calls. Time.Delay delay; } - // Structure that stores the details of a role, including: - // - the members of the role - // - the admin role (that can grant or revoke permissions) - // - the guardian role (that can cancel operations targeting functions that need this role) - // - the grand delay + // Structure that stores the details of a role. struct Role { + // Members of the role. mapping(address user => Access access) members; + // Admin who can grant or revoke permissions. uint64 admin; + // Guardian who can cancel operations targeting functions that need this role. uint64 guardian; + // Delay in which the role takes effect after being granted. Time.Delay grantDelay; } // Structure that stores the details for a scheduled operation. This structure fits into a single slot. struct Schedule { + // Moment at which the operation can be executed. uint48 timepoint; + // Operation nonce to allow third-party contracts to identify the operation. uint32 nonce; } @@ -92,6 +103,7 @@ contract AccessManager is Context, Multicall, IAccessManager { mapping(uint64 roleId => Role) private _roles; mapping(bytes32 operationId => Schedule) private _schedules; + // Used to identify operations that are currently being executed via {execute}. // This should be transient storage when supported by the EVM. bytes32 private _executionId; @@ -120,15 +132,19 @@ contract AccessManager is Context, Multicall, IAccessManager { * & {execute} workflow. * * This function is usually called by the targeted contract to control immediate execution of restricted functions. - * Therefore we only return true is the call can be performed without any delay. If the call is subject to a delay, - * then the function should return false, and the caller should schedule the operation for future execution. + * Therefore we only return true if the call can be performed without any delay. If the call is subject to a + * previously set delay (not zero), then the function should return false and the caller should schedule the operation + * for future execution. * - * We may be able to hash the operation, and check if the call was scheduled, but we would not be able to cleanup - * the schedule, leaving the possibility of multiple executions. Maybe this function should not be view? + * If `immediate` is true, the delay can be disregarded and the operation can be immediately executed, otherwise + * the operation can be executed if and only if delay is greater than 0. * * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail * to identify the indirect workflow, and will consider calls that require a delay to be forbidden. + * + * NOTE: This function does not report the permissions of this manager itself. These are defined by the + * {_canCallSelf} function instead. */ function canCall( address caller, @@ -150,13 +166,16 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Expiration delay for scheduled proposals. Defaults to 1 week. + * + * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately, + * disabling any scheduling usage. */ function expiration() public view virtual returns (uint32) { return 1 weeks; } /** - * @dev Minimum setback for all delay updates, with the exception of execution delays, which + * @dev Minimum setback for all delay updates, with the exception of execution delays. It * can be increased without setback (and in the event of an accidental increase can be reset * via {revokeRole}). Defaults to 5 days. */ @@ -165,7 +184,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Get the mode under which a contract is operating. + * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied. */ function isTargetClosed(address target) public view virtual returns (bool) { return _targets[target].closed; @@ -186,7 +205,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Get the id of the role that acts as an admin for given role. + * @dev Get the id of the role that acts as an admin for the given role. * * The admin permission is required to grant the role, revoke the role and update the execution delay to execute * an operation that is restricted to this role. @@ -205,9 +224,10 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Get the role current grant delay, that value may change at any point, without an event emitted, following - * a call to {setGrantDelay}. Changes to this value, including effect timepoint are notified by the - * {RoleGrantDelayChanged} event. + * @dev Get the role current grant delay. + * + * Its value may change at any point without an event emitted following a call to {setGrantDelay}. + * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event. */ function getRoleGrantDelay(uint64 roleId) public view virtual returns (uint32) { return _roles[roleId].grantDelay.get(); @@ -237,8 +257,8 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Check if a given account currently had the permission level corresponding to a given role. Note that this - * permission might be associated with a delay. {getAccess} can provide more details. + * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this + * permission might be associated with an execution delay. {getAccess} can provide more details. */ function hasRole( uint64 roleId, @@ -256,6 +276,10 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Give a label to a role, for improved role discoverabily by UIs. * + * Requirements: + * + * - the caller must be a global admin + * * Emits a {RoleLabel} event. */ function labelRole(uint64 roleId, string calldata label) public virtual onlyAuthorized { @@ -270,19 +294,20 @@ contract AccessManager is Context, Multicall, IAccessManager { * * This gives the account the authorization to call any function that is restricted to this role. An optional * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation - * that is restricted to members this role. The user will only be able to execute the operation after the delay has + * that is restricted to members of this role. The user will only be able to execute the operation after the delay has * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}). * * If the account has already been granted this role, the execution delay will be updated. This update is not - * immediate and follows the delay rules. For example, If a user currently has a delay of 3 hours, and this is + * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any * operation executed in the 3 hours that follows this update was indeed scheduled before this update. * * Requirements: * * - the caller must be an admin for the role (see {getRoleAdmin}) + * - granted role must not be the `PUBLIC_ROLE` * - * Emits a {RoleGranted} event + * Emits a {RoleGranted} event. */ function grantRole(uint64 roleId, address account, uint32 executionDelay) public virtual onlyAuthorized { _grantRole(roleId, account, getRoleGrantDelay(roleId), executionDelay); @@ -295,6 +320,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * Requirements: * * - the caller must be an admin for the role (see {getRoleAdmin}) + * - revoked role must not be the `PUBLIC_ROLE` * * Emits a {RoleRevoked} event if the account had the role. */ @@ -303,8 +329,8 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Renounce role permissions for the calling account, with immediate effect. If the sender is not in - * the role, this call has no effect. + * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in + * the role this call has no effect. * * Requirements: * @@ -416,7 +442,10 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Internal version of {setRoleAdmin} without access control. * - * Emits a {RoleAdminChanged} event + * Emits a {RoleAdminChanged} event. + * + * NOTE: Setting the admin role as the `PUBLIC_ROLE` is allowed, but it will effectively allow + * anyone to set grant or revoke such role. */ function _setRoleAdmin(uint64 roleId, uint64 admin) internal virtual { if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { @@ -431,7 +460,10 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Internal version of {setRoleGuardian} without access control. * - * Emits a {RoleGuardianChanged} event + * Emits a {RoleGuardianChanged} event. + * + * NOTE: Setting the guardian role as the `PUBLIC_ROLE` is allowed, but it will effectively allow + * anyone to cancel any scheduled operation for such role. */ function _setRoleGuardian(uint64 roleId, uint64 guardian) internal virtual { if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { @@ -446,7 +478,7 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Internal version of {setGrantDelay} without access control. * - * Emits a {RoleGrantDelayChanged} event + * Emits a {RoleGrantDelayChanged} event. */ function _setGrantDelay(uint64 roleId, uint32 newDelay) internal virtual { if (roleId == PUBLIC_ROLE) { @@ -480,9 +512,9 @@ contract AccessManager is Context, Multicall, IAccessManager { } /** - * @dev Internal version of {setFunctionAllowedRole} without access control. + * @dev Internal version of {setTargetFunctionRole} without access control. * - * Emits a {TargetFunctionRoleUpdated} event + * Emits a {TargetFunctionRoleUpdated} event. */ function _setTargetFunctionRole(address target, bytes4 selector, uint64 roleId) internal virtual { _targets[target].allowedRoles[selector] = roleId; @@ -496,7 +528,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * * - the caller must be a global admin * - * Emits a {TargetAdminDelayUpdated} event per selector + * Emits a {TargetAdminDelayUpdated} event. */ function setTargetAdminDelay(address target, uint32 newDelay) public virtual onlyAuthorized { _setTargetAdminDelay(target, newDelay); @@ -505,7 +537,7 @@ contract AccessManager is Context, Multicall, IAccessManager { /** * @dev Internal version of {setTargetAdminDelay} without access control. * - * Emits a {TargetAdminDelayUpdated} event + * Emits a {TargetAdminDelayUpdated} event. */ function _setTargetAdminDelay(address target, uint32 newDelay) internal virtual { uint48 effect; @@ -673,7 +705,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager, * with all the verifications that it implies. * - * Emit a {OperationExecuted} event + * Emit a {OperationExecuted} event. */ function consumeScheduledOp(address caller, bytes calldata data) public virtual { address target = _msgSender(); @@ -788,7 +820,7 @@ contract AccessManager is Context, Multicall, IAccessManager { * Returns: * - bool restricted: does this data match a restricted operation * - uint64: which role is this operation restricted to - * - uint32: minimum delay to enforce for that operation (on top of the admin's execution delay) + * - uint32: minimum delay to enforce for that operation (max between operation's delay and admin's execution delay) */ function _getAdminRestrictions( bytes calldata data @@ -834,14 +866,12 @@ contract AccessManager is Context, Multicall, IAccessManager { // =================================================== HELPERS ==================================================== /** - * @dev An extended version of {canCall} for internal use that considers restrictions for admin functions. + * @dev An extended version of {canCall} for internal usage that checks {_canCallSelf} + * when the target is this contract. * * Returns: * - bool immediate: whether the operation can be executed immediately (with no delay) * - uint32 delay: the execution delay - * - * If immediate is true, the delay can be disregarded and the operation can be immediately executed. - * If immediate is false, the operation can be executed if and only if delay is greater than 0. */ function _canCallExtended( address caller, diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index 0fec166f9..95dd1b65a 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -29,6 +29,13 @@ interface IAccessManager { event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce); event RoleLabel(uint64 indexed roleId, string label); + /** + * @dev Emitted when `account` is granted `roleId`. + * + * NOTE: The meaning of the `since` argument depends on the `newMember` argument. + * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role, + * otherwise it indicates the execution delay for this account and roleId is updated. + */ event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember); event RoleRevoked(uint64 indexed roleId, address indexed account); event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin); diff --git a/contracts/mocks/AccessManagedTarget.sol b/contracts/mocks/AccessManagedTarget.sol index 0f7c7a193..673feedaa 100644 --- a/contracts/mocks/AccessManagedTarget.sol +++ b/contracts/mocks/AccessManagedTarget.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.20; import {AccessManaged} from "../access/manager/AccessManaged.sol"; +import {StorageSlot} from "../utils/StorageSlot.sol"; abstract contract AccessManagedTarget is AccessManaged { event CalledRestricted(address caller); @@ -17,6 +18,16 @@ abstract contract AccessManagedTarget is AccessManaged { emit CalledUnrestricted(msg.sender); } + function setIsConsumingScheduledOp(bool isConsuming, bytes32 slot) external { + // Memory layout is 0x....<_consumingSchedule (boolean)> + bytes32 mask = bytes32(uint256(1 << 160)); + if (isConsuming) { + StorageSlot.getBytes32Slot(slot).value |= mask; + } else { + StorageSlot.getBytes32Slot(slot).value &= ~mask; + } + } + fallback() external { emit CalledFallback(msg.sender); } diff --git a/contracts/utils/types/Time.sol b/contracts/utils/types/Time.sol index 4ccdc8174..12d2659a2 100644 --- a/contracts/utils/types/Time.sol +++ b/contracts/utils/types/Time.sol @@ -96,22 +96,26 @@ library Time { * enforce the old delay at the moment of the update. Returns the updated Delay object and the timestamp when the * new delay becomes effective. */ - function withUpdate(Delay self, uint32 newValue, uint32 minSetback) internal view returns (Delay, uint48) { + function withUpdate( + Delay self, + uint32 newValue, + uint32 minSetback + ) internal view returns (Delay updatedDelay, uint48 effect) { uint32 value = self.get(); uint32 setback = uint32(Math.max(minSetback, value > newValue ? value - newValue : 0)); - uint48 effect = timestamp() + setback; + effect = timestamp() + setback; return (pack(value, newValue, effect), effect); } /** * @dev Split a delay into its components: valueBefore, valueAfter and effect (transition timepoint). */ - function unpack(Delay self) internal pure returns (uint32, uint32, uint48) { + function unpack(Delay self) internal pure returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) { uint112 raw = Delay.unwrap(self); - uint32 valueAfter = uint32(raw); - uint32 valueBefore = uint32(raw >> 32); - uint48 effect = uint48(raw >> 64); + valueAfter = uint32(raw); + valueBefore = uint32(raw >> 32); + effect = uint48(raw >> 64); return (valueBefore, valueAfter, effect); } diff --git a/scripts/upgradeable/transpile.sh b/scripts/upgradeable/transpile.sh index f2126936c..ebc8c3219 100644 --- a/scripts/upgradeable/transpile.sh +++ b/scripts/upgradeable/transpile.sh @@ -6,7 +6,7 @@ VERSION="$(jq -r .version contracts/package.json)" DIRNAME="$(dirname -- "${BASH_SOURCE[0]}")" bash "$DIRNAME/patch-apply.sh" -sed -i "s//$VERSION/g" contracts/package.json +sed -i'' -e "s//$VERSION/g" "contracts/package.json" git add contracts/package.json npm run clean diff --git a/test/access/manager/AccessManager.behavior.js b/test/access/manager/AccessManager.behavior.js new file mode 100644 index 000000000..d528ffb48 --- /dev/null +++ b/test/access/manager/AccessManager.behavior.js @@ -0,0 +1,711 @@ +const { time } = require('@openzeppelin/test-helpers'); +const { + time: { setNextBlockTimestamp }, + setStorageAt, + mine, +} = require('@nomicfoundation/hardhat-network-helpers'); +const { impersonate } = require('../../helpers/account'); +const { expectRevertCustomError } = require('../../helpers/customError'); +const { EXPIRATION, EXECUTION_ID_STORAGE_SLOT } = require('../../helpers/access-manager'); + +// ============ COMMON PATHS ============ + +const COMMON_IS_EXECUTING_PATH = { + executing() { + it('succeeds', async function () { + await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + }); + }, + notExecuting() { + it('reverts as AccessManagerUnauthorizedAccount', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerUnauthorizedAccount', + [this.caller, this.role.id], + ); + }); + }, +}; + +const COMMON_GET_ACCESS_PATH = { + requiredRoleIsGranted: { + roleGrantingIsDelayed: { + callerHasAnExecutionDelay: { + beforeGrantDelay() { + it('reverts as AccessManagerUnauthorizedAccount', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerUnauthorizedAccount', + [this.caller, this.role.id], + ); + }); + }, + afterGrantDelay: undefined, // Diverges if there's an operation delay or not + }, + callerHasNoExecutionDelay: { + beforeGrantDelay() { + it('reverts as AccessManagerUnauthorizedAccount', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerUnauthorizedAccount', + [this.caller, this.role.id], + ); + }); + }, + afterGrantDelay() { + it('succeeds called directly', async function () { + await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + }); + + it('succeeds via execute', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); + }, + }, + }, + roleGrantingIsNotDelayed: { + callerHasAnExecutionDelay: undefined, // Diverges if there's an operation to schedule or not + callerHasNoExecutionDelay() { + it('succeeds called directly', async function () { + await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + }); + + it('succeeds via execute', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); + }, + }, + }, + requiredRoleIsNotGranted() { + it('reverts as AccessManagerUnauthorizedAccount', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerUnauthorizedAccount', + [this.caller, this.role.id], + ); + }); + }, +}; + +const COMMON_SCHEDULABLE_PATH = { + scheduled: { + before() { + it('reverts as AccessManagerNotReady', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerNotReady', + [this.operationId], + ); + }); + }, + after() { + it('succeeds called directly', async function () { + await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + }); + + it('succeeds via execute', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); + }, + expired() { + it('reverts as AccessManagerExpired', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerExpired', + [this.operationId], + ); + }); + }, + }, + notScheduled() { + it('reverts as AccessManagerNotScheduled', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerNotScheduled', + [this.operationId], + ); + }); + }, +}; + +const COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY = { + scheduled: { + before() { + it.skip('is not reachable without a delay'); + }, + after() { + it.skip('is not reachable without a delay'); + }, + expired() { + it.skip('is not reachable without a delay'); + }, + }, + notScheduled() { + it('succeeds', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); + }, +}; + +// ============ MODE HELPERS ============ + +/** + * @requires this.{manager,target} + */ +function shouldBehaveLikeClosable({ closed, open }) { + describe('when the manager is closed', function () { + beforeEach('close', async function () { + await this.manager.$_setTargetClosed(this.target.address, true); + }); + + closed(); + }); + + describe('when the manager is open', function () { + beforeEach('open', async function () { + await this.manager.$_setTargetClosed(this.target.address, false); + }); + + open(); + }); +} + +// ============ DELAY HELPERS ============ + +/** + * @requires this.{delay} + */ +function shouldBehaveLikeDelay(type, { before, after }) { + beforeEach('define timestamp when delay takes effect', async function () { + const timestamp = await time.latest(); + this.delayEffect = timestamp.add(this.delay); + }); + + describe(`when ${type} delay has not taken effect yet`, function () { + beforeEach(`set next block timestamp before ${type} takes effect`, async function () { + await setNextBlockTimestamp(this.delayEffect.subn(1)); + }); + + before(); + }); + + describe(`when ${type} delay has taken effect`, function () { + beforeEach(`set next block timestamp when ${type} takes effect`, async function () { + await setNextBlockTimestamp(this.delayEffect); + }); + + after(); + }); +} + +// ============ OPERATION HELPERS ============ + +/** + * @requires this.{manager,scheduleIn,caller,target,calldata} + */ +function shouldBehaveLikeSchedulableOperation({ scheduled: { before, after, expired }, notScheduled }) { + describe('when operation is scheduled', function () { + beforeEach('schedule operation', async function () { + await impersonate(this.caller); // May be a contract + const { operationId } = await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.scheduleIn, + }); + this.operationId = operationId; + }); + + describe('when operation is not ready for execution', function () { + beforeEach('set next block time before operation is ready', async function () { + this.scheduledAt = await time.latest(); + const schedule = await this.manager.getSchedule(this.operationId); + await setNextBlockTimestamp(schedule.subn(1)); + }); + + before(); + }); + + describe('when operation is ready for execution', function () { + beforeEach('set next block time when operation is ready for execution', async function () { + this.scheduledAt = await time.latest(); + const schedule = await this.manager.getSchedule(this.operationId); + await setNextBlockTimestamp(schedule); + }); + + after(); + }); + + describe('when operation has expired', function () { + beforeEach('set next block time when operation expired', async function () { + this.scheduledAt = await time.latest(); + const schedule = await this.manager.getSchedule(this.operationId); + await setNextBlockTimestamp(schedule.add(EXPIRATION)); + }); + + expired(); + }); + }); + + describe('when operation is not scheduled', function () { + beforeEach('set expected operationId', async function () { + this.operationId = await this.manager.hashOperation(this.caller, this.target.address, this.calldata); + + // Assert operation is not scheduled + expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal(web3.utils.toBN(0)); + }); + + notScheduled(); + }); +} + +/** + * @requires this.{manager,roles,target,calldata} + */ +function shouldBehaveLikeARestrictedOperation({ callerIsNotTheManager, callerIsTheManager }) { + describe('when the call comes from the manager (msg.sender == manager)', function () { + beforeEach('define caller as manager', async function () { + this.caller = this.manager.address; + await impersonate(this.caller); + }); + + shouldBehaveLikeCanCallExecuting(callerIsTheManager); + }); + + describe('when the call does not come from the manager (msg.sender != manager)', function () { + beforeEach('define non manager caller', function () { + this.caller = this.roles.SOME.members[0]; + }); + + callerIsNotTheManager(); + }); +} + +/** + * @requires this.{manager,roles,executionDelay,operationDelay,target} + */ +function shouldBehaveLikeDelayedOperation() { + describe('with operation delay', function () { + describe('when operation delay is greater than execution delay', function () { + beforeEach('set operation delay', async function () { + this.operationDelay = this.executionDelay.add(time.duration.hours(1)); + await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); + this.scheduleIn = this.operationDelay; // For shouldBehaveLikeSchedulableOperation + }); + + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }); + + describe('when operation delay is shorter than execution delay', function () { + beforeEach('set operation delay', async function () { + this.operationDelay = this.executionDelay.sub(time.duration.hours(1)); + await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); + this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + }); + + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }); + }); + + describe('without operation delay', function () { + beforeEach('set operation delay', async function () { + this.operationDelay = web3.utils.toBN(0); + await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); + this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + }); + + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }); +} + +// ============ METHOD HELPERS ============ + +/** + * @requires this.{manager,roles,role,target,calldata} + */ +function shouldBehaveLikeCanCall({ + closed, + open: { + callerIsTheManager, + callerIsNotTheManager: { publicRoleIsRequired, specificRoleIsRequired }, + }, +}) { + shouldBehaveLikeClosable({ + closed, + open() { + shouldBehaveLikeARestrictedOperation({ + callerIsTheManager, + callerIsNotTheManager() { + shouldBehaveLikeHasRole({ + publicRoleIsRequired, + specificRoleIsRequired, + }); + }, + }); + }, + }); +} + +/** + * @requires this.{target,calldata} + */ +function shouldBehaveLikeCanCallExecuting({ executing, notExecuting }) { + describe('when _executionId is in storage for target and selector', function () { + beforeEach('set _executionId flag from calldata and target', async function () { + const executionId = await web3.utils.keccak256( + web3.eth.abi.encodeParameters(['address', 'bytes4'], [this.target.address, this.calldata.substring(0, 10)]), + ); + await setStorageAt(this.manager.address, EXECUTION_ID_STORAGE_SLOT, executionId); + }); + + executing(); + }); + + describe('when _executionId does not match target and selector', notExecuting); +} + +/** + * @requires this.{target,calldata,roles,role} + */ +function shouldBehaveLikeHasRole({ publicRoleIsRequired, specificRoleIsRequired }) { + describe('when the function requires the caller to be granted with the PUBLIC_ROLE', function () { + beforeEach('set target function role as PUBLIC_ROLE', async function () { + this.role = this.roles.PUBLIC; + await this.manager.$_setTargetFunctionRole(this.target.address, this.calldata.substring(0, 10), this.role.id, { + from: this.roles.ADMIN.members[0], + }); + }); + + publicRoleIsRequired(); + }); + + describe('when the function requires the caller to be granted with a role other than PUBLIC_ROLE', function () { + beforeEach('set target function role as PUBLIC_ROLE', async function () { + await this.manager.$_setTargetFunctionRole(this.target.address, this.calldata.substring(0, 10), this.role.id, { + from: this.roles.ADMIN.members[0], + }); + }); + + shouldBehaveLikeGetAccess(specificRoleIsRequired); + }); +} + +/** + * @requires this.{manager,role,caller} + */ +function shouldBehaveLikeGetAccess({ + requiredRoleIsGranted: { + roleGrantingIsDelayed: { + // Because both grant and execution delay are set within the same $_grantRole call + // it's not possible to create a set of tests that diverge between grant and execution delay. + // Therefore, the shouldBehaveLikeDelay arguments are renamed for clarity: + // before => beforeGrantDelay + // after => afterGrantDelay + callerHasAnExecutionDelay: { beforeGrantDelay: case1, afterGrantDelay: case2 }, + callerHasNoExecutionDelay: { beforeGrantDelay: case3, afterGrantDelay: case4 }, + }, + roleGrantingIsNotDelayed: { callerHasAnExecutionDelay: case5, callerHasNoExecutionDelay: case6 }, + }, + requiredRoleIsNotGranted, +}) { + describe('when the required role is granted to the caller', function () { + describe('when role granting is delayed', function () { + beforeEach('define delay', function () { + this.grantDelay = time.duration.minutes(3); + this.delay = this.grantDelay; // For shouldBehaveLikeDelay + }); + + describe('when caller has an execution delay', function () { + beforeEach('set role and delay', async function () { + this.executionDelay = time.duration.hours(10); + this.delay = this.grantDelay; + await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); + }); + + shouldBehaveLikeDelay('grant', { before: case1, after: case2 }); + }); + + describe('when caller has no execution delay', function () { + beforeEach('set role and delay', async function () { + this.executionDelay = web3.utils.toBN(0); + await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); + }); + + shouldBehaveLikeDelay('grant', { before: case3, after: case4 }); + }); + }); + + describe('when role granting is not delayed', function () { + beforeEach('define delay', function () { + this.grantDelay = web3.utils.toBN(0); + }); + + describe('when caller has an execution delay', function () { + beforeEach('set role and delay', async function () { + this.executionDelay = time.duration.hours(10); + await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); + }); + + case5(); + }); + + describe('when caller has no execution delay', function () { + beforeEach('set role and delay', async function () { + this.executionDelay = web3.utils.toBN(0); + await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); + }); + + case6(); + }); + }); + }); + + describe('when role is not granted', function () { + // Because this helper can be composed with other helpers, it's possible + // that role has been set already by another helper. + // Although this is highly unlikely, we check for it here to avoid false positives. + beforeEach('assert role is unset', async function () { + const { since } = await this.manager.getAccess(this.role.id, this.caller); + expect(since).to.be.bignumber.equal(web3.utils.toBN(0)); + }); + + requiredRoleIsNotGranted(); + }); +} + +// ============ ADMIN OPERATION HELPERS ============ + +/** + * @requires this.{manager,roles,calldata,role} + */ +function shouldBehaveLikeDelayedAdminOperation() { + const getAccessPath = COMMON_GET_ACCESS_PATH; + getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = function () { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + shouldBehaveLikeDelayedOperation(); + }; + getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { + beforeEach('set execution delay', async function () { + this.scheduleIn = this.executionDelay; // For shouldBehaveLikeDelayedOperation + }); + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }; + + beforeEach('set target as manager', function () { + this.target = this.manager; + }); + + shouldBehaveLikeARestrictedOperation({ + callerIsTheManager: COMMON_IS_EXECUTING_PATH, + callerIsNotTheManager() { + shouldBehaveLikeHasRole({ + publicRoleIsRequired() { + it('reverts as AccessManagerUnauthorizedAccount', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerUnauthorizedAccount', + [ + this.caller, + this.roles.ADMIN.id, // Although PUBLIC is required, target function role doesn't apply to admin ops + ], + ); + }); + }, + specificRoleIsRequired: getAccessPath, + }); + }, + }); +} + +/** + * @requires this.{manager,roles,calldata,role} + */ +function shouldBehaveLikeNotDelayedAdminOperation() { + const getAccessPath = COMMON_GET_ACCESS_PATH; + getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = function () { + beforeEach('set execution delay', async function () { + await mine(); + this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + }); + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }; + getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { + beforeEach('set execution delay', async function () { + this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + }); + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }; + + beforeEach('set target as manager', function () { + this.target = this.manager; + }); + + shouldBehaveLikeARestrictedOperation({ + callerIsTheManager: COMMON_IS_EXECUTING_PATH, + callerIsNotTheManager() { + shouldBehaveLikeHasRole({ + publicRoleIsRequired() { + it('reverts as AccessManagerUnauthorizedAccount', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerUnauthorizedAccount', + [this.caller, this.roles.ADMIN.id], // Although PUBLIC_ROLE is required, admin ops are not subject to target function roles + ); + }); + }, + specificRoleIsRequired: getAccessPath, + }); + }, + }); +} + +/** + * @requires this.{manager,roles,calldata,role} + */ +function shouldBehaveLikeRoleAdminOperation(roleAdmin) { + const getAccessPath = COMMON_GET_ACCESS_PATH; + getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = function () { + beforeEach('set operation delay', async function () { + await mine(); + this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + }); + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }; + getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { + beforeEach('set execution delay', async function () { + this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + }); + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }; + + beforeEach('set target as manager', function () { + this.target = this.manager; + }); + + shouldBehaveLikeARestrictedOperation({ + callerIsTheManager: COMMON_IS_EXECUTING_PATH, + callerIsNotTheManager() { + shouldBehaveLikeHasRole({ + publicRoleIsRequired() { + it('reverts as AccessManagerUnauthorizedAccount', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerUnauthorizedAccount', + [this.caller, roleAdmin], // Role admin ops require the role's admin + ); + }); + }, + specificRoleIsRequired: getAccessPath, + }); + }, + }); +} + +// ============ RESTRICTED OPERATION HELPERS ============ + +/** + * @requires this.{manager,roles,calldata,role} + */ +function shouldBehaveLikeAManagedRestrictedOperation() { + function revertUnauthorized() { + it('reverts as AccessManagedUnauthorized', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagedUnauthorized', + [this.caller], + ); + }); + } + + const getAccessPath = COMMON_GET_ACCESS_PATH; + + getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.beforeGrantDelay = + revertUnauthorized; + getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasNoExecutionDelay.beforeGrantDelay = + revertUnauthorized; + getAccessPath.requiredRoleIsNotGranted = revertUnauthorized; + + getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = function () { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + }); + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }; + getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { + beforeEach('consume previously set grant delay', async function () { + this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + }); + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }; + + const isExecutingPath = COMMON_IS_EXECUTING_PATH; + isExecutingPath.notExecuting = revertUnauthorized; + + shouldBehaveLikeCanCall({ + closed: revertUnauthorized, + open: { + callerIsTheManager: isExecutingPath, + callerIsNotTheManager: { + publicRoleIsRequired() { + it('succeeds called directly', async function () { + await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + }); + + it('succeeds via execute', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); + }, + specificRoleIsRequired: getAccessPath, + }, + }, + }); +} + +// ============ HELPERS ============ + +/** + * @requires this.{manager, caller, target, calldata} + */ +async function scheduleOperation(manager, { caller, target, calldata, delay }) { + const timestamp = await time.latest(); + const scheduledAt = timestamp.addn(1); + await setNextBlockTimestamp(scheduledAt); // Fix next block timestamp for predictability + const { receipt } = await manager.schedule(target, calldata, scheduledAt.add(delay), { + from: caller, + }); + + return { + receipt, + scheduledAt, + operationId: await manager.hashOperation(caller, target, calldata), + }; +} + +module.exports = { + // COMMON PATHS + COMMON_SCHEDULABLE_PATH, + COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY, + // MODE HELPERS + shouldBehaveLikeClosable, + // DELAY HELPERS + shouldBehaveLikeDelay, + // OPERATION HELPERS + shouldBehaveLikeSchedulableOperation, + // METHOD HELPERS + shouldBehaveLikeCanCall, + shouldBehaveLikeGetAccess, + shouldBehaveLikeHasRole, + // ADMIN OPERATION HELPERS + shouldBehaveLikeDelayedAdminOperation, + shouldBehaveLikeNotDelayedAdminOperation, + shouldBehaveLikeRoleAdminOperation, + // RESTRICTED OPERATION HELPERS + shouldBehaveLikeAManagedRestrictedOperation, + // HELPERS + scheduleOperation, +}; diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 5d8ed5de9..705af1a8a 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -1,1030 +1,2592 @@ const { web3 } = require('hardhat'); -const { constants, expectEvent, time } = require('@openzeppelin/test-helpers'); +const { constants, expectEvent, time, expectRevert } = require('@openzeppelin/test-helpers'); const { expectRevertCustomError } = require('../../helpers/customError'); const { selector } = require('../../helpers/methods'); const { clockFromReceipt } = require('../../helpers/time'); -const { product } = require('../../helpers/iterate'); -const helpers = require('@nomicfoundation/hardhat-network-helpers'); +const { + buildBaseRoles, + formatAccess, + EXPIRATION, + MINSETBACK, + EXECUTION_ID_STORAGE_SLOT, + CONSUMING_SCHEDULE_STORAGE_SLOT, +} = require('../../helpers/access-manager'); +const { + // COMMON PATHS + COMMON_SCHEDULABLE_PATH, + COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY, + // MODE HELPERS + shouldBehaveLikeClosable, + // DELAY HELPERS + shouldBehaveLikeDelay, + // OPERATION HELPERS + shouldBehaveLikeSchedulableOperation, + // METHOD HELPERS + shouldBehaveLikeCanCall, + shouldBehaveLikeGetAccess, + shouldBehaveLikeHasRole, + // ADMIN OPERATION HELPERS + shouldBehaveLikeDelayedAdminOperation, + shouldBehaveLikeNotDelayedAdminOperation, + shouldBehaveLikeRoleAdminOperation, + // RESTRICTED OPERATION HELPERS + shouldBehaveLikeAManagedRestrictedOperation, + // HELPERS + scheduleOperation, +} = require('./AccessManager.behavior'); +const { default: Wallet } = require('ethereumjs-wallet'); +const { + mine, + time: { setNextBlockTimestamp }, + getStorageAt, +} = require('@nomicfoundation/hardhat-network-helpers'); +const { MAX_UINT48 } = require('../../helpers/constants'); +const { impersonate } = require('../../helpers/account'); const AccessManager = artifacts.require('$AccessManager'); const AccessManagedTarget = artifacts.require('$AccessManagedTarget'); const Ownable = artifacts.require('$Ownable'); -const MAX_UINT64 = web3.utils.toBN((2n ** 64n - 1n).toString()); - -const ROLES = { - ADMIN: web3.utils.toBN(0), - SOME_ADMIN: web3.utils.toBN(17), - SOME: web3.utils.toBN(42), - PUBLIC: MAX_UINT64, -}; -Object.assign(ROLES, Object.fromEntries(Object.entries(ROLES).map(([key, value]) => [value, key]))); - -const executeDelay = web3.utils.toBN(10); -const grantDelay = web3.utils.toBN(10); -const MINSETBACK = time.duration.days(5); - -const formatAccess = access => [access[0], access[1].toString()]; +const someAddress = Wallet.generate().getChecksumAddressString(); contract('AccessManager', function (accounts) { - const [admin, manager, member, user, other] = accounts; + const [admin, manager, guardian, member, user, other] = accounts; beforeEach(async function () { + this.roles = buildBaseRoles(); + + // Add members + this.roles.ADMIN.members = [admin]; + this.roles.SOME_ADMIN.members = [manager]; + this.roles.SOME_GUARDIAN.members = [guardian]; + this.roles.SOME.members = [member]; + this.roles.PUBLIC.members = [admin, manager, guardian, member, user, other]; + this.manager = await AccessManager.new(admin); + this.target = await AccessManagedTarget.new(this.manager.address); - // add member to role - await this.manager.$_setRoleAdmin(ROLES.SOME, ROLES.SOME_ADMIN); - await this.manager.$_setRoleGuardian(ROLES.SOME, ROLES.SOME_ADMIN); - await this.manager.$_grantRole(ROLES.SOME_ADMIN, manager, 0, 0); - await this.manager.$_grantRole(ROLES.SOME, member, 0, 0); - }); + for (const { id: roleId, admin, guardian, members } of Object.values(this.roles)) { + if (roleId === this.roles.PUBLIC.id) continue; // Every address belong to public and is locked + if (roleId === this.roles.ADMIN.id) continue; // Admin set during construction and is locked - it('rejects zero address for initialAdmin', async function () { - await expectRevertCustomError(AccessManager.new(constants.ZERO_ADDRESS), 'AccessManagerInvalidInitialAdmin', [ - constants.ZERO_ADDRESS, - ]); - }); + // Set admin role avoiding default + if (admin.id !== this.roles.ADMIN.id) { + await this.manager.$_setRoleAdmin(roleId, admin.id); + } - it('default minsetback is 1 day', async function () { - expect(await this.manager.minSetback()).to.be.bignumber.equal(MINSETBACK); + // Set guardian role avoiding default + if (guardian.id !== this.roles.ADMIN.id) { + await this.manager.$_setRoleGuardian(roleId, guardian.id); + } + + // Grant role to members + for (const member of members) { + await this.manager.$_grantRole(roleId, member, 0, 0); + } + } }); - it('roles are correctly initialized', async function () { - // role admin - expect(await this.manager.getRoleAdmin(ROLES.ADMIN)).to.be.bignumber.equal(ROLES.ADMIN); - expect(await this.manager.getRoleAdmin(ROLES.SOME_ADMIN)).to.be.bignumber.equal(ROLES.ADMIN); - expect(await this.manager.getRoleAdmin(ROLES.SOME)).to.be.bignumber.equal(ROLES.SOME_ADMIN); - expect(await this.manager.getRoleAdmin(ROLES.PUBLIC)).to.be.bignumber.equal(ROLES.ADMIN); - // role guardian - expect(await this.manager.getRoleGuardian(ROLES.ADMIN)).to.be.bignumber.equal(ROLES.ADMIN); - expect(await this.manager.getRoleGuardian(ROLES.SOME_ADMIN)).to.be.bignumber.equal(ROLES.ADMIN); - expect(await this.manager.getRoleGuardian(ROLES.SOME)).to.be.bignumber.equal(ROLES.SOME_ADMIN); - expect(await this.manager.getRoleGuardian(ROLES.PUBLIC)).to.be.bignumber.equal(ROLES.ADMIN); - // role members - expect(await this.manager.hasRole(ROLES.ADMIN, admin).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasRole(ROLES.ADMIN, manager).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasRole(ROLES.ADMIN, member).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasRole(ROLES.ADMIN, user).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasRole(ROLES.SOME_ADMIN, admin).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasRole(ROLES.SOME_ADMIN, manager).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasRole(ROLES.SOME_ADMIN, member).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasRole(ROLES.SOME_ADMIN, user).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasRole(ROLES.SOME, admin).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasRole(ROLES.SOME, manager).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - expect(await this.manager.hasRole(ROLES.PUBLIC, admin).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasRole(ROLES.PUBLIC, manager).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasRole(ROLES.PUBLIC, member).then(formatAccess)).to.be.deep.equal([true, '0']); - expect(await this.manager.hasRole(ROLES.PUBLIC, user).then(formatAccess)).to.be.deep.equal([true, '0']); + describe('during construction', function () { + it('grants admin role to initialAdmin', async function () { + const manager = await AccessManager.new(other); + expect(await manager.hasRole(this.roles.ADMIN.id, other).then(formatAccess)).to.be.deep.equal([true, '0']); + }); + + it('rejects zero address for initialAdmin', async function () { + await expectRevertCustomError(AccessManager.new(constants.ZERO_ADDRESS), 'AccessManagerInvalidInitialAdmin', [ + constants.ZERO_ADDRESS, + ]); + }); + + it('initializes setup roles correctly', async function () { + for (const { id: roleId, admin, guardian, members } of Object.values(this.roles)) { + expect(await this.manager.getRoleAdmin(roleId)).to.be.bignumber.equal(admin.id); + expect(await this.manager.getRoleGuardian(roleId)).to.be.bignumber.equal(guardian.id); + + for (const user of this.roles.PUBLIC.members) { + expect(await this.manager.hasRole(roleId, user).then(formatAccess)).to.be.deep.equal([ + members.includes(user), + '0', + ]); + } + } + }); }); - describe('Roles management', function () { - describe('label role', function () { - it('admin can emit a label event', async function () { - expectEvent(await this.manager.labelRole(ROLES.SOME, 'Some label', { from: admin }), 'RoleLabel', { - roleId: ROLES.SOME, - label: 'Some label', + describe('getters', function () { + describe('#canCall', function () { + beforeEach('set calldata', function () { + this.calldata = '0x12345678'; + this.role = { id: web3.utils.toBN(379204) }; + }); + + shouldBehaveLikeCanCall({ + closed() { + it('should return false and no delay', async function () { + const { immediate, delay } = await this.manager.canCall( + someAddress, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(false); + expect(delay).to.be.bignumber.equal('0'); + }); + }, + open: { + callerIsTheManager: { + executing() { + it('should return true and no delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(true); + expect(delay).to.be.bignumber.equal('0'); + }); + }, + notExecuting() { + it('should return false and no delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(false); + expect(delay).to.be.bignumber.equal('0'); + }); + }, + }, + callerIsNotTheManager: { + publicRoleIsRequired() { + it('should return true and no delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(true); + expect(delay).to.be.bignumber.equal('0'); + }); + }, + specificRoleIsRequired: { + requiredRoleIsGranted: { + roleGrantingIsDelayed: { + callerHasAnExecutionDelay: { + beforeGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('should return false and no execution delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(false); + expect(delay).to.be.bignumber.equal('0'); + }); + }, + afterGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + }); + + shouldBehaveLikeSchedulableOperation({ + scheduled: { + before() { + beforeEach('consume previously set delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('should return false and execution delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(false); + expect(delay).to.be.bignumber.equal(this.executionDelay); + }); + }, + after() { + beforeEach('consume previously set delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('should return false and execution delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(false); + expect(delay).to.be.bignumber.equal(this.executionDelay); + }); + }, + expired() { + beforeEach('consume previously set delay', async function () { + // Consume previously set delay + await mine(); + }); + it('should return false and execution delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(false); + expect(delay).to.be.bignumber.equal(this.executionDelay); + }); + }, + }, + notScheduled() { + it('should return false and execution delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(false); + expect(delay).to.be.bignumber.equal(this.executionDelay); + }); + }, + }); + }, + }, + callerHasNoExecutionDelay: { + beforeGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('should return false and no execution delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(false); + expect(delay).to.be.bignumber.equal('0'); + }); + }, + afterGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('should return true and no execution delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(true); + expect(delay).to.be.bignumber.equal('0'); + }); + }, + }, + }, + roleGrantingIsNotDelayed: { + callerHasAnExecutionDelay() { + it('should return false and execution delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(false); + expect(delay).to.be.bignumber.equal(this.executionDelay); + }); + }, + callerHasNoExecutionDelay() { + it('should return true and no execution delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(true); + expect(delay).to.be.bignumber.equal('0'); + }); + }, + }, + }, + requiredRoleIsNotGranted() { + it('should return false and no execution delay', async function () { + const { immediate, delay } = await this.manager.canCall( + this.caller, + this.target.address, + this.calldata.substring(0, 10), + ); + expect(immediate).to.be.equal(false); + expect(delay).to.be.bignumber.equal('0'); + }); + }, + }, + }, + }, + }); + }); + + describe('#expiration', function () { + it('has a 7 days default expiration', async function () { + expect(await this.manager.expiration()).to.be.bignumber.equal(EXPIRATION); + }); + }); + + describe('#minSetback', function () { + it('has a 5 days default minimum setback', async function () { + expect(await this.manager.minSetback()).to.be.bignumber.equal(MINSETBACK); + }); + }); + + describe('#isTargetClosed', function () { + shouldBehaveLikeClosable({ + closed() { + it('returns true', async function () { + expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(true); + }); + }, + open() { + it('returns false', async function () { + expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(false); + }); + }, + }); + }); + + describe('#getTargetFunctionRole', function () { + const methodSelector = selector('something(address,bytes)'); + + it('returns the target function role', async function () { + const roleId = web3.utils.toBN(21498); + await this.manager.$_setTargetFunctionRole(this.target.address, methodSelector, roleId); + + expect(await this.manager.getTargetFunctionRole(this.target.address, methodSelector)).to.be.bignumber.equal( + roleId, + ); + }); + + it('returns the ADMIN role if not set', async function () { + expect(await this.manager.getTargetFunctionRole(this.target.address, methodSelector)).to.be.bignumber.equal( + this.roles.ADMIN.id, + ); + }); + }); + + describe('#getTargetAdminDelay', function () { + describe('when the target admin delay is setup', function () { + beforeEach('set target admin delay', async function () { + this.oldDelay = await this.manager.getTargetAdminDelay(this.target.address); + this.newDelay = time.duration.days(10); + + await this.manager.$_setTargetAdminDelay(this.target.address, this.newDelay); + this.delay = MINSETBACK; // For shouldBehaveLikeDelay + }); + + shouldBehaveLikeDelay('effect', { + before() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('returns the old target admin delay', async function () { + expect(await this.manager.getTargetAdminDelay(this.target.address)).to.be.bignumber.equal(this.oldDelay); + }); + }, + after() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('returns the new target admin delay', async function () { + expect(await this.manager.getTargetAdminDelay(this.target.address)).to.be.bignumber.equal(this.newDelay); + }); + }, }); }); - it('admin can re-emit a label event', async function () { - await this.manager.labelRole(ROLES.SOME, 'Some label', { from: admin }); + it('returns the 0 if not set', async function () { + expect(await this.manager.getTargetAdminDelay(this.target.address)).to.be.bignumber.equal('0'); + }); + }); + + describe('#getRoleAdmin', function () { + const roleId = web3.utils.toBN(5234907); + + it('returns the role admin', async function () { + const adminId = web3.utils.toBN(789433); + + await this.manager.$_setRoleAdmin(roleId, adminId); + + expect(await this.manager.getRoleAdmin(roleId)).to.be.bignumber.equal(adminId); + }); + + it('returns the ADMIN role if not set', async function () { + expect(await this.manager.getRoleAdmin(roleId)).to.be.bignumber.equal(this.roles.ADMIN.id); + }); + }); + + describe('#getRoleGuardian', function () { + const roleId = web3.utils.toBN(5234907); - expectEvent(await this.manager.labelRole(ROLES.SOME, 'Updated label', { from: admin }), 'RoleLabel', { - roleId: ROLES.SOME, - label: 'Updated label', + it('returns the role guardian', async function () { + const guardianId = web3.utils.toBN(789433); + + await this.manager.$_setRoleGuardian(roleId, guardianId); + + expect(await this.manager.getRoleGuardian(roleId)).to.be.bignumber.equal(guardianId); + }); + + it('returns the ADMIN role if not set', async function () { + expect(await this.manager.getRoleGuardian(roleId)).to.be.bignumber.equal(this.roles.ADMIN.id); + }); + }); + + describe('#getRoleGrantDelay', function () { + const roleId = web3.utils.toBN(9248439); + + describe('when the grant admin delay is setup', function () { + beforeEach('set grant admin delay', async function () { + this.oldDelay = await this.manager.getRoleGrantDelay(roleId); + this.newDelay = time.duration.days(11); + + await this.manager.$_setGrantDelay(roleId, this.newDelay); + this.delay = MINSETBACK; // For shouldBehaveLikeDelay + }); + + shouldBehaveLikeDelay('grant', { + before() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('returns the old role grant delay', async function () { + expect(await this.manager.getRoleGrantDelay(roleId)).to.be.bignumber.equal(this.oldDelay); + }); + }, + after() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('returns the new role grant delay', async function () { + expect(await this.manager.getRoleGrantDelay(roleId)).to.be.bignumber.equal(this.newDelay); + }); + }, }); }); - it('emitting a label is restricted', async function () { - await expectRevertCustomError( - this.manager.labelRole(ROLES.SOME, 'Invalid label', { from: other }), - 'AccessManagerUnauthorizedAccount', - [other, ROLES.ADMIN], + it('returns 0 if delay is not set', async function () { + expect(await this.manager.getTargetAdminDelay(this.target.address)).to.be.bignumber.equal('0'); + }); + }); + + describe('#getAccess', function () { + beforeEach('set role', function () { + this.role = { id: web3.utils.toBN(9452) }; + this.caller = user; + }); + + shouldBehaveLikeGetAccess({ + requiredRoleIsGranted: { + roleGrantingIsDelayed: { + callerHasAnExecutionDelay: { + beforeGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('role is not in effect and execution delay is set', async function () { + const access = await this.manager.getAccess(this.role.id, this.caller); + expect(access[0]).to.be.bignumber.equal(this.delayEffect); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Not in effect yet + expect(await time.latest()).to.be.bignumber.lt(access[0]); + }); + }, + afterGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('access has role in effect and execution delay is set', async function () { + const access = await this.manager.getAccess(this.role.id, this.caller); + + expect(access[0]).to.be.bignumber.equal(this.delayEffect); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Already in effect + expect(await time.latest()).to.be.bignumber.equal(access[0]); + }); + }, + }, + callerHasNoExecutionDelay: { + beforeGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('access has role not in effect without execution delay', async function () { + const access = await this.manager.getAccess(this.role.id, this.caller); + expect(access[0]).to.be.bignumber.equal(this.delayEffect); // inEffectSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Not in effect yet + expect(await time.latest()).to.be.bignumber.lt(access[0]); + }); + }, + afterGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('role is in effect without execution delay', async function () { + const access = await this.manager.getAccess(this.role.id, this.caller); + expect(access[0]).to.be.bignumber.equal(this.delayEffect); // inEffectSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Already in effect + expect(await time.latest()).to.be.bignumber.equal(access[0]); + }); + }, + }, + }, + roleGrantingIsNotDelayed: { + callerHasAnExecutionDelay() { + it('access has role in effect and execution delay is set', async function () { + const access = await this.manager.getAccess(this.role.id, this.caller); + expect(access[0]).to.be.bignumber.equal(await time.latest()); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Already in effect + expect(await time.latest()).to.be.bignumber.equal(access[0]); + }); + }, + callerHasNoExecutionDelay() { + it('access has role in effect without execution delay', async function () { + const access = await this.manager.getAccess(this.role.id, this.caller); + expect(access[0]).to.be.bignumber.equal(await time.latest()); // inEffectSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Already in effect + expect(await time.latest()).to.be.bignumber.equal(access[0]); + }); + }, + }, + }, + requiredRoleIsNotGranted() { + it('has empty access', async function () { + const access = await this.manager.getAccess(this.role.id, this.caller); + expect(access[0]).to.be.bignumber.equal('0'); // inEffectSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + }); + }, + }); + }); + + describe('#hasRole', function () { + beforeEach('setup shouldBehaveLikeHasRole', function () { + this.role = { id: web3.utils.toBN(49832) }; + this.calldata = '0x1234'; + this.caller = user; + }); + + shouldBehaveLikeHasRole({ + publicRoleIsRequired() { + it('has PUBLIC role', async function () { + const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); + expect(isMember).to.be.true; + expect(executionDelay).to.be.bignumber.eq('0'); + }); + }, + specificRoleIsRequired: { + requiredRoleIsGranted: { + roleGrantingIsDelayed: { + callerHasAnExecutionDelay: { + beforeGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('does not have role but execution delay', async function () { + const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); + expect(isMember).to.be.false; + expect(executionDelay).to.be.bignumber.eq(this.executionDelay); + }); + }, + afterGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('has role and execution delay', async function () { + const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); + expect(isMember).to.be.true; + expect(executionDelay).to.be.bignumber.eq(this.executionDelay); + }); + }, + }, + callerHasNoExecutionDelay: { + beforeGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('does not have role nor execution delay', async function () { + const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); + expect(isMember).to.be.false; + expect(executionDelay).to.be.bignumber.eq('0'); + }); + }, + afterGrantDelay() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('has role and no execution delay', async function () { + const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); + expect(isMember).to.be.true; + expect(executionDelay).to.be.bignumber.eq('0'); + }); + }, + }, + }, + roleGrantingIsNotDelayed: { + callerHasAnExecutionDelay() { + it('has role and execution delay', async function () { + const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); + expect(isMember).to.be.true; + expect(executionDelay).to.be.bignumber.eq(this.executionDelay); + }); + }, + callerHasNoExecutionDelay() { + it('has role and no execution delay', async function () { + const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); + expect(isMember).to.be.true; + expect(executionDelay).to.be.bignumber.eq('0'); + }); + }, + }, + }, + requiredRoleIsNotGranted() { + it('has no role and no execution delay', async function () { + const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); + expect(isMember).to.be.false; + expect(executionDelay).to.be.bignumber.eq('0'); + }); + }, + }, + }); + }); + + describe('#getSchedule', function () { + beforeEach('set role and calldata', async function () { + const method = 'fnRestricted()'; + this.caller = user; + this.role = { id: web3.utils.toBN(493590) }; + await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // nonzero execution delay + + this.calldata = await this.target.contract.methods[method]().encodeABI(); + this.scheduleIn = time.duration.days(10); // For shouldBehaveLikeSchedulableOperation + }); + + shouldBehaveLikeSchedulableOperation({ + scheduled: { + before() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('returns schedule in the future', async function () { + const schedule = await this.manager.getSchedule(this.operationId); + expect(schedule).to.be.bignumber.equal(this.scheduledAt.add(this.scheduleIn)); + expect(schedule).to.be.bignumber.gt(await time.latest()); + }); + }, + after() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('returns schedule', async function () { + const schedule = await this.manager.getSchedule(this.operationId); + expect(schedule).to.be.bignumber.equal(this.scheduledAt.add(this.scheduleIn)); + expect(schedule).to.be.bignumber.eq(await time.latest()); + }); + }, + expired() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('returns 0', async function () { + expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal('0'); + }); + }, + }, + notScheduled() { + it('defaults to 0', async function () { + expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal('0'); + }); + }, + }); + }); + + describe('#getNonce', function () { + describe('when operation is scheduled', function () { + beforeEach('schedule operation', async function () { + const method = 'fnRestricted()'; + this.caller = user; + this.role = { id: web3.utils.toBN(4209043) }; + await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // nonzero execution delay + + this.calldata = await this.target.contract.methods[method]().encodeABI(); + this.delay = time.duration.days(10); + + const { operationId } = await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.delay, + }); + this.operationId = operationId; + }); + + it('returns nonce', async function () { + expect(await this.manager.getNonce(this.operationId)).to.be.bignumber.equal('1'); + }); + }); + + describe('when is not scheduled', function () { + it('returns default 0', async function () { + expect(await this.manager.getNonce(web3.utils.keccak256('operation'))).to.be.bignumber.equal('0'); + }); + }); + }); + + describe('#hashOperation', function () { + it('returns an operationId', async function () { + const calldata = '0x123543'; + const address = someAddress; + + const args = [user, address, calldata]; + + expect(await this.manager.hashOperation(...args)).to.be.bignumber.eq( + await web3.utils.keccak256(web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], args)), ); }); }); + }); - describe('grant role', function () { - describe('without a grant delay', function () { - it('without an execute delay', async function () { - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - - const { receipt } = await this.manager.grantRole(ROLES.SOME, user, 0, { from: manager }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'RoleGranted', { - roleId: ROLES.SOME, - account: user, - since: timestamp, - delay: '0', - newMember: true, + describe('admin operations', function () { + beforeEach('set required role', function () { + this.role = this.roles.ADMIN; + }); + + describe('subject to a delay', function () { + describe('#labelRole', function () { + describe('restrictions', function () { + beforeEach('set method and args', function () { + const method = 'labelRole(uint64,string)'; + const args = [123443, 'TEST']; + this.calldata = this.manager.contract.methods[method](...args).encodeABI(); }); - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([true, '0']); + shouldBehaveLikeDelayedAdminOperation(); + }); - const access = await this.manager.getAccess(ROLES.SOME, user); - expect(access[0]).to.be.bignumber.equal(timestamp); // inRoleSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect + it('emits an event with the label', async function () { + expectEvent(await this.manager.labelRole(this.roles.SOME.id, 'Some label', { from: admin }), 'RoleLabel', { + roleId: this.roles.SOME.id, + label: 'Some label', + }); }); - it('with an execute delay', async function () { - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - - const { receipt } = await this.manager.grantRole(ROLES.SOME, user, executeDelay, { from: manager }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'RoleGranted', { - roleId: ROLES.SOME, - account: user, - since: timestamp, - delay: executeDelay, - newMember: true, + it('updates label on a second call', async function () { + await this.manager.labelRole(this.roles.SOME.id, 'Some label', { from: admin }); + + expectEvent(await this.manager.labelRole(this.roles.SOME.id, 'Updated label', { from: admin }), 'RoleLabel', { + roleId: this.roles.SOME.id, + label: 'Updated label', }); + }); - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([ - true, - executeDelay.toString(), - ]); + it('reverts labeling PUBLIC_ROLE', async function () { + await expectRevertCustomError( + this.manager.labelRole(this.roles.PUBLIC.id, 'Some label', { from: admin }), + 'AccessManagerLockedRole', + [this.roles.PUBLIC.id], + ); + }); + + it('reverts labeling ADMIN_ROLE', async function () { + await expectRevertCustomError( + this.manager.labelRole(this.roles.ADMIN.id, 'Some label', { from: admin }), + 'AccessManagerLockedRole', + [this.roles.ADMIN.id], + ); + }); + }); + + describe('#setRoleAdmin', function () { + describe('restrictions', function () { + beforeEach('set method and args', function () { + const method = 'setRoleAdmin(uint64,uint64)'; + const args = [93445, 84532]; + this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + }); - const access = await this.manager.getAccess(ROLES.SOME, user); - expect(access[0]).to.be.bignumber.equal(timestamp); // inRoleSince - expect(access[1]).to.be.bignumber.equal(executeDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect + shouldBehaveLikeDelayedAdminOperation(); }); - it('to a user that is already in the role', async function () { - expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); - await this.manager.grantRole(ROLES.SOME, member, 0, { from: manager }); - expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); + it("sets any role's admin if called by an admin", async function () { + expect(await this.manager.getRoleAdmin(this.roles.SOME.id)).to.be.bignumber.equal(this.roles.SOME_ADMIN.id); + + const { receipt } = await this.manager.setRoleAdmin(this.roles.SOME.id, this.roles.ADMIN.id, { from: admin }); + expectEvent(receipt, 'RoleAdminChanged', { roleId: this.roles.SOME.id, admin: this.roles.ADMIN.id }); + + expect(await this.manager.getRoleAdmin(this.roles.SOME.id)).to.be.bignumber.equal(this.roles.ADMIN.id); }); - it('to a user that is scheduled for joining the role', async function () { - await this.manager.$_grantRole(ROLES.SOME, user, 10, 0); // grant delay 10 - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - await this.manager.grantRole(ROLES.SOME, user, 0, { from: manager }); - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + it('reverts setting PUBLIC_ROLE admin', async function () { + await expectRevertCustomError( + this.manager.setRoleAdmin(this.roles.PUBLIC.id, this.roles.ADMIN.id, { from: admin }), + 'AccessManagerLockedRole', + [this.roles.PUBLIC.id], + ); }); - it('grant role is restricted', async function () { + it('reverts setting ADMIN_ROLE admin', async function () { await expectRevertCustomError( - this.manager.grantRole(ROLES.SOME, user, 0, { from: other }), - 'AccessManagerUnauthorizedAccount', - [other, ROLES.SOME_ADMIN], + this.manager.setRoleAdmin(this.roles.ADMIN.id, this.roles.ADMIN.id, { from: admin }), + 'AccessManagerLockedRole', + [this.roles.ADMIN.id], ); }); }); - describe('with a grant delay', function () { - beforeEach(async function () { - await this.manager.$_setGrantDelay(ROLES.SOME, grantDelay); - await time.increase(MINSETBACK); + describe('#setRoleGuardian', function () { + describe('restrictions', function () { + beforeEach('set method and args', function () { + const method = 'setRoleGuardian(uint64,uint64)'; + const args = [93445, 84532]; + this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + }); + + shouldBehaveLikeDelayedAdminOperation(); + }); + + it("sets any role's guardian if called by an admin", async function () { + expect(await this.manager.getRoleGuardian(this.roles.SOME.id)).to.be.bignumber.equal( + this.roles.SOME_GUARDIAN.id, + ); + + const { receipt } = await this.manager.setRoleGuardian(this.roles.SOME.id, this.roles.ADMIN.id, { + from: admin, + }); + expectEvent(receipt, 'RoleGuardianChanged', { roleId: this.roles.SOME.id, guardian: this.roles.ADMIN.id }); + + expect(await this.manager.getRoleGuardian(this.roles.SOME.id)).to.be.bignumber.equal(this.roles.ADMIN.id); + }); + + it('reverts setting PUBLIC_ROLE admin', async function () { + await expectRevertCustomError( + this.manager.setRoleGuardian(this.roles.PUBLIC.id, this.roles.ADMIN.id, { from: admin }), + 'AccessManagerLockedRole', + [this.roles.PUBLIC.id], + ); + }); + + it('reverts setting ADMIN_ROLE admin', async function () { + await expectRevertCustomError( + this.manager.setRoleGuardian(this.roles.ADMIN.id, this.roles.ADMIN.id, { from: admin }), + 'AccessManagerLockedRole', + [this.roles.ADMIN.id], + ); }); + }); - it('granted role is not active immediately', async function () { - const { receipt } = await this.manager.grantRole(ROLES.SOME, user, 0, { from: manager }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'RoleGranted', { - roleId: ROLES.SOME, - account: user, - since: timestamp.add(grantDelay), - delay: '0', - newMember: true, + describe('#setGrantDelay', function () { + describe('restrictions', function () { + beforeEach('set method and args', function () { + const method = 'setGrantDelay(uint64,uint32)'; + const args = [984910, time.duration.days(2)]; + this.calldata = this.manager.contract.methods[method](...args).encodeABI(); }); - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + shouldBehaveLikeDelayedAdminOperation(); + }); - const access = await this.manager.getAccess(ROLES.SOME, user); - expect(access[0]).to.be.bignumber.equal(timestamp.add(grantDelay)); // inRoleSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect + it('reverts setting grant delay for the PUBLIC_ROLE', async function () { + await expectRevertCustomError( + this.manager.setGrantDelay(this.roles.PUBLIC.id, web3.utils.toBN(69), { from: admin }), + 'AccessManagerLockedRole', + [this.roles.PUBLIC.id], + ); }); - it('granted role is active after the delay', async function () { - const { receipt } = await this.manager.grantRole(ROLES.SOME, user, 0, { from: manager }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'RoleGranted', { - roleId: ROLES.SOME, - account: user, - since: timestamp.add(grantDelay), - delay: '0', - newMember: true, + describe('when increasing the delay', function () { + const oldDelay = web3.utils.toBN(10); + const newDelay = web3.utils.toBN(100); + + beforeEach('sets old delay', async function () { + this.role = this.roles.SOME; + await this.manager.$_setGrantDelay(this.role.id, oldDelay); + await time.increase(MINSETBACK); + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(oldDelay); + }); + + it('increases the delay after minsetback', async function () { + const { receipt } = await this.manager.setGrantDelay(this.role.id, newDelay, { from: admin }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + expectEvent(receipt, 'RoleGrantDelayChanged', { + roleId: this.role.id, + delay: newDelay, + since: timestamp.add(MINSETBACK), + }); + + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(oldDelay); + await time.increase(MINSETBACK); + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(newDelay); + }); + }); + + describe('when reducing the delay', function () { + const oldDelay = time.duration.days(10); + + beforeEach('sets old delay', async function () { + this.role = this.roles.SOME; + await this.manager.$_setGrantDelay(this.role.id, oldDelay); + await time.increase(MINSETBACK); + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(oldDelay); + }); + + describe('when the delay difference is shorter than minimum setback', function () { + const newDelay = oldDelay.subn(1); + + it('increases the delay after minsetback', async function () { + const { receipt } = await this.manager.setGrantDelay(this.role.id, newDelay, { from: admin }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + expectEvent(receipt, 'RoleGrantDelayChanged', { + roleId: this.role.id, + delay: newDelay, + since: timestamp.add(MINSETBACK), + }); + + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(oldDelay); + await time.increase(MINSETBACK); + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(newDelay); + }); }); - await time.increase(grantDelay); + describe('when the delay difference is longer than minimum setback', function () { + const newDelay = web3.utils.toBN(1); - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([true, '0']); + beforeEach('assert delay difference is higher than minsetback', function () { + expect(oldDelay.sub(newDelay)).to.be.bignumber.gt(MINSETBACK); + }); - const access = await this.manager.getAccess(ROLES.SOME, user); - expect(access[0]).to.be.bignumber.equal(timestamp.add(grantDelay)); // inRoleSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect + it('increases the delay after delay difference', async function () { + const setback = oldDelay.sub(newDelay); + const { receipt } = await this.manager.setGrantDelay(this.role.id, newDelay, { from: admin }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + expectEvent(receipt, 'RoleGrantDelayChanged', { + roleId: this.role.id, + delay: newDelay, + since: timestamp.add(setback), + }); + + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(oldDelay); + await time.increase(setback); + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(newDelay); + }); + }); }); }); - it('cannot grant public role', async function () { - await expectRevertCustomError( - this.manager.$_grantRole(ROLES.PUBLIC, other, 0, executeDelay, { from: manager }), - 'AccessManagerLockedRole', - [ROLES.PUBLIC], - ); + describe('#setTargetAdminDelay', function () { + describe('restrictions', function () { + beforeEach('set method and args', function () { + const method = 'setTargetAdminDelay(address,uint32)'; + const args = [someAddress, time.duration.days(3)]; + this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + }); + + shouldBehaveLikeDelayedAdminOperation(); + }); + + describe('when increasing the delay', function () { + const oldDelay = time.duration.days(10); + const newDelay = time.duration.days(11); + const target = someAddress; + + beforeEach('sets old delay', async function () { + await this.manager.$_setTargetAdminDelay(target, oldDelay); + await time.increase(MINSETBACK); + expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(oldDelay); + }); + + it('increases the delay after minsetback', async function () { + const { receipt } = await this.manager.setTargetAdminDelay(target, newDelay, { from: admin }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + expectEvent(receipt, 'TargetAdminDelayUpdated', { + target, + delay: newDelay, + since: timestamp.add(MINSETBACK), + }); + + expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(oldDelay); + await time.increase(MINSETBACK); + expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(newDelay); + }); + }); + + describe('when reducing the delay', function () { + const oldDelay = time.duration.days(10); + const target = someAddress; + + beforeEach('sets old delay', async function () { + await this.manager.$_setTargetAdminDelay(target, oldDelay); + await time.increase(MINSETBACK); + expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(oldDelay); + }); + + describe('when the delay difference is shorter than minimum setback', function () { + const newDelay = oldDelay.subn(1); + + it('increases the delay after minsetback', async function () { + const { receipt } = await this.manager.setTargetAdminDelay(target, newDelay, { from: admin }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + expectEvent(receipt, 'TargetAdminDelayUpdated', { + target, + delay: newDelay, + since: timestamp.add(MINSETBACK), + }); + + expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(oldDelay); + await time.increase(MINSETBACK); + expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(newDelay); + }); + }); + + describe('when the delay difference is longer than minimum setback', function () { + const newDelay = web3.utils.toBN(1); + + beforeEach('assert delay difference is higher than minsetback', function () { + expect(oldDelay.sub(newDelay)).to.be.bignumber.gt(MINSETBACK); + }); + + it('increases the delay after delay difference', async function () { + const setback = oldDelay.sub(newDelay); + const { receipt } = await this.manager.setTargetAdminDelay(target, newDelay, { from: admin }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + expectEvent(receipt, 'TargetAdminDelayUpdated', { + target, + delay: newDelay, + since: timestamp.add(setback), + }); + + expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(oldDelay); + await time.increase(setback); + expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(newDelay); + }); + }); + }); }); }); - describe('revoke role', function () { - it('from a user that is already in the role', async function () { - expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); + describe('not subject to a delay', function () { + describe('#updateAuthority', function () { + beforeEach('create a target and a new authority', async function () { + this.newAuthority = await AccessManager.new(admin); + this.newManagedTarget = await AccessManagedTarget.new(this.manager.address); + }); + + describe('restrictions', function () { + beforeEach('set method and args', function () { + const method = 'updateAuthority(address,address)'; + const args = [this.newManagedTarget.address, this.newAuthority.address]; + this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + }); - const { receipt } = await this.manager.revokeRole(ROLES.SOME, member, { from: manager }); - expectEvent(receipt, 'RoleRevoked', { roleId: ROLES.SOME, account: member }); + shouldBehaveLikeNotDelayedAdminOperation(); + }); - expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([false, '0']); + it('changes the authority', async function () { + expect(await this.newManagedTarget.authority()).to.be.equal(this.manager.address); - const access = await this.manager.getAccess(ROLES.SOME, user); - expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect + const { tx } = await this.manager.updateAuthority(this.newManagedTarget.address, this.newAuthority.address, { + from: admin, + }); + + // Managed contract is responsible of notifying the change through an event + await expectEvent.inTransaction(tx, this.newManagedTarget, 'AuthorityUpdated', { + authority: this.newAuthority.address, + }); + + expect(await this.newManagedTarget.authority()).to.be.equal(this.newAuthority.address); + }); }); - it('from a user that is scheduled for joining the role', async function () { - await this.manager.$_grantRole(ROLES.SOME, user, 10, 0); // grant delay 10 + describe('#setTargetClosed', function () { + describe('restrictions', function () { + beforeEach('set method and args', function () { + const method = 'setTargetClosed(address,bool)'; + const args = [someAddress, true]; + this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + }); - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + shouldBehaveLikeNotDelayedAdminOperation(); + }); - const { receipt } = await this.manager.revokeRole(ROLES.SOME, user, { from: manager }); - expectEvent(receipt, 'RoleRevoked', { roleId: ROLES.SOME, account: user }); + it('closes and opens a target', async function () { + const close = await this.manager.setTargetClosed(this.target.address, true, { from: admin }); + expectEvent(close.receipt, 'TargetClosed', { target: this.target.address, closed: true }); - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(true); - const access = await this.manager.getAccess(ROLES.SOME, user); - expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect - }); + const open = await this.manager.setTargetClosed(this.target.address, false, { from: admin }); + expectEvent(open.receipt, 'TargetClosed', { target: this.target.address, closed: false }); + expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(false); + }); - it('from a user that is not in the role', async function () { - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); - await this.manager.revokeRole(ROLES.SOME, user, { from: manager }); - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + it('reverts if closing the manager', async function () { + await expectRevertCustomError( + this.manager.setTargetClosed(this.manager.address, true, { from: admin }), + 'AccessManagerLockedAccount', + [this.manager.address], + ); + }); }); - it('revoke role is restricted', async function () { - await expectRevertCustomError( - this.manager.revokeRole(ROLES.SOME, member, { from: other }), - 'AccessManagerUnauthorizedAccount', - [other, ROLES.SOME_ADMIN], - ); + describe('#setTargetFunctionRole', function () { + describe('restrictions', function () { + beforeEach('set method and args', function () { + const method = 'setTargetFunctionRole(address,bytes4[],uint64)'; + const args = [someAddress, ['0x12345678'], 443342]; + this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + }); + + shouldBehaveLikeNotDelayedAdminOperation(); + }); + + const sigs = ['someFunction()', 'someOtherFunction(uint256)', 'oneMoreFunction(address,uint8)'].map(selector); + + it('sets function roles', async function () { + for (const sig of sigs) { + expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal( + this.roles.ADMIN.id, + ); + } + + const { receipt: receipt1 } = await this.manager.setTargetFunctionRole( + this.target.address, + sigs, + this.roles.SOME.id, + { + from: admin, + }, + ); + + for (const sig of sigs) { + expectEvent(receipt1, 'TargetFunctionRoleUpdated', { + target: this.target.address, + selector: sig, + roleId: this.roles.SOME.id, + }); + expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal( + this.roles.SOME.id, + ); + } + + const { receipt: receipt2 } = await this.manager.setTargetFunctionRole( + this.target.address, + [sigs[1]], + this.roles.SOME_ADMIN.id, + { + from: admin, + }, + ); + expectEvent(receipt2, 'TargetFunctionRoleUpdated', { + target: this.target.address, + selector: sigs[1], + roleId: this.roles.SOME_ADMIN.id, + }); + + for (const sig of sigs) { + expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal( + sig == sigs[1] ? this.roles.SOME_ADMIN.id : this.roles.SOME.id, + ); + } + }); }); - }); - describe('renounce role', function () { - it('for a user that is already in the role', async function () { - expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([true, '0']); + describe('role admin operations', function () { + const ANOTHER_ADMIN = web3.utils.toBN(0xdeadc0de1); + const ANOTHER_ROLE = web3.utils.toBN(0xdeadc0de2); + + beforeEach('set required role', async function () { + // Make admin a member of ANOTHER_ADMIN + await this.manager.$_grantRole(ANOTHER_ADMIN, admin, 0, 0); + await this.manager.$_setRoleAdmin(ANOTHER_ROLE, ANOTHER_ADMIN); + + this.role = { id: ANOTHER_ADMIN }; + this.user = user; + await this.manager.$_grantRole(this.role.id, this.user, 0, 0); + }); + + describe('#grantRole', function () { + describe('restrictions', function () { + beforeEach('set method and args', function () { + const method = 'grantRole(uint64,address,uint32)'; + const args = [ANOTHER_ROLE, someAddress, 0]; + this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + }); + + shouldBehaveLikeRoleAdminOperation(ANOTHER_ADMIN); + }); + + it('reverts when granting PUBLIC_ROLE', async function () { + await expectRevertCustomError( + this.manager.grantRole(this.roles.PUBLIC.id, user, 0, { + from: admin, + }), + 'AccessManagerLockedRole', + [this.roles.PUBLIC.id], + ); + }); + + describe('when the user is not a role member', function () { + describe('with grant delay', function () { + beforeEach('set grant delay and grant role', async function () { + // Delay granting + this.grantDelay = time.duration.weeks(2); + await this.manager.$_setGrantDelay(ANOTHER_ROLE, this.grantDelay); + await time.increase(MINSETBACK); + + // Grant role + this.executionDelay = time.duration.days(3); + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ + false, + '0', + ]); + const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.executionDelay, { + from: admin, + }); + + this.receipt = receipt; + this.delay = this.grantDelay; // For shouldBehaveLikeDelay + }); + + shouldBehaveLikeDelay('grant', { + before() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('does not grant role to the user yet', async function () { + const timestamp = await clockFromReceipt.timestamp(this.receipt).then(web3.utils.toBN); + expectEvent(this.receipt, 'RoleGranted', { + roleId: ANOTHER_ROLE, + account: this.user, + since: timestamp.add(this.grantDelay), + delay: this.executionDelay, + newMember: true, + }); + + // Access is correctly stored + const access = await this.manager.getAccess(ANOTHER_ROLE, user); + expect(access[0]).to.be.bignumber.equal(timestamp.add(this.grantDelay)); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Not in effect yet + const currentTimestamp = await time.latest(); + expect(currentTimestamp).to.be.a.bignumber.lt(access[0]); + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + false, + this.executionDelay.toString(), + ]); + }); + }, + after() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('grants role to the user', async function () { + const timestamp = await clockFromReceipt.timestamp(this.receipt).then(web3.utils.toBN); + expectEvent(this.receipt, 'RoleGranted', { + roleId: ANOTHER_ROLE, + account: this.user, + since: timestamp.add(this.grantDelay), + delay: this.executionDelay, + newMember: true, + }); + + // Access is correctly stored + const access = await this.manager.getAccess(ANOTHER_ROLE, user); + expect(access[0]).to.be.bignumber.equal(timestamp.add(this.grantDelay)); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Already in effect + const currentTimestamp = await time.latest(); + expect(currentTimestamp).to.be.a.bignumber.equal(access[0]); + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + true, + this.executionDelay.toString(), + ]); + }); + }, + }); + }); + + describe('without grant delay', function () { + beforeEach('set granting delay', async function () { + // Delay granting + this.grantDelay = 0; + await this.manager.$_setGrantDelay(ANOTHER_ROLE, this.grantDelay); + await time.increase(MINSETBACK); + }); + + it('immediately grants the role to the user', async function () { + this.executionDelay = time.duration.days(6); + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ + false, + '0', + ]); + const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.executionDelay, { + from: admin, + }); + + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + expectEvent(receipt, 'RoleGranted', { + roleId: ANOTHER_ROLE, + account: this.user, + since: timestamp, + delay: this.executionDelay, + newMember: true, + }); + + // Access is correctly stored + const access = await this.manager.getAccess(ANOTHER_ROLE, user); + expect(access[0]).to.be.bignumber.equal(timestamp); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Already in effect + const currentTimestamp = await time.latest(); + expect(currentTimestamp).to.be.a.bignumber.equal(access[0]); + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + true, + this.executionDelay.toString(), + ]); + }); + }); + }); + + describe('when the user is already a role member', function () { + beforeEach('make user role member', async function () { + this.previousExecutionDelay = time.duration.days(6); + await this.manager.$_grantRole(ANOTHER_ROLE, this.user, 0, this.previousExecutionDelay); + this.oldAccess = await this.manager.getAccess(ANOTHER_ROLE, user); + }); + + describe('with grant delay', function () { + beforeEach('set granting delay', async function () { + // Delay granting + const grantDelay = time.duration.weeks(2); + await this.manager.$_setGrantDelay(ANOTHER_ROLE, grantDelay); + await time.increase(MINSETBACK); + }); - const { receipt } = await this.manager.renounceRole(ROLES.SOME, member, { from: member }); - expectEvent(receipt, 'RoleRevoked', { roleId: ROLES.SOME, account: member }); + describe('when increasing the execution delay', function () { + beforeEach('set increased new execution delay', async function () { + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ + true, + this.previousExecutionDelay.toString(), + ]); - expect(await this.manager.hasRole(ROLES.SOME, member).then(formatAccess)).to.be.deep.equal([false, '0']); + this.newExecutionDelay = this.previousExecutionDelay.add(time.duration.days(4)); + }); - const access = await this.manager.getAccess(ROLES.SOME, member); - expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect - }); + it('emits event and immediately changes the execution delay', async function () { + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ + true, + this.previousExecutionDelay.toString(), + ]); + const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay, { + from: admin, + }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + + expectEvent(receipt, 'RoleGranted', { + roleId: ANOTHER_ROLE, + account: this.user, + since: timestamp, + delay: this.newExecutionDelay, + newMember: false, + }); + + // Access is correctly stored + const access = await this.manager.getAccess(ANOTHER_ROLE, user); + expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.newExecutionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Already in effect + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + true, + this.newExecutionDelay.toString(), + ]); + }); + }); - it('for a user that is schedule for joining the role', async function () { - await this.manager.$_grantRole(ROLES.SOME, user, 10, 0); // grant delay 10 + describe('when decreasing the execution delay', function () { + beforeEach('decrease execution delay', async function () { + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ + true, + this.previousExecutionDelay.toString(), + ]); + + this.newExecutionDelay = this.previousExecutionDelay.sub(time.duration.days(4)); + const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay, { + from: admin, + }); + this.grantTimestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + + this.receipt = receipt; + this.delay = this.previousExecutionDelay.sub(this.newExecutionDelay); // For shouldBehaveLikeDelay + }); - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + it('emits event', function () { + expectEvent(this.receipt, 'RoleGranted', { + roleId: ANOTHER_ROLE, + account: this.user, + since: this.grantTimestamp.add(this.delay), + delay: this.newExecutionDelay, + newMember: false, + }); + }); - const { receipt } = await this.manager.renounceRole(ROLES.SOME, user, { from: user }); - expectEvent(receipt, 'RoleRevoked', { roleId: ROLES.SOME, account: user }); + shouldBehaveLikeDelay('execution delay effect', { + before() { + beforeEach('consume effect delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('does not change the execution delay yet', async function () { + // Access is correctly stored + const access = await this.manager.getAccess(ANOTHER_ROLE, user); + expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.previousExecutionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal(this.newExecutionDelay); // pendingDelay + expect(access[3]).to.be.bignumber.equal(this.grantTimestamp.add(this.delay)); // pendingDelayEffect + + // Not in effect yet + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + true, + this.previousExecutionDelay.toString(), + ]); + }); + }, + after() { + beforeEach('consume effect delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('changes the execution delay', async function () { + // Access is correctly stored + const access = await this.manager.getAccess(ANOTHER_ROLE, user); + + expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.newExecutionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Already in effect + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + true, + this.newExecutionDelay.toString(), + ]); + }); + }, + }); + }); + }); - expect(await this.manager.hasRole(ROLES.SOME, user).then(formatAccess)).to.be.deep.equal([false, '0']); + describe('without grant delay', function () { + beforeEach('set granting delay', async function () { + // Delay granting + const grantDelay = 0; + await this.manager.$_setGrantDelay(ANOTHER_ROLE, grantDelay); + await time.increase(MINSETBACK); + }); - const access = await this.manager.getAccess(ROLES.SOME, user); - expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect - }); + describe('when increasing the execution delay', function () { + beforeEach('set increased new execution delay', async function () { + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ + true, + this.previousExecutionDelay.toString(), + ]); - it('for a user that is not in the role', async function () { - await this.manager.renounceRole(ROLES.SOME, user, { from: user }); - }); + this.newExecutionDelay = this.previousExecutionDelay.add(time.duration.days(4)); + }); - it('bad user confirmation', async function () { - await expectRevertCustomError( - this.manager.renounceRole(ROLES.SOME, member, { from: user }), - 'AccessManagerBadConfirmation', - [], - ); - }); - }); + it('emits event and immediately changes the execution delay', async function () { + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ + true, + this.previousExecutionDelay.toString(), + ]); + const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay, { + from: admin, + }); + const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + + expectEvent(receipt, 'RoleGranted', { + roleId: ANOTHER_ROLE, + account: this.user, + since: timestamp, + delay: this.newExecutionDelay, + newMember: false, + }); + + // Access is correctly stored + const access = await this.manager.getAccess(ANOTHER_ROLE, user); + expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.newExecutionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Already in effect + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + true, + this.newExecutionDelay.toString(), + ]); + }); + }); - describe('change role admin', function () { - it("admin can set any role's admin", async function () { - expect(await this.manager.getRoleAdmin(ROLES.SOME)).to.be.bignumber.equal(ROLES.SOME_ADMIN); + describe('when decreasing the execution delay', function () { + beforeEach('decrease execution delay', async function () { + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ + true, + this.previousExecutionDelay.toString(), + ]); + + this.newExecutionDelay = this.previousExecutionDelay.sub(time.duration.days(4)); + const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay, { + from: admin, + }); + this.grantTimestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + + this.receipt = receipt; + this.delay = this.previousExecutionDelay.sub(this.newExecutionDelay); // For shouldBehaveLikeDelay + }); - const { receipt } = await this.manager.setRoleAdmin(ROLES.SOME, ROLES.ADMIN, { from: admin }); - expectEvent(receipt, 'RoleAdminChanged', { roleId: ROLES.SOME, admin: ROLES.ADMIN }); + it('emits event', function () { + expectEvent(this.receipt, 'RoleGranted', { + roleId: ANOTHER_ROLE, + account: this.user, + since: this.grantTimestamp.add(this.delay), + delay: this.newExecutionDelay, + newMember: false, + }); + }); - expect(await this.manager.getRoleAdmin(ROLES.SOME)).to.be.bignumber.equal(ROLES.ADMIN); - }); + shouldBehaveLikeDelay('execution delay effect', { + before() { + beforeEach('consume effect delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('does not change the execution delay yet', async function () { + // Access is correctly stored + const access = await this.manager.getAccess(ANOTHER_ROLE, user); + expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.previousExecutionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal(this.newExecutionDelay); // pendingDelay + expect(access[3]).to.be.bignumber.equal(this.grantTimestamp.add(this.delay)); // pendingDelayEffect + + // Not in effect yet + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + true, + this.previousExecutionDelay.toString(), + ]); + }); + }, + after() { + beforeEach('consume effect delay', async function () { + // Consume previously set delay + await mine(); + }); + + it('changes the execution delay', async function () { + // Access is correctly stored + const access = await this.manager.getAccess(ANOTHER_ROLE, user); + + expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.be.bignumber.equal(this.newExecutionDelay); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + + // Already in effect + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + true, + this.newExecutionDelay.toString(), + ]); + }); + }, + }); + }); + }); + }); + }); - it("setting a role's admin is restricted", async function () { - await expectRevertCustomError( - this.manager.setRoleAdmin(ROLES.SOME, ROLES.SOME, { from: manager }), - 'AccessManagerUnauthorizedAccount', - [manager, ROLES.ADMIN], - ); - }); - }); + describe('#revokeRole', function () { + describe('restrictions', function () { + beforeEach('set method and args', async function () { + const method = 'revokeRole(uint64,address)'; + const args = [ANOTHER_ROLE, someAddress]; + this.calldata = this.manager.contract.methods[method](...args).encodeABI(); - describe('change role guardian', function () { - it("admin can set any role's admin", async function () { - expect(await this.manager.getRoleGuardian(ROLES.SOME)).to.be.bignumber.equal(ROLES.SOME_ADMIN); + // Need to be set before revoking + await this.manager.$_grantRole(...args, 0, 0); + }); - const { receipt } = await this.manager.setRoleGuardian(ROLES.SOME, ROLES.ADMIN, { from: admin }); - expectEvent(receipt, 'RoleGuardianChanged', { roleId: ROLES.SOME, guardian: ROLES.ADMIN }); + shouldBehaveLikeRoleAdminOperation(ANOTHER_ADMIN); + }); - expect(await this.manager.getRoleGuardian(ROLES.SOME)).to.be.bignumber.equal(ROLES.ADMIN); - }); + describe('when role has been granted', function () { + beforeEach('grant role with grant delay', async function () { + this.grantDelay = time.duration.weeks(1); + await this.manager.$_grantRole(ANOTHER_ROLE, user, this.grantDelay, 0); - it("setting a role's admin is restricted", async function () { - await expectRevertCustomError( - this.manager.setRoleGuardian(ROLES.SOME, ROLES.SOME, { from: other }), - 'AccessManagerUnauthorizedAccount', - [other, ROLES.ADMIN], - ); - }); - }); + this.delay = this.grantDelay; // For shouldBehaveLikeDelay + }); - describe('change execution delay', function () { - it('increasing the delay has immediate effect', async function () { - const oldDelay = web3.utils.toBN(10); - const newDelay = web3.utils.toBN(100); + shouldBehaveLikeDelay('grant', { + before() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); - // role is already granted (with no delay) in the initial setup. this update takes time. - await this.manager.$_grantRole(ROLES.SOME, member, 0, oldDelay); + it('revokes a granted role that will take effect in the future', async function () { + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + false, + '0', + ]); + + const { receipt } = await this.manager.revokeRole(ANOTHER_ROLE, user, { from: admin }); + expectEvent(receipt, 'RoleRevoked', { roleId: ANOTHER_ROLE, account: user }); + + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + false, + '0', + ]); + + const access = await this.manager.getAccess(ANOTHER_ROLE, user); + expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect + }); + }, + after() { + beforeEach('consume previously set grant delay', async function () { + // Consume previously set delay + await mine(); + }); - const accessBefore = await this.manager.getAccess(ROLES.SOME, member); - expect(accessBefore[1]).to.be.bignumber.equal(oldDelay); // currentDelay - expect(accessBefore[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(accessBefore[3]).to.be.bignumber.equal('0'); // effect + it('revokes a granted role that already took effect', async function () { + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + true, + '0', + ]); + + const { receipt } = await this.manager.revokeRole(ANOTHER_ROLE, user, { from: admin }); + expectEvent(receipt, 'RoleRevoked', { roleId: ANOTHER_ROLE, account: user }); + + expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + false, + '0', + ]); + + const access = await this.manager.getAccess(ANOTHER_ROLE, user); + expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince + expect(access[1]).to.be.bignumber.equal('0'); // currentDelay + expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay + expect(access[3]).to.be.bignumber.equal('0'); // effect + }); + }, + }); + }); - const { receipt } = await this.manager.grantRole(ROLES.SOME, member, newDelay, { - from: manager, - }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - - expectEvent(receipt, 'RoleGranted', { - roleId: ROLES.SOME, - account: member, - since: timestamp, - delay: newDelay, - newMember: false, - }); + describe('when role has not been granted', function () { + it('has no effect', async function () { + expect(await this.manager.hasRole(this.roles.SOME.id, user).then(formatAccess)).to.be.deep.equal([ + false, + '0', + ]); + const { receipt } = await this.manager.revokeRole(this.roles.SOME.id, user, { from: manager }); + expectEvent.notEmitted(receipt, 'RoleRevoked', { roleId: ANOTHER_ROLE, account: user }); + expect(await this.manager.hasRole(this.roles.SOME.id, user).then(formatAccess)).to.be.deep.equal([ + false, + '0', + ]); + }); + }); - // immediate effect - const accessAfter = await this.manager.getAccess(ROLES.SOME, member); - expect(accessAfter[1]).to.be.bignumber.equal(newDelay); // currentDelay - expect(accessAfter[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(accessAfter[3]).to.be.bignumber.equal('0'); // effect + it('reverts revoking PUBLIC_ROLE', async function () { + await expectRevertCustomError( + this.manager.revokeRole(this.roles.PUBLIC.id, user, { from: admin }), + 'AccessManagerLockedRole', + [this.roles.PUBLIC.id], + ); + }); + }); }); - it('decreasing the delay takes time', async function () { - const oldDelay = web3.utils.toBN(100); - const newDelay = web3.utils.toBN(10); - - // role is already granted (with no delay) in the initial setup. this update takes time. - await this.manager.$_grantRole(ROLES.SOME, member, 0, oldDelay); + describe('self role operations', function () { + describe('#renounceRole', function () { + beforeEach('grant role', async function () { + this.role = { id: web3.utils.toBN(783164) }; + this.caller = user; + await this.manager.$_grantRole(this.role.id, this.caller, 0, 0); + }); - const accessBefore = await this.manager.getAccess(ROLES.SOME, member); - expect(accessBefore[1]).to.be.bignumber.equal(oldDelay); // currentDelay - expect(accessBefore[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(accessBefore[3]).to.be.bignumber.equal('0'); // effect + it('renounces a role', async function () { + expect(await this.manager.hasRole(this.role.id, this.caller).then(formatAccess)).to.be.deep.equal([ + true, + '0', + ]); + const { receipt } = await this.manager.renounceRole(this.role.id, this.caller, { + from: this.caller, + }); + expectEvent(receipt, 'RoleRevoked', { + roleId: this.role.id, + account: this.caller, + }); + expect(await this.manager.hasRole(this.role.id, this.caller).then(formatAccess)).to.be.deep.equal([ + false, + '0', + ]); + }); - const { receipt } = await this.manager.grantRole(ROLES.SOME, member, newDelay, { - from: manager, - }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - const setback = oldDelay.sub(newDelay); - - expectEvent(receipt, 'RoleGranted', { - roleId: ROLES.SOME, - account: member, - since: timestamp.add(setback), - delay: newDelay, - newMember: false, - }); + it('reverts if renouncing the PUBLIC_ROLE', async function () { + await expectRevertCustomError( + this.manager.renounceRole(this.roles.PUBLIC.id, this.caller, { + from: this.caller, + }), + 'AccessManagerLockedRole', + [this.roles.PUBLIC.id], + ); + }); - // no immediate effect - const accessAfter = await this.manager.getAccess(ROLES.SOME, member); - expect(accessAfter[1]).to.be.bignumber.equal(oldDelay); // currentDelay - expect(accessAfter[2]).to.be.bignumber.equal(newDelay); // pendingDelay - expect(accessAfter[3]).to.be.bignumber.equal(timestamp.add(setback)); // effect - - // delayed effect - await time.increase(setback); - const accessAfterSetback = await this.manager.getAccess(ROLES.SOME, member); - expect(accessAfterSetback[1]).to.be.bignumber.equal(newDelay); // currentDelay - expect(accessAfterSetback[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(accessAfterSetback[3]).to.be.bignumber.equal('0'); // effect - }); - - it('can set a user execution delay during the grant delay', async function () { - await this.manager.$_grantRole(ROLES.SOME, other, 10, 0); - // here: "other" is pending to get the role, but doesn't yet have it. - - const { receipt } = await this.manager.grantRole(ROLES.SOME, other, executeDelay, { from: manager }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - - // increasing the execution delay from 0 to executeDelay is immediate - expectEvent(receipt, 'RoleGranted', { - roleId: ROLES.SOME, - account: other, - since: timestamp, - delay: executeDelay, - newMember: false, + it('reverts if renouncing with bad caller confirmation', async function () { + await expectRevertCustomError( + this.manager.renounceRole(this.role.id, someAddress, { + from: this.caller, + }), + 'AccessManagerBadConfirmation', + [], + ); + }); }); }); }); + }); - describe('change grant delay', function () { - it('increasing the delay has immediate effect', async function () { - const oldDelay = web3.utils.toBN(10); - const newDelay = web3.utils.toBN(100); - - await this.manager.$_setGrantDelay(ROLES.SOME, oldDelay); - await time.increase(MINSETBACK); - - expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); + describe('access managed target operations', function () { + describe('when calling a restricted target function', function () { + const method = 'fnRestricted()'; - const { receipt } = await this.manager.setGrantDelay(ROLES.SOME, newDelay, { from: admin }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - const setback = web3.utils.BN.max(MINSETBACK, oldDelay.sub(newDelay)); + beforeEach('set required role', function () { + this.role = { id: web3.utils.toBN(3597243) }; + this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + }); - expect(setback).to.be.bignumber.equal(MINSETBACK); - expectEvent(receipt, 'RoleGrantDelayChanged', { - roleId: ROLES.SOME, - delay: newDelay, - since: timestamp.add(setback), + describe('restrictions', function () { + beforeEach('set method and args', function () { + this.calldata = this.target.contract.methods[method]().encodeABI(); + this.caller = user; }); - expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); - await time.increase(setback); - expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(newDelay); + shouldBehaveLikeAManagedRestrictedOperation(); }); - it('increasing the delay has delay effect #1', async function () { - const oldDelay = web3.utils.toBN(100); - const newDelay = web3.utils.toBN(10); + it('succeeds called by a role member', async function () { + await this.manager.$_grantRole(this.role.id, user, 0, 0); - await this.manager.$_setGrantDelay(ROLES.SOME, oldDelay); - await time.increase(MINSETBACK); - - expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); - - const { receipt } = await this.manager.setGrantDelay(ROLES.SOME, newDelay, { from: admin }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - const setback = web3.utils.BN.max(MINSETBACK, oldDelay.sub(newDelay)); - - expect(setback).to.be.bignumber.equal(MINSETBACK); - expectEvent(receipt, 'RoleGrantDelayChanged', { - roleId: ROLES.SOME, - delay: newDelay, - since: timestamp.add(setback), + const { receipt } = await this.target.methods[method]({ + data: this.calldata, + from: user, + }); + expectEvent(receipt, 'CalledRestricted', { + caller: user, }); - - expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); - await time.increase(setback); - expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(newDelay); }); + }); - it('increasing the delay has delay effect #2', async function () { - const oldDelay = time.duration.days(30); // more than the minsetback - const newDelay = web3.utils.toBN(10); - - await this.manager.$_setGrantDelay(ROLES.SOME, oldDelay); - await time.increase(MINSETBACK); - - expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); - - const { receipt } = await this.manager.setGrantDelay(ROLES.SOME, newDelay, { from: admin }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - const setback = web3.utils.BN.max(MINSETBACK, oldDelay.sub(newDelay)); - - expect(setback).to.be.bignumber.gt(MINSETBACK); - expectEvent(receipt, 'RoleGrantDelayChanged', { - roleId: ROLES.SOME, - delay: newDelay, - since: timestamp.add(setback), - }); + describe('when calling a non-restricted target function', function () { + const method = 'fnUnrestricted()'; - expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(oldDelay); - await time.increase(setback); - expect(await this.manager.getRoleGrantDelay(ROLES.SOME)).to.be.bignumber.equal(newDelay); + beforeEach('set required role', async function () { + this.role = { id: web3.utils.toBN(879435) }; + await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); }); - it('changing the grant delay is restricted', async function () { - await expectRevertCustomError( - this.manager.setGrantDelay(ROLES.SOME, grantDelay, { from: other }), - 'AccessManagerUnauthorizedAccount', - [ROLES.ADMIN, other], - ); + it('succeeds called by anyone', async function () { + const { receipt } = await this.target.methods[method]({ + data: this.calldata, + from: user, + }); + expectEvent(receipt, 'CalledUnrestricted', { + caller: user, + }); }); }); }); - describe('with AccessManaged target contract', function () { - beforeEach('deploy target contract', async function () { - this.target = await AccessManagedTarget.new(this.manager.address); - // helpers for indirect calls - this.callData = selector('fnRestricted()'); - this.call = [this.target.address, this.callData]; - this.opId = web3.utils.keccak256( - web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], [user, ...this.call]), - ); - this.direct = (opts = {}) => this.target.fnRestricted({ from: user, ...opts }); - this.schedule = (opts = {}) => this.manager.schedule(...this.call, 0, { from: user, ...opts }); - this.execute = (opts = {}) => this.manager.execute(...this.call, { from: user, ...opts }); - this.cancel = (opts = {}) => this.manager.cancel(user, ...this.call, { from: user, ...opts }); - }); + describe('#schedule', function () { + const method = 'fnRestricted()'; - describe('Change function permissions', function () { - const sigs = ['someFunction()', 'someOtherFunction(uint256)', 'oneMoreFunction(address,uint8)'].map(selector); + beforeEach('set target function role', async function () { + this.role = { id: web3.utils.toBN(498305) }; + this.caller = user; - it('admin can set function role', async function () { - for (const sig of sigs) { - expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal(ROLES.ADMIN); - } + await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // nonzero execution delay - const { receipt: receipt1 } = await this.manager.setTargetFunctionRole(this.target.address, sigs, ROLES.SOME, { - from: admin, - }); + this.calldata = this.target.contract.methods[method]().encodeABI(); + this.delay = time.duration.weeks(2); + }); - for (const sig of sigs) { - expectEvent(receipt1, 'TargetFunctionRoleUpdated', { - target: this.target.address, - selector: sig, - roleId: ROLES.SOME, + describe('restrictions', function () { + shouldBehaveLikeCanCall({ + closed() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + await expectRevertCustomError( + scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.delay, + }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); }); - expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal(ROLES.SOME); - } - - const { receipt: receipt2 } = await this.manager.setTargetFunctionRole( - this.target.address, - [sigs[1]], - ROLES.SOME_ADMIN, - { - from: admin, + }, + open: { + callerIsTheManager: { + executing() { + it.skip('is not reachable because schedule is not restrictable'); + }, + notExecuting() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + await expectRevertCustomError( + scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.delay, + }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); + }, }, - ); - expectEvent(receipt2, 'TargetFunctionRoleUpdated', { - target: this.target.address, - selector: sigs[1], - roleId: ROLES.SOME_ADMIN, - }); + callerIsNotTheManager: { + publicRoleIsRequired() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + // scheduleOperation is not used here because it alters the next block timestamp + await expectRevertCustomError( + this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { + from: this.caller, + }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); + }, + specificRoleIsRequired: { + requiredRoleIsGranted: { + roleGrantingIsDelayed: { + callerHasAnExecutionDelay: { + beforeGrantDelay() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + // scheduleOperation is not used here because it alters the next block timestamp + await expectRevertCustomError( + this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { + from: this.caller, + }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); + }, + afterGrantDelay() { + it('succeeds', async function () { + // scheduleOperation is not used here because it alters the next block timestamp + await this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { + from: this.caller, + }); + }); + }, + }, + callerHasNoExecutionDelay: { + beforeGrantDelay() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + // scheduleOperation is not used here because it alters the next block timestamp + await expectRevertCustomError( + this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { + from: this.caller, + }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); + }, + afterGrantDelay() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + // scheduleOperation is not used here because it alters the next block timestamp + await expectRevertCustomError( + this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { + from: this.caller, + }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); + }, + }, + }, + roleGrantingIsNotDelayed: { + callerHasAnExecutionDelay() { + it('succeeds', async function () { + await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.delay, + }); + }); + }, + callerHasNoExecutionDelay() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + // scheduleOperation is not used here because it alters the next block timestamp + await expectRevertCustomError( + this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { + from: this.caller, + }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); + }, + }, + }, + requiredRoleIsNotGranted() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + await expectRevertCustomError( + scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.delay, + }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); + }, + }, + }, + }, + }); + }); - for (const sig of sigs) { - expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal( - sig == sigs[1] ? ROLES.SOME_ADMIN : ROLES.SOME, - ); - } + it('schedules an operation at the specified execution date if it is larger than caller execution delay', async function () { + const { operationId, scheduledAt, receipt } = await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.delay, }); - it('non-admin cannot set function role', async function () { - await expectRevertCustomError( - this.manager.setTargetFunctionRole(this.target.address, sigs, ROLES.SOME, { from: other }), - 'AccessManagerUnauthorizedAccount', - [other, ROLES.ADMIN], - ); + expect(await this.manager.getSchedule(operationId)).to.be.bignumber.equal(scheduledAt.add(this.delay)); + expectEvent(receipt, 'OperationScheduled', { + operationId, + nonce: '1', + schedule: scheduledAt.add(this.delay), + target: this.target.address, + data: this.calldata, }); }); - // WIP - describe('Calling restricted & unrestricted functions', function () { - for (const [callerRoles, fnRole, closed, delay] of product( - [[], [ROLES.SOME]], - [undefined, ROLES.ADMIN, ROLES.SOME, ROLES.PUBLIC], - [false, true], - [null, executeDelay], - )) { - // can we call with a delay ? - const indirectSuccess = (fnRole == ROLES.PUBLIC || callerRoles.includes(fnRole)) && !closed; - - // can we call without a delay ? - const directSuccess = (fnRole == ROLES.PUBLIC || (callerRoles.includes(fnRole) && !delay)) && !closed; - - const description = [ - 'Caller in roles', - '[' + (callerRoles ?? []).map(roleId => ROLES[roleId]).join(', ') + ']', - delay ? 'with a delay' : 'without a delay', - '+', - 'functions open to roles', - '[' + (ROLES[fnRole] ?? '') + ']', - closed ? `(closed)` : '', - ].join(' '); - - describe(description, function () { - beforeEach(async function () { - if (!delay || fnRole === ROLES.PUBLIC) this.skip(); // TODO: Fixed in #4613 - - // setup - await Promise.all([ - this.manager.$_setTargetClosed(this.target.address, closed), - fnRole && this.manager.$_setTargetFunctionRole(this.target.address, selector('fnRestricted()'), fnRole), - fnRole && this.manager.$_setTargetFunctionRole(this.target.address, selector('fnUnrestricted()'), fnRole), - ...callerRoles - .filter(roleId => roleId != ROLES.PUBLIC) - .map(roleId => this.manager.$_grantRole(roleId, user, 0, delay ?? 0)), - ]); - - // post setup checks - expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(closed); - - if (fnRole) { - expect( - await this.manager.getTargetFunctionRole(this.target.address, selector('fnRestricted()')), - ).to.be.bignumber.equal(fnRole); - expect( - await this.manager.getTargetFunctionRole(this.target.address, selector('fnUnrestricted()')), - ).to.be.bignumber.equal(fnRole); - } - - for (const roleId of callerRoles) { - const access = await this.manager.getAccess(roleId, user); - if (roleId == ROLES.PUBLIC) { - expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect - } else { - expect(access[0]).to.be.bignumber.gt('0'); // inRoleSince - expect(access[1]).to.be.bignumber.eq(String(delay ?? 0)); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect - } - } - }); - - it('canCall', async function () { - const result = await this.manager.canCall(user, this.target.address, selector('fnRestricted()')); - expect(result[0]).to.be.equal(directSuccess); - expect(result[1]).to.be.bignumber.equal(!directSuccess && indirectSuccess ? delay ?? '0' : '0'); - }); - - it('Calling a non restricted function never revert', async function () { - expectEvent(await this.target.fnUnrestricted({ from: user }), 'CalledUnrestricted', { - caller: user, - }); - }); - - it(`Calling a restricted function directly should ${ - directSuccess ? 'succeed' : 'revert' - }`, async function () { - const promise = this.direct(); - - if (directSuccess) { - expectEvent(await promise, 'CalledRestricted', { caller: user }); - } else if (indirectSuccess) { - await expectRevertCustomError(promise, 'AccessManagerNotScheduled', [this.opId]); - } else { - await expectRevertCustomError(promise, 'AccessManagedUnauthorized', [user]); - } - }); + it('schedules an operation at the minimum execution date if no specified execution date (when == 0)', async function () { + const executionDelay = await time.duration.hours(72); + await this.manager.$_grantRole(this.role.id, this.caller, 0, executionDelay); - it('Calling indirectly: only execute', async function () { - // execute without schedule - if (directSuccess) { - const nonceBefore = await this.manager.getNonce(this.opId); - const { receipt, tx } = await this.execute(); - - expectEvent.notEmitted(receipt, 'OperationExecuted', { operationId: this.opId }); - await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); - - // nonce is not modified - expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore); - } else if (indirectSuccess) { - await expectRevertCustomError(this.execute(), 'AccessManagerNotScheduled', [this.opId]); - } else { - await expectRevertCustomError(this.execute(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); - } - }); + const timestamp = await time.latest(); + const scheduledAt = timestamp.addn(1); + await setNextBlockTimestamp(scheduledAt); + const { receipt } = await this.manager.schedule(this.target.address, this.calldata, 0, { + from: this.caller, + }); - it('Calling indirectly: schedule and execute', async function () { - if (directSuccess || indirectSuccess) { - const nonceBefore = await this.manager.getNonce(this.opId); - const { receipt } = await this.schedule(); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + const operationId = await this.manager.hashOperation(this.caller, this.target.address, this.calldata); - expectEvent(receipt, 'OperationScheduled', { - operationId: this.opId, - caller: user, - target: this.call[0], - data: this.call[1], - }); + expect(await this.manager.getSchedule(operationId)).to.be.bignumber.equal(scheduledAt.add(executionDelay)); + expectEvent(receipt, 'OperationScheduled', { + operationId, + nonce: '1', + schedule: scheduledAt.add(executionDelay), + target: this.target.address, + data: this.calldata, + }); + }); - // if can call directly, delay should be 0. Otherwise, the delay should be applied - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal( - timestamp.add(directSuccess ? web3.utils.toBN(0) : delay), - ); + it('increases the nonce of an operation scheduled more than once', async function () { + // Setup and check initial nonce + const expectedOperationId = await web3.utils.keccak256( + web3.eth.abi.encodeParameters( + ['address', 'address', 'bytes'], + [this.caller, this.target.address, this.calldata], + ), + ); + expect(await this.manager.getNonce(expectedOperationId)).to.be.bignumber.eq('0'); + + // Schedule + const op1 = await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.delay, + }); + expectEvent(op1.receipt, 'OperationScheduled', { + operationId: op1.operationId, + nonce: '1', + schedule: op1.scheduledAt.add(this.delay), + target: this.target.address, + data: this.calldata, + }); + expect(expectedOperationId).to.eq(op1.operationId); - // nonce is incremented - expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); - - // execute without wait - if (directSuccess) { - const { receipt, tx } = await this.execute(); - - await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); - if (delay && fnRole !== ROLES.PUBLIC) { - expectEvent(receipt, 'OperationExecuted', { operationId: this.opId }); - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); - } - - // nonce is not modified by execute - expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); - } else if (indirectSuccess) { - await expectRevertCustomError(this.execute(), 'AccessManagerNotReady', [this.opId]); - } else { - await expectRevertCustomError(this.execute(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); - } - } else { - await expectRevertCustomError(this.schedule(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); - } - }); + // Consume + await time.increase(this.delay); + await this.manager.$_consumeScheduledOp(expectedOperationId); - it('Calling indirectly: schedule wait and execute', async function () { - if (directSuccess || indirectSuccess) { - const nonceBefore = await this.manager.getNonce(this.opId); - const { receipt } = await this.schedule(); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + // Check nonce + expect(await this.manager.getNonce(expectedOperationId)).to.be.bignumber.eq('1'); - expectEvent(receipt, 'OperationScheduled', { - operationId: this.opId, - caller: user, - target: this.call[0], - data: this.call[1], - }); + // Schedule again + const op2 = await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.delay, + }); + expectEvent(op2.receipt, 'OperationScheduled', { + operationId: op2.operationId, + nonce: '2', + schedule: op2.scheduledAt.add(this.delay), + target: this.target.address, + data: this.calldata, + }); + expect(expectedOperationId).to.eq(op2.operationId); - // if can call directly, delay should be 0. Otherwise, the delay should be applied - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal( - timestamp.add(directSuccess ? web3.utils.toBN(0) : delay), - ); + // Check final nonce + expect(await this.manager.getNonce(expectedOperationId)).to.be.bignumber.eq('2'); + }); - // nonce is incremented - expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); - - // wait - await time.increase(delay ?? 0); - - // execute without wait - if (directSuccess || indirectSuccess) { - const { receipt, tx } = await this.execute(); - - await expectEvent.inTransaction(tx, this.target, 'CalledRestricted', { caller: this.manager.address }); - if (delay && fnRole !== ROLES.PUBLIC) { - expectEvent(receipt, 'OperationExecuted', { operationId: this.opId }); - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); - } - - // nonce is not modified by execute - expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); - } else { - await expectRevertCustomError(this.execute(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); - } - } else { - await expectRevertCustomError(this.schedule(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); - } - }); + it('reverts if the specified execution date is before the current timestamp + caller execution delay', async function () { + const executionDelay = time.duration.weeks(1).add(this.delay); + await this.manager.$_grantRole(this.role.id, this.caller, 0, executionDelay); - it('Calling directly: schedule and call', async function () { - if (directSuccess || indirectSuccess) { - const nonceBefore = await this.manager.getNonce(this.opId); - const { receipt } = await this.schedule(); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + await expectRevertCustomError( + scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.delay, + }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); - expectEvent(receipt, 'OperationScheduled', { - operationId: this.opId, - caller: user, - target: this.call[0], - data: this.call[1], - }); + it('reverts if an operation is already schedule', async function () { + const { operationId } = await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.delay, + }); - // if can call directly, delay should be 0. Otherwise, the delay should be applied - const schedule = timestamp.add(directSuccess ? web3.utils.toBN(0) : delay); - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); - - // nonce is incremented - expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); - - // execute without wait - const promise = this.direct(); - if (directSuccess) { - expectEvent(await promise, 'CalledRestricted', { caller: user }); - - // schedule is not reset - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); - - // nonce is not modified by execute - expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); - } else if (indirectSuccess) { - await expectRevertCustomError(promise, 'AccessManagerNotReady', [this.opId]); - } else { - await expectRevertCustomError(promise, 'AccessManagerUnauthorizedCall', [user, ...this.call]); - } - } else { - await expectRevertCustomError(this.schedule(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); - } - }); + await expectRevertCustomError( + scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.delay, + }), + 'AccessManagerAlreadyScheduled', + [operationId], + ); + }); - it('Calling directly: schedule wait and call', async function () { - if (directSuccess || indirectSuccess) { - const nonceBefore = await this.manager.getNonce(this.opId); - const { receipt } = await this.schedule(); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + it('panics scheduling calldata with less than 4 bytes', async function () { + const calldata = '0x1234'; // 2 bytes - expectEvent(receipt, 'OperationScheduled', { - operationId: this.opId, - caller: user, - target: this.call[0], - data: this.call[1], - }); + // Managed contract + await expectRevert.unspecified( + scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: calldata, + delay: this.delay, + }), + ); - // if can call directly, delay should be 0. Otherwise, the delay should be applied - const schedule = timestamp.add(directSuccess ? web3.utils.toBN(0) : delay); - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); + // Manager contract + await expectRevert.unspecified( + scheduleOperation(this.manager, { + caller: this.caller, + target: this.manager.address, + calldata: calldata, + delay: this.delay, + }), + ); + }); - // nonce is incremented - expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); + it('reverts scheduling an unknown operation to the manager', async function () { + const calldata = '0x12345678'; - // wait - await time.increase(delay ?? 0); + await expectRevertCustomError( + scheduleOperation(this.manager, { + caller: this.caller, + target: this.manager.address, + calldata, + delay: this.delay, + }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.manager.address, calldata], + ); + }); + }); - // execute without wait - const promise = await this.direct(); - if (directSuccess) { - expectEvent(await promise, 'CalledRestricted', { caller: user }); + describe('#execute', function () { + const method = 'fnRestricted()'; - // schedule is not reset - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(schedule); + beforeEach('set target function role', async function () { + this.role = { id: web3.utils.toBN(9825430) }; + this.caller = user; - // nonce is not modified by execute - expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); - } else if (indirectSuccess) { - const receipt = await promise; + await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + await this.manager.$_grantRole(this.role.id, this.caller, 0, 0); - expectEvent(receipt, 'CalledRestricted', { caller: user }); - await expectEvent.inTransaction(receipt.tx, this.manager, 'OperationExecuted', { - operationId: this.opId, - }); + this.calldata = this.target.contract.methods[method]().encodeABI(); + }); - // schedule is reset - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); - - // nonce is not modified by execute - expect(await this.manager.getNonce(this.opId)).to.be.bignumber.equal(nonceBefore.addn(1)); - } else { - await expectRevertCustomError(this.direct(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); - } - } else { - await expectRevertCustomError(this.schedule(), 'AccessManagerUnauthorizedCall', [user, ...this.call]); - } + describe('restrictions', function () { + shouldBehaveLikeCanCall({ + closed() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + await expectRevertCustomError( + this.manager.execute(this.target.address, this.calldata, { from: this.caller }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); }); - - it('Scheduling for later than needed'); // TODO - }); - } + }, + open: { + callerIsTheManager: { + executing() { + it('succeeds', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); + }, + notExecuting() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + await expectRevertCustomError( + this.manager.execute(this.target.address, this.calldata, { from: this.caller }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); + }, + }, + callerIsNotTheManager: { + publicRoleIsRequired() { + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY); + }, + specificRoleIsRequired: { + requiredRoleIsGranted: { + roleGrantingIsDelayed: { + callerHasAnExecutionDelay: { + beforeGrantDelay() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + await expectRevertCustomError( + this.manager.execute(this.target.address, this.calldata, { from: this.caller }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); + }, + afterGrantDelay() { + beforeEach('define schedule delay', async function () { + // Consume previously set delay + await mine(); + this.scheduleIn = time.duration.days(21); + }); + + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }, + }, + callerHasNoExecutionDelay: { + beforeGrantDelay() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + await expectRevertCustomError( + this.manager.execute(this.target.address, this.calldata, { from: this.caller }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); + }, + afterGrantDelay() { + beforeEach('define schedule delay', async function () { + // Consume previously set delay + await mine(); + }); + + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY); + }, + }, + }, + roleGrantingIsNotDelayed: { + callerHasAnExecutionDelay() { + beforeEach('define schedule delay', async function () { + this.scheduleIn = time.duration.days(15); + }); + + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + }, + callerHasNoExecutionDelay() { + shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY); + }, + }, + }, + requiredRoleIsNotGranted() { + it('reverts as AccessManagerUnauthorizedCall', async function () { + await expectRevertCustomError( + this.manager.execute(this.target.address, this.calldata, { from: this.caller }), + 'AccessManagerUnauthorizedCall', + [this.caller, this.target.address, this.calldata.substring(0, 10)], + ); + }); + }, + }, + }, + }, + }); }); - describe('Indirect execution corner-cases', async function () { - beforeEach(async function () { - await this.manager.$_setTargetFunctionRole(this.target.address, this.callData, ROLES.SOME); - await this.manager.$_grantRole(ROLES.SOME, user, 0, executeDelay); - }); + it('executes with a delay consuming the scheduled operation', async function () { + const delay = time.duration.hours(4); + await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // Execution delay is needed so the operation is consumed - it('Checking canCall when caller is the manager depend on the _executionId', async function () { - const result = await this.manager.canCall(this.manager.address, this.target.address, '0x00000000'); - expect(result[0]).to.be.false; - expect(result[1]).to.be.bignumber.equal('0'); + const { operationId } = await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay, }); + await time.increase(delay); + const { receipt } = await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + expectEvent(receipt, 'OperationExecuted', { + operationId, + nonce: '1', + }); + expect(await this.manager.getSchedule(operationId)).to.be.bignumber.equal('0'); + }); - it('Cannot execute earlier', async function () { - const { receipt } = await this.schedule(); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal(timestamp.add(executeDelay)); - - // too early - await helpers.time.setNextBlockTimestamp(timestamp.add(executeDelay).subn(1)); - await expectRevertCustomError(this.execute(), 'AccessManagerNotReady', [this.opId]); - - // the revert happened one second before the execution delay expired - expect(await time.latest()).to.be.bignumber.equal(timestamp.add(executeDelay).subn(1)); + it('executes with no delay consuming a scheduled operation', async function () { + const delay = time.duration.hours(4); - // ok - await helpers.time.setNextBlockTimestamp(timestamp.add(executeDelay)); - await this.execute(); + // give caller an execution delay + await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); - // the success happened when the delay was reached (earliest possible) - expect(await time.latest()).to.be.bignumber.equal(timestamp.add(executeDelay)); + const { operationId } = await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay, }); - it('Cannot schedule an already scheduled operation', async function () { - const { receipt } = await this.schedule(); - expectEvent(receipt, 'OperationScheduled', { - operationId: this.opId, - caller: user, - target: this.call[0], - data: this.call[1], - }); + // remove the execution delay + await this.manager.$_grantRole(this.role.id, this.caller, 0, 0); - await expectRevertCustomError(this.schedule(), 'AccessManagerAlreadyScheduled', [this.opId]); + await time.increase(delay); + const { receipt } = await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + expectEvent(receipt, 'OperationExecuted', { + operationId, + nonce: '1', }); + expect(await this.manager.getSchedule(operationId)).to.be.bignumber.equal('0'); + }); - it('Cannot cancel an operation that is not scheduled', async function () { - await expectRevertCustomError(this.cancel(), 'AccessManagerNotScheduled', [this.opId]); - }); + it('keeps the original _executionId after finishing the call', async function () { + const executionIdBefore = await getStorageAt(this.manager.address, EXECUTION_ID_STORAGE_SLOT); + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + const executionIdAfter = await getStorageAt(this.manager.address, EXECUTION_ID_STORAGE_SLOT); + expect(executionIdBefore).to.be.bignumber.equal(executionIdAfter); + }); - it('Cannot cancel an operation that is already executed', async function () { - await this.schedule(); - await time.increase(executeDelay); - await this.execute(); + it('reverts executing twice', async function () { + const delay = time.duration.hours(2); + await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // Execution delay is needed so the operation is consumed - await expectRevertCustomError(this.cancel(), 'AccessManagerNotScheduled', [this.opId]); + const { operationId } = await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay, }); + await time.increase(delay); + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + await expectRevertCustomError( + this.manager.execute(this.target.address, this.calldata, { from: this.caller }), + 'AccessManagerNotScheduled', + [operationId], + ); + }); + }); - it('Scheduler can cancel', async function () { - await this.schedule(); + describe('#consumeScheduledOp', function () { + beforeEach('define scheduling parameters', async function () { + const method = 'fnRestricted()'; + this.caller = this.target.address; + this.calldata = this.target.contract.methods[method]().encodeABI(); + this.role = { id: web3.utils.toBN(9834983) }; - expect(await this.manager.getSchedule(this.opId)).to.not.be.bignumber.equal('0'); + await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // nonzero execution delay - expectEvent(await this.cancel({ from: manager }), 'OperationCanceled', { operationId: this.opId }); + this.scheduleIn = time.duration.hours(10); // For shouldBehaveLikeSchedulableOperation + }); - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); + describe('when caller is not consuming scheduled operation', function () { + beforeEach('set consuming false', async function () { + await this.target.setIsConsumingScheduledOp(false, `0x${CONSUMING_SCHEDULE_STORAGE_SLOT.toString(16)}`); }); - it('Guardian can cancel', async function () { - await this.schedule(); - - expect(await this.manager.getSchedule(this.opId)).to.not.be.bignumber.equal('0'); - - expectEvent(await this.cancel({ from: manager }), 'OperationCanceled', { operationId: this.opId }); + it('reverts as AccessManagerUnauthorizedConsume', async function () { + await impersonate(this.caller); + await expectRevertCustomError( + this.manager.consumeScheduledOp(this.caller, this.calldata, { from: this.caller }), + 'AccessManagerUnauthorizedConsume', + [this.caller], + ); + }); + }); - expect(await this.manager.getSchedule(this.opId)).to.be.bignumber.equal('0'); + describe('when caller is consuming scheduled operation', function () { + beforeEach('set consuming true', async function () { + await this.target.setIsConsumingScheduledOp(true, `0x${CONSUMING_SCHEDULE_STORAGE_SLOT.toString(16)}`); }); - it('Cancel is restricted', async function () { - await this.schedule(); + shouldBehaveLikeSchedulableOperation({ + scheduled: { + before() { + it('reverts as AccessManagerNotReady', async function () { + await impersonate(this.caller); + await expectRevertCustomError( + this.manager.consumeScheduledOp(this.caller, this.calldata, { from: this.caller }), + 'AccessManagerNotReady', + [this.operationId], + ); + }); + }, + after() { + it('consumes the scheduled operation and resets timepoint', async function () { + expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal( + this.scheduledAt.add(this.scheduleIn), + ); + await impersonate(this.caller); + const { receipt } = await this.manager.consumeScheduledOp(this.caller, this.calldata, { + from: this.caller, + }); + expectEvent(receipt, 'OperationExecuted', { + operationId: this.operationId, + nonce: '1', + }); + expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal('0'); + }); + }, + expired() { + it('reverts as AccessManagerExpired', async function () { + await impersonate(this.caller); + await expectRevertCustomError( + this.manager.consumeScheduledOp(this.caller, this.calldata, { from: this.caller }), + 'AccessManagerExpired', + [this.operationId], + ); + }); + }, + }, + notScheduled() { + it('reverts as AccessManagerNotScheduled', async function () { + await impersonate(this.caller); + await expectRevertCustomError( + this.manager.consumeScheduledOp(this.caller, this.calldata, { from: this.caller }), + 'AccessManagerNotScheduled', + [this.operationId], + ); + }); + }, + }); + }); + }); - expect(await this.manager.getSchedule(this.opId)).to.not.be.bignumber.equal('0'); + describe('#cancelScheduledOp', function () { + const method = 'fnRestricted()'; - await expectRevertCustomError(this.cancel({ from: other }), 'AccessManagerUnauthorizedCancel', [ - other, - user, - ...this.call, - ]); + beforeEach('setup scheduling', async function () { + this.caller = this.roles.SOME.members[0]; + await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.roles.SOME.id); + await this.manager.$_grantRole(this.roles.SOME.id, this.caller, 0, 1); // nonzero execution delay - expect(await this.manager.getSchedule(this.opId)).to.not.be.bignumber.equal('0'); - }); + this.calldata = await this.target.contract.methods[method]().encodeABI(); + this.scheduleIn = time.duration.days(10); // For shouldBehaveLikeSchedulableOperation + }); - it('Can re-schedule after execution', async function () { - await this.schedule(); - await time.increase(executeDelay); - await this.execute(); + shouldBehaveLikeSchedulableOperation({ + scheduled: { + before() { + describe('when caller is the scheduler', function () { + it('succeeds', async function () { + await this.manager.cancel(this.caller, this.target.address, this.calldata, { from: this.caller }); + }); + }); - // reschedule - const { receipt } = await this.schedule(); - expectEvent(receipt, 'OperationScheduled', { - operationId: this.opId, - caller: user, - target: this.call[0], - data: this.call[1], - }); - }); + describe('when caller is an admin', function () { + it('succeeds', async function () { + await this.manager.cancel(this.caller, this.target.address, this.calldata, { + from: this.roles.ADMIN.members[0], + }); + }); + }); - it('Can re-schedule after cancel', async function () { - await this.schedule(); - await this.cancel(); + describe('when caller is the role guardian', function () { + it('succeeds', async function () { + await this.manager.cancel(this.caller, this.target.address, this.calldata, { + from: this.roles.SOME_GUARDIAN.members[0], + }); + }); + }); - // reschedule - const { receipt } = await this.schedule(); - expectEvent(receipt, 'OperationScheduled', { - operationId: this.opId, - caller: user, - target: this.call[0], - data: this.call[1], + describe('when caller is any other account', function () { + it('reverts as AccessManagerUnauthorizedCancel', async function () { + await expectRevertCustomError( + this.manager.cancel(this.caller, this.target.address, this.calldata, { from: other }), + 'AccessManagerUnauthorizedCancel', + [other, this.caller, this.target.address, selector(method)], + ); + }); + }); + }, + after() { + it('succeeds', async function () { + await this.manager.cancel(this.caller, this.target.address, this.calldata, { from: this.caller }); + }); + }, + expired() { + it('succeeds', async function () { + await this.manager.cancel(this.caller, this.target.address, this.calldata, { from: this.caller }); + }); + }, + }, + notScheduled() { + it('reverts as AccessManagerNotScheduled', async function () { + await expectRevertCustomError( + this.manager.cancel(this.caller, this.target.address, this.calldata), + 'AccessManagerNotScheduled', + [this.operationId], + ); }); + }, + }); + + it('cancels an operation and resets schedule', async function () { + const { operationId } = await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.scheduleIn, }); + const { receipt } = await this.manager.cancel(this.caller, this.target.address, this.calldata, { + from: this.caller, + }); + expectEvent(receipt, 'OperationCanceled', { + operationId, + nonce: '1', + }); + expect(await this.manager.getSchedule(operationId)).to.be.bignumber.eq('0'); }); }); @@ -1095,7 +2657,11 @@ contract('AccessManager', function (accounts) { describe('function is open to public role', function () { beforeEach(async function () { - await this.manager.$_setTargetFunctionRole(this.ownable.address, selector('$_checkOwner()'), ROLES.PUBLIC); + await this.manager.$_setTargetFunctionRole( + this.ownable.address, + selector('$_checkOwner()'), + this.roles.PUBLIC.id, + ); }); it('directly call: reverts', async function () { @@ -1114,50 +2680,4 @@ contract('AccessManager', function (accounts) { }); }); }); - - describe('authority update', function () { - beforeEach(async function () { - this.newManager = await AccessManager.new(admin); - this.target = await AccessManagedTarget.new(this.manager.address); - }); - - it('admin can change authority', async function () { - expect(await this.target.authority()).to.be.equal(this.manager.address); - - const { tx } = await this.manager.updateAuthority(this.target.address, this.newManager.address, { from: admin }); - await expectEvent.inTransaction(tx, this.target, 'AuthorityUpdated', { authority: this.newManager.address }); - - expect(await this.target.authority()).to.be.equal(this.newManager.address); - }); - - it('cannot set an address without code as the authority', async function () { - await expectRevertCustomError( - this.manager.updateAuthority(this.target.address, user, { from: admin }), - 'AccessManagedInvalidAuthority', - [user], - ); - }); - - it('updateAuthority is restricted on manager', async function () { - await expectRevertCustomError( - this.manager.updateAuthority(this.target.address, this.newManager.address, { from: other }), - 'AccessManagerUnauthorizedAccount', - [other, ROLES.ADMIN], - ); - }); - - it('setAuthority is restricted on AccessManaged', async function () { - await expectRevertCustomError( - this.target.setAuthority(this.newManager.address, { from: admin }), - 'AccessManagedUnauthorized', - [admin], - ); - }); - }); - - // TODO: - // - check opening/closing a contract - // - check updating the contract delay - // - check the delay applies to admin function - describe.skip('contract modes', function () {}); }); diff --git a/test/helpers/access-manager.js b/test/helpers/access-manager.js new file mode 100644 index 000000000..7dfc4c33d --- /dev/null +++ b/test/helpers/access-manager.js @@ -0,0 +1,69 @@ +const { time } = require('@openzeppelin/test-helpers'); +const { MAX_UINT64 } = require('./constants'); +const { artifacts } = require('hardhat'); + +function buildBaseRoles() { + const roles = { + ADMIN: { + id: web3.utils.toBN(0), + }, + SOME_ADMIN: { + id: web3.utils.toBN(17), + }, + SOME_GUARDIAN: { + id: web3.utils.toBN(35), + }, + SOME: { + id: web3.utils.toBN(42), + }, + PUBLIC: { + id: MAX_UINT64, + }, + }; + + // Names + Object.entries(roles).forEach(([name, role]) => (role.name = name)); + + // Defaults + for (const role of Object.keys(roles)) { + roles[role].admin = roles.ADMIN; + roles[role].guardian = roles.ADMIN; + } + + // Admins + roles.SOME.admin = roles.SOME_ADMIN; + + // Guardians + roles.SOME.guardian = roles.SOME_GUARDIAN; + + return roles; +} + +const formatAccess = access => [access[0], access[1].toString()]; + +const MINSETBACK = time.duration.days(5); +const EXPIRATION = time.duration.weeks(1); + +let EXECUTION_ID_STORAGE_SLOT = 3n; +let CONSUMING_SCHEDULE_STORAGE_SLOT = 0n; +try { + // Try to get the artifact paths, will throw if it doesn't exist + artifacts._getArtifactPathSync('AccessManagerUpgradeable'); + artifacts._getArtifactPathSync('AccessManagedUpgradeable'); + + // ERC-7201 namespace location for AccessManager + EXECUTION_ID_STORAGE_SLOT += 0x40c6c8c28789853c7efd823ab20824bbd71718a8a5915e855f6f288c9a26ad00n; + // ERC-7201 namespace location for AccessManaged + CONSUMING_SCHEDULE_STORAGE_SLOT += 0xf3177357ab46d8af007ab3fdb9af81da189e1068fefdc0073dca88a2cab40a00n; +} catch (_) { + // eslint-disable-next-line no-empty +} + +module.exports = { + buildBaseRoles, + formatAccess, + MINSETBACK, + EXPIRATION, + EXECUTION_ID_STORAGE_SLOT, + CONSUMING_SCHEDULE_STORAGE_SLOT, +}; From 0560576c7affdcba3c0158598dcbaa4b7db4df68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Wed, 4 Oct 2023 16:15:41 -0600 Subject: [PATCH 082/167] Improve `AccessManaged` and `AuthorityUtils` tests (#4632) Co-authored-by: Hadrien Croubois Co-authored-by: Francisco Giordano --- contracts/mocks/AuthorityMock.sol | 69 ++++++++++ test/access/manager/AccessManaged.test.js | 142 +++++++++++++++++++++ test/access/manager/AuthorityUtils.test.js | 91 +++++++++++++ 3 files changed, 302 insertions(+) create mode 100644 contracts/mocks/AuthorityMock.sol create mode 100644 test/access/manager/AccessManaged.test.js create mode 100644 test/access/manager/AuthorityUtils.test.js diff --git a/contracts/mocks/AuthorityMock.sol b/contracts/mocks/AuthorityMock.sol new file mode 100644 index 000000000..bf2434b0a --- /dev/null +++ b/contracts/mocks/AuthorityMock.sol @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {IAccessManaged} from "../access/manager/IAccessManaged.sol"; +import {IAuthority} from "../access/manager/IAuthority.sol"; + +contract NotAuthorityMock is IAuthority { + function canCall(address /* caller */, address /* target */, bytes4 /* selector */) external pure returns (bool) { + revert("AuthorityNoDelayMock: not implemented"); + } +} + +contract AuthorityNoDelayMock is IAuthority { + bool _immediate; + + function canCall( + address /* caller */, + address /* target */, + bytes4 /* selector */ + ) external view returns (bool immediate) { + return _immediate; + } + + function _setImmediate(bool immediate) external { + _immediate = immediate; + } +} + +contract AuthorityDelayMock { + bool _immediate; + uint32 _delay; + + function canCall( + address /* caller */, + address /* target */, + bytes4 /* selector */ + ) external view returns (bool immediate, uint32 delay) { + return (_immediate, _delay); + } + + function _setImmediate(bool immediate) external { + _immediate = immediate; + } + + function _setDelay(uint32 delay) external { + _delay = delay; + } +} + +contract AuthorityNoResponse { + function canCall(address /* caller */, address /* target */, bytes4 /* selector */) external view {} +} + +contract AuthoritiyObserveIsConsuming { + event ConsumeScheduledOpCalled(address caller, bytes data, bytes4 isConsuming); + + function canCall( + address /* caller */, + address /* target */, + bytes4 /* selector */ + ) external pure returns (bool immediate, uint32 delay) { + return (false, 1); + } + + function consumeScheduledOp(address caller, bytes memory data) public { + emit ConsumeScheduledOpCalled(caller, data, IAccessManaged(msg.sender).isConsumingScheduledOp()); + } +} diff --git a/test/access/manager/AccessManaged.test.js b/test/access/manager/AccessManaged.test.js new file mode 100644 index 000000000..9e94af615 --- /dev/null +++ b/test/access/manager/AccessManaged.test.js @@ -0,0 +1,142 @@ +const { expectEvent, time, expectRevert } = require('@openzeppelin/test-helpers'); +const { selector } = require('../../helpers/methods'); +const { expectRevertCustomError } = require('../../helpers/customError'); +const { + time: { setNextBlockTimestamp }, +} = require('@nomicfoundation/hardhat-network-helpers'); +const { impersonate } = require('../../helpers/account'); + +const AccessManaged = artifacts.require('$AccessManagedTarget'); +const AccessManager = artifacts.require('$AccessManager'); + +const AuthoritiyObserveIsConsuming = artifacts.require('$AuthoritiyObserveIsConsuming'); + +contract('AccessManaged', function (accounts) { + const [admin, roleMember, other] = accounts; + + beforeEach(async function () { + this.authority = await AccessManager.new(admin); + this.managed = await AccessManaged.new(this.authority.address); + }); + + it('sets authority and emits AuthorityUpdated event during construction', async function () { + await expectEvent.inConstruction(this.managed, 'AuthorityUpdated', { + authority: this.authority.address, + }); + expect(await this.managed.authority()).to.eq(this.authority.address); + }); + + describe('restricted modifier', function () { + const method = 'fnRestricted()'; + + beforeEach(async function () { + this.selector = selector(method); + this.role = web3.utils.toBN(42); + await this.authority.$_setTargetFunctionRole(this.managed.address, this.selector, this.role); + await this.authority.$_grantRole(this.role, roleMember, 0, 0); + }); + + it('succeeds when role is granted without execution delay', async function () { + await this.managed.methods[method]({ from: roleMember }); + }); + + it('reverts when role is not granted', async function () { + await expectRevertCustomError(this.managed.methods[method]({ from: other }), 'AccessManagedUnauthorized', [ + other, + ]); + }); + + it('panics in short calldata', async function () { + // We avoid adding the `restricted` modifier to the fallback function because other tests may depend on it + // being accessible without restrictions. We check for the internal `_checkCanCall` instead. + await expectRevert.unspecified(this.managed.$_checkCanCall(other, '0x1234')); + }); + + describe('when role is granted with execution delay', function () { + beforeEach(async function () { + const executionDelay = web3.utils.toBN(911); + await this.authority.$_grantRole(this.role, roleMember, 0, executionDelay); + }); + + it('reverts if the operation is not scheduled', async function () { + const calldata = await this.managed.contract.methods[method]().encodeABI(); + const opId = await this.authority.hashOperation(roleMember, this.managed.address, calldata); + + await expectRevertCustomError(this.managed.methods[method]({ from: roleMember }), 'AccessManagerNotScheduled', [ + opId, + ]); + }); + + it('succeeds if the operation is scheduled', async function () { + // Arguments + const delay = time.duration.hours(12); + const calldata = await this.managed.contract.methods[method]().encodeABI(); + + // Schedule + const timestamp = await time.latest(); + const scheduledAt = timestamp.addn(1); + const when = scheduledAt.add(delay); + await setNextBlockTimestamp(scheduledAt); + await this.authority.schedule(this.managed.address, calldata, when, { + from: roleMember, + }); + + // Set execution date + await setNextBlockTimestamp(when); + + // Shouldn't revert + await this.managed.methods[method]({ from: roleMember }); + }); + }); + }); + + describe('setAuthority', function () { + beforeEach(async function () { + this.newAuthority = await AccessManager.new(admin); + }); + + it('reverts if the caller is not the authority', async function () { + await expectRevertCustomError(this.managed.setAuthority(other, { from: other }), 'AccessManagedUnauthorized', [ + other, + ]); + }); + + it('reverts if the new authority is not a valid authority', async function () { + await impersonate(this.authority.address); + await expectRevertCustomError( + this.managed.setAuthority(other, { from: this.authority.address }), + 'AccessManagedInvalidAuthority', + [other], + ); + }); + + it('sets authority and emits AuthorityUpdated event', async function () { + await impersonate(this.authority.address); + const { receipt } = await this.managed.setAuthority(this.newAuthority.address, { from: this.authority.address }); + await expectEvent(receipt, 'AuthorityUpdated', { + authority: this.newAuthority.address, + }); + expect(await this.managed.authority()).to.eq(this.newAuthority.address); + }); + }); + + describe('isConsumingScheduledOp', function () { + beforeEach(async function () { + this.authority = await AuthoritiyObserveIsConsuming.new(); + this.managed = await AccessManaged.new(this.authority.address); + }); + + it('returns bytes4(0) when not consuming operation', async function () { + expect(await this.managed.isConsumingScheduledOp()).to.eq('0x00000000'); + }); + + it('returns isConsumingScheduledOp selector when consuming operation', async function () { + const receipt = await this.managed.fnRestricted({ from: other }); + await expectEvent.inTransaction(receipt.tx, this.authority, 'ConsumeScheduledOpCalled', { + caller: other, + data: this.managed.contract.methods.fnRestricted().encodeABI(), + isConsuming: selector('isConsumingScheduledOp()'), + }); + }); + }); +}); diff --git a/test/access/manager/AuthorityUtils.test.js b/test/access/manager/AuthorityUtils.test.js new file mode 100644 index 000000000..346be030b --- /dev/null +++ b/test/access/manager/AuthorityUtils.test.js @@ -0,0 +1,91 @@ +require('@openzeppelin/test-helpers'); + +const AuthorityUtils = artifacts.require('$AuthorityUtils'); +const NotAuthorityMock = artifacts.require('NotAuthorityMock'); +const AuthorityNoDelayMock = artifacts.require('AuthorityNoDelayMock'); +const AuthorityDelayMock = artifacts.require('AuthorityDelayMock'); +const AuthorityNoResponse = artifacts.require('AuthorityNoResponse'); + +contract('AuthorityUtils', function (accounts) { + const [user, other] = accounts; + + beforeEach(async function () { + this.mock = await AuthorityUtils.new(); + }); + + describe('canCallWithDelay', function () { + describe('when authority does not have a canCall function', function () { + beforeEach(async function () { + this.authority = await NotAuthorityMock.new(); + }); + + it('returns (immediate = 0, delay = 0)', async function () { + const { immediate, delay } = await this.mock.$canCallWithDelay( + this.authority.address, + user, + other, + '0x12345678', + ); + expect(immediate).to.equal(false); + expect(delay).to.be.bignumber.equal('0'); + }); + }); + + describe('when authority has no delay', function () { + beforeEach(async function () { + this.authority = await AuthorityNoDelayMock.new(); + this.immediate = true; + await this.authority._setImmediate(this.immediate); + }); + + it('returns (immediate, delay = 0)', async function () { + const { immediate, delay } = await this.mock.$canCallWithDelay( + this.authority.address, + user, + other, + '0x12345678', + ); + expect(immediate).to.equal(this.immediate); + expect(delay).to.be.bignumber.equal('0'); + }); + }); + + describe('when authority replies with a delay', function () { + beforeEach(async function () { + this.authority = await AuthorityDelayMock.new(); + this.immediate = true; + this.delay = web3.utils.toBN(42); + await this.authority._setImmediate(this.immediate); + await this.authority._setDelay(this.delay); + }); + + it('returns (immediate, delay)', async function () { + const { immediate, delay } = await this.mock.$canCallWithDelay( + this.authority.address, + user, + other, + '0x12345678', + ); + expect(immediate).to.equal(this.immediate); + expect(delay).to.be.bignumber.equal(this.delay); + }); + }); + + describe('when authority replies with empty data', function () { + beforeEach(async function () { + this.authority = await AuthorityNoResponse.new(); + }); + + it('returns (immediate = 0, delay = 0)', async function () { + const { immediate, delay } = await this.mock.$canCallWithDelay( + this.authority.address, + user, + other, + '0x12345678', + ); + expect(immediate).to.equal(false); + expect(delay).to.be.bignumber.equal('0'); + }); + }); + }); +}); From f92dce51ed24a5b4e0009c1522ee12b30f3409ac Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 4 Oct 2023 20:00:02 -0300 Subject: [PATCH 083/167] Reset Hardhat Network before each test suite (#4652) --- hardhat/env-contract.js | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/hardhat/env-contract.js b/hardhat/env-contract.js index 74d54cfbb..c615249a3 100644 --- a/hardhat/env-contract.js +++ b/hardhat/env-contract.js @@ -2,9 +2,24 @@ extendEnvironment(env => { const { contract } = env; env.contract = function (name, body) { - // remove the default account from the accounts list used in tests, in order - // to protect tests against accidentally passing due to the contract - // deployer being used subsequently as function caller - contract(name, accounts => body(accounts.slice(1))); + const { takeSnapshot } = require('@nomicfoundation/hardhat-network-helpers'); + + contract(name, accounts => { + // reset the state of the chain in between contract test suites + let snapshot; + + before(async function () { + snapshot = await takeSnapshot(); + }); + + after(async function () { + await snapshot.restore(); + }); + + // remove the default account from the accounts list used in tests, in order + // to protect tests against accidentally passing due to the contract + // deployer being used subsequently as function caller + body(accounts.slice(1)); + }); }; }); From 655bd58487764c918d9934784969d7ad1f725b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Wed, 4 Oct 2023 18:29:25 -0600 Subject: [PATCH 084/167] Improve `GovernorTimelockAccess` tests (#4642) Co-authored-by: Francisco --- .../extensions/GovernorTimelockAccess.test.js | 373 +++++++++++++++++- test/metatx/ERC2771Forwarder.test.js | 1 - 2 files changed, 365 insertions(+), 9 deletions(-) diff --git a/test/governance/extensions/GovernorTimelockAccess.test.js b/test/governance/extensions/GovernorTimelockAccess.test.js index 9734a2f5c..68df99e85 100644 --- a/test/governance/extensions/GovernorTimelockAccess.test.js +++ b/test/governance/extensions/GovernorTimelockAccess.test.js @@ -1,4 +1,4 @@ -const { expectEvent } = require('@openzeppelin/test-helpers'); +const { expectEvent, time } = require('@openzeppelin/test-helpers'); const { expect } = require('chai'); const Enums = require('../../helpers/enums'); @@ -12,7 +12,7 @@ const Governor = artifacts.require('$GovernorTimelockAccessMock'); const AccessManagedTarget = artifacts.require('$AccessManagedTarget'); const TOKENS = [ - // { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, + { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' }, ]; @@ -20,7 +20,7 @@ const hashOperation = (caller, target, data) => web3.utils.keccak256(web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], [caller, target, data])); contract('GovernorTimelockAccess', function (accounts) { - const [admin, voter1, voter2, voter3, voter4] = accounts; + const [admin, voter1, voter2, voter3, voter4, other] = accounts; const name = 'OZ-Governor'; const version = '1'; @@ -112,6 +112,139 @@ contract('GovernorTimelockAccess', function (accounts) { expect(await this.mock.accessManager()).to.be.equal(this.manager.address); }); + it('sets base delay (seconds)', async function () { + const baseDelay = time.duration.hours(10); + + // Only through governance + await expectRevertCustomError( + this.mock.setBaseDelaySeconds(baseDelay, { from: voter1 }), + 'GovernorOnlyExecutor', + [voter1], + ); + + this.proposal = await this.helper.setProposal( + [ + { + target: this.mock.address, + value: '0', + data: this.mock.contract.methods.setBaseDelaySeconds(baseDelay).encodeABI(), + }, + ], + 'descr', + ); + + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + const receipt = await this.helper.execute(); + + expectEvent(receipt, 'BaseDelaySet', { + oldBaseDelaySeconds: '0', + newBaseDelaySeconds: baseDelay, + }); + + expect(await this.mock.baseDelaySeconds()).to.be.bignumber.eq(baseDelay); + }); + + it('sets access manager ignored', async function () { + const selectors = ['0x12345678', '0x87654321', '0xabcdef01']; + + // Only through governance + await expectRevertCustomError( + this.mock.setAccessManagerIgnored(other, selectors, true, { from: voter1 }), + 'GovernorOnlyExecutor', + [voter1], + ); + + // Ignore + const helperIgnore = new GovernorHelper(this.mock, mode); + await helperIgnore.setProposal( + [ + { + target: this.mock.address, + value: '0', + data: this.mock.contract.methods.setAccessManagerIgnored(other, selectors, true).encodeABI(), + }, + ], + 'descr', + ); + + await helperIgnore.propose(); + await helperIgnore.waitForSnapshot(); + await helperIgnore.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await helperIgnore.waitForDeadline(); + const ignoreReceipt = await helperIgnore.execute(); + + for (const selector of selectors) { + expectEvent(ignoreReceipt, 'AccessManagerIgnoredSet', { + target: other, + selector, + ignored: true, + }); + expect(await this.mock.isAccessManagerIgnored(other, selector)).to.be.true; + } + + // Unignore + const helperUnignore = new GovernorHelper(this.mock, mode); + await helperUnignore.setProposal( + [ + { + target: this.mock.address, + value: '0', + data: this.mock.contract.methods.setAccessManagerIgnored(other, selectors, false).encodeABI(), + }, + ], + 'descr', + ); + + await helperUnignore.propose(); + await helperUnignore.waitForSnapshot(); + await helperUnignore.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await helperUnignore.waitForDeadline(); + const unignoreReceipt = await helperUnignore.execute(); + + for (const selector of selectors) { + expectEvent(unignoreReceipt, 'AccessManagerIgnoredSet', { + target: other, + selector, + ignored: false, + }); + expect(await this.mock.isAccessManagerIgnored(other, selector)).to.be.false; + } + }); + + it('sets access manager ignored when target is the governor', async function () { + const other = this.mock.address; + const selectors = ['0x12345678', '0x87654321', '0xabcdef01']; + + await this.helper.setProposal( + [ + { + target: this.mock.address, + value: '0', + data: this.mock.contract.methods.setAccessManagerIgnored(other, selectors, true).encodeABI(), + }, + ], + 'descr', + ); + + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + const receipt = await this.helper.execute(); + + for (const selector of selectors) { + expectEvent(receipt, 'AccessManagerIgnoredSet', { + target: other, + selector, + ignored: true, + }); + expect(await this.mock.isAccessManagerIgnored(other, selector)).to.be.true; + } + }); + describe('base delay only', function () { for (const [delay, queue] of [ [0, true], @@ -124,10 +257,15 @@ contract('GovernorTimelockAccess', function (accounts) { this.proposal = await this.helper.setProposal([this.unrestricted.operation], 'descr'); await this.helper.propose(); + const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); + expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); + expect(indirect).to.deep.eq([false]); + expect(withDelay).to.deep.eq([false]); + await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); - if (queue) { + if (await this.mock.proposalNeedsQueuing(this.proposal.id)) { const txQueue = await this.helper.queue(); expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id }); } @@ -141,6 +279,82 @@ contract('GovernorTimelockAccess', function (accounts) { } }); + it('reverts when an operation is executed before eta', async function () { + const delay = time.duration.hours(2); + await this.mock.$_setBaseDelaySeconds(delay); + + this.proposal = await this.helper.setProposal([this.unrestricted.operation], 'descr'); + + await this.helper.propose(); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(true); + const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); + expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); + expect(indirect).to.deep.eq([false]); + expect(withDelay).to.deep.eq([false]); + + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + await this.helper.queue(); + await expectRevertCustomError(this.helper.execute(), 'GovernorUnmetDelay', [ + this.proposal.id, + await this.mock.proposalEta(this.proposal.id), + ]); + }); + + it('reverts with a proposal including multiple operations but one of those was cancelled in the manager', async function () { + const delay = time.duration.hours(2); + const roleId = '1'; + + await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { + from: admin, + }); + await this.manager.grantRole(roleId, this.mock.address, delay, { from: admin }); + + // Set proposals + const original = new GovernorHelper(this.mock, mode); + await original.setProposal([this.restricted.operation, this.unrestricted.operation], 'descr'); + + // Go through all the governance process + await original.propose(); + expect(await this.mock.proposalNeedsQueuing(original.currentProposal.id)).to.be.eq(true); + const { + delay: planDelay, + indirect, + withDelay, + } = await this.mock.proposalExecutionPlan(original.currentProposal.id); + expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); + expect(indirect).to.deep.eq([true, false]); + expect(withDelay).to.deep.eq([true, false]); + await original.waitForSnapshot(); + await original.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await original.waitForDeadline(); + await original.queue(); + await original.waitForEta(); + + // Suddenly cancel one of the proposed operations in the manager + await this.manager.cancel(this.mock.address, this.restricted.operation.target, this.restricted.operation.data, { + from: admin, + }); + + // Reschedule the same operation in a different proposal to avoid "AccessManagerNotScheduled" error + const rescheduled = new GovernorHelper(this.mock, mode); + await rescheduled.setProposal([this.restricted.operation], 'descr'); + await rescheduled.propose(); + await rescheduled.waitForSnapshot(); + await rescheduled.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await rescheduled.waitForDeadline(); + await rescheduled.queue(); // This will schedule it again in the manager + await rescheduled.waitForEta(); + + // Attempt to execute + await expectRevertCustomError(original.execute(), 'GovernorMismatchedNonce', [ + original.currentProposal.id, + 1, + 2, + ]); + }); + it('single operation with access manager delay', async function () { const delay = 1000; const roleId = '1'; @@ -153,6 +367,12 @@ contract('GovernorTimelockAccess', function (accounts) { this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); await this.helper.propose(); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(true); + const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); + expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); + expect(indirect).to.deep.eq([true]); + expect(withDelay).to.deep.eq([true]); + await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -197,6 +417,12 @@ contract('GovernorTimelockAccess', function (accounts) { ); await this.helper.propose(); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(true); + const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); + expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(baseDelay)); + expect(indirect).to.deep.eq([true, false, false]); + expect(withDelay).to.deep.eq([true, false, false]); + await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -235,10 +461,16 @@ contract('GovernorTimelockAccess', function (accounts) { await this.manager.grantRole(roleId, this.mock.address, delay, { from: admin }); }); - it('cancellation after queue (internal)', async function () { + it('cancels restricted with delay after queue (internal)', async function () { this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); await this.helper.propose(); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(true); + const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); + expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); + expect(indirect).to.deep.eq([true]); + expect(withDelay).to.deep.eq([true]); + await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -259,7 +491,114 @@ contract('GovernorTimelockAccess', function (accounts) { ]); }); - it('cancel calls already canceled by guardian', async function () { + it('cancels restricted with queueing if the same operation is part of a more recent proposal (internal)', async function () { + // Set proposals + const original = new GovernorHelper(this.mock, mode); + await original.setProposal([this.restricted.operation], 'descr'); + + // Go through all the governance process + await original.propose(); + expect(await this.mock.proposalNeedsQueuing(original.currentProposal.id)).to.be.eq(true); + const { + delay: planDelay, + indirect, + withDelay, + } = await this.mock.proposalExecutionPlan(original.currentProposal.id); + expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); + expect(indirect).to.deep.eq([true]); + expect(withDelay).to.deep.eq([true]); + await original.waitForSnapshot(); + await original.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await original.waitForDeadline(); + await original.queue(); + + // Cancel the operation in the manager + await this.manager.cancel( + this.mock.address, + this.restricted.operation.target, + this.restricted.operation.data, + { from: admin }, + ); + + // Another proposal is added with the same operation + const rescheduled = new GovernorHelper(this.mock, mode); + await rescheduled.setProposal([this.restricted.operation], 'another descr'); + + // Queue the new proposal + await rescheduled.propose(); + await rescheduled.waitForSnapshot(); + await rescheduled.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await rescheduled.waitForDeadline(); + await rescheduled.queue(); // This will schedule it again in the manager + + // Cancel + const eta = await this.mock.proposalEta(rescheduled.currentProposal.id); + const txCancel = await original.cancel('internal'); + expectEvent(txCancel, 'ProposalCanceled', { proposalId: original.currentProposal.id }); + + await time.increase(eta); // waitForEta() + await expectRevertCustomError(original.execute(), 'GovernorUnexpectedProposalState', [ + original.currentProposal.id, + Enums.ProposalState.Canceled, + proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ]); + }); + + it('cancels unrestricted with queueing (internal)', async function () { + this.proposal = await this.helper.setProposal([this.unrestricted.operation], 'descr'); + + await this.helper.propose(); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(false); + const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); + expect(planDelay).to.be.bignumber.eq(web3.utils.toBN('0')); + expect(indirect).to.deep.eq([false]); + expect(withDelay).to.deep.eq([false]); + + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + await this.helper.queue(); + + const eta = await this.mock.proposalEta(this.proposal.id); + const txCancel = await this.helper.cancel('internal'); + expectEvent(txCancel, 'ProposalCanceled', { proposalId: this.proposal.id }); + + await time.increase(eta); // waitForEta() + await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ + this.proposal.id, + Enums.ProposalState.Canceled, + proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ]); + }); + + it('cancels unrestricted without queueing (internal)', async function () { + this.proposal = await this.helper.setProposal([this.unrestricted.operation], 'descr'); + + await this.helper.propose(); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(false); + const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); + expect(planDelay).to.be.bignumber.eq(web3.utils.toBN('0')); + expect(indirect).to.deep.eq([false]); + expect(withDelay).to.deep.eq([false]); + + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + // await this.helper.queue(); + + // const eta = await this.mock.proposalEta(this.proposal.id); + const txCancel = await this.helper.cancel('internal'); + expectEvent(txCancel, 'ProposalCanceled', { proposalId: this.proposal.id }); + + // await time.increase(eta); // waitForEta() + await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ + this.proposal.id, + Enums.ProposalState.Canceled, + proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ]); + }); + + it('cancels calls already canceled by guardian', async function () { const operationA = { target: this.receiver.address, data: this.restricted.selector + '00' }; const operationB = { target: this.receiver.address, data: this.restricted.selector + '01' }; const operationC = { target: this.receiver.address, data: this.restricted.selector + '02' }; @@ -353,6 +692,12 @@ contract('GovernorTimelockAccess', function (accounts) { ); await this.helper.propose(); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(false); + const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); + expect(planDelay).to.be.bignumber.eq(web3.utils.toBN('0')); + expect(indirect).to.deep.eq([]); // Governor operations ignore access manager + expect(withDelay).to.deep.eq([]); // Governor operations ignore access manager + await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -393,8 +738,14 @@ contract('GovernorTimelockAccess', function (accounts) { await this.manager.setTargetFunctionRole(target, [selector], roleId, { from: admin }); await this.manager.grantRole(roleId, this.mock.address, 0, { from: admin }); - await this.helper.setProposal([{ target, data, value: '0' }], '1'); + const proposal = await this.helper.setProposal([{ target, data, value: '0' }], '1'); await this.helper.propose(); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(false); + const plan = await this.mock.proposalExecutionPlan(proposal.id); + expect(plan.delay).to.be.bignumber.eq(web3.utils.toBN('0')); + expect(plan.indirect).to.deep.eq([true]); + expect(plan.withDelay).to.deep.eq([false]); + await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -406,8 +757,14 @@ contract('GovernorTimelockAccess', function (accounts) { await this.mock.$_setAccessManagerIgnored(target, selector, true); - await this.helper.setProposal([{ target, data, value: '0' }], '2'); + const proposalIgnored = await this.helper.setProposal([{ target, data, value: '0' }], '2'); await this.helper.propose(); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(false); + const planIgnored = await this.mock.proposalExecutionPlan(proposalIgnored.id); + expect(planIgnored.delay).to.be.bignumber.eq(web3.utils.toBN('0')); + expect(planIgnored.indirect).to.deep.eq([false]); + expect(planIgnored.withDelay).to.deep.eq([false]); + await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); diff --git a/test/metatx/ERC2771Forwarder.test.js b/test/metatx/ERC2771Forwarder.test.js index 209c84b2f..0e0998832 100644 --- a/test/metatx/ERC2771Forwarder.test.js +++ b/test/metatx/ERC2771Forwarder.test.js @@ -16,7 +16,6 @@ contract('ERC2771Forwarder', function (accounts) { from: another, value: web3.utils.toWei('0.5'), data: '0x1742', - deadline: 0xdeadbeef, }; beforeEach(async function () { From e12511b53eb6ec99d86acec76b0923acfa5b8da2 Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 4 Oct 2023 22:37:11 -0300 Subject: [PATCH 085/167] Fix guides for 5.0 (#4654) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto García --- contracts/governance/utils/Votes.sol | 2 +- .../mocks/docs/ERC20WithAutoMinerReward.sol | 22 ++++++++ contracts/mocks/docs/MyContractOwnable.sol | 17 ++++++ docs/modules/ROOT/pages/access-control.adoc | 21 ++------ docs/modules/ROOT/pages/erc20-supply.adoc | 24 ++------- .../ROOT/pages/extending-contracts.adoc | 54 ------------------- test/token/ERC20/extensions/ERC4626.test.js | 4 +- 7 files changed, 50 insertions(+), 94 deletions(-) create mode 100644 contracts/mocks/docs/ERC20WithAutoMinerReward.sol create mode 100644 contracts/mocks/docs/MyContractOwnable.sol diff --git a/contracts/governance/utils/Votes.sol b/contracts/governance/utils/Votes.sol index ad1074d77..84587c3af 100644 --- a/contracts/governance/utils/Votes.sol +++ b/contracts/governance/utils/Votes.sol @@ -27,7 +27,7 @@ import {Time} from "../../utils/types/Time.sol"; * * When using this module the derived contract must implement {_getVotingUnits} (for example, make it return * {ERC721-balanceOf}), and can use {_transferVotingUnits} to track a change in the distribution of those units (in the - * previous example, it would be included in {ERC721-_beforeTokenTransfer}). + * previous example, it would be included in {ERC721-_update}). */ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { using Checkpoints for Checkpoints.Trace208; diff --git a/contracts/mocks/docs/ERC20WithAutoMinerReward.sol b/contracts/mocks/docs/ERC20WithAutoMinerReward.sol new file mode 100644 index 000000000..46be53238 --- /dev/null +++ b/contracts/mocks/docs/ERC20WithAutoMinerReward.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {ERC20} from "../../token/ERC20/ERC20.sol"; + +contract ERC20WithAutoMinerReward is ERC20 { + constructor() ERC20("Reward", "RWD") { + _mintMinerReward(); + } + + function _mintMinerReward() internal { + _mint(block.coinbase, 1000); + } + + function _update(address from, address to, uint256 value) internal virtual override { + if (!(from == address(0) && to == block.coinbase)) { + _mintMinerReward(); + } + super._update(from, to, value); + } +} diff --git a/contracts/mocks/docs/MyContractOwnable.sol b/contracts/mocks/docs/MyContractOwnable.sol new file mode 100644 index 000000000..01847c036 --- /dev/null +++ b/contracts/mocks/docs/MyContractOwnable.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {Ownable} from "../../access/Ownable.sol"; + +contract MyContract is Ownable { + constructor(address initialOwner) Ownable(initialOwner) {} + + function normalThing() public { + // anyone can call this normalThing() + } + + function specialThing() public onlyOwner { + // only the owner can call specialThing()! + } +} diff --git a/docs/modules/ROOT/pages/access-control.adoc b/docs/modules/ROOT/pages/access-control.adoc index a60a34388..2a977a2b1 100644 --- a/docs/modules/ROOT/pages/access-control.adoc +++ b/docs/modules/ROOT/pages/access-control.adoc @@ -9,24 +9,9 @@ The most common and basic form of access control is the concept of _ownership_: OpenZeppelin Contracts provides xref:api:access.adoc#Ownable[`Ownable`] for implementing ownership in your contracts. -[source,solidity] ----- -// contracts/MyContract.sol -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; - -import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; - -contract MyContract is Ownable { - function normalThing() public { - // anyone can call this normalThing() - } - - function specialThing() public onlyOwner { - // only the owner can call specialThing()! - } -} ----- +```solidity +include::api:example$MyContractOwnable.sol[] +``` By default, the xref:api:access.adoc#Ownable-owner--[`owner`] of an `Ownable` contract is the account that deployed it, which is usually exactly what you want. diff --git a/docs/modules/ROOT/pages/erc20-supply.adoc b/docs/modules/ROOT/pages/erc20-supply.adoc index 44cbd73dd..bf6e24058 100644 --- a/docs/modules/ROOT/pages/erc20-supply.adoc +++ b/docs/modules/ROOT/pages/erc20-supply.adoc @@ -57,27 +57,13 @@ As we can see, `_mint` makes it super easy to do this correctly. [[automating-the-reward]] == Automating the Reward -So far our supply mechanism was triggered manually, but `ERC20` also allows us to extend the core functionality of the token through the xref:api:token/ERC20.adoc#ERC20-_beforeTokenTransfer-address-address-uint256-[`_beforeTokenTransfer`] hook (see xref:extending-contracts.adoc#using-hooks[Using Hooks]). +So far our supply mechanism was triggered manually, but `ERC20` also allows us to extend the core functionality of the token through the xref:api:token/ERC20.adoc#ERC20-_update-address-address-uint256-[`_update`] function. -Adding to the supply mechanism from the previous section, we can use this hook to mint a miner reward for every token transfer that is included in the blockchain. +Adding to the supply mechanism from the previous section, we can use this function to mint a miner reward for every token transfer that is included in the blockchain. -[source,solidity] ----- -contract ERC20WithAutoMinerReward is ERC20 { - constructor() ERC20("Reward", "RWD") {} - - function _mintMinerReward() internal { - _mint(block.coinbase, 1000); - } - - function _beforeTokenTransfer(address from, address to, uint256 value) internal virtual override { - if (!(from == address(0) && to == block.coinbase)) { - _mintMinerReward(); - } - super._beforeTokenTransfer(from, to, value); - } -} ----- +```solidity +include::api:example$ERC20WithAutoMinerReward.sol[] +``` [[wrapping-up]] == Wrapping Up diff --git a/docs/modules/ROOT/pages/extending-contracts.adoc b/docs/modules/ROOT/pages/extending-contracts.adoc index 1c13d6b4b..330d3a5bc 100644 --- a/docs/modules/ROOT/pages/extending-contracts.adoc +++ b/docs/modules/ROOT/pages/extending-contracts.adoc @@ -68,60 +68,6 @@ The `super.revokeRole` statement at the end will invoke ``AccessControl``'s orig NOTE: The same rule is implemented and extended in xref:api:access.adoc#AccessControlDefaultAdminRules[`AccessControlDefaultAdminRules`], an extension that also adds enforced security measures for the `DEFAULT_ADMIN_ROLE`. -[[using-hooks]] -== Using Hooks - -Sometimes, in order to extend a parent contract you will need to override multiple related functions, which leads to code duplication and increased likelihood of bugs. - -For example, consider implementing safe xref:api:token/ERC20.adoc#ERC20[`ERC20`] transfers in the style of xref:api:token/ERC721.adoc#IERC721Receiver[`IERC721Receiver`]. You may think overriding xref:api:token/ERC20.adoc#ERC20-transfer-address-uint256-[`transfer`] and xref:api:token/ERC20.adoc#ERC20-transferFrom-address-address-uint256-[`transferFrom`] would be enough, but what about xref:api:token/ERC20.adoc#ERC20-_transfer-address-address-uint256-[`_transfer`] and xref:api:token/ERC20.adoc#ERC20-_mint-address-uint256-[`_mint`]? To prevent you from having to deal with these details, we introduced **hooks**. - -Hooks are simply functions that are called before or after some action takes place. They provide a centralized point to _hook into_ and extend the original behavior. - -Here's how you would implement the `IERC721Receiver` pattern in `ERC20`, using the xref:api:token/ERC20.adoc#ERC20-_beforeTokenTransfer-address-address-uint256-[`_beforeTokenTransfer`] hook: - -```solidity -pragma solidity ^0.8.20; - -import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -contract ERC20WithSafeTransfer is ERC20 { - function _beforeTokenTransfer(address from, address to, uint256 amount) - internal virtual override - { - super._beforeTokenTransfer(from, to, amount); - - require(_validRecipient(to), "ERC20WithSafeTransfer: invalid recipient"); - } - - function _validRecipient(address to) private view returns (bool) { - ... - } - - ... -} -``` - -Using hooks this way leads to cleaner and safer code, without having to rely on a deep understanding of the parent's internals. - -=== Rules of Hooks - -There's a few guidelines you should follow when writing code that uses hooks in order to prevent issues. They are very simple, but do make sure you follow them: - -1. Whenever you override a parent's hook, re-apply the `virtual` attribute to the hook. That will allow child contracts to add more functionality to the hook. -2. **Always** call the parent's hook in your override using `super`. This will make sure all hooks in the inheritance tree are called: contracts like xref:api:token/ERC20.adoc#ERC20Pausable[`ERC20Pausable`] rely on this behavior. - -```solidity -contract MyToken is ERC20 { - function _beforeTokenTransfer(address from, address to, uint256 amount) - internal virtual override // Add virtual here! - { - super._beforeTokenTransfer(from, to, amount); // Call parent hook - ... - } -} -``` -That's it! Enjoy simpler code using hooks! - == Security The maintainers of OpenZeppelin Contracts are mainly concerned with the correctness and security of the code as published in the library, and the combinations of base contracts with the official extensions from the library. diff --git a/test/token/ERC20/extensions/ERC4626.test.js b/test/token/ERC20/extensions/ERC4626.test.js index 499cf0628..fa66785f0 100644 --- a/test/token/ERC20/extensions/ERC4626.test.js +++ b/test/token/ERC20/extensions/ERC4626.test.js @@ -88,7 +88,7 @@ contract('ERC4626', function (accounts) { const sharesForDeposit = await vault.previewDeposit(value, { from: holder }); const sharesForReenter = await vault.previewDeposit(reenterValue, { from: holder }); - // Do deposit normally, triggering the _beforeTokenTransfer hook + // Deposit normally, reentering before the internal `_update` const receipt = await vault.deposit(value, holder, { from: holder }); // Main deposit event @@ -170,7 +170,7 @@ contract('ERC4626', function (accounts) { // Price before const sharesBefore = await vault.previewDeposit(value); - // Deposit, triggering the _beforeTokenTransfer hook + // Deposit, reentering before the internal `_update` const receipt = await vault.deposit(value, holder, { from: holder }); // Price is as previewed From 0f89a7e5f85153e566db8787d3ab2b1af39b57d3 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Thu, 5 Oct 2023 10:51:52 -0400 Subject: [PATCH 086/167] Update "Using with Upgrades" page for 5.0 (#4659) --- docs/modules/ROOT/pages/upgradeable.adoc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/modules/ROOT/pages/upgradeable.adoc b/docs/modules/ROOT/pages/upgradeable.adoc index 7324c9bad..6d252d8fa 100644 --- a/docs/modules/ROOT/pages/upgradeable.adoc +++ b/docs/modules/ROOT/pages/upgradeable.adoc @@ -2,7 +2,7 @@ If your contract is going to be deployed with upgradeability, such as using the xref:upgrades-plugins::index.adoc[OpenZeppelin Upgrades Plugins], you will need to use the Upgradeable variant of OpenZeppelin Contracts. -This variant is available as a separate package called `@openzeppelin/contracts-upgradeable`, which is hosted in the repository https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable[OpenZeppelin/openzeppelin-contracts-upgradeable]. +This variant is available as a separate package called `@openzeppelin/contracts-upgradeable`, which is hosted in the repository https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable[OpenZeppelin/openzeppelin-contracts-upgradeable]. It uses `@openzeppelin/contracts` as a peer dependency. It follows all of the rules for xref:upgrades-plugins::writing-upgradeable.adoc[Writing Upgradeable Contracts]: constructors are replaced by initializer functions, state variables are initialized in initializer functions, and we additionally check for storage incompatibilities across minor versions. @@ -13,12 +13,12 @@ TIP: OpenZeppelin provides a full suite of tools for deploying and securing upgr === Installation ```console -$ npm install @openzeppelin/contracts-upgradeable +$ npm install @openzeppelin/contracts-upgradeable @openzeppelin/contracts ``` === Usage -The package replicates the structure of the main OpenZeppelin Contracts package, but every file and contract has the suffix `Upgradeable`. +The Upgradeable package replicates the structure of the main OpenZeppelin Contracts package, but every file and contract has the suffix `Upgradeable`. ```diff -import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; @@ -28,6 +28,8 @@ The package replicates the structure of the main OpenZeppelin Contracts package, +contract MyCollectible is ERC721Upgradeable { ``` +NOTE: Interfaces and libraries are not included in the Upgradeable package, but are instead imported from the main OpenZeppelin Contracts package. + Constructors are replaced by internal initializer functions following the naming convention `+__{ContractName}_init+`. Since these are internal, you must always define your own public initializer function and call the parent initializer of the contract you extend. ```diff @@ -50,8 +52,8 @@ async function main() { const mc = await upgrades.deployProxy(MyCollectible); - await mc.deployed(); - console.log("MyCollectible deployed to:", mc.address); + await mc.waitForDeployment(); + console.log("MyCollectible deployed to:", await mc.getAddress()); } main(); @@ -66,8 +68,10 @@ Initializer functions are not linearized by the compiler like constructors. Beca The function `+__{ContractName}_init_unchained+` found in every contract is the initializer function minus the calls to parent initializers, and can be used to avoid the double initialization problem, but doing this manually is not recommended. We hope to be able to implement safety checks for this in future versions of the Upgrades Plugins. -=== Storage Gaps +=== Namespaced Storage + +You may notice that contracts use a struct with the `@custom:storage-location erc7201:` annotation to store the contract's state variables. This follows the https://eips.ethereum.org/EIPS/eip-7201[ERC-7201: Namespaced Storage Layout] pattern, where each contract has its own storage layout in a namespace that is separate from other contracts in the inheritance chain. -You may notice that every contract includes a state variable named `+__gap+`. This is empty reserved space in storage that is put in place in Upgradeable contracts. It allows us to freely add new state variables in the future without compromising the storage compatibility with existing deployments. +Without namespaced storage, it isn't safe to simply add a state variable because it "shifts down" all of the state variables below in the inheritance chain. This makes the storage layouts incompatible, as explained in xref:upgrades-plugins::writing-upgradeable.adoc#modifying-your-contracts[Writing Upgradeable Contracts]. -It isn't safe to simply add a state variable because it "shifts down" all of the state variables below in the inheritance chain. This makes the storage layouts incompatible, as explained in xref:upgrades-plugins::writing-upgradeable.adoc#modifying-your-contracts[Writing Upgradeable Contracts]. The size of the `+__gap+` array is calculated so that the amount of storage used by a contract always adds up to the same number (in this case 50 storage slots). +The namespaced storage pattern used in the Upgradeable package allows us to freely add new state variables in the future without compromising the storage compatibility with existing deployments. It also allows changing the inheritance order with no impact on the resulting storage layout, as long as all inherited contracts use namespaced storage. \ No newline at end of file From e78628bfcf98e06c05286c80854b3617ed332c3f Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 5 Oct 2023 17:55:11 +0200 Subject: [PATCH 087/167] Document AccessManager functions and events in IAccessManager (#4660) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Francisco Co-authored-by: Ernesto García --- .../access_manager_AccessManager.sol.patch | 49 ++- contracts/access/README.adoc | 6 +- contracts/access/manager/AccessManaged.sol | 14 +- contracts/access/manager/AccessManager.sol | 326 ++++-------------- contracts/access/manager/IAccessManaged.sol | 14 + contracts/access/manager/IAccessManager.sol | 275 ++++++++++++++- 6 files changed, 378 insertions(+), 306 deletions(-) diff --git a/certora/diff/access_manager_AccessManager.sol.patch b/certora/diff/access_manager_AccessManager.sol.patch index 8a9232bc7..29ff92346 100644 --- a/certora/diff/access_manager_AccessManager.sol.patch +++ b/certora/diff/access_manager_AccessManager.sol.patch @@ -1,5 +1,5 @@ ---- access/manager/AccessManager.sol 2023-10-04 11:20:52.802378968 +0200 -+++ access/manager/AccessManager.sol 2023-10-04 14:49:43.126279234 +0200 +--- access/manager/AccessManager.sol 2023-10-05 12:17:09.694051809 -0300 ++++ access/manager/AccessManager.sol 2023-10-05 12:26:18.498688718 -0300 @@ -6,7 +6,6 @@ import {IAccessManaged} from "./IAccessManaged.sol"; import {Address} from "../../utils/Address.sol"; @@ -8,7 +8,7 @@ import {Math} from "../../utils/math/Math.sol"; import {Time} from "../../utils/types/Time.sol"; -@@ -48,7 +47,8 @@ +@@ -57,7 +56,8 @@ * mindful of the danger associated with functions such as {{Ownable-renounceOwnership}} or * {{AccessControl-renounceRole}}. */ @@ -18,17 +18,17 @@ using Time for *; // Structure that stores the details for a target contract. -@@ -93,7 +93,7 @@ - mapping(bytes32 operationId => Schedule) private _schedules; +@@ -105,7 +105,7 @@ + // Used to identify operations that are currently being executed via {execute}. // This should be transient storage when supported by the EVM. - bytes32 private _executionId; + bytes32 internal _executionId; // private → internal for FV /** * @dev Check that the caller is authorized to perform the operation, following the restrictions encoded in -@@ -185,6 +185,11 @@ - return _targets[target].adminDelay.get(); +@@ -253,6 +253,11 @@ + _setGrantDelay(roleId, newDelay); } + // Exposed for FV @@ -37,10 +37,10 @@ + } + /** - * @dev Get the id of the role that acts as an admin for given role. + * @dev Internal version of {grantRole} without access control. Returns true if the role was newly granted. * -@@ -213,6 +218,11 @@ - return _roles[roleId].grantDelay.get(); +@@ -287,6 +292,11 @@ + return newMember; } + // Exposed for FV @@ -49,18 +49,9 @@ + } + /** - * @dev Get the access details for a given account for a given role. These details include the timepoint at which - * membership becomes active, and the delay applied to all operation by this user that requires this permission -@@ -749,7 +759,7 @@ - /** - * @dev Hashing function for execute protection - */ -- function _hashExecutionId(address target, bytes4 selector) private pure returns (bytes32) { -+ function _hashExecutionId(address target, bytes4 selector) internal pure returns (bytes32) { // private → internal for FV - return keccak256(abi.encode(target, selector)); - } - -@@ -769,7 +779,7 @@ + * @dev Internal version of {revokeRole} without access control. This logic is also used by {renounceRole}. + * Returns true if the role was previously granted. +@@ -586,7 +596,7 @@ /** * @dev Check if the current call is authorized according to admin logic. */ @@ -69,7 +60,7 @@ address caller = _msgSender(); (bool immediate, uint32 delay) = _canCallSelf(caller, _msgData()); if (!immediate) { -@@ -792,7 +802,7 @@ +@@ -609,7 +619,7 @@ */ function _getAdminRestrictions( bytes calldata data @@ -78,7 +69,7 @@ if (data.length < 4) { return (false, 0, 0); } -@@ -847,7 +857,7 @@ +@@ -662,7 +672,7 @@ address caller, address target, bytes calldata data @@ -87,7 +78,7 @@ if (target == address(this)) { return _canCallSelf(caller, data); } else { -@@ -901,7 +911,7 @@ +@@ -716,14 +726,14 @@ /** * @dev Extracts the selector from calldata. Panics if data is not at least 4 bytes */ @@ -95,4 +86,12 @@ + function _checkSelector(bytes calldata data) internal pure returns (bytes4) { // private → internal for FV return bytes4(data[0:4]); } + + /** + * @dev Hashing function for execute protection + */ +- function _hashExecutionId(address target, bytes4 selector) private pure returns (bytes32) { ++ function _hashExecutionId(address target, bytes4 selector) internal pure returns (bytes32) { // private → internal for FV + return keccak256(abi.encode(target, selector)); + } } diff --git a/contracts/access/README.adoc b/contracts/access/README.adoc index c40b8dbee..ba9c02faf 100644 --- a/contracts/access/README.adoc +++ b/contracts/access/README.adoc @@ -32,8 +32,12 @@ This directory provides ways to restrict who can access the functions of a contr {{IAuthority}} +{{IAccessManager}} + {{AccessManager}} +{{IAccessManaged}} + {{AccessManaged}} -{{AccessManagerAdapter}} +{{AuthorityUtils}} diff --git a/contracts/access/manager/AccessManaged.sol b/contracts/access/manager/AccessManaged.sol index cbf9e0810..773ce0dea 100644 --- a/contracts/access/manager/AccessManaged.sol +++ b/contracts/access/manager/AccessManaged.sol @@ -57,16 +57,12 @@ abstract contract AccessManaged is Context, IAccessManaged { _; } - /** - * @dev Returns the current authority. - */ + /// @inheritdoc IAccessManaged function authority() public view virtual returns (address) { return _authority; } - /** - * @dev Transfers control to a new authority. The caller must be the current authority. - */ + /// @inheritdoc IAccessManaged function setAuthority(address newAuthority) public virtual { address caller = _msgSender(); if (caller != authority()) { @@ -78,11 +74,7 @@ abstract contract AccessManaged is Context, IAccessManaged { _setAuthority(newAuthority); } - /** - * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is - * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs - * attacker controlled calls. - */ + /// @inheritdoc IAccessManaged function isConsumingScheduledOp() public view returns (bytes4) { return _consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0); } diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index 78492697c..f42ffaccb 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -126,26 +126,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } // =================================================== GETTERS ==================================================== - /** - * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with - * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule} - * & {execute} workflow. - * - * This function is usually called by the targeted contract to control immediate execution of restricted functions. - * Therefore we only return true if the call can be performed without any delay. If the call is subject to a - * previously set delay (not zero), then the function should return false and the caller should schedule the operation - * for future execution. - * - * If `immediate` is true, the delay can be disregarded and the operation can be immediately executed, otherwise - * the operation can be executed if and only if delay is greater than 0. - * - * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that - * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail - * to identify the indirect workflow, and will consider calls that require a delay to be forbidden. - * - * NOTE: This function does not report the permissions of this manager itself. These are defined by the - * {_canCallSelf} function instead. - */ + /// @inheritdoc IAccessManager function canCall( address caller, address target, @@ -164,86 +145,47 @@ contract AccessManager is Context, Multicall, IAccessManager { } } - /** - * @dev Expiration delay for scheduled proposals. Defaults to 1 week. - * - * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately, - * disabling any scheduling usage. - */ + /// @inheritdoc IAccessManager function expiration() public view virtual returns (uint32) { return 1 weeks; } - /** - * @dev Minimum setback for all delay updates, with the exception of execution delays. It - * can be increased without setback (and in the event of an accidental increase can be reset - * via {revokeRole}). Defaults to 5 days. - */ + /// @inheritdoc IAccessManager function minSetback() public view virtual returns (uint32) { return 5 days; } - /** - * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied. - */ + /// @inheritdoc IAccessManager function isTargetClosed(address target) public view virtual returns (bool) { return _targets[target].closed; } - /** - * @dev Get the role required to call a function. - */ + /// @inheritdoc IAccessManager function getTargetFunctionRole(address target, bytes4 selector) public view virtual returns (uint64) { return _targets[target].allowedRoles[selector]; } - /** - * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay. - */ + /// @inheritdoc IAccessManager function getTargetAdminDelay(address target) public view virtual returns (uint32) { return _targets[target].adminDelay.get(); } - /** - * @dev Get the id of the role that acts as an admin for the given role. - * - * The admin permission is required to grant the role, revoke the role and update the execution delay to execute - * an operation that is restricted to this role. - */ + /// @inheritdoc IAccessManager function getRoleAdmin(uint64 roleId) public view virtual returns (uint64) { return _roles[roleId].admin; } - /** - * @dev Get the role that acts as a guardian for a given role. - * - * The guardian permission allows canceling operations that have been scheduled under the role. - */ + /// @inheritdoc IAccessManager function getRoleGuardian(uint64 roleId) public view virtual returns (uint64) { return _roles[roleId].guardian; } - /** - * @dev Get the role current grant delay. - * - * Its value may change at any point without an event emitted following a call to {setGrantDelay}. - * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event. - */ + /// @inheritdoc IAccessManager function getRoleGrantDelay(uint64 roleId) public view virtual returns (uint32) { return _roles[roleId].grantDelay.get(); } - /** - * @dev Get the access details for a given account for a given role. These details include the timepoint at which - * membership becomes active, and the delay applied to all operation by this user that requires this permission - * level. - * - * Returns: - * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted. - * [1] Current execution delay for the account. - * [2] Pending execution delay for the account. - * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled. - */ + /// @inheritdoc IAccessManager function getAccess( uint64 roleId, address account @@ -256,10 +198,7 @@ contract AccessManager is Context, Multicall, IAccessManager { return (since, currentDelay, pendingDelay, effect); } - /** - * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this - * permission might be associated with an execution delay. {getAccess} can provide more details. - */ + /// @inheritdoc IAccessManager function hasRole( uint64 roleId, address account @@ -273,15 +212,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } // =============================================== ROLE MANAGEMENT =============================================== - /** - * @dev Give a label to a role, for improved role discoverabily by UIs. - * - * Requirements: - * - * - the caller must be a global admin - * - * Emits a {RoleLabel} event. - */ + /// @inheritdoc IAccessManager function labelRole(uint64 roleId, string calldata label) public virtual onlyAuthorized { if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { revert AccessManagerLockedRole(roleId); @@ -289,55 +220,17 @@ contract AccessManager is Context, Multicall, IAccessManager { emit RoleLabel(roleId, label); } - /** - * @dev Add `account` to `roleId`, or change its execution delay. - * - * This gives the account the authorization to call any function that is restricted to this role. An optional - * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation - * that is restricted to members of this role. The user will only be able to execute the operation after the delay has - * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}). - * - * If the account has already been granted this role, the execution delay will be updated. This update is not - * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is - * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any - * operation executed in the 3 hours that follows this update was indeed scheduled before this update. - * - * Requirements: - * - * - the caller must be an admin for the role (see {getRoleAdmin}) - * - granted role must not be the `PUBLIC_ROLE` - * - * Emits a {RoleGranted} event. - */ + /// @inheritdoc IAccessManager function grantRole(uint64 roleId, address account, uint32 executionDelay) public virtual onlyAuthorized { _grantRole(roleId, account, getRoleGrantDelay(roleId), executionDelay); } - /** - * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has - * no effect. - * - * Requirements: - * - * - the caller must be an admin for the role (see {getRoleAdmin}) - * - revoked role must not be the `PUBLIC_ROLE` - * - * Emits a {RoleRevoked} event if the account had the role. - */ + /// @inheritdoc IAccessManager function revokeRole(uint64 roleId, address account) public virtual onlyAuthorized { _revokeRole(roleId, account); } - /** - * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in - * the role this call has no effect. - * - * Requirements: - * - * - the caller must be `callerConfirmation`. - * - * Emits a {RoleRevoked} event if the account had the role. - */ + /// @inheritdoc IAccessManager function renounceRole(uint64 roleId, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessManagerBadConfirmation(); @@ -345,41 +238,17 @@ contract AccessManager is Context, Multicall, IAccessManager { _revokeRole(roleId, callerConfirmation); } - /** - * @dev Change admin role for a given role. - * - * Requirements: - * - * - the caller must be a global admin - * - * Emits a {RoleAdminChanged} event - */ + /// @inheritdoc IAccessManager function setRoleAdmin(uint64 roleId, uint64 admin) public virtual onlyAuthorized { _setRoleAdmin(roleId, admin); } - /** - * @dev Change guardian role for a given role. - * - * Requirements: - * - * - the caller must be a global admin - * - * Emits a {RoleGuardianChanged} event - */ + /// @inheritdoc IAccessManager function setRoleGuardian(uint64 roleId, uint64 guardian) public virtual onlyAuthorized { _setRoleGuardian(roleId, guardian); } - /** - * @dev Update the delay for granting a `roleId`. - * - * Requirements: - * - * - the caller must be a global admin - * - * Emits a {RoleGrantDelayChanged} event. - */ + /// @inheritdoc IAccessManager function setGrantDelay(uint64 roleId, uint32 newDelay) public virtual onlyAuthorized { _setGrantDelay(roleId, newDelay); } @@ -492,15 +361,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } // ============================================= FUNCTION MANAGEMENT ============================================== - /** - * @dev Set the role required to call functions identified by the `selectors` in the `target` contract. - * - * Requirements: - * - * - the caller must be a global admin - * - * Emits a {TargetFunctionRoleUpdated} event per selector. - */ + /// @inheritdoc IAccessManager function setTargetFunctionRole( address target, bytes4[] calldata selectors, @@ -521,15 +382,7 @@ contract AccessManager is Context, Multicall, IAccessManager { emit TargetFunctionRoleUpdated(target, selector, roleId); } - /** - * @dev Set the delay for changing the configuration of a given target contract. - * - * Requirements: - * - * - the caller must be a global admin - * - * Emits a {TargetAdminDelayUpdated} event. - */ + /// @inheritdoc IAccessManager function setTargetAdminDelay(address target, uint32 newDelay) public virtual onlyAuthorized { _setTargetAdminDelay(target, newDelay); } @@ -547,15 +400,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } // =============================================== MODE MANAGEMENT ================================================ - /** - * @dev Set the closed flag for a contract. - * - * Requirements: - * - * - the caller must be a global admin - * - * Emits a {TargetClosed} event. - */ + /// @inheritdoc IAccessManager function setTargetClosed(address target, bool closed) public virtual onlyAuthorized { _setTargetClosed(target, closed); } @@ -574,38 +419,18 @@ contract AccessManager is Context, Multicall, IAccessManager { } // ============================================== DELAYED OPERATIONS ============================================== - /** - * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the - * operation is not yet scheduled, has expired, was executed, or was canceled. - */ + /// @inheritdoc IAccessManager function getSchedule(bytes32 id) public view virtual returns (uint48) { uint48 timepoint = _schedules[id].timepoint; return _isExpired(timepoint) ? 0 : timepoint; } - /** - * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never - * been scheduled. - */ + /// @inheritdoc IAccessManager function getNonce(bytes32 id) public view virtual returns (uint32) { return _schedules[id].nonce; } - /** - * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to - * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays - * required for the caller. The special value zero will automatically set the earliest possible time. - * - * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when - * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this - * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}. - * - * Emits a {OperationScheduled} event. - * - * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If - * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target - * contract if it is using standard Solidity ABI encoding. - */ + /// @inheritdoc IAccessManager function schedule( address target, bytes calldata data, @@ -653,15 +478,7 @@ contract AccessManager is Context, Multicall, IAccessManager { } } - /** - * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the - * execution delay is 0. - * - * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the - * operation wasn't previously scheduled (if the caller doesn't have an execution delay). - * - * Emits an {OperationExecuted} event only if the call was scheduled and delayed. - */ + /// @inheritdoc IAccessManager // Reentrancy is not an issue because permissions are checked on msg.sender. Additionally, // _consumeScheduledOp guarantees a scheduled operation is only executed once. // slither-disable-next-line reentrancy-no-eth @@ -698,15 +515,31 @@ contract AccessManager is Context, Multicall, IAccessManager { return nonce; } - /** - * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed - * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error. - * - * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager, - * with all the verifications that it implies. - * - * Emit a {OperationExecuted} event. - */ + /// @inheritdoc IAccessManager + function cancel(address caller, address target, bytes calldata data) public virtual returns (uint32) { + address msgsender = _msgSender(); + bytes4 selector = _checkSelector(data); + + bytes32 operationId = hashOperation(caller, target, data); + if (_schedules[operationId].timepoint == 0) { + revert AccessManagerNotScheduled(operationId); + } else if (caller != msgsender) { + // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required role. + (bool isAdmin, ) = hasRole(ADMIN_ROLE, msgsender); + (bool isGuardian, ) = hasRole(getRoleGuardian(getTargetFunctionRole(target, selector)), msgsender); + if (!isAdmin && !isGuardian) { + revert AccessManagerUnauthorizedCancel(msgsender, caller, target, selector); + } + } + + delete _schedules[operationId].timepoint; // reset the timepoint, keep the nonce + uint32 nonce = _schedules[operationId].nonce; + emit OperationCanceled(operationId, nonce); + + return nonce; + } + + /// @inheritdoc IAccessManager function consumeScheduledOp(address caller, bytes calldata data) public virtual { address target = _msgSender(); if (IAccessManaged(target).isConsumingScheduledOp() != IAccessManaged.isConsumingScheduledOp.selector) { @@ -738,61 +571,13 @@ contract AccessManager is Context, Multicall, IAccessManager { return nonce; } - /** - * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled - * operation that is cancelled. - * - * Requirements: - * - * - the caller must be the proposer, a guardian of the targeted function, or a global admin - * - * Emits a {OperationCanceled} event. - */ - function cancel(address caller, address target, bytes calldata data) public virtual returns (uint32) { - address msgsender = _msgSender(); - bytes4 selector = _checkSelector(data); - - bytes32 operationId = hashOperation(caller, target, data); - if (_schedules[operationId].timepoint == 0) { - revert AccessManagerNotScheduled(operationId); - } else if (caller != msgsender) { - // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required role. - (bool isAdmin, ) = hasRole(ADMIN_ROLE, msgsender); - (bool isGuardian, ) = hasRole(getRoleGuardian(getTargetFunctionRole(target, selector)), msgsender); - if (!isAdmin && !isGuardian) { - revert AccessManagerUnauthorizedCancel(msgsender, caller, target, selector); - } - } - - delete _schedules[operationId].timepoint; // reset the timepoint, keep the nonce - uint32 nonce = _schedules[operationId].nonce; - emit OperationCanceled(operationId, nonce); - - return nonce; - } - - /** - * @dev Hashing function for delayed operations - */ + /// @inheritdoc IAccessManager function hashOperation(address caller, address target, bytes calldata data) public view virtual returns (bytes32) { return keccak256(abi.encode(caller, target, data)); } - /** - * @dev Hashing function for execute protection - */ - function _hashExecutionId(address target, bytes4 selector) private pure returns (bytes32) { - return keccak256(abi.encode(target, selector)); - } - // ==================================================== OTHERS ==================================================== - /** - * @dev Change the AccessManager instance used by a contract that correctly uses this instance. - * - * Requirements: - * - * - the caller must be a global admin - */ + /// @inheritdoc IAccessManager function updateAuthority(address target, address newAuthority) public virtual onlyAuthorized { IAccessManaged(target).setAuthority(newAuthority); } @@ -934,4 +719,11 @@ contract AccessManager is Context, Multicall, IAccessManager { function _checkSelector(bytes calldata data) private pure returns (bytes4) { return bytes4(data[0:4]); } + + /** + * @dev Hashing function for execute protection + */ + function _hashExecutionId(address target, bytes4 selector) private pure returns (bytes32) { + return keccak256(abi.encode(target, selector)); + } } diff --git a/contracts/access/manager/IAccessManaged.sol b/contracts/access/manager/IAccessManaged.sol index 537a4749d..0b332be9c 100644 --- a/contracts/access/manager/IAccessManaged.sol +++ b/contracts/access/manager/IAccessManaged.sol @@ -3,15 +3,29 @@ pragma solidity ^0.8.20; interface IAccessManaged { + /** + * @dev Authority that manages this contract was updated. + */ event AuthorityUpdated(address authority); error AccessManagedUnauthorized(address caller); error AccessManagedRequiredDelay(address caller, uint32 delay); error AccessManagedInvalidAuthority(address authority); + /** + * @dev Returns the current authority. + */ function authority() external view returns (address); + /** + * @dev Transfers control to a new authority. The caller must be the current authority. + */ function setAuthority(address) external; + /** + * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is + * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs + * attacker controlled calls. + */ function isConsumingScheduledOp() external view returns (bytes4); } diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index 95dd1b65a..fc6ffaf8f 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -28,7 +28,11 @@ interface IAccessManager { */ event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce); + /** + * @dev Informational labelling for a roleId. + */ event RoleLabel(uint64 indexed roleId, string label); + /** * @dev Emitted when `account` is granted `roleId`. * @@ -37,12 +41,40 @@ interface IAccessManager { * otherwise it indicates the execution delay for this account and roleId is updated. */ event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember); + + /** + * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous. + */ event RoleRevoked(uint64 indexed roleId, address indexed account); + + /** + * @dev Role acting as admin over a given `roleId` is updated. + */ event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin); + + /** + * @dev Role acting as guardian over a given `roleId` is updated. + */ event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian); + + /** + * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached. + */ event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since); + + /** + * @dev Target mode is updated (true = closed, false = open). + */ event TargetClosed(address indexed target, bool closed); + + /** + * @dev Role required to invoke `selector` on `target` is updated to `roleId`. + */ event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId); + + /** + * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached. + */ event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since); error AccessManagerAlreadyScheduled(bytes32 operationId); @@ -58,63 +90,302 @@ interface IAccessManager { error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector); error AccessManagerInvalidInitialAdmin(address initialAdmin); + /** + * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with + * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule} + * & {execute} workflow. + * + * This function is usually called by the targeted contract to control immediate execution of restricted functions. + * Therefore we only return true if the call can be performed without any delay. If the call is subject to a + * previously set delay (not zero), then the function should return false and the caller should schedule the operation + * for future execution. + * + * If `immediate` is true, the delay can be disregarded and the operation can be immediately executed, otherwise + * the operation can be executed if and only if delay is greater than 0. + * + * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that + * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail + * to identify the indirect workflow, and will consider calls that require a delay to be forbidden. + * + * NOTE: This function does not report the permissions of this manager itself. These are defined by the + * {_canCallSelf} function instead. + */ function canCall( address caller, address target, bytes4 selector ) external view returns (bool allowed, uint32 delay); - function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32); - + /** + * @dev Expiration delay for scheduled proposals. Defaults to 1 week. + * + * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately, + * disabling any scheduling usage. + */ function expiration() external view returns (uint32); + /** + * @dev Minimum setback for all delay updates, with the exception of execution delays. It + * can be increased without setback (and reset via {revokeRole} in the case event of an + * accidental increase). Defaults to 5 days. + */ + function minSetback() external view returns (uint32); + + /** + * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied. + */ function isTargetClosed(address target) external view returns (bool); + /** + * @dev Get the role required to call a function. + */ function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64); + /** + * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay. + */ function getTargetAdminDelay(address target) external view returns (uint32); + /** + * @dev Get the id of the role that acts as an admin for the given role. + * + * The admin permission is required to grant the role, revoke the role and update the execution delay to execute + * an operation that is restricted to this role. + */ function getRoleAdmin(uint64 roleId) external view returns (uint64); + /** + * @dev Get the role that acts as a guardian for a given role. + * + * The guardian permission allows canceling operations that have been scheduled under the role. + */ function getRoleGuardian(uint64 roleId) external view returns (uint64); + /** + * @dev Get the role current grant delay. + * + * Its value may change at any point without an event emitted following a call to {setGrantDelay}. + * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event. + */ function getRoleGrantDelay(uint64 roleId) external view returns (uint32); + /** + * @dev Get the access details for a given account for a given role. These details include the timepoint at which + * membership becomes active, and the delay applied to all operation by this user that requires this permission + * level. + * + * Returns: + * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted. + * [1] Current execution delay for the account. + * [2] Pending execution delay for the account. + * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled. + */ function getAccess(uint64 roleId, address account) external view returns (uint48, uint32, uint32, uint48); + /** + * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this + * permission might be associated with an execution delay. {getAccess} can provide more details. + */ function hasRole(uint64 roleId, address account) external view returns (bool, uint32); + /** + * @dev Give a label to a role, for improved role discoverability by UIs. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {RoleLabel} event. + */ function labelRole(uint64 roleId, string calldata label) external; + /** + * @dev Add `account` to `roleId`, or change its execution delay. + * + * This gives the account the authorization to call any function that is restricted to this role. An optional + * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation + * that is restricted to members of this role. The user will only be able to execute the operation after the delay has + * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}). + * + * If the account has already been granted this role, the execution delay will be updated. This update is not + * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is + * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any + * operation executed in the 3 hours that follows this update was indeed scheduled before this update. + * + * Requirements: + * + * - the caller must be an admin for the role (see {getRoleAdmin}) + * - granted role must not be the `PUBLIC_ROLE` + * + * Emits a {RoleGranted} event. + */ function grantRole(uint64 roleId, address account, uint32 executionDelay) external; + /** + * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has + * no effect. + * + * Requirements: + * + * - the caller must be an admin for the role (see {getRoleAdmin}) + * - revoked role must not be the `PUBLIC_ROLE` + * + * Emits a {RoleRevoked} event if the account had the role. + */ function revokeRole(uint64 roleId, address account) external; + /** + * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in + * the role this call has no effect. + * + * Requirements: + * + * - the caller must be `callerConfirmation`. + * + * Emits a {RoleRevoked} event if the account had the role. + */ function renounceRole(uint64 roleId, address callerConfirmation) external; + /** + * @dev Change admin role for a given role. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {RoleAdminChanged} event + */ function setRoleAdmin(uint64 roleId, uint64 admin) external; + /** + * @dev Change guardian role for a given role. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {RoleGuardianChanged} event + */ function setRoleGuardian(uint64 roleId, uint64 guardian) external; + /** + * @dev Update the delay for granting a `roleId`. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {RoleGrantDelayChanged} event. + */ function setGrantDelay(uint64 roleId, uint32 newDelay) external; + /** + * @dev Set the role required to call functions identified by the `selectors` in the `target` contract. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {TargetFunctionRoleUpdated} event per selector. + */ function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external; + /** + * @dev Set the delay for changing the configuration of a given target contract. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {TargetAdminDelayUpdated} event. + */ function setTargetAdminDelay(address target, uint32 newDelay) external; + /** + * @dev Set the closed flag for a contract. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {TargetClosed} event. + */ function setTargetClosed(address target, bool closed) external; + /** + * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the + * operation is not yet scheduled, has expired, was executed, or was canceled. + */ function getSchedule(bytes32 id) external view returns (uint48); + /** + * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never + * been scheduled. + */ function getNonce(bytes32 id) external view returns (uint32); + /** + * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to + * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays + * required for the caller. The special value zero will automatically set the earliest possible time. + * + * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when + * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this + * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}. + * + * Emits a {OperationScheduled} event. + * + * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If + * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target + * contract if it is using standard Solidity ABI encoding. + */ function schedule(address target, bytes calldata data, uint48 when) external returns (bytes32, uint32); + /** + * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the + * execution delay is 0. + * + * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the + * operation wasn't previously scheduled (if the caller doesn't have an execution delay). + * + * Emits an {OperationExecuted} event only if the call was scheduled and delayed. + */ function execute(address target, bytes calldata data) external payable returns (uint32); + /** + * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled + * operation that is cancelled. + * + * Requirements: + * + * - the caller must be the proposer, a guardian of the targeted function, or a global admin + * + * Emits a {OperationCanceled} event. + */ function cancel(address caller, address target, bytes calldata data) external returns (uint32); + /** + * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed + * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error. + * + * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager, + * with all the verifications that it implies. + * + * Emit a {OperationExecuted} event. + */ function consumeScheduledOp(address caller, bytes calldata data) external; + /** + * @dev Hashing function for delayed operations. + */ + function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32); + + /** + * @dev Changes the authority of a target managed by this manager instance. + * + * Requirements: + * + * - the caller must be a global admin + */ function updateAuthority(address target, address newAuthority) external; } From a754936a477bdd356dffed2e16fd52bb2ee278a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 5 Oct 2023 11:45:18 -0600 Subject: [PATCH 088/167] Remove v5.0 release candidate note and add audit (#4663) Co-authored-by: Francisco Giordano --- README.md | 4 ---- audits/2023-10-v5.0.pdf | Bin 0 -> 910284 bytes audits/README.md | 1 + 3 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 audits/2023-10-v5.0.pdf diff --git a/README.md b/README.md index 549891e3f..9ca41573f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ -> [!NOTE] -> Version 5.0 is currently in release candidate period. Bug bounty rewards are boosted 50% until the release. -> [See more details on Immunefi.](https://immunefi.com/bounty/openzeppelin/) - # OpenZeppelin [![NPM Package](https://img.shields.io/npm/v/@openzeppelin/contracts.svg)](https://www.npmjs.org/package/@openzeppelin/contracts) diff --git a/audits/2023-10-v5.0.pdf b/audits/2023-10-v5.0.pdf new file mode 100644 index 0000000000000000000000000000000000000000..991026ecd206174a63e2187aef9e1572af0c2668 GIT binary patch literal 910284 zcmcG#c|6o#`#(PRJ;_!o5kkxuV=N<-HG4wYLktEp!;G;NAt6h4ZAyhmwh(10MIw?V zOCn2Dh)7B$zUMV4-M9DWegFRWy&sSJ&dj{dbhl+}fA&!7`B;f+F&O)*>hC)h8^70s2nL|S0DU^)15DJY{lts%J z3n?LG%)zf{Iq<8lkd2T61}P+~popuq#7k^t5bLw6#!3O?hoa zML9(sv>Z|$qm9;9S69biWYy*6kthwde}BSGMvvf(^|zsJT^6YTeRd&&Jt8q+m8LR= zSc0pMn~R}{}6t4k5n<*%Czk1-}57qZzpS6RC!C)8+x^XM&x-ByItuiglm z(mzHpB#u9KP|y`~dc}r3!5Ebi1*^(q)?yum#YlxsS<~{xGbMfua!}~KTmAl#dtU8` z#iN_5^mj_%(KJ20{)pW$mObBLd#JLG-lc@)ZA({G7&kk>w0%XQAuFzKV%45xA4igp zKMCu?f#eVq(>|oL&ceS<{r|%s96-tIyk{e~5JD@WFu%*&z;EBzz_mE!z`*e2LBomwWLIie74^LgfT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5<>t52=n zsZ27A_SiVCzD{Fo`H!LP6+31~-O(4?-M+VxY@20Mc02Ukx1^_D+FQOI@T`4d$QiRK zFHY{Zu*=dNA1!~pREr-X)og#M?j+A#;IBI5r$1AA|5?kqXP$)29;n`Xq9o+uL@#O6 zZ9~&HjVdo;8UE!we|fX|Uw^cN_P_0;9q>pxQ%wyXnP#Y}!y~UGRXR&UgRQAfg%1ld zHK-aY_|XnKt{-d)!@e?Xp2JQmJn0C#%5cIhO?c4yuRrU-pdyl6p#kGBKkvby41dx3 zm(P2U{`7ed8=FQ~K?j>no7U$)=*=V__^`s=Kqj*I<)j6Em7^z)vzTf&N&DQ<5c4*v ocaqxDQ?<2M@3^fnif{6$^PvJx|4G Date: Thu, 5 Oct 2023 15:30:30 -0300 Subject: [PATCH 089/167] Merge release-v5.0 branch (#4665) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] Co-authored-by: Francisco Giordano Co-authored-by: Ernesto García Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Eric Lau Co-authored-by: Hadrien Croubois --- .changeset/afraid-walls-smell.md | 5 - .changeset/angry-ties-switch.md | 5 - .changeset/big-plums-cover.md | 4 - .changeset/blue-horses-do.md | 5 - .changeset/blue-scissors-design.md | 5 - .changeset/brave-lobsters-punch.md | 5 - .changeset/bright-tomatoes-sing.md | 5 - .changeset/chilled-spiders-attack.md | 5 - .changeset/clever-bats-kick.md | 5 - .changeset/clever-pumas-beg.md | 5 - .changeset/eight-peaches-guess.md | 5 - .changeset/eighty-crabs-listen.md | 5 - .changeset/eighty-lemons-shake.md | 5 - .changeset/empty-cheetahs-hunt.md | 5 - .changeset/empty-taxis-kiss.md | 5 - .changeset/fair-humans-peel.md | 5 - .changeset/fifty-owls-retire.md | 5 - .changeset/flat-bottles-wonder.md | 7 - .changeset/fluffy-countries-buy.md | 5 - .changeset/four-adults-knock.md | 5 - .changeset/fresh-birds-kiss.md | 5 - .changeset/green-pumpkins-end.md | 5 - .changeset/grumpy-bulldogs-call.md | 5 - .changeset/grumpy-worms-tease.md | 5 - .changeset/happy-falcons-walk.md | 5 - .changeset/healthy-gorillas-applaud.md | 5 - .changeset/heavy-drinks-fail.md | 5 - .changeset/hip-beds-provide.md | 5 - .changeset/hip-goats-fail.md | 5 - .changeset/hot-coins-judge.md | 5 - .changeset/hot-dingos-kiss.md | 5 - .changeset/hot-plums-approve.md | 5 - .changeset/large-humans-remain.md | 5 - .changeset/lazy-rice-joke.md | 5 - .changeset/little-falcons-build.md | 5 - .changeset/loud-shrimps-play.md | 5 - .changeset/lovely-geckos-hide.md | 5 - .changeset/mean-walls-watch.md | 5 - .changeset/mighty-donuts-smile.md | 6 - .changeset/orange-apes-draw.md | 5 - .changeset/pink-suns-mix.md | 5 - .changeset/popular-deers-raise.md | 5 - .changeset/proud-seals-complain.md | 5 - .changeset/proud-spiders-attend.md | 5 - .changeset/purple-cats-cheer.md | 5 - .changeset/quiet-trainers-kick.md | 5 - .changeset/red-dots-fold.md | 5 - .changeset/rotten-insects-wash.md | 5 - .changeset/serious-books-lie.md | 5 - .changeset/short-eels-enjoy.md | 5 - .changeset/silly-bees-beam.md | 7 - .changeset/six-frogs-turn.md | 5 - .changeset/sixty-numbers-reply.md | 5 - .changeset/slimy-penguins-attack.md | 5 - .changeset/smooth-books-wink.md | 5 - .changeset/smooth-cougars-jump.md | 5 - .changeset/spicy-sheep-eat.md | 5 - .changeset/spotty-hotels-type.md | 5 - .changeset/strong-poems-thank.md | 5 - .changeset/swift-bags-divide.md | 5 - .changeset/swift-numbers-cry.md | 5 - .changeset/tasty-tomatoes-turn.md | 5 - .changeset/tender-shirts-turn.md | 5 - .changeset/thick-pumpkins-exercise.md | 5 - .changeset/thin-camels-matter.md | 5 - .changeset/tough-drinks-hammer.md | 5 - .changeset/two-wasps-punch.md | 5 - .changeset/unlucky-beans-obey.md | 5 - .changeset/violet-dancers-cough.md | 5 - .changeset/violet-melons-press.md | 5 - .changeset/warm-guests-rule.md | 5 - .changeset/wet-bears-heal.md | 5 - .changeset/wild-beds-visit.md | 5 - .changeset/wild-peas-remain.md | 5 - .changeset/wild-rockets-rush.md | 5 - .changeset/wild-windows-trade.md | 5 - CHANGELOG.md | 221 ++++++++++++++++-- contracts/access/AccessControl.sol | 2 +- contracts/access/IAccessControl.sol | 2 +- contracts/access/Ownable.sol | 2 +- contracts/access/Ownable2Step.sol | 2 +- .../AccessControlDefaultAdminRules.sol | 2 +- .../extensions/AccessControlEnumerable.sol | 2 +- .../IAccessControlDefaultAdminRules.sol | 2 +- .../extensions/IAccessControlEnumerable.sol | 2 +- contracts/access/manager/AccessManaged.sol | 1 + contracts/access/manager/AccessManager.sol | 1 + contracts/access/manager/AuthorityUtils.sol | 1 + contracts/access/manager/IAccessManaged.sol | 1 + contracts/access/manager/IAccessManager.sol | 1 + contracts/access/manager/IAuthority.sol | 1 + contracts/finance/VestingWallet.sol | 2 +- contracts/governance/Governor.sol | 2 +- contracts/governance/IGovernor.sol | 2 +- contracts/governance/TimelockController.sol | 2 +- .../extensions/GovernorCountingSimple.sol | 2 +- .../extensions/GovernorPreventLateQuorum.sol | 2 +- .../extensions/GovernorSettings.sol | 2 +- .../governance/extensions/GovernorStorage.sol | 1 + .../extensions/GovernorTimelockAccess.sol | 1 + .../extensions/GovernorTimelockCompound.sol | 2 +- .../extensions/GovernorTimelockControl.sol | 2 +- .../governance/extensions/GovernorVotes.sol | 2 +- .../GovernorVotesQuorumFraction.sol | 2 +- contracts/governance/utils/IVotes.sol | 2 +- contracts/governance/utils/Votes.sol | 2 +- contracts/interfaces/IERC1155.sol | 2 +- contracts/interfaces/IERC1155MetadataURI.sol | 2 +- contracts/interfaces/IERC1155Receiver.sol | 2 +- contracts/interfaces/IERC1271.sol | 2 +- contracts/interfaces/IERC1363.sol | 2 +- contracts/interfaces/IERC1363Receiver.sol | 2 +- contracts/interfaces/IERC1363Spender.sol | 2 +- contracts/interfaces/IERC165.sol | 2 +- contracts/interfaces/IERC1820Implementer.sol | 2 +- contracts/interfaces/IERC1820Registry.sol | 2 +- contracts/interfaces/IERC1967.sol | 2 +- contracts/interfaces/IERC20.sol | 2 +- contracts/interfaces/IERC20Metadata.sol | 2 +- contracts/interfaces/IERC2309.sol | 2 +- contracts/interfaces/IERC2612.sol | 2 +- contracts/interfaces/IERC2981.sol | 2 +- contracts/interfaces/IERC3156.sol | 2 +- .../interfaces/IERC3156FlashBorrower.sol | 2 +- contracts/interfaces/IERC3156FlashLender.sol | 2 +- contracts/interfaces/IERC4626.sol | 2 +- contracts/interfaces/IERC4906.sol | 2 +- contracts/interfaces/IERC5267.sol | 2 +- contracts/interfaces/IERC5313.sol | 2 +- contracts/interfaces/IERC5805.sol | 2 +- contracts/interfaces/IERC6372.sol | 2 +- contracts/interfaces/IERC721.sol | 2 +- contracts/interfaces/IERC721Enumerable.sol | 2 +- contracts/interfaces/IERC721Metadata.sol | 2 +- contracts/interfaces/IERC721Receiver.sol | 2 +- contracts/interfaces/IERC777.sol | 1 + contracts/interfaces/IERC777Recipient.sol | 1 + contracts/interfaces/IERC777Sender.sol | 1 + contracts/interfaces/draft-IERC1822.sol | 2 +- contracts/interfaces/draft-IERC6093.sol | 1 + contracts/metatx/ERC2771Context.sol | 2 +- contracts/metatx/ERC2771Forwarder.sol | 2 +- contracts/package.json | 2 +- contracts/proxy/Clones.sol | 2 +- contracts/proxy/ERC1967/ERC1967Proxy.sol | 2 +- contracts/proxy/ERC1967/ERC1967Utils.sol | 2 +- contracts/proxy/Proxy.sol | 2 +- contracts/proxy/beacon/BeaconProxy.sol | 2 +- contracts/proxy/beacon/IBeacon.sol | 2 +- contracts/proxy/beacon/UpgradeableBeacon.sol | 2 +- contracts/proxy/transparent/ProxyAdmin.sol | 2 +- .../TransparentUpgradeableProxy.sol | 2 +- contracts/proxy/utils/Initializable.sol | 2 +- contracts/proxy/utils/UUPSUpgradeable.sol | 2 +- contracts/token/ERC1155/ERC1155.sol | 2 +- contracts/token/ERC1155/IERC1155.sol | 2 +- contracts/token/ERC1155/IERC1155Receiver.sol | 2 +- .../ERC1155/extensions/ERC1155Burnable.sol | 2 +- .../ERC1155/extensions/ERC1155Pausable.sol | 2 +- .../ERC1155/extensions/ERC1155Supply.sol | 2 +- .../ERC1155/extensions/ERC1155URIStorage.sol | 2 +- .../extensions/IERC1155MetadataURI.sol | 2 +- .../token/ERC1155/utils/ERC1155Holder.sol | 2 +- contracts/token/ERC20/ERC20.sol | 2 +- contracts/token/ERC20/IERC20.sol | 2 +- .../token/ERC20/extensions/ERC20Burnable.sol | 2 +- .../token/ERC20/extensions/ERC20Capped.sol | 2 +- .../token/ERC20/extensions/ERC20FlashMint.sol | 2 +- .../token/ERC20/extensions/ERC20Pausable.sol | 2 +- .../token/ERC20/extensions/ERC20Permit.sol | 2 +- .../token/ERC20/extensions/ERC20Votes.sol | 2 +- .../token/ERC20/extensions/ERC20Wrapper.sol | 2 +- contracts/token/ERC20/extensions/ERC4626.sol | 2 +- .../token/ERC20/extensions/IERC20Metadata.sol | 2 +- .../token/ERC20/extensions/IERC20Permit.sol | 2 +- contracts/token/ERC20/utils/SafeERC20.sol | 2 +- contracts/token/ERC721/ERC721.sol | 2 +- contracts/token/ERC721/IERC721.sol | 2 +- contracts/token/ERC721/IERC721Receiver.sol | 2 +- .../ERC721/extensions/ERC721Burnable.sol | 2 +- .../ERC721/extensions/ERC721Consecutive.sol | 2 +- .../ERC721/extensions/ERC721Enumerable.sol | 2 +- .../ERC721/extensions/ERC721Pausable.sol | 2 +- .../token/ERC721/extensions/ERC721Royalty.sol | 2 +- .../ERC721/extensions/ERC721URIStorage.sol | 2 +- .../token/ERC721/extensions/ERC721Votes.sol | 2 +- .../token/ERC721/extensions/ERC721Wrapper.sol | 2 +- .../ERC721/extensions/IERC721Enumerable.sol | 2 +- .../ERC721/extensions/IERC721Metadata.sol | 2 +- contracts/token/ERC721/utils/ERC721Holder.sol | 2 +- contracts/token/common/ERC2981.sol | 2 +- contracts/utils/Address.sol | 2 +- contracts/utils/Arrays.sol | 2 +- contracts/utils/Base64.sol | 2 +- contracts/utils/Context.sol | 2 +- contracts/utils/Create2.sol | 2 +- contracts/utils/Multicall.sol | 2 +- contracts/utils/Nonces.sol | 1 + contracts/utils/Pausable.sol | 2 +- contracts/utils/ReentrancyGuard.sol | 2 +- contracts/utils/ShortStrings.sol | 2 +- contracts/utils/StorageSlot.sol | 2 +- contracts/utils/Strings.sol | 2 +- contracts/utils/cryptography/ECDSA.sol | 2 +- contracts/utils/cryptography/EIP712.sol | 2 +- contracts/utils/cryptography/MerkleProof.sol | 2 +- .../utils/cryptography/MessageHashUtils.sol | 1 + .../utils/cryptography/SignatureChecker.sol | 2 +- contracts/utils/introspection/ERC165.sol | 2 +- .../utils/introspection/ERC165Checker.sol | 2 +- contracts/utils/introspection/IERC165.sol | 2 +- contracts/utils/math/Math.sol | 2 +- contracts/utils/math/SafeCast.sol | 2 +- contracts/utils/math/SignedMath.sol | 2 +- contracts/utils/structs/BitMaps.sol | 2 +- contracts/utils/structs/Checkpoints.sol | 2 +- contracts/utils/structs/DoubleEndedQueue.sol | 2 +- contracts/utils/structs/EnumerableMap.sol | 2 +- contracts/utils/structs/EnumerableSet.sol | 2 +- contracts/utils/types/Time.sol | 1 + .../vendor/compound/ICompoundTimelock.sol | 2 +- docs/antora.yml | 2 +- package.json | 2 +- 223 files changed, 343 insertions(+), 539 deletions(-) delete mode 100644 .changeset/afraid-walls-smell.md delete mode 100644 .changeset/angry-ties-switch.md delete mode 100644 .changeset/big-plums-cover.md delete mode 100644 .changeset/blue-horses-do.md delete mode 100644 .changeset/blue-scissors-design.md delete mode 100644 .changeset/brave-lobsters-punch.md delete mode 100644 .changeset/bright-tomatoes-sing.md delete mode 100644 .changeset/chilled-spiders-attack.md delete mode 100644 .changeset/clever-bats-kick.md delete mode 100644 .changeset/clever-pumas-beg.md delete mode 100644 .changeset/eight-peaches-guess.md delete mode 100644 .changeset/eighty-crabs-listen.md delete mode 100644 .changeset/eighty-lemons-shake.md delete mode 100644 .changeset/empty-cheetahs-hunt.md delete mode 100644 .changeset/empty-taxis-kiss.md delete mode 100644 .changeset/fair-humans-peel.md delete mode 100644 .changeset/fifty-owls-retire.md delete mode 100644 .changeset/flat-bottles-wonder.md delete mode 100644 .changeset/fluffy-countries-buy.md delete mode 100644 .changeset/four-adults-knock.md delete mode 100644 .changeset/fresh-birds-kiss.md delete mode 100644 .changeset/green-pumpkins-end.md delete mode 100644 .changeset/grumpy-bulldogs-call.md delete mode 100644 .changeset/grumpy-worms-tease.md delete mode 100644 .changeset/happy-falcons-walk.md delete mode 100644 .changeset/healthy-gorillas-applaud.md delete mode 100644 .changeset/heavy-drinks-fail.md delete mode 100644 .changeset/hip-beds-provide.md delete mode 100644 .changeset/hip-goats-fail.md delete mode 100644 .changeset/hot-coins-judge.md delete mode 100644 .changeset/hot-dingos-kiss.md delete mode 100644 .changeset/hot-plums-approve.md delete mode 100644 .changeset/large-humans-remain.md delete mode 100644 .changeset/lazy-rice-joke.md delete mode 100644 .changeset/little-falcons-build.md delete mode 100644 .changeset/loud-shrimps-play.md delete mode 100644 .changeset/lovely-geckos-hide.md delete mode 100644 .changeset/mean-walls-watch.md delete mode 100644 .changeset/mighty-donuts-smile.md delete mode 100644 .changeset/orange-apes-draw.md delete mode 100644 .changeset/pink-suns-mix.md delete mode 100644 .changeset/popular-deers-raise.md delete mode 100644 .changeset/proud-seals-complain.md delete mode 100644 .changeset/proud-spiders-attend.md delete mode 100644 .changeset/purple-cats-cheer.md delete mode 100644 .changeset/quiet-trainers-kick.md delete mode 100644 .changeset/red-dots-fold.md delete mode 100644 .changeset/rotten-insects-wash.md delete mode 100644 .changeset/serious-books-lie.md delete mode 100644 .changeset/short-eels-enjoy.md delete mode 100644 .changeset/silly-bees-beam.md delete mode 100644 .changeset/six-frogs-turn.md delete mode 100644 .changeset/sixty-numbers-reply.md delete mode 100644 .changeset/slimy-penguins-attack.md delete mode 100644 .changeset/smooth-books-wink.md delete mode 100644 .changeset/smooth-cougars-jump.md delete mode 100644 .changeset/spicy-sheep-eat.md delete mode 100644 .changeset/spotty-hotels-type.md delete mode 100644 .changeset/strong-poems-thank.md delete mode 100644 .changeset/swift-bags-divide.md delete mode 100644 .changeset/swift-numbers-cry.md delete mode 100644 .changeset/tasty-tomatoes-turn.md delete mode 100644 .changeset/tender-shirts-turn.md delete mode 100644 .changeset/thick-pumpkins-exercise.md delete mode 100644 .changeset/thin-camels-matter.md delete mode 100644 .changeset/tough-drinks-hammer.md delete mode 100644 .changeset/two-wasps-punch.md delete mode 100644 .changeset/unlucky-beans-obey.md delete mode 100644 .changeset/violet-dancers-cough.md delete mode 100644 .changeset/violet-melons-press.md delete mode 100644 .changeset/warm-guests-rule.md delete mode 100644 .changeset/wet-bears-heal.md delete mode 100644 .changeset/wild-beds-visit.md delete mode 100644 .changeset/wild-peas-remain.md delete mode 100644 .changeset/wild-rockets-rush.md delete mode 100644 .changeset/wild-windows-trade.md diff --git a/.changeset/afraid-walls-smell.md b/.changeset/afraid-walls-smell.md deleted file mode 100644 index 682fdde5e..000000000 --- a/.changeset/afraid-walls-smell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC1155Receiver`: Removed in favor of `ERC1155Holder`. diff --git a/.changeset/angry-ties-switch.md b/.changeset/angry-ties-switch.md deleted file mode 100644 index f3ec7db38..000000000 --- a/.changeset/angry-ties-switch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`TimelockController`: Changed the role architecture to use `DEFAULT_ADMIN_ROLE` as the admin for all roles, instead of the bespoke `TIMELOCK_ADMIN_ROLE` that was used previously. This aligns with the general recommendation for `AccessControl` and makes the addition of new roles easier. Accordingly, the `admin` parameter and timelock will now be granted `DEFAULT_ADMIN_ROLE` instead of `TIMELOCK_ADMIN_ROLE`. ([#3799](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3799)) diff --git a/.changeset/big-plums-cover.md b/.changeset/big-plums-cover.md deleted file mode 100644 index 411156253..000000000 --- a/.changeset/big-plums-cover.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -'openzeppelin-solidity': major ---- -Use `abi.encodeCall` in place of `abi.encodeWithSelector` and `abi.encodeWithSignature` for improved type-checking of parameters diff --git a/.changeset/blue-horses-do.md b/.changeset/blue-horses-do.md deleted file mode 100644 index 9df604fe4..000000000 --- a/.changeset/blue-horses-do.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC2771Forwarder`: Added `deadline` for expiring transactions, batching, and more secure handling of `msg.value`. diff --git a/.changeset/blue-scissors-design.md b/.changeset/blue-scissors-design.md deleted file mode 100644 index c2f815aae..000000000 --- a/.changeset/blue-scissors-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`Math`: Make `ceilDiv` to revert on 0 division even if the numerator is 0 diff --git a/.changeset/brave-lobsters-punch.md b/.changeset/brave-lobsters-punch.md deleted file mode 100644 index 60f04e430..000000000 --- a/.changeset/brave-lobsters-punch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Governor`: Refactored internals to implement common queuing logic in the core module of the Governor. Added `queue` and `_queueOperations` functions that act at different levels. Modules that implement queuing via timelocks are expected to override `_queueOperations` to implement the timelock-specific logic. Added `_executeOperations` as the equivalent for execution. diff --git a/.changeset/bright-tomatoes-sing.md b/.changeset/bright-tomatoes-sing.md deleted file mode 100644 index 7ef6d929a..000000000 --- a/.changeset/bright-tomatoes-sing.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC20`, `ERC721`, `ERC1155`: Deleted `_beforeTokenTransfer` and `_afterTokenTransfer` hooks, added a new internal `_update` function for customizations, and refactored all extensions using those hooks to use `_update` instead. ([#3838](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3838), [#3876](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3876), [#4377](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4377)) diff --git a/.changeset/chilled-spiders-attack.md b/.changeset/chilled-spiders-attack.md deleted file mode 100644 index ef3fc4f55..000000000 --- a/.changeset/chilled-spiders-attack.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC1155Supply`: add a `totalSupply()` function that returns the total amount of token circulating, this change will restrict the total tokens minted across all ids to 2\*\*256-1 . diff --git a/.changeset/clever-bats-kick.md b/.changeset/clever-bats-kick.md deleted file mode 100644 index b35301b73..000000000 --- a/.changeset/clever-bats-kick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`Ownable`: Prevent using address(0) as the initial owner. diff --git a/.changeset/clever-pumas-beg.md b/.changeset/clever-pumas-beg.md deleted file mode 100644 index 5f1f4b13b..000000000 --- a/.changeset/clever-pumas-beg.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Ownable`: Add an `initialOwner` parameter to the constructor, making the ownership initialization explicit. diff --git a/.changeset/eight-peaches-guess.md b/.changeset/eight-peaches-guess.md deleted file mode 100644 index ba4e87c17..000000000 --- a/.changeset/eight-peaches-guess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`Proxy`: Removed redundant `receive` function. diff --git a/.changeset/eighty-crabs-listen.md b/.changeset/eighty-crabs-listen.md deleted file mode 100644 index 7de904db8..000000000 --- a/.changeset/eighty-crabs-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -Optimize `Strings.equal` diff --git a/.changeset/eighty-lemons-shake.md b/.changeset/eighty-lemons-shake.md deleted file mode 100644 index 4e53893f5..000000000 --- a/.changeset/eighty-lemons-shake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC721`: `_approve` no longer allows approving the owner of the tokenId. `_setApprovalForAll` no longer allows setting address(0) as an operator. diff --git a/.changeset/empty-cheetahs-hunt.md b/.changeset/empty-cheetahs-hunt.md deleted file mode 100644 index eb20381a6..000000000 --- a/.changeset/empty-cheetahs-hunt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC721URIStorage`: Allow setting the token URI prior to minting. diff --git a/.changeset/empty-taxis-kiss.md b/.changeset/empty-taxis-kiss.md deleted file mode 100644 index b01c92bd0..000000000 --- a/.changeset/empty-taxis-kiss.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`UUPSUpgradeable`, `TransparentUpgradeableProxy` and `ProxyAdmin`: Removed `upgradeTo` and `upgrade` functions, and made `upgradeToAndCall` and `upgradeAndCall` ignore the data argument if it is empty. It is no longer possible to invoke the receive function (or send value with empty data) along with an upgrade. diff --git a/.changeset/fair-humans-peel.md b/.changeset/fair-humans-peel.md deleted file mode 100644 index 3c0dc3c06..000000000 --- a/.changeset/fair-humans-peel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC721URIStorage`, `ERC721Royalty`: Stop resetting token-specific URI and royalties when burning. diff --git a/.changeset/fifty-owls-retire.md b/.changeset/fifty-owls-retire.md deleted file mode 100644 index 118fad421..000000000 --- a/.changeset/fifty-owls-retire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Address`: Removed the ability to customize error messages. A common custom error is always used if the underlying revert reason cannot be bubbled up. diff --git a/.changeset/flat-bottles-wonder.md b/.changeset/flat-bottles-wonder.md deleted file mode 100644 index f7ee7dd5d..000000000 --- a/.changeset/flat-bottles-wonder.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -Replace some uses of `abi.encodePacked` with clearer alternatives (e.g. `bytes.concat`, `string.concat`). (#4504)[https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4504] - -pr: #4296 diff --git a/.changeset/fluffy-countries-buy.md b/.changeset/fluffy-countries-buy.md deleted file mode 100644 index 0cc7de370..000000000 --- a/.changeset/fluffy-countries-buy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`Arrays`: Optimize `findUpperBound` by removing redundant SLOAD. diff --git a/.changeset/four-adults-knock.md b/.changeset/four-adults-knock.md deleted file mode 100644 index f6f566d7a..000000000 --- a/.changeset/four-adults-knock.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`ECDSA`: Use unchecked arithmetic for the `tryRecover` function that receives the `r` and `vs` short-signature fields separately. diff --git a/.changeset/fresh-birds-kiss.md b/.changeset/fresh-birds-kiss.md deleted file mode 100644 index 221f54cdf..000000000 --- a/.changeset/fresh-birds-kiss.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Checkpoints`: library moved from `utils` to `utils/structs` diff --git a/.changeset/green-pumpkins-end.md b/.changeset/green-pumpkins-end.md deleted file mode 100644 index 03cfe023f..000000000 --- a/.changeset/green-pumpkins-end.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`SafeERC20`: Removed `safePermit` in favor of documentation-only `permit` recommendations. diff --git a/.changeset/grumpy-bulldogs-call.md b/.changeset/grumpy-bulldogs-call.md deleted file mode 100644 index c034587f3..000000000 --- a/.changeset/grumpy-bulldogs-call.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Governor`: Optimized use of storage for proposal data diff --git a/.changeset/grumpy-worms-tease.md b/.changeset/grumpy-worms-tease.md deleted file mode 100644 index 910b996c6..000000000 --- a/.changeset/grumpy-worms-tease.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC1967Utils`: Refactor the `ERC1967Upgrade` abstract contract as a library. diff --git a/.changeset/happy-falcons-walk.md b/.changeset/happy-falcons-walk.md deleted file mode 100644 index bba9642aa..000000000 --- a/.changeset/happy-falcons-walk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`TransparentUpgradeableProxy`: Admin is now stored in an immutable variable (set during construction) to avoid unnecessary storage reads on every proxy call. This removed the ability to ever change the admin. Transfer of the upgrade capability is exclusively handled through the ownership of the `ProxyAdmin`. diff --git a/.changeset/healthy-gorillas-applaud.md b/.changeset/healthy-gorillas-applaud.md deleted file mode 100644 index 1d4156ebf..000000000 --- a/.changeset/healthy-gorillas-applaud.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`VestingWallet`: Use `Ownable` instead of an immutable `beneficiary`. diff --git a/.changeset/heavy-drinks-fail.md b/.changeset/heavy-drinks-fail.md deleted file mode 100644 index bbe93ca90..000000000 --- a/.changeset/heavy-drinks-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC20`: Remove `Approval` event previously emitted in `transferFrom` to indicate that part of the allowance was consumed. With this change, allowances are no longer reconstructible from events. See the code for guidelines on how to re-enable this event if needed. diff --git a/.changeset/hip-beds-provide.md b/.changeset/hip-beds-provide.md deleted file mode 100644 index c67283813..000000000 --- a/.changeset/hip-beds-provide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -Move the logic to validate ERC-1822 during an upgrade from `ERC1967Utils` to `UUPSUpgradeable`. diff --git a/.changeset/hip-goats-fail.md b/.changeset/hip-goats-fail.md deleted file mode 100644 index 5cfe2ef79..000000000 --- a/.changeset/hip-goats-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`VestingWallet`: Fix revert during 1 second time window when duration is 0. diff --git a/.changeset/hot-coins-judge.md b/.changeset/hot-coins-judge.md deleted file mode 100644 index e544af467..000000000 --- a/.changeset/hot-coins-judge.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`Arrays`: Add `unsafeMemoryAccess` helpers to read from a memory array without checking the length. diff --git a/.changeset/hot-dingos-kiss.md b/.changeset/hot-dingos-kiss.md deleted file mode 100644 index fb213cd64..000000000 --- a/.changeset/hot-dingos-kiss.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`MessageHashUtils`: Add a new library for creating message digest to be used along with signing or recovery such as ECDSA or ERC-1271. These functions are moved from the `ECDSA` library. diff --git a/.changeset/hot-plums-approve.md b/.changeset/hot-plums-approve.md deleted file mode 100644 index 131559027..000000000 --- a/.changeset/hot-plums-approve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`GovernorTimelockControl`: Clean up timelock id on execution for gas refund. diff --git a/.changeset/large-humans-remain.md b/.changeset/large-humans-remain.md deleted file mode 100644 index 95b72aea4..000000000 --- a/.changeset/large-humans-remain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`MerkleProof`: Use custom error to report invalid multiproof instead of reverting with overflow panic. diff --git a/.changeset/lazy-rice-joke.md b/.changeset/lazy-rice-joke.md deleted file mode 100644 index 6e1243002..000000000 --- a/.changeset/lazy-rice-joke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`Initializable`: Use intermediate variables to improve readability. diff --git a/.changeset/little-falcons-build.md b/.changeset/little-falcons-build.md deleted file mode 100644 index b310a8ae6..000000000 --- a/.changeset/little-falcons-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`EIP712`: Add internal getters for the name and version strings diff --git a/.changeset/loud-shrimps-play.md b/.changeset/loud-shrimps-play.md deleted file mode 100644 index 3de2da080..000000000 --- a/.changeset/loud-shrimps-play.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`TimelockController`: Add a state getter that returns an `OperationState` enum. diff --git a/.changeset/lovely-geckos-hide.md b/.changeset/lovely-geckos-hide.md deleted file mode 100644 index 1fbcb2077..000000000 --- a/.changeset/lovely-geckos-hide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -Replace revert strings and require statements with custom errors. diff --git a/.changeset/mean-walls-watch.md b/.changeset/mean-walls-watch.md deleted file mode 100644 index 6bcf609b8..000000000 --- a/.changeset/mean-walls-watch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Nonces`: Added a new contract to keep track of user nonces. Used for signatures in `ERC20Permit`, `ERC20Votes`, and `ERC721Votes`. ([#3816](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3816)) diff --git a/.changeset/mighty-donuts-smile.md b/.changeset/mighty-donuts-smile.md deleted file mode 100644 index 5885a7370..000000000 --- a/.changeset/mighty-donuts-smile.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`Governor`: Add validation in ERC1155 and ERC721 receiver hooks to ensure Governor is the executor. - diff --git a/.changeset/orange-apes-draw.md b/.changeset/orange-apes-draw.md deleted file mode 100644 index 5f2b7d928..000000000 --- a/.changeset/orange-apes-draw.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -Switched to using explicit Solidity import statements. Some previously available symbols may now have to be separately imported. diff --git a/.changeset/pink-suns-mix.md b/.changeset/pink-suns-mix.md deleted file mode 100644 index eb7aaac46..000000000 --- a/.changeset/pink-suns-mix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`Math`: Optimized stack operations in `mulDiv`. diff --git a/.changeset/popular-deers-raise.md b/.changeset/popular-deers-raise.md deleted file mode 100644 index ec1fb7466..000000000 --- a/.changeset/popular-deers-raise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Governor`: Add support for casting votes with ERC-1271 signatures by using a `bytes memory signature` instead of `r`, `s` and `v` arguments in the `castVoteBySig` and `castVoteWithReasonAndParamsBySig` functions. diff --git a/.changeset/proud-seals-complain.md b/.changeset/proud-seals-complain.md deleted file mode 100644 index 35df4777e..000000000 --- a/.changeset/proud-seals-complain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`BeaconProxy`: Use an immutable variable to store the address of the beacon. It is no longer possible for a `BeaconProxy` to upgrade by changing to another beacon. diff --git a/.changeset/proud-spiders-attend.md b/.changeset/proud-spiders-attend.md deleted file mode 100644 index a8f7694c7..000000000 --- a/.changeset/proud-spiders-attend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC721`: Renamed `_requireMinted` to `_requireOwned` and added a return value with the current owner. Implemented `ownerOf` in terms of `_requireOwned`. diff --git a/.changeset/purple-cats-cheer.md b/.changeset/purple-cats-cheer.md deleted file mode 100644 index 7e9dc1c4d..000000000 --- a/.changeset/purple-cats-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`GovernorTimelockControl`: Add the Governor instance address as part of the TimelockController operation `salt` to avoid operation id collisions between governors using the same TimelockController. diff --git a/.changeset/quiet-trainers-kick.md b/.changeset/quiet-trainers-kick.md deleted file mode 100644 index 5de96467d..000000000 --- a/.changeset/quiet-trainers-kick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`AccessManager`: Added a new contract for managing access control of complex systems in a consolidated location. diff --git a/.changeset/red-dots-fold.md b/.changeset/red-dots-fold.md deleted file mode 100644 index 08cc77843..000000000 --- a/.changeset/red-dots-fold.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -Overrides are now used internally for a number of functions that were previously hardcoded to their default implementation in certain locations: `ERC1155Supply.totalSupply`, `ERC721.ownerOf`, `ERC721.balanceOf` and `ERC721.totalSupply` in `ERC721Enumerable`, `ERC20.totalSupply` in `ERC20FlashMint`, and `ERC1967._getImplementation` in `ERC1967Proxy`. diff --git a/.changeset/rotten-insects-wash.md b/.changeset/rotten-insects-wash.md deleted file mode 100644 index 9b2f11706..000000000 --- a/.changeset/rotten-insects-wash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ProxyAdmin`: Removed `getProxyAdmin` and `getProxyImplementation` getters. ([#3820](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3820)) diff --git a/.changeset/serious-books-lie.md b/.changeset/serious-books-lie.md deleted file mode 100644 index 6f0a0a732..000000000 --- a/.changeset/serious-books-lie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`ERC1155`: Optimize array allocation. diff --git a/.changeset/short-eels-enjoy.md b/.changeset/short-eels-enjoy.md deleted file mode 100644 index e826c6d19..000000000 --- a/.changeset/short-eels-enjoy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -Bump minimum compiler version required to 0.8.20 diff --git a/.changeset/silly-bees-beam.md b/.changeset/silly-bees-beam.md deleted file mode 100644 index 0f4f40507..000000000 --- a/.changeset/silly-bees-beam.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC20Votes`: Changed internal vote accounting to reusable `Votes` module previously used by `ERC721Votes`. Removed implicit `ERC20Permit` inheritance. Note that the `DOMAIN_SEPARATOR` getter was previously guaranteed to be available for `ERC20Votes` contracts, but is no longer available unless `ERC20Permit` is explicitly used; ERC-5267 support is included in `ERC20Votes` with `EIP712` and is recommended as an alternative. - -pr: #3816 diff --git a/.changeset/six-frogs-turn.md b/.changeset/six-frogs-turn.md deleted file mode 100644 index 9c5668b6d..000000000 --- a/.changeset/six-frogs-turn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC20`: Remove the non-standard `increaseAllowance` and `decreaseAllowance` functions. diff --git a/.changeset/sixty-numbers-reply.md b/.changeset/sixty-numbers-reply.md deleted file mode 100644 index 4e6faa837..000000000 --- a/.changeset/sixty-numbers-reply.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Governor`: Add `voter` and `nonce` parameters in signed ballots, to avoid forging signatures for random addresses, prevent signature replay, and allow invalidating signatures. Add `voter` as a new parameter in the `castVoteBySig` and `castVoteWithReasonAndParamsBySig` functions. diff --git a/.changeset/slimy-penguins-attack.md b/.changeset/slimy-penguins-attack.md deleted file mode 100644 index dcf91e90b..000000000 --- a/.changeset/slimy-penguins-attack.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`TransparentUpgradeableProxy`: Removed `admin` and `implementation` getters, which were only callable by the proxy owner and thus not very useful. ([#3820](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3820)) diff --git a/.changeset/smooth-books-wink.md b/.changeset/smooth-books-wink.md deleted file mode 100644 index e5eb3fbeb..000000000 --- a/.changeset/smooth-books-wink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ERC1155`: Remove check for address zero in `balanceOf`. diff --git a/.changeset/smooth-cougars-jump.md b/.changeset/smooth-cougars-jump.md deleted file mode 100644 index 337101cd0..000000000 --- a/.changeset/smooth-cougars-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`ReentrancyGuard`, `Pausable`: Moved to `utils` directory. diff --git a/.changeset/spicy-sheep-eat.md b/.changeset/spicy-sheep-eat.md deleted file mode 100644 index 17b6d5585..000000000 --- a/.changeset/spicy-sheep-eat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`access`: Move `AccessControl` extensions to a dedicated directory. diff --git a/.changeset/spotty-hotels-type.md b/.changeset/spotty-hotels-type.md deleted file mode 100644 index 866d8fc02..000000000 --- a/.changeset/spotty-hotels-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`ERC721Consecutive`: Add a `_firstConsecutiveId` internal function that can be overridden to change the id of the first token minted through `_mintConsecutive`. diff --git a/.changeset/strong-poems-thank.md b/.changeset/strong-poems-thank.md deleted file mode 100644 index 5f496de7f..000000000 --- a/.changeset/strong-poems-thank.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`DoubleEndedQueue`: refactor internal structure to use `uint128` instead of `int128`. This has no effect on the library interface. diff --git a/.changeset/swift-bags-divide.md b/.changeset/swift-bags-divide.md deleted file mode 100644 index 9af63e98e..000000000 --- a/.changeset/swift-bags-divide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`Governor`: Add a mechanism to restrict the address of the proposer using a suffix in the description. diff --git a/.changeset/swift-numbers-cry.md b/.changeset/swift-numbers-cry.md deleted file mode 100644 index 48afbd245..000000000 --- a/.changeset/swift-numbers-cry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`Governor`, `Initializable`, and `UUPSUpgradeable`: Use internal functions in modifiers to optimize bytecode size. diff --git a/.changeset/tasty-tomatoes-turn.md b/.changeset/tasty-tomatoes-turn.md deleted file mode 100644 index 3fe46a9b1..000000000 --- a/.changeset/tasty-tomatoes-turn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Strings`: Rename `toString(int256)` to `toStringSigned(int256)`. diff --git a/.changeset/tender-shirts-turn.md b/.changeset/tender-shirts-turn.md deleted file mode 100644 index 9c98e6e2b..000000000 --- a/.changeset/tender-shirts-turn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`BeaconProxy`: Reject value in initialization unless a payable function is explicitly invoked. diff --git a/.changeset/thick-pumpkins-exercise.md b/.changeset/thick-pumpkins-exercise.md deleted file mode 100644 index 8df8b51cc..000000000 --- a/.changeset/thick-pumpkins-exercise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Initializable`: Use the namespaced storage pattern to avoid putting critical variables in slot 0. Allow reinitializer versions greater than 256. diff --git a/.changeset/thin-camels-matter.md b/.changeset/thin-camels-matter.md deleted file mode 100644 index c832b1163..000000000 --- a/.changeset/thin-camels-matter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`ERC1155`: Bubble errors triggered in the `onERC1155Received` and `onERC1155BatchReceived` hooks. diff --git a/.changeset/tough-drinks-hammer.md b/.changeset/tough-drinks-hammer.md deleted file mode 100644 index 51b3836e4..000000000 --- a/.changeset/tough-drinks-hammer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`ERC1155`: Optimize array accesses by skipping bounds checking when unnecessary. diff --git a/.changeset/two-wasps-punch.md b/.changeset/two-wasps-punch.md deleted file mode 100644 index d382ab6e9..000000000 --- a/.changeset/two-wasps-punch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -`AccessControl`: Add a boolean return value to the internal `_grantRole` and `_revokeRole` functions indicating whether the role was granted or revoked. diff --git a/.changeset/unlucky-beans-obey.md b/.changeset/unlucky-beans-obey.md deleted file mode 100644 index e472d3c6c..000000000 --- a/.changeset/unlucky-beans-obey.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`ERC2771Context`: Return the forwarder address whenever the `msg.data` of a call originating from a trusted forwarder is not long enough to contain the request signer address (i.e. `msg.data.length` is less than 20 bytes), as specified by ERC-2771. diff --git a/.changeset/violet-dancers-cough.md b/.changeset/violet-dancers-cough.md deleted file mode 100644 index c6160d287..000000000 --- a/.changeset/violet-dancers-cough.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': minor ---- - -Remove the `override` specifier from functions that only override a single interface function. diff --git a/.changeset/violet-melons-press.md b/.changeset/violet-melons-press.md deleted file mode 100644 index 18fd70b58..000000000 --- a/.changeset/violet-melons-press.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`GovernorTimelockAccess`: Added a module to connect a governor with an instance of `AccessManager`, allowing the governor to make calls that are delay-restricted by the manager using the normal `queue` workflow. diff --git a/.changeset/warm-guests-rule.md b/.changeset/warm-guests-rule.md deleted file mode 100644 index 049da4dd5..000000000 --- a/.changeset/warm-guests-rule.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`ERC2771Context`: Prevent revert in `_msgData()` when a call originating from a trusted forwarder is not long enough to contain the request signer address (i.e. `msg.data.length` is less than 20 bytes). Return the full calldata in that case. diff --git a/.changeset/wet-bears-heal.md b/.changeset/wet-bears-heal.md deleted file mode 100644 index 2df32f39a..000000000 --- a/.changeset/wet-bears-heal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -Upgradeable contracts now use namespaced storage (EIP-7201). diff --git a/.changeset/wild-beds-visit.md b/.changeset/wild-beds-visit.md deleted file mode 100644 index e97dee284..000000000 --- a/.changeset/wild-beds-visit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`GovernorStorage`: Added a new governor extension that stores the proposal details in storage, with an interface that operates on `proposalId`, as well as proposal enumerability. This replaces the old `GovernorCompatibilityBravo` module. diff --git a/.changeset/wild-peas-remain.md b/.changeset/wild-peas-remain.md deleted file mode 100644 index 83b4bb307..000000000 --- a/.changeset/wild-peas-remain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Votes`: Use Trace208 for checkpoints. This enables EIP-6372 clock support for keys but reduces the max supported voting power to uint208. diff --git a/.changeset/wild-rockets-rush.md b/.changeset/wild-rockets-rush.md deleted file mode 100644 index 7fc6f598d..000000000 --- a/.changeset/wild-rockets-rush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`Math`: Renamed members of `Rounding` enum, and added a new rounding mode for "away from zero". diff --git a/.changeset/wild-windows-trade.md b/.changeset/wild-windows-trade.md deleted file mode 100644 index f599d0fcb..000000000 --- a/.changeset/wild-windows-trade.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`SafeERC20`: Refactor `safeDecreaseAllowance` and `safeIncreaseAllowance` to support USDT-like tokens. diff --git a/CHANGELOG.md b/CHANGELOG.md index 98d06de99..9575afbb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,26 @@ # Changelog -## Unreleased +## 5.0.0 (2023-10-05) -> **Warning** Version 5.0 is under active development and should not be used. Install the releases from npm or use the version tags in the repository. +### Additions Summary -### Removals +The following contracts and libraries were added: -The following contracts, libraries and functions were removed: +- `AccessManager`: A consolidated system for managing access control in complex systems. + - `AccessManaged`: A module for connecting a contract to an authority in charge of its access control. + - `GovernorTimelockAccess`: An adapter for time-locking governance proposals using an `AccessManager`. + - `AuthorityUtils`: A library of utilities for interacting with authority contracts. +- `GovernorStorage`: A Governor module that stores proposal details in storage. +- `ERC2771Forwarder`: An ERC2771 forwarder for meta transactions. +- `ERC1967Utils`: A library with ERC1967 events, errors and getters. +- `Nonces`: An abstraction for managing account nonces. +- `MessageHashUtils`: A library for producing digests for ECDSA operations. +- `Time`: A library with helpers for manipulating time-related objects. +### Removals Summary + +The following contracts, libraries, and functions were removed: + - `Address.isContract` (because of its ambiguous nature and potential for misuse) - `Checkpoints.History` - `Counters` @@ -30,38 +43,140 @@ The following contracts, libraries and functions were removed: These removals were implemented in the following PRs: [#3637](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3637), [#3880](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3880), [#3945](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3945), [#4258](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4258), [#4276](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4276), [#4289](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4289) -### How to upgrade from 4.x +### Changes by category + +#### General + +- Replaced revert strings and require statements with custom errors. ([#4261](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4261)) +- Bumped minimum compiler version required to 0.8.20 ([#4288](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4288)) +- Use of `abi.encodeCall` in place of `abi.encodeWithSelector` and `abi.encodeWithSignature` for improved type-checking of parameters ([#4293](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4293)) +- Replaced some uses of `abi.encodePacked` with clearer alternatives (e.g. `bytes.concat`, `string.concat`). ([#4504](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4504)) ([#4296](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4296)) +- Overrides are now used internally for a number of functions that were previously hardcoded to their default implementation in certain locations: `ERC1155Supply.totalSupply`, `ERC721.ownerOf`, `ERC721.balanceOf` and `ERC721.totalSupply` in `ERC721Enumerable`, `ERC20.totalSupply` in `ERC20FlashMint`, and `ERC1967._getImplementation` in `ERC1967Proxy`. ([#4299](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4299)) +- Removed the `override` specifier from functions that only override a single interface function. ([#4315](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4315)) +- Switched to using explicit Solidity import statements. Some previously available symbols may now have to be separately imported. ([#4399](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4399)) +- `Governor`, `Initializable`, and `UUPSUpgradeable`: Use internal functions in modifiers to optimize bytecode size. ([#4472](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4472)) +- Upgradeable contracts now use namespaced storage (EIP-7201). ([#4534](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4534)) +- Upgradeable contracts no longer transpile interfaces and libraries. ([#4628](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4628)) + +#### Access + +- `Ownable`: Added an `initialOwner` parameter to the constructor, making the ownership initialization explicit. ([#4267](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4267)) +- `Ownable`: Prevent using address(0) as the initial owner. ([#4531](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4531)) +- `AccessControl`: Added a boolean return value to the internal `_grantRole` and `_revokeRole` functions indicating whether the role was granted or revoked. ([#4241](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4241)) +- `access`: Moved `AccessControl` extensions to a dedicated directory. ([#4359](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4359)) +- `AccessManager`: Added a new contract for managing access control of complex systems in a consolidated location. ([#4121](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4121)) +- `AccessManager`, `AccessManaged`, `GovernorTimelockAccess`: Ensure that calldata shorter than 4 bytes is not padded to 4 bytes. ([#4624](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4624)) +- `AccessManager`: Use named return parameters in functions that return multiple values. ([#4624](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4624)) +- `AccessManager`: Make `schedule` and `execute` more conservative when delay is 0. ([#4644](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4644)) + +#### Finance + +- `VestingWallet`: Fixed revert during 1 second time window when duration is 0. ([#4502](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4502)) +- `VestingWallet`: Use `Ownable` instead of an immutable `beneficiary`. ([#4508](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4508)) + +#### Governance + +- `Governor`: Optimized use of storage for proposal data ([#4268](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4268)) +- `Governor`: Added validation in ERC1155 and ERC721 receiver hooks to ensure Governor is the executor. ([#4314](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4314)) +- `Governor`: Refactored internals to implement common queuing logic in the core module of the Governor. Added `queue` and `_queueOperations` functions that act at different levels. Modules that implement queuing via timelocks are expected to override `_queueOperations` to implement the timelock-specific logic. Added `_executeOperations` as the equivalent for execution. ([#4360](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4360)) +- `Governor`: Added `voter` and `nonce` parameters in signed ballots, to avoid forging signatures for random addresses, prevent signature replay, and allow invalidating signatures. Add `voter` as a new parameter in the `castVoteBySig` and `castVoteWithReasonAndParamsBySig` functions. ([#4378](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4378)) +- `Governor`: Added support for casting votes with ERC-1271 signatures by using a `bytes memory signature` instead of `r`, `s` and `v` arguments in the `castVoteBySig` and `castVoteWithReasonAndParamsBySig` functions. ([#4418](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4418)) +- `Governor`: Added a mechanism to restrict the address of the proposer using a suffix in the description. +- `GovernorStorage`: Added a new governor extension that stores the proposal details in storage, with an interface that operates on `proposalId`, as well as proposal enumerability. This replaces the old `GovernorCompatibilityBravo` module. ([#4360](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4360)) +- `GovernorTimelockAccess`: Added a module to connect a governor with an instance of `AccessManager`, allowing the governor to make calls that are delay-restricted by the manager using the normal `queue` workflow. ([#4523](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4523)) +- `GovernorTimelockControl`: Clean up timelock id on execution for gas refund. ([#4118](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4118)) +- `GovernorTimelockControl`: Added the Governor instance address as part of the TimelockController operation `salt` to avoid operation id collisions between governors using the same TimelockController. ([#4432](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4432)) +- `TimelockController`: Changed the role architecture to use `DEFAULT_ADMIN_ROLE` as the admin for all roles, instead of the bespoke `TIMELOCK_ADMIN_ROLE` that was used previously. This aligns with the general recommendation for `AccessControl` and makes the addition of new roles easier. Accordingly, the `admin` parameter and timelock will now be granted `DEFAULT_ADMIN_ROLE` instead of `TIMELOCK_ADMIN_ROLE`. ([#3799](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3799)) +- `TimelockController`: Added a state getter that returns an `OperationState` enum. ([#4358](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4358)) +- `Votes`: Use Trace208 for checkpoints. This enables EIP-6372 clock support for keys but reduces the max supported voting power to uint208. ([#4539](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4539)) + +#### Metatx + +- `ERC2771Forwarder`: Added `deadline` for expiring transactions, batching, and more secure handling of `msg.value`. ([#4346](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4346)) +- `ERC2771Context`: Return the forwarder address whenever the `msg.data` of a call originating from a trusted forwarder is not long enough to contain the request signer address (i.e. `msg.data.length` is less than 20 bytes), as specified by ERC-2771. ([#4481](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4481)) +- `ERC2771Context`: Prevent revert in `_msgData()` when a call originating from a trusted forwarder is not long enough to contain the request signer address (i.e. `msg.data.length` is less than 20 bytes). Return the full calldata in that case. ([#4484](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4484)) + +#### Proxy + +- `ProxyAdmin`: Removed `getProxyAdmin` and `getProxyImplementation` getters. ([#3820](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3820)) +- `TransparentUpgradeableProxy`: Removed `admin` and `implementation` getters, which were only callable by the proxy owner and thus not very useful. ([#3820](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3820)) +- `ERC1967Utils`: Refactored the `ERC1967Upgrade` abstract contract as a library. ([#4325](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4325)) +- `TransparentUpgradeableProxy`: Admin is now stored in an immutable variable (set during construction) to avoid unnecessary storage reads on every proxy call. This removed the ability to ever change the admin. Transfer of the upgrade capability is exclusively handled through the ownership of the `ProxyAdmin`. ([#4354](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4354)) +- Moved the logic to validate ERC-1822 during an upgrade from `ERC1967Utils` to `UUPSUpgradeable`. ([#4356](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4356)) +- `UUPSUpgradeable`, `TransparentUpgradeableProxy` and `ProxyAdmin`: Removed `upgradeTo` and `upgrade` functions, and made `upgradeToAndCall` and `upgradeAndCall` ignore the data argument if it is empty. It is no longer possible to invoke the receive function (or send value with empty data) along with an upgrade. ([#4382](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4382)) +- `BeaconProxy`: Reject value in initialization unless a payable function is explicitly invoked. ([#4382](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4382)) +- `Proxy`: Removed redundant `receive` function. ([#4434](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4434)) +- `BeaconProxy`: Use an immutable variable to store the address of the beacon. It is no longer possible for a `BeaconProxy` to upgrade by changing to another beacon. ([#4435](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4435)) +- `Initializable`: Use the namespaced storage pattern to avoid putting critical variables in slot 0. Allow reinitializer versions greater than 256. ([#4460](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4460)) +- `Initializable`: Use intermediate variables to improve readability. ([#4576](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4576)) + +#### Token + +- `ERC20`, `ERC721`, `ERC1155`: Deleted `_beforeTokenTransfer` and `_afterTokenTransfer` hooks, added a new internal `_update` function for customizations, and refactored all extensions using those hooks to use `_update` instead. ([#3838](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3838), [#3876](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3876), [#4377](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4377)) +- `ERC20`: Removed `Approval` event previously emitted in `transferFrom` to indicate that part of the allowance was consumed. With this change, allowances are no longer reconstructible from events. See the code for guidelines on how to re-enable this event if needed. ([#4370](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4370)) +- `ERC20`: Removed the non-standard `increaseAllowance` and `decreaseAllowance` functions. ([#4585](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4585)) +- `ERC20Votes`: Changed internal vote accounting to reusable `Votes` module previously used by `ERC721Votes`. Removed implicit `ERC20Permit` inheritance. Note that the `DOMAIN_SEPARATOR` getter was previously guaranteed to be available for `ERC20Votes` contracts, but is no longer available unless `ERC20Permit` is explicitly used; ERC-5267 support is included in `ERC20Votes` with `EIP712` and is recommended as an alternative. ([#3816](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3816)) +- `SafeERC20`: Refactored `safeDecreaseAllowance` and `safeIncreaseAllowance` to support USDT-like tokens. ([#4260](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4260)) +- `SafeERC20`: Removed `safePermit` in favor of documentation-only `permit` recommendations. Based on recommendations from @trust1995 ([#4582](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4582)) +- `ERC721`: `_approve` no longer allows approving the owner of the tokenId. ([#4377](https://github.com/OpenZeppelin/openzeppelin-contracts/issues/4377)) `_setApprovalForAll` no longer allows setting address(0) as an operator. ([#4377](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4377)) +- `ERC721`: Renamed `_requireMinted` to `_requireOwned` and added a return value with the current owner. Implemented `ownerOf` in terms of `_requireOwned`. ([#4566](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4566)) +- `ERC721Consecutive`: Added a `_firstConsecutiveId` internal function that can be overridden to change the id of the first token minted through `_mintConsecutive`. ([#4097](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4097)) +- `ERC721URIStorage`: Allow setting the token URI prior to minting. ([#4559](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4559)) +- `ERC721URIStorage`, `ERC721Royalty`: Stop resetting token-specific URI and royalties when burning. ([#4561](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4561)) +- `ERC1155`: Optimized array allocation. ([#4196](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4196)) +- `ERC1155`: Removed check for address zero in `balanceOf`. ([#4263](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4263)) +- `ERC1155`: Optimized array accesses by skipping bounds checking when unnecessary. ([#4300](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4300)) +- `ERC1155`: Bubble errors triggered in the `onERC1155Received` and `onERC1155BatchReceived` hooks. ([#4314](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4314)) +- `ERC1155Supply`: Added a `totalSupply()` function that returns the total amount of token circulating, this change will restrict the total tokens minted across all ids to 2**256-1 . ([#3962](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3962)) +- `ERC1155Receiver`: Removed in favor of `ERC1155Holder`. ([#4450](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4450)) + +#### Utils + +- `Address`: Removed the ability to customize error messages. A common custom error is always used if the underlying revert reason cannot be bubbled up. ([#4502](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4502)) +- `Arrays`: Added `unsafeMemoryAccess` helpers to read from a memory array without checking the length. ([#4300](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4300)) +- `Arrays`: Optimized `findUpperBound` by removing redundant SLOAD. ([#4442](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4442)) +- `Checkpoints`: Library moved from `utils` to `utils/structs` ([#4275](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4275)) +- `DoubleEndedQueue`: Refactored internal structure to use `uint128` instead of `int128`. This has no effect on the library interface. ([#4150](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4150)) +- `ECDSA`: Use unchecked arithmetic for the `tryRecover` function that receives the `r` and `vs` short-signature fields separately. ([#4301](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4301)) +- `EIP712`: Added internal getters for the name and version strings ([#4303](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4303)) +- `Math`: Makes `ceilDiv` to revert on 0 division even if the numerator is 0 ([#4348](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4348)) +- `Math`: Optimized stack operations in `mulDiv`. ([#4494](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4494)) +- `Math`: Renamed members of `Rounding` enum, and added a new rounding mode for "away from zero". ([#4455](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4455)) +- `MerkleProof`: Use custom error to report invalid multiproof instead of reverting with overflow panic. ([#4564](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4564)) +- `MessageHashUtils`: Added a new library for creating message digest to be used along with signing or recovery such as ECDSA or ERC-1271. These functions are moved from the `ECDSA` library. ([#4430](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4430)) +- `Nonces`: Added a new contract to keep track of user nonces. Used for signatures in `ERC20Permit`, `ERC20Votes`, and `ERC721Votes`. ([#3816](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3816)) +- `ReentrancyGuard`, `Pausable`: Moved to `utils` directory. ([#4551](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4551)) +- `Strings`: Renamed `toString(int256)` to `toStringSigned(int256)`. ([#4330](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4330)) +- Optimized `Strings.equal` ([#4262](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4262)) + +### How to migrate from 4.x #### ERC20, ERC721, and ERC1155 -These breaking changes will require modifications to ERC20, ERC721, and ERC1155 contracts, since the `_afterTokenTransfer` and `_beforeTokenTransfer` functions were removed. Any customization made through those hooks should now be done overriding the new `_update` function instead. +These breaking changes will require modifications to ERC20, ERC721, and ERC1155 contracts, since the `_afterTokenTransfer` and `_beforeTokenTransfer` functions were removed. Thus, any customization made through those hooks should now be done overriding the new `_update` function instead. Minting and burning are implemented by `_update` and customizations should be done by overriding this function as well. `_transfer`, `_mint` and `_burn` are no longer virtual (meaning they are not overridable) to guard against possible inconsistencies. For example, a contract using `ERC20`'s `_beforeTokenTransfer` hook would have to be changed in the following way. ```diff -- function _beforeTokenTransfer( -+ function _update( - address from, - address to, - uint256 amount - ) internal virtual override { -- super._beforeTokenTransfer(from, to, amount); - require(!condition(), "ERC20: wrong condition"); -+ super._update(from, to, amount); - } +-function _beforeTokenTransfer( ++function _update( + address from, + address to, + uint256 amount + ) internal virtual override { +- super._beforeTokenTransfer(from, to, amount); + require(!condition(), "ERC20: wrong condition"); ++ super._update(from, to, amount); + } ``` -### More about ERC721 +#### More about ERC721 -In the case of `ERC721`, the `_update` function does not include a `from` parameter, as the sender is implicitly the previous owner of the `tokenId`. The address of -this previous owner is returned by the `_update` function, so it can be used for a posteriori checks. In addition to `to` and `tokenId`, a third parameter (`auth`) is -present in this function. This parameter enabled an optional check that the caller/spender is approved to do the transfer. This check cannot be performed after the transfer (because the transfer resets the approval), and doing it before `_update` would require a duplicate call to `_ownerOf`. +In the case of `ERC721`, the `_update` function does not include a `from` parameter, as the sender is implicitly the previous owner of the `tokenId`. The address of this previous owner is returned by the `_update` function, so it can be used for a posteriori checks. In addition to `to` and `tokenId`, a third parameter (`auth`) is present in this function. This parameter enabled an optional check that the caller/spender is approved to do the transfer. This check cannot be performed after the transfer (because the transfer resets the approval), and doing it before `_update` would require a duplicate call to `_ownerOf`. -In this logic of removing hidden SLOADs, the `_isApprovedOrOwner` function was removed in favor of a new `_isAuthorized` function. Overrides that used to target the -`_isApprovedOrOwner` should now be performed on the `_isAuthorized` function. Calls to `_isApprovedOrOwner` that preceded a call to `_transfer`, `_burn` or `_approve` -should be removed in favor of using the `auth` argument in `_update` and `_approve`. This is showcased in `ERC721Burnable.burn` and in `ERC721Wrapper.withdrawTo`. +In this logic of removing hidden SLOADs, the `_isApprovedOrOwner` function was removed in favor of a new `_isAuthorized` function. Overrides that used to target the `_isApprovedOrOwner` should now be performed on the `_isAuthorized` function. Calls to `_isApprovedOrOwner` that preceded a call to `_transfer`, `_burn` or `_approve` should be removed in favor of using the `auth` argument in `_update` and `_approve`. This is showcased in `ERC721Burnable.burn` and in `ERC721Wrapper.withdrawTo`. The `_exists` function was removed. Calls to this function can be replaced by `_ownerOf(tokenId) != address(0)`. @@ -71,10 +186,68 @@ Users that were registering EIP-165 interfaces with `_registerInterface` from `E ```solidity function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { - return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); + return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); } ``` +#### Adapting Governor modules + +Custom Governor modules that override internal functions may require modifications if migrated to v5. In particular, the new internal functions `_queueOperations` and `_executeOperations` may need to be used. If assistance with this migration is needed reach out via the [OpenZeppelin Support Forum](https://forum.openzeppelin.com/c/support/contracts/18). + +#### ECDSA and MessageHashUtils + +The `ECDSA` library is now focused on signer recovery. Previously it also included utility methods for producing digests to be used with signing or recovery. These utilities have been moved to the `MessageHashUtils` library and should be imported if needed: + +```diff + import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; ++import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; + + contract Verifier { + using ECDSA for bytes32; ++ using MessageHashUtils for bytes32; + + function _verify(bytes32 data, bytes memory signature, address account) internal pure returns (bool) { + return data + .toEthSignedMessageHash() + .recover(signature) == account; + } + } +``` + +#### Interfaces and libraries in upgradeable contracts + +The upgradeable version of the contracts library used to include a variant suffixed with `Upgradeable` for every contract. These variants, which are produced automatically, mainly include changes for dealing with storage that don't apply to libraries and interfaces. + +The upgradeable library no longer includes upgradeable variants for libraries and interfaces. Projects migrating to 5.0 should replace their library and interface imports with their corresponding non-upgradeable version: + +```diff + // Libraries +-import {AddressUpgradeable} from '@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol'; ++import {Address} from '@openzeppelin/contracts/utils/Address.sol'; + + // Interfaces +-import {IERC20Upgradeable} from '@openzeppelin/contracts-upgradeable/interfaces/IERC20.sol'; ++import {IERC20} from '@openzeppelin/contracts/interfaces/IERC20.sol'; +``` + +#### Offchain Considerations + +Some changes may affect offchain systems if they rely on assumptions that are changed along with these new breaking changes. These cases are: + +##### Relying on revert strings for processing errors + +A concrete example is AccessControl, where it was previously advised to catch revert reasons using the following regex: + +``` +/^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ +``` + +Instead, contracts now revert with custom errors. Systems that interact with smart contracts outside of the network should consider reliance on revert strings and possibly support the new custom errors. + +##### Relying on storage locations for retrieving data + +After 5.0, the storage location of some variables were changed. This is the case for `Initializable` and all the upgradeable contracts since they now use namespaced storaged locations. Any system relying on storage locations for retrieving data or detecting capabilities should be updated to support these new locations. + ## 4.9.2 (2023-06-16) - `MerkleProof`: Fix a bug in `processMultiProof` and `processMultiProofCalldata` that allows proving arbitrary leaves if the tree contains a node with value 0 at depth 1. diff --git a/contracts/access/AccessControl.sol b/contracts/access/AccessControl.sol index ccbfec66d..3e3341e9c 100644 --- a/contracts/access/AccessControl.sol +++ b/contracts/access/AccessControl.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/IAccessControl.sol b/contracts/access/IAccessControl.sol index ebb01f2c8..2ac89ca73 100644 --- a/contracts/access/IAccessControl.sol +++ b/contracts/access/IAccessControl.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/Ownable.sol b/contracts/access/Ownable.sol index 3cf113782..bd96f6661 100644 --- a/contracts/access/Ownable.sol +++ b/contracts/access/Ownable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/Ownable2Step.sol b/contracts/access/Ownable2Step.sol index e6bfb1f84..f0427e2fd 100644 --- a/contracts/access/Ownable2Step.sol +++ b/contracts/access/Ownable2Step.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/extensions/AccessControlDefaultAdminRules.sol b/contracts/access/extensions/AccessControlDefaultAdminRules.sol index 454608407..ef71a648c 100644 --- a/contracts/access/extensions/AccessControlDefaultAdminRules.sol +++ b/contracts/access/extensions/AccessControlDefaultAdminRules.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControlDefaultAdminRules.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/AccessControlDefaultAdminRules.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/extensions/AccessControlEnumerable.sol b/contracts/access/extensions/AccessControlEnumerable.sol index 8af95906d..151de05c4 100644 --- a/contracts/access/extensions/AccessControlEnumerable.sol +++ b/contracts/access/extensions/AccessControlEnumerable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/AccessControlEnumerable.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/extensions/IAccessControlDefaultAdminRules.sol b/contracts/access/extensions/IAccessControlDefaultAdminRules.sol index 0e6fa2b28..73531fafa 100644 --- a/contracts/access/extensions/IAccessControlDefaultAdminRules.sol +++ b/contracts/access/extensions/IAccessControlDefaultAdminRules.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/IAccessControlDefaultAdminRules.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/IAccessControlDefaultAdminRules.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/extensions/IAccessControlEnumerable.sol b/contracts/access/extensions/IAccessControlEnumerable.sol index 1dd28f1a0..a39d05166 100644 --- a/contracts/access/extensions/IAccessControlEnumerable.sol +++ b/contracts/access/extensions/IAccessControlEnumerable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/IAccessControlEnumerable.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/manager/AccessManaged.sol b/contracts/access/manager/AccessManaged.sol index 773ce0dea..b5f45240a 100644 --- a/contracts/access/manager/AccessManaged.sol +++ b/contracts/access/manager/AccessManaged.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/AccessManaged.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/manager/AccessManager.sol b/contracts/access/manager/AccessManager.sol index f42ffaccb..5fef519a7 100644 --- a/contracts/access/manager/AccessManager.sol +++ b/contracts/access/manager/AccessManager.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/AccessManager.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/manager/AuthorityUtils.sol b/contracts/access/manager/AuthorityUtils.sol index caf4ca299..fb3018ca8 100644 --- a/contracts/access/manager/AuthorityUtils.sol +++ b/contracts/access/manager/AuthorityUtils.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/AuthorityUtils.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/manager/IAccessManaged.sol b/contracts/access/manager/IAccessManaged.sol index 0b332be9c..95206bdec 100644 --- a/contracts/access/manager/IAccessManaged.sol +++ b/contracts/access/manager/IAccessManaged.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAccessManaged.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index fc6ffaf8f..3a6dc7311 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAccessManager.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/manager/IAuthority.sol b/contracts/access/manager/IAuthority.sol index 175b967f8..e2d3898fd 100644 --- a/contracts/access/manager/IAuthority.sol +++ b/contracts/access/manager/IAuthority.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAuthority.sol) pragma solidity ^0.8.20; diff --git a/contracts/finance/VestingWallet.sol b/contracts/finance/VestingWallet.sol index b0a4d18d4..5abb7cdad 100644 --- a/contracts/finance/VestingWallet.sol +++ b/contracts/finance/VestingWallet.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (finance/VestingWallet.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (finance/VestingWallet.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol"; diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index c2a60ce73..830c9d83c 100644 --- a/contracts/governance/Governor.sol +++ b/contracts/governance/Governor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.1) (governance/Governor.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/Governor.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/IGovernor.sol b/contracts/governance/IGovernor.sol index e05e7b379..6cde0e86d 100644 --- a/contracts/governance/IGovernor.sol +++ b/contracts/governance/IGovernor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/IGovernor.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/IGovernor.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/TimelockController.sol b/contracts/governance/TimelockController.sol index 4439b9b8b..349d940fd 100644 --- a/contracts/governance/TimelockController.sol +++ b/contracts/governance/TimelockController.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/TimelockController.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/TimelockController.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorCountingSimple.sol b/contracts/governance/extensions/GovernorCountingSimple.sol index 87f9b39f5..ac9c22aab 100644 --- a/contracts/governance/extensions/GovernorCountingSimple.sol +++ b/contracts/governance/extensions/GovernorCountingSimple.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorCountingSimple.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorCountingSimple.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorPreventLateQuorum.sol b/contracts/governance/extensions/GovernorPreventLateQuorum.sol index 7f644fe7c..ff80af648 100644 --- a/contracts/governance/extensions/GovernorPreventLateQuorum.sol +++ b/contracts/governance/extensions/GovernorPreventLateQuorum.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorPreventLateQuorum.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorPreventLateQuorum.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorSettings.sol b/contracts/governance/extensions/GovernorSettings.sol index 3b577aad8..7347ee293 100644 --- a/contracts/governance/extensions/GovernorSettings.sol +++ b/contracts/governance/extensions/GovernorSettings.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorSettings.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorSettings.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorStorage.sol b/contracts/governance/extensions/GovernorStorage.sol index 9c5b2d3f7..2547b553b 100644 --- a/contracts/governance/extensions/GovernorStorage.sol +++ b/contracts/governance/extensions/GovernorStorage.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorStorage.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorTimelockAccess.sol b/contracts/governance/extensions/GovernorTimelockAccess.sol index 0c6dbeab2..a2373a4ff 100644 --- a/contracts/governance/extensions/GovernorTimelockAccess.sol +++ b/contracts/governance/extensions/GovernorTimelockAccess.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorTimelockAccess.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorTimelockCompound.sol b/contracts/governance/extensions/GovernorTimelockCompound.sol index 617925f3f..117df01ad 100644 --- a/contracts/governance/extensions/GovernorTimelockCompound.sol +++ b/contracts/governance/extensions/GovernorTimelockCompound.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorTimelockCompound.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorTimelockCompound.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorTimelockControl.sol b/contracts/governance/extensions/GovernorTimelockControl.sol index 6c08b32ed..53503cc66 100644 --- a/contracts/governance/extensions/GovernorTimelockControl.sol +++ b/contracts/governance/extensions/GovernorTimelockControl.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorTimelockControl.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorTimelockControl.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorVotes.sol b/contracts/governance/extensions/GovernorVotes.sol index b9a7b4384..ec32ba478 100644 --- a/contracts/governance/extensions/GovernorVotes.sol +++ b/contracts/governance/extensions/GovernorVotes.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotes.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorVotes.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorVotesQuorumFraction.sol b/contracts/governance/extensions/GovernorVotesQuorumFraction.sol index eefe665ab..85a1f9826 100644 --- a/contracts/governance/extensions/GovernorVotesQuorumFraction.sol +++ b/contracts/governance/extensions/GovernorVotesQuorumFraction.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotesQuorumFraction.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorVotesQuorumFraction.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/utils/IVotes.sol b/contracts/governance/utils/IVotes.sol index fe47bcf36..7ba012e67 100644 --- a/contracts/governance/utils/IVotes.sol +++ b/contracts/governance/utils/IVotes.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/IVotes.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/utils/IVotes.sol) pragma solidity ^0.8.20; /** diff --git a/contracts/governance/utils/Votes.sol b/contracts/governance/utils/Votes.sol index 84587c3af..9f9667653 100644 --- a/contracts/governance/utils/Votes.sol +++ b/contracts/governance/utils/Votes.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/Votes.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (governance/utils/Votes.sol) pragma solidity ^0.8.20; import {IERC5805} from "../../interfaces/IERC5805.sol"; diff --git a/contracts/interfaces/IERC1155.sol b/contracts/interfaces/IERC1155.sol index 783c897be..bb502b1da 100644 --- a/contracts/interfaces/IERC1155.sol +++ b/contracts/interfaces/IERC1155.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC1155MetadataURI.sol b/contracts/interfaces/IERC1155MetadataURI.sol index 3c8cdb553..dac0bab54 100644 --- a/contracts/interfaces/IERC1155MetadataURI.sol +++ b/contracts/interfaces/IERC1155MetadataURI.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155MetadataURI.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155MetadataURI.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC1155Receiver.sol b/contracts/interfaces/IERC1155Receiver.sol index 1b5cd4b8d..6bb7c9684 100644 --- a/contracts/interfaces/IERC1155Receiver.sol +++ b/contracts/interfaces/IERC1155Receiver.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155Receiver.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155Receiver.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC1271.sol b/contracts/interfaces/IERC1271.sol index 49c7df1c8..a56057ba5 100644 --- a/contracts/interfaces/IERC1271.sol +++ b/contracts/interfaces/IERC1271.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1271.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC1363.sol b/contracts/interfaces/IERC1363.sol index d1b555a11..8b02aba5e 100644 --- a/contracts/interfaces/IERC1363.sol +++ b/contracts/interfaces/IERC1363.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1363.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC1363Receiver.sol b/contracts/interfaces/IERC1363Receiver.sol index 61f32ba34..64d669d4a 100644 --- a/contracts/interfaces/IERC1363Receiver.sol +++ b/contracts/interfaces/IERC1363Receiver.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363Receiver.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1363Receiver.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC1363Spender.sol b/contracts/interfaces/IERC1363Spender.sol index ab9e62140..f2215418a 100644 --- a/contracts/interfaces/IERC1363Spender.sol +++ b/contracts/interfaces/IERC1363Spender.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363Spender.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1363Spender.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC165.sol b/contracts/interfaces/IERC165.sol index 53945fcb3..944dd0d59 100644 --- a/contracts/interfaces/IERC165.sol +++ b/contracts/interfaces/IERC165.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC1820Implementer.sol b/contracts/interfaces/IERC1820Implementer.sol index 03b6245e0..38e8a4e9b 100644 --- a/contracts/interfaces/IERC1820Implementer.sol +++ b/contracts/interfaces/IERC1820Implementer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Implementer.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1820Implementer.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC1820Registry.sol b/contracts/interfaces/IERC1820Registry.sol index a88e4ba8e..bf0140a12 100644 --- a/contracts/interfaces/IERC1820Registry.sol +++ b/contracts/interfaces/IERC1820Registry.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (utils/introspection/IERC1820Registry.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1820Registry.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC1967.sol b/contracts/interfaces/IERC1967.sol index 6cbcb5a50..d285ec889 100644 --- a/contracts/interfaces/IERC1967.sol +++ b/contracts/interfaces/IERC1967.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC20.sol b/contracts/interfaces/IERC20.sol index 9f72f9e0b..21d5a4132 100644 --- a/contracts/interfaces/IERC20.sol +++ b/contracts/interfaces/IERC20.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC20Metadata.sol b/contracts/interfaces/IERC20Metadata.sol index fce1d8deb..b7bc6916f 100644 --- a/contracts/interfaces/IERC20Metadata.sol +++ b/contracts/interfaces/IERC20Metadata.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20Metadata.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20Metadata.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC2309.sol b/contracts/interfaces/IERC2309.sol index d4e80c82c..aa00f3417 100644 --- a/contracts/interfaces/IERC2309.sol +++ b/contracts/interfaces/IERC2309.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (interfaces/IERC2309.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2309.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC2612.sol b/contracts/interfaces/IERC2612.sol index e27ba7ffe..c0427bbfd 100644 --- a/contracts/interfaces/IERC2612.sol +++ b/contracts/interfaces/IERC2612.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2612.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2612.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC2981.sol b/contracts/interfaces/IERC2981.sol index eabe34929..9e7871df2 100644 --- a/contracts/interfaces/IERC2981.sol +++ b/contracts/interfaces/IERC2981.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC3156.sol b/contracts/interfaces/IERC3156.sol index 8721e3082..0f48bf387 100644 --- a/contracts/interfaces/IERC3156.sol +++ b/contracts/interfaces/IERC3156.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC3156.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC3156FlashBorrower.sol b/contracts/interfaces/IERC3156FlashBorrower.sol index c3f9d6158..53e17ea63 100644 --- a/contracts/interfaces/IERC3156FlashBorrower.sol +++ b/contracts/interfaces/IERC3156FlashBorrower.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC3156FlashBorrower.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC3156FlashBorrower.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC3156FlashLender.sol b/contracts/interfaces/IERC3156FlashLender.sol index 5a18adb40..cfae3c0b7 100644 --- a/contracts/interfaces/IERC3156FlashLender.sol +++ b/contracts/interfaces/IERC3156FlashLender.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156FlashLender.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC3156FlashLender.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC4626.sol b/contracts/interfaces/IERC4626.sol index e1b778e65..cfff53b97 100644 --- a/contracts/interfaces/IERC4626.sol +++ b/contracts/interfaces/IERC4626.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4626.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4626.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC4906.sol b/contracts/interfaces/IERC4906.sol index 1f129450e..bc008e397 100644 --- a/contracts/interfaces/IERC4906.sol +++ b/contracts/interfaces/IERC4906.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4906.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4906.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC5267.sol b/contracts/interfaces/IERC5267.sol index eeda3ea53..47a9fd588 100644 --- a/contracts/interfaces/IERC5267.sol +++ b/contracts/interfaces/IERC5267.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC5313.sol b/contracts/interfaces/IERC5313.sol index 86adb8ef2..62f8d75c5 100644 --- a/contracts/interfaces/IERC5313.sol +++ b/contracts/interfaces/IERC5313.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5313.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5313.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC5805.sol b/contracts/interfaces/IERC5805.sol index 7b562b18f..a89e22df4 100644 --- a/contracts/interfaces/IERC5805.sol +++ b/contracts/interfaces/IERC5805.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5805.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5805.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC6372.sol b/contracts/interfaces/IERC6372.sol index 0627254a6..7d2ea4a55 100644 --- a/contracts/interfaces/IERC6372.sol +++ b/contracts/interfaces/IERC6372.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC6372.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC6372.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC721.sol b/contracts/interfaces/IERC721.sol index d9b8070f3..0ea735bb3 100644 --- a/contracts/interfaces/IERC721.sol +++ b/contracts/interfaces/IERC721.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC721Enumerable.sol b/contracts/interfaces/IERC721Enumerable.sol index 216139911..d83a05621 100644 --- a/contracts/interfaces/IERC721Enumerable.sol +++ b/contracts/interfaces/IERC721Enumerable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Enumerable.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC721Metadata.sol b/contracts/interfaces/IERC721Metadata.sol index 4dc4becf8..d79dd6869 100644 --- a/contracts/interfaces/IERC721Metadata.sol +++ b/contracts/interfaces/IERC721Metadata.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Metadata.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Metadata.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC721Receiver.sol b/contracts/interfaces/IERC721Receiver.sol index 0987da198..6b2a5aa67 100644 --- a/contracts/interfaces/IERC721Receiver.sol +++ b/contracts/interfaces/IERC721Receiver.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Receiver.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC777.sol b/contracts/interfaces/IERC777.sol index 651909047..56dfbef51 100644 --- a/contracts/interfaces/IERC777.sol +++ b/contracts/interfaces/IERC777.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC777.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC777Recipient.sol b/contracts/interfaces/IERC777Recipient.sol index 65a60feac..6378e1409 100644 --- a/contracts/interfaces/IERC777Recipient.sol +++ b/contracts/interfaces/IERC777Recipient.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC777Recipient.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/IERC777Sender.sol b/contracts/interfaces/IERC777Sender.sol index 99e508688..5c0ec0b57 100644 --- a/contracts/interfaces/IERC777Sender.sol +++ b/contracts/interfaces/IERC777Sender.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC777Sender.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/draft-IERC1822.sol b/contracts/interfaces/draft-IERC1822.sol index 52023a5f9..4d0f0f885 100644 --- a/contracts/interfaces/draft-IERC1822.sol +++ b/contracts/interfaces/draft-IERC1822.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/draft-IERC6093.sol b/contracts/interfaces/draft-IERC6093.sol index c38379ac4..f6990e607 100644 --- a/contracts/interfaces/draft-IERC6093.sol +++ b/contracts/interfaces/draft-IERC6093.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** diff --git a/contracts/metatx/ERC2771Context.sol b/contracts/metatx/ERC2771Context.sol index 1084afb15..ab9546bc8 100644 --- a/contracts/metatx/ERC2771Context.sol +++ b/contracts/metatx/ERC2771Context.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (metatx/ERC2771Context.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (metatx/ERC2771Context.sol) pragma solidity ^0.8.20; diff --git a/contracts/metatx/ERC2771Forwarder.sol b/contracts/metatx/ERC2771Forwarder.sol index f580f8729..4815c1a1d 100644 --- a/contracts/metatx/ERC2771Forwarder.sol +++ b/contracts/metatx/ERC2771Forwarder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (metatx/ERC2771Forwarder.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (metatx/ERC2771Forwarder.sol) pragma solidity ^0.8.20; diff --git a/contracts/package.json b/contracts/package.json index 9017953ca..be3e741e3 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,7 +1,7 @@ { "name": "@openzeppelin/contracts", "description": "Secure Smart Contract library for Solidity", - "version": "4.9.2", + "version": "5.0.0", "files": [ "**/*.sol", "/build/contracts/*.json", diff --git a/contracts/proxy/Clones.sol b/contracts/proxy/Clones.sol index ae7525fe4..95e467d3e 100644 --- a/contracts/proxy/Clones.sol +++ b/contracts/proxy/Clones.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Clones.sol) pragma solidity ^0.8.20; diff --git a/contracts/proxy/ERC1967/ERC1967Proxy.sol b/contracts/proxy/ERC1967/ERC1967Proxy.sol index 527e8c55a..0fa61b5b3 100644 --- a/contracts/proxy/ERC1967/ERC1967Proxy.sol +++ b/contracts/proxy/ERC1967/ERC1967Proxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Proxy.sol) pragma solidity ^0.8.20; diff --git a/contracts/proxy/ERC1967/ERC1967Utils.sol b/contracts/proxy/ERC1967/ERC1967Utils.sol index b9306480b..e55bae20c 100644 --- a/contracts/proxy/ERC1967/ERC1967Utils.sol +++ b/contracts/proxy/ERC1967/ERC1967Utils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Utils.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol) pragma solidity ^0.8.20; diff --git a/contracts/proxy/Proxy.sol b/contracts/proxy/Proxy.sol index 993acec88..0e736512c 100644 --- a/contracts/proxy/Proxy.sol +++ b/contracts/proxy/Proxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol) pragma solidity ^0.8.20; diff --git a/contracts/proxy/beacon/BeaconProxy.sol b/contracts/proxy/beacon/BeaconProxy.sol index 6694f7a9c..05e26e5d5 100644 --- a/contracts/proxy/beacon/BeaconProxy.sol +++ b/contracts/proxy/beacon/BeaconProxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/BeaconProxy.sol) pragma solidity ^0.8.20; diff --git a/contracts/proxy/beacon/IBeacon.sol b/contracts/proxy/beacon/IBeacon.sol index 56477c92a..36a3c76e9 100644 --- a/contracts/proxy/beacon/IBeacon.sol +++ b/contracts/proxy/beacon/IBeacon.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.20; diff --git a/contracts/proxy/beacon/UpgradeableBeacon.sol b/contracts/proxy/beacon/UpgradeableBeacon.sol index a7816a1e6..8db9bd232 100644 --- a/contracts/proxy/beacon/UpgradeableBeacon.sol +++ b/contracts/proxy/beacon/UpgradeableBeacon.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/UpgradeableBeacon.sol) pragma solidity ^0.8.20; diff --git a/contracts/proxy/transparent/ProxyAdmin.sol b/contracts/proxy/transparent/ProxyAdmin.sol index cd03fb939..dab55ef2a 100644 --- a/contracts/proxy/transparent/ProxyAdmin.sol +++ b/contracts/proxy/transparent/ProxyAdmin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/transparent/ProxyAdmin.sol) pragma solidity ^0.8.20; diff --git a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol index db19ce568..b2021c74b 100644 --- a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +++ b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/transparent/TransparentUpgradeableProxy.sol) pragma solidity ^0.8.20; diff --git a/contracts/proxy/utils/Initializable.sol b/contracts/proxy/utils/Initializable.sol index 75a018b0c..b3d82b586 100644 --- a/contracts/proxy/utils/Initializable.sol +++ b/contracts/proxy/utils/Initializable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; diff --git a/contracts/proxy/utils/UUPSUpgradeable.sol b/contracts/proxy/utils/UUPSUpgradeable.sol index f08e61c1e..8a4e693ae 100644 --- a/contracts/proxy/utils/UUPSUpgradeable.sol +++ b/contracts/proxy/utils/UUPSUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/ERC1155.sol b/contracts/token/ERC1155/ERC1155.sol index becd973bd..316f3291e 100644 --- a/contracts/token/ERC1155/ERC1155.sol +++ b/contracts/token/ERC1155/ERC1155.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/IERC1155.sol b/contracts/token/ERC1155/IERC1155.sol index ac931704f..a014946b0 100644 --- a/contracts/token/ERC1155/IERC1155.sol +++ b/contracts/token/ERC1155/IERC1155.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/IERC1155Receiver.sol b/contracts/token/ERC1155/IERC1155Receiver.sol index 6517621b7..0f6e2bf85 100644 --- a/contracts/token/ERC1155/IERC1155Receiver.sol +++ b/contracts/token/ERC1155/IERC1155Receiver.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/extensions/ERC1155Burnable.sol b/contracts/token/ERC1155/extensions/ERC1155Burnable.sol index 57f03f699..fd6ad61dd 100644 --- a/contracts/token/ERC1155/extensions/ERC1155Burnable.sol +++ b/contracts/token/ERC1155/extensions/ERC1155Burnable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/extensions/ERC1155Pausable.sol b/contracts/token/ERC1155/extensions/ERC1155Pausable.sol index 96f2400f8..529a46523 100644 --- a/contracts/token/ERC1155/extensions/ERC1155Pausable.sol +++ b/contracts/token/ERC1155/extensions/ERC1155Pausable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC1155/extensions/ERC1155Pausable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155Pausable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/extensions/ERC1155Supply.sol b/contracts/token/ERC1155/extensions/ERC1155Supply.sol index bbf5e2a8f..cef11b4c2 100644 --- a/contracts/token/ERC1155/extensions/ERC1155Supply.sol +++ b/contracts/token/ERC1155/extensions/ERC1155Supply.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol b/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol index b766d9adc..c2a5bdced 100644 --- a/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol +++ b/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol b/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol index 9b06fb6ad..e3fb74df0 100644 --- a/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol +++ b/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/utils/ERC1155Holder.sol b/contracts/token/ERC1155/utils/ERC1155Holder.sol index 7c8d470e0..b108cdbf6 100644 --- a/contracts/token/ERC1155/utils/ERC1155Holder.sol +++ b/contracts/token/ERC1155/utils/ERC1155Holder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/utils/ERC1155Holder.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index aa433ea2f..1fde5279d 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/contracts/token/ERC20/ERC20.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/IERC20.sol b/contracts/token/ERC20/IERC20.sol index 77ca716bd..db01cf4c7 100644 --- a/contracts/token/ERC20/IERC20.sol +++ b/contracts/token/ERC20/IERC20.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20Burnable.sol b/contracts/token/ERC20/extensions/ERC20Burnable.sol index 6233e8c10..4d482d8ec 100644 --- a/contracts/token/ERC20/extensions/ERC20Burnable.sol +++ b/contracts/token/ERC20/extensions/ERC20Burnable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20Capped.sol b/contracts/token/ERC20/extensions/ERC20Capped.sol index 523c2670c..56bafb3ad 100644 --- a/contracts/token/ERC20/extensions/ERC20Capped.sol +++ b/contracts/token/ERC20/extensions/ERC20Capped.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Capped.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Capped.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20FlashMint.sol b/contracts/token/ERC20/extensions/ERC20FlashMint.sol index 2cba0e2a5..0e8931278 100644 --- a/contracts/token/ERC20/extensions/ERC20FlashMint.sol +++ b/contracts/token/ERC20/extensions/ERC20FlashMint.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/ERC20FlashMint.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20FlashMint.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20Pausable.sol b/contracts/token/ERC20/extensions/ERC20Pausable.sol index e7c311cc1..8fe832b99 100644 --- a/contracts/token/ERC20/extensions/ERC20Pausable.sol +++ b/contracts/token/ERC20/extensions/ERC20Pausable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Pausable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Pausable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20Permit.sol b/contracts/token/ERC20/extensions/ERC20Permit.sol index 4165fbaca..36667adf1 100644 --- a/contracts/token/ERC20/extensions/ERC20Permit.sol +++ b/contracts/token/ERC20/extensions/ERC20Permit.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Permit.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20Votes.sol b/contracts/token/ERC20/extensions/ERC20Votes.sol index 0ec1e6059..6aa6ed05e 100644 --- a/contracts/token/ERC20/extensions/ERC20Votes.sol +++ b/contracts/token/ERC20/extensions/ERC20Votes.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Votes.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Votes.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20Wrapper.sol b/contracts/token/ERC20/extensions/ERC20Wrapper.sol index 0dfbbd4aa..61448803b 100644 --- a/contracts/token/ERC20/extensions/ERC20Wrapper.sol +++ b/contracts/token/ERC20/extensions/ERC20Wrapper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Wrapper.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Wrapper.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC4626.sol b/contracts/token/ERC20/extensions/ERC4626.sol index adc4f661b..ec6087231 100644 --- a/contracts/token/ERC20/extensions/ERC4626.sol +++ b/contracts/token/ERC20/extensions/ERC4626.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC4626.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC4626.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/IERC20Metadata.sol b/contracts/token/ERC20/extensions/IERC20Metadata.sol index 9056e34ed..1a38cba3e 100644 --- a/contracts/token/ERC20/extensions/IERC20Metadata.sol +++ b/contracts/token/ERC20/extensions/IERC20Metadata.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/IERC20Permit.sol b/contracts/token/ERC20/extensions/IERC20Permit.sol index b3260f305..5af48101a 100644 --- a/contracts/token/ERC20/extensions/IERC20Permit.sol +++ b/contracts/token/ERC20/extensions/IERC20Permit.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/utils/SafeERC20.sol b/contracts/token/ERC20/utils/SafeERC20.sol index 69370a4b0..bb65709b4 100644 --- a/contracts/token/ERC20/utils/SafeERC20.sol +++ b/contracts/token/ERC20/utils/SafeERC20.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/ERC721.sol b/contracts/token/ERC721/ERC721.sol index bf711689f..98a80e52c 100644 --- a/contracts/token/ERC721/ERC721.sol +++ b/contracts/token/ERC721/ERC721.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/IERC721.sol b/contracts/token/ERC721/IERC721.sol index b66d922db..12f323634 100644 --- a/contracts/token/ERC721/IERC721.sol +++ b/contracts/token/ERC721/IERC721.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/IERC721Receiver.sol b/contracts/token/ERC721/IERC721Receiver.sol index 06a286ba1..f9dc1332b 100644 --- a/contracts/token/ERC721/IERC721Receiver.sol +++ b/contracts/token/ERC721/IERC721Receiver.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721Burnable.sol b/contracts/token/ERC721/extensions/ERC721Burnable.sol index eecbd6435..2a150afb8 100644 --- a/contracts/token/ERC721/extensions/ERC721Burnable.sol +++ b/contracts/token/ERC721/extensions/ERC721Burnable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721Consecutive.sol b/contracts/token/ERC721/extensions/ERC721Consecutive.sol index d5f995576..0d6cbc7e4 100644 --- a/contracts/token/ERC721/extensions/ERC721Consecutive.sol +++ b/contracts/token/ERC721/extensions/ERC721Consecutive.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Consecutive.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Consecutive.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721Enumerable.sol b/contracts/token/ERC721/extensions/ERC721Enumerable.sol index 1b7cb650f..cbf3e03f7 100644 --- a/contracts/token/ERC721/extensions/ERC721Enumerable.sol +++ b/contracts/token/ERC721/extensions/ERC721Enumerable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721Pausable.sol b/contracts/token/ERC721/extensions/ERC721Pausable.sol index 420edab22..0b34fd9c1 100644 --- a/contracts/token/ERC721/extensions/ERC721Pausable.sol +++ b/contracts/token/ERC721/extensions/ERC721Pausable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/extensions/ERC721Pausable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Pausable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721Royalty.sol b/contracts/token/ERC721/extensions/ERC721Royalty.sol index 397f0d4f5..be98ec7c5 100644 --- a/contracts/token/ERC721/extensions/ERC721Royalty.sol +++ b/contracts/token/ERC721/extensions/ERC721Royalty.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Royalty.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Royalty.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721URIStorage.sol b/contracts/token/ERC721/extensions/ERC721URIStorage.sol index e515f2369..2584cb58b 100644 --- a/contracts/token/ERC721/extensions/ERC721URIStorage.sol +++ b/contracts/token/ERC721/extensions/ERC721URIStorage.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721URIStorage.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721Votes.sol b/contracts/token/ERC721/extensions/ERC721Votes.sol index 91e464173..562871514 100644 --- a/contracts/token/ERC721/extensions/ERC721Votes.sol +++ b/contracts/token/ERC721/extensions/ERC721Votes.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Votes.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Votes.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721Wrapper.sol b/contracts/token/ERC721/extensions/ERC721Wrapper.sol index 72cef509f..e091bdd9f 100644 --- a/contracts/token/ERC721/extensions/ERC721Wrapper.sol +++ b/contracts/token/ERC721/extensions/ERC721Wrapper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Wrapper.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Wrapper.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/IERC721Enumerable.sol b/contracts/token/ERC721/extensions/IERC721Enumerable.sol index d490998e4..7a09cc6a0 100644 --- a/contracts/token/ERC721/extensions/IERC721Enumerable.sol +++ b/contracts/token/ERC721/extensions/IERC721Enumerable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/IERC721Metadata.sol b/contracts/token/ERC721/extensions/IERC721Metadata.sol index 9a0a67774..e9e00fab6 100644 --- a/contracts/token/ERC721/extensions/IERC721Metadata.sol +++ b/contracts/token/ERC721/extensions/IERC721Metadata.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/utils/ERC721Holder.sol b/contracts/token/ERC721/utils/ERC721Holder.sol index 4ffd16146..6bb23ace5 100644 --- a/contracts/token/ERC721/utils/ERC721Holder.sol +++ b/contracts/token/ERC721/utils/ERC721Holder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/utils/ERC721Holder.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/utils/ERC721Holder.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/common/ERC2981.sol b/contracts/token/common/ERC2981.sol index bdcbf2f74..fce02514d 100644 --- a/contracts/token/common/ERC2981.sol +++ b/contracts/token/common/ERC2981.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (token/common/ERC2981.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/Address.sol b/contracts/utils/Address.sol index fd22b05ab..b7e305952 100644 --- a/contracts/utils/Address.sol +++ b/contracts/utils/Address.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/Arrays.sol b/contracts/utils/Arrays.sol index e051d4b71..aaab3ce59 100644 --- a/contracts/utils/Arrays.sol +++ b/contracts/utils/Arrays.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Arrays.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Arrays.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/Base64.sol b/contracts/utils/Base64.sol index bd3562bd5..f8547d1cc 100644 --- a/contracts/utils/Base64.sol +++ b/contracts/utils/Base64.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Base64.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/Context.sol b/contracts/utils/Context.sol index 25e115925..9037dcd14 100644 --- a/contracts/utils/Context.sol +++ b/contracts/utils/Context.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/Context.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/Create2.sol b/contracts/utils/Create2.sol index 73bf43ddb..ad1cd5f4d 100644 --- a/contracts/utils/Create2.sol +++ b/contracts/utils/Create2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Create2.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Create2.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/Multicall.sol b/contracts/utils/Multicall.sol index a9a3d3acf..2d925a91e 100644 --- a/contracts/utils/Multicall.sol +++ b/contracts/utils/Multicall.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Multicall.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Multicall.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/Nonces.sol b/contracts/utils/Nonces.sol index ab43e03eb..37451ff93 100644 --- a/contracts/utils/Nonces.sol +++ b/contracts/utils/Nonces.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol) pragma solidity ^0.8.20; /** diff --git a/contracts/utils/Pausable.sol b/contracts/utils/Pausable.sol index 96f80eccc..312f1cb90 100644 --- a/contracts/utils/Pausable.sol +++ b/contracts/utils/Pausable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/ReentrancyGuard.sol b/contracts/utils/ReentrancyGuard.sol index d2de919f5..291d92fd5 100644 --- a/contracts/utils/ReentrancyGuard.sol +++ b/contracts/utils/ReentrancyGuard.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/ShortStrings.sol b/contracts/utils/ShortStrings.sol index 0c046c4c3..fdfe774d6 100644 --- a/contracts/utils/ShortStrings.sol +++ b/contracts/utils/ShortStrings.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/StorageSlot.sol b/contracts/utils/StorageSlot.sol index c853c0e5f..08418327a 100644 --- a/contracts/utils/StorageSlot.sol +++ b/contracts/utils/StorageSlot.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; diff --git a/contracts/utils/Strings.sol b/contracts/utils/Strings.sol index fb5c42af6..b2c0a40fb 100644 --- a/contracts/utils/Strings.sol +++ b/contracts/utils/Strings.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/cryptography/ECDSA.sol b/contracts/utils/cryptography/ECDSA.sol index 4a04a40af..04b3e5e06 100644 --- a/contracts/utils/cryptography/ECDSA.sol +++ b/contracts/utils/cryptography/ECDSA.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol index 644f6f531..8e548cdd8 100644 --- a/contracts/utils/cryptography/EIP712.sol +++ b/contracts/utils/cryptography/EIP712.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/cryptography/MerkleProof.sol b/contracts/utils/cryptography/MerkleProof.sol index 8461e49cc..525f5da34 100644 --- a/contracts/utils/cryptography/MerkleProof.sol +++ b/contracts/utils/cryptography/MerkleProof.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/cryptography/MessageHashUtils.sol b/contracts/utils/cryptography/MessageHashUtils.sol index 0e6d602fe..8836693e7 100644 --- a/contracts/utils/cryptography/MessageHashUtils.sol +++ b/contracts/utils/cryptography/MessageHashUtils.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/cryptography/SignatureChecker.sol b/contracts/utils/cryptography/SignatureChecker.sol index a7f1750cf..59a2c6d90 100644 --- a/contracts/utils/cryptography/SignatureChecker.sol +++ b/contracts/utils/cryptography/SignatureChecker.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/SignatureChecker.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/introspection/ERC165.sol b/contracts/utils/introspection/ERC165.sol index 71c8e4a4f..1e77b60d7 100644 --- a/contracts/utils/introspection/ERC165.sol +++ b/contracts/utils/introspection/ERC165.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/introspection/ERC165Checker.sol b/contracts/utils/introspection/ERC165Checker.sol index bfa59e686..7b5224144 100644 --- a/contracts/utils/introspection/ERC165Checker.sol +++ b/contracts/utils/introspection/ERC165Checker.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165Checker.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/introspection/IERC165.sol b/contracts/utils/introspection/IERC165.sol index 87e7490cd..c09f31fe1 100644 --- a/contracts/utils/introspection/IERC165.sol +++ b/contracts/utils/introspection/IERC165.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/math/Math.sol b/contracts/utils/math/Math.sol index 690373b07..968152452 100644 --- a/contracts/utils/math/Math.sol +++ b/contracts/utils/math/Math.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/math/SafeCast.sol b/contracts/utils/math/SafeCast.sol index cfb99eb75..0ed458b43 100644 --- a/contracts/utils/math/SafeCast.sol +++ b/contracts/utils/math/SafeCast.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.20; diff --git a/contracts/utils/math/SignedMath.sol b/contracts/utils/math/SignedMath.sol index cd8c88f25..66a615162 100644 --- a/contracts/utils/math/SignedMath.sol +++ b/contracts/utils/math/SignedMath.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/structs/BitMaps.sol b/contracts/utils/structs/BitMaps.sol index b9d3de671..40cceb90b 100644 --- a/contracts/utils/structs/BitMaps.sol +++ b/contracts/utils/structs/BitMaps.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/BitMaps.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/BitMaps.sol) pragma solidity ^0.8.20; /** diff --git a/contracts/utils/structs/Checkpoints.sol b/contracts/utils/structs/Checkpoints.sol index 9c849b759..6561b0d68 100644 --- a/contracts/utils/structs/Checkpoints.sol +++ b/contracts/utils/structs/Checkpoints.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/Checkpoints.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/Checkpoints.sol) // This file was procedurally generated from scripts/generate/templates/Checkpoints.js. pragma solidity ^0.8.20; diff --git a/contracts/utils/structs/DoubleEndedQueue.sol b/contracts/utils/structs/DoubleEndedQueue.sol index 294e50a7f..218a2fbd9 100644 --- a/contracts/utils/structs/DoubleEndedQueue.sol +++ b/contracts/utils/structs/DoubleEndedQueue.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/DoubleEndedQueue.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/DoubleEndedQueue.sol) pragma solidity ^0.8.20; /** diff --git a/contracts/utils/structs/EnumerableMap.sol b/contracts/utils/structs/EnumerableMap.sol index 65f9ea26c..929ae7c53 100644 --- a/contracts/utils/structs/EnumerableMap.sol +++ b/contracts/utils/structs/EnumerableMap.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableMap.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableMap.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableMap.js. pragma solidity ^0.8.20; diff --git a/contracts/utils/structs/EnumerableSet.sol b/contracts/utils/structs/EnumerableSet.sol index 425876d19..4c7fc5e1d 100644 --- a/contracts/utils/structs/EnumerableSet.sol +++ b/contracts/utils/structs/EnumerableSet.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; diff --git a/contracts/utils/types/Time.sol b/contracts/utils/types/Time.sol index 12d2659a2..9faef31f0 100644 --- a/contracts/utils/types/Time.sol +++ b/contracts/utils/types/Time.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (utils/types/Time.sol) pragma solidity ^0.8.20; diff --git a/contracts/vendor/compound/ICompoundTimelock.sol b/contracts/vendor/compound/ICompoundTimelock.sol index 00387bdc1..320eea1c6 100644 --- a/contracts/vendor/compound/ICompoundTimelock.sol +++ b/contracts/vendor/compound/ICompoundTimelock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (vendor/compound/ICompoundTimelock.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (vendor/compound/ICompoundTimelock.sol) pragma solidity ^0.8.20; diff --git a/docs/antora.yml b/docs/antora.yml index 20f4a1d89..4bc06b36a 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,6 +1,6 @@ name: contracts title: Contracts -version: 4.x +version: 5.x prerelease: false nav: - modules/ROOT/nav.adoc diff --git a/package.json b/package.json index 55a89746e..c7e92efa0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "openzeppelin-solidity", "description": "Secure Smart Contract library for Solidity", - "version": "4.9.2", + "version": "5.0.0", "private": true, "files": [ "/contracts/**/*.sol", From 793d92a3331538d126033cbacb1ee5b8a7d95adc Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 6 Oct 2023 15:40:03 -0300 Subject: [PATCH 090/167] Document ERC1155 event differences (#4666) --- CHANGELOG.md | 4 ++++ contracts/token/ERC1155/IERC1155.sol | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9575afbb5..1616a5379 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -180,6 +180,10 @@ In this logic of removing hidden SLOADs, the `_isApprovedOrOwner` function was r The `_exists` function was removed. Calls to this function can be replaced by `_ownerOf(tokenId) != address(0)`. +#### More about ERC1155 + +Batch transfers will now emit `TransferSingle` if the batch consists of a single token, while in previous versions the `TransferBatch` event would be used for all transfers initiated through `safeBatchTransferFrom`. Both behaviors are compliant with the ERC-1155 specification. + #### ERC165Storage Users that were registering EIP-165 interfaces with `_registerInterface` from `ERC165Storage` should instead do so so by overriding the `supportsInterface` function as seen below: diff --git a/contracts/token/ERC1155/IERC1155.sol b/contracts/token/ERC1155/IERC1155.sol index a014946b0..461e48b98 100644 --- a/contracts/token/ERC1155/IERC1155.sol +++ b/contracts/token/ERC1155/IERC1155.sol @@ -104,13 +104,12 @@ interface IERC1155 is IERC165 { /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * - * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * - * Emits a {TransferBatch} event. + * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments. * * Requirements: * From faa83c693ad6a7d389d16eabcbea1a8d137242b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 12 Oct 2023 03:24:31 -0600 Subject: [PATCH 091/167] Add note about `SafeMath.sol` remaining functions moved to `Math.sol` (#4676) --- CHANGELOG.md | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1616a5379..249eb76a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,20 +7,20 @@ The following contracts and libraries were added: - `AccessManager`: A consolidated system for managing access control in complex systems. - - `AccessManaged`: A module for connecting a contract to an authority in charge of its access control. - - `GovernorTimelockAccess`: An adapter for time-locking governance proposals using an `AccessManager`. - - `AuthorityUtils`: A library of utilities for interacting with authority contracts. + - `AccessManaged`: A module for connecting a contract to an authority in charge of its access control. + - `GovernorTimelockAccess`: An adapter for time-locking governance proposals using an `AccessManager`. + - `AuthorityUtils`: A library of utilities for interacting with authority contracts. - `GovernorStorage`: A Governor module that stores proposal details in storage. - `ERC2771Forwarder`: An ERC2771 forwarder for meta transactions. - `ERC1967Utils`: A library with ERC1967 events, errors and getters. - `Nonces`: An abstraction for managing account nonces. - `MessageHashUtils`: A library for producing digests for ECDSA operations. -- `Time`: A library with helpers for manipulating time-related objects. +- `Time`: A library with helpers for manipulating time-related objects. ### Removals Summary The following contracts, libraries, and functions were removed: - + - `Address.isContract` (because of its ambiguous nature and potential for misuse) - `Checkpoints.History` - `Counters` @@ -127,7 +127,7 @@ These removals were implemented in the following PRs: [#3637](https://github.com - `ERC1155`: Removed check for address zero in `balanceOf`. ([#4263](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4263)) - `ERC1155`: Optimized array accesses by skipping bounds checking when unnecessary. ([#4300](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4300)) - `ERC1155`: Bubble errors triggered in the `onERC1155Received` and `onERC1155BatchReceived` hooks. ([#4314](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4314)) -- `ERC1155Supply`: Added a `totalSupply()` function that returns the total amount of token circulating, this change will restrict the total tokens minted across all ids to 2**256-1 . ([#3962](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3962)) +- `ERC1155Supply`: Added a `totalSupply()` function that returns the total amount of token circulating, this change will restrict the total tokens minted across all ids to 2\*\*256-1 . ([#3962](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3962)) - `ERC1155Receiver`: Removed in favor of `ERC1155Holder`. ([#4450](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4450)) #### Utils @@ -194,6 +194,27 @@ function supportsInterface(bytes4 interfaceId) public view virtual override retu } ``` +#### SafeMath + +Methods in SafeMath superseded by native overflow checks in Solidity 0.8.0 were removed along with operations providing an interface for revert strings. The remaining methods were moved to `utils/Math.sol`. + +```diff +- import "@openzeppelin/contracts/utils/math/SafeMath.sol"; ++ import "@openzeppelin/contracts/utils/math/Math.sol"; + + function tryOperations(uint256 x, uint256 y) external view { +- (bool overflowsAdd, uint256 resultAdd) = SafeMath.tryAdd(x, y); ++ (bool overflowsAdd, uint256 resultAdd) = Math.tryAdd(x, y); +- (bool overflowsSub, uint256 resultSub) = SafeMath.trySub(x, y); ++ (bool overflowsSub, uint256 resultSub) = Math.trySub(x, y); +- (bool overflowsMul, uint256 resultMul) = SafeMath.tryMul(x, y); ++ (bool overflowsMul, uint256 resultMul) = Math.tryMul(x, y); +- (bool overflowsDiv, uint256 resultDiv) = SafeMath.tryDiv(x, y); ++ (bool overflowsDiv, uint256 resultDiv) = Math.tryDiv(x, y); + // ... + } +``` + #### Adapting Governor modules Custom Governor modules that override internal functions may require modifications if migrated to v5. In particular, the new internal functions `_queueOperations` and `_executeOperations` may need to be used. If assistance with this migration is needed reach out via the [OpenZeppelin Support Forum](https://forum.openzeppelin.com/c/support/contracts/18). @@ -209,7 +230,7 @@ The `ECDSA` library is now focused on signer recovery. Previously it also includ contract Verifier { using ECDSA for bytes32; + using MessageHashUtils for bytes32; - + function _verify(bytes32 data, bytes memory signature, address account) internal pure returns (bool) { return data .toEthSignedMessageHash() From 7ef43333011c9d9fae7ee35f5dd680db3c051b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 12 Oct 2023 03:27:50 -0600 Subject: [PATCH 092/167] Add compile step in `checks.yml` (#4675) --- .github/workflows/checks.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 5b32bdb1d..17dfb669d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -34,6 +34,8 @@ jobs: - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup + - name: Compile contracts # TODO: Remove after migrating tests to ethers + run: npm run compile - name: Run tests and generate gas report run: npm run test - name: Check linearisation of the inheritance graph From 3eb5cfb22a589a84805dc631cece72c5c10a35fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 12 Oct 2023 08:30:02 -0600 Subject: [PATCH 093/167] Nonces FV (#4528) Co-authored-by: Hadrien Croubois --- certora/harnesses/NoncesHarness.sol | 14 +++++ certora/specs.json | 5 ++ certora/specs/Nonces.spec | 92 +++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 certora/harnesses/NoncesHarness.sol create mode 100644 certora/specs/Nonces.spec diff --git a/certora/harnesses/NoncesHarness.sol b/certora/harnesses/NoncesHarness.sol new file mode 100644 index 000000000..beea5fdab --- /dev/null +++ b/certora/harnesses/NoncesHarness.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {Nonces} from "../patched/utils/Nonces.sol"; + +contract NoncesHarness is Nonces { + function useNonce(address account) external returns (uint256) { + return _useNonce(account); + } + + function useCheckedNonce(address account, uint256 nonce) external { + _useCheckedNonce(account, nonce); + } +} diff --git a/certora/specs.json b/certora/specs.json index 20b02a03a..a89419092 100644 --- a/certora/specs.json +++ b/certora/specs.json @@ -101,5 +101,10 @@ "contract": "TimelockControllerHarness", "files": ["certora/harnesses/TimelockControllerHarness.sol"], "options": ["--optimistic_hashing", "--optimistic_loop"] + }, + { + "spec": "Nonces", + "contract": "NoncesHarness", + "files": ["certora/harnesses/NoncesHarness.sol"] } ] diff --git a/certora/specs/Nonces.spec b/certora/specs/Nonces.spec new file mode 100644 index 000000000..4647c5c89 --- /dev/null +++ b/certora/specs/Nonces.spec @@ -0,0 +1,92 @@ +import "helpers/helpers.spec"; + +methods { + function nonces(address) external returns (uint256) envfree; + function useNonce(address) external returns (uint256) envfree; + function useCheckedNonce(address,uint256) external envfree; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Helpers │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +function nonceSanity(address account) returns bool { + return nonces(account) < max_uint256; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: useNonce uses nonce │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule useNonce(address account) { + require nonceSanity(account); + + address other; + + mathint nonceBefore = nonces(account); + mathint otherNonceBefore = nonces(other); + + mathint nonceUsed = useNonce@withrevert(account); + bool success = !lastReverted; + + mathint nonceAfter = nonces(account); + mathint otherNonceAfter = nonces(other); + + // liveness + assert success, "doesn't revert"; + + // effect + assert nonceAfter == nonceBefore + 1 && nonceBefore == nonceUsed, "nonce is used"; + + // no side effect + assert otherNonceBefore != otherNonceAfter => other == account, "no other nonce is used"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Function correctness: useCheckedNonce uses only the current nonce │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule useCheckedNonce(address account, uint256 currentNonce) { + require nonceSanity(account); + + address other; + + mathint nonceBefore = nonces(account); + mathint otherNonceBefore = nonces(other); + + useCheckedNonce@withrevert(account, currentNonce); + bool success = !lastReverted; + + mathint nonceAfter = nonces(account); + mathint otherNonceAfter = nonces(other); + + // liveness + assert success <=> to_mathint(currentNonce) == nonceBefore, "works iff current nonce is correct"; + + // effect + assert success => nonceAfter == nonceBefore + 1, "nonce is used"; + + // no side effect + assert otherNonceBefore != otherNonceAfter => other == account, "no other nonce is used"; +} + +/* +┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ Rule: nonce only increments │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ +rule nonceOnlyIncrements(address account) { + require nonceSanity(account); + + mathint nonceBefore = nonces(account); + + env e; method f; calldataarg args; + f(e, args); + + mathint nonceAfter = nonces(account); + + assert nonceAfter == nonceBefore || nonceAfter == nonceBefore + 1, "nonce only increments"; +} From b48d65822828394b9710aeb5e2b380d2a987fc99 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 12 Oct 2023 19:08:15 +0200 Subject: [PATCH 094/167] Update the "utilities" documentation page (#4678) Co-authored-by: ernestognw --- docs/modules/ROOT/pages/utilities.adoc | 46 +++++++++++++++++--------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/docs/modules/ROOT/pages/utilities.adoc b/docs/modules/ROOT/pages/utilities.adoc index 487b47a80..c194a4705 100644 --- a/docs/modules/ROOT/pages/utilities.adoc +++ b/docs/modules/ROOT/pages/utilities.adoc @@ -71,29 +71,45 @@ contract MyContract { [[math]] == Math -The most popular math related library OpenZeppelin Contracts provides is xref:api:utils.adoc#SafeMath[`SafeMath`], which provides mathematical functions that protect your contract from overflows and underflows. +Although Solidity already provides math operators (i.e. `+`, `-`, etc.), Contracts includes xref:api:utils.adoc#Math[`Math`]; a set of utilities for dealing with mathematical operators, with support for extra operations (eg. xref:api:utils.adoc#Math-average-uint256-uint256-[`average`]) and xref:api:utils.adoc#SignedMath[`SignedMath`]; a library specialized in signed math operations. -Include the contract with `using SafeMath for uint256;` and then call the functions: +Include these contracts with `using Math for uint256` or `using SignedMath for int256` and then use their functions in your code: -* `myNumber.add(otherNumber)` -* `myNumber.sub(otherNumber)` -* `myNumber.div(otherNumber)` -* `myNumber.mul(otherNumber)` -* `myNumber.mod(otherNumber)` +[source,solidity] +---- +contract MyContract { + using Math for uint256; + using SignedMath for int256; + + function tryOperations(uint256 a, uint256 b) internal pure { + (bool overflowsAdd, uint256 resultAdd) = x.tryAdd(y); + (bool overflowsSub, uint256 resultSub) = x.trySub(y); + (bool overflowsMul, uint256 resultMul) = x.tryMul(y); + (bool overflowsDiv, uint256 resultDiv) = x.tryDiv(y); + // ... + } -Easy! + function unsignedAverage(int256 a, int256 b) { + int256 avg = a.average(b); + // ... + } +} +---- -[[payment]] -== Payment +Easy! -Want to split some payments between multiple people? Maybe you have an app that sends 30% of art purchases to the original creator and 70% of the profits to the current owner; you can build that with xref:api:finance.adoc#PaymentSplitter[`PaymentSplitter`]! +[[structures]] +== Structures -In Solidity, there are some security concerns with blindly sending money to accounts, since it allows them to execute arbitrary code. You can read up on these security concerns in the https://consensys.github.io/smart-contract-best-practices/[Ethereum Smart Contract Best Practices] website. +Some use cases require more powerful data structures than arrays and mappings offered natively in Solidity. Contracts provides these libraries for enhanced data structure management: -[[collections]] -== Collections +- xref:api:utils.adoc#BitMaps[`BitMaps`]: Store packed booleans in storage. +- xref:api:utils.adoc#Checkpoints[`Checkpoints`]: Checkpoint values with built-in lookups. +- xref:api:utils.adoc#DoubleEndedQueue[`DoubleEndedQueue`]: Store items in a queue with `pop()` and `queue()` constant time operations. +- xref:api:utils.adoc#EnumerableSet[`EnumerableSet`]: A https://en.wikipedia.org/wiki/Set_(abstract_data_type)[set] with enumeration capabilities. +- xref:api:utils.adoc#EnumerableMap[`EnumerableMap`]: A `mapping` variant with enumeration capabilities. -If you need support for more powerful collections than Solidity's native arrays and mappings, take a look at xref:api:utils.adoc#EnumerableSet[`EnumerableSet`] and xref:api:utils.adoc#EnumerableMap[`EnumerableMap`]. They are similar to mappings in that they store and remove elements in constant time and don't allow for repeated entries, but they also support _enumeration_, which means you can easily query all stored entries both on and off-chain. +The `Enumerable*` structures are similar to mappings in that they store and remove elements in constant time and don't allow for repeated entries, but they also support _enumeration_, which means you can easily query all stored entries both on and off-chain. [[misc]] == Misc From 6383299d715d7cd3d697ab655b42f8e61e52e197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 12 Oct 2023 11:32:30 -0600 Subject: [PATCH 095/167] AccessManager tests consolidation (#4655) --- test/access/manager/AccessManaged.test.js | 4 +- test/access/manager/AccessManager.behavior.js | 587 ++---------------- .../access/manager/AccessManager.predicate.js | 461 ++++++++++++++ test/access/manager/AccessManager.test.js | 129 ++-- test/access/manager/AuthorityUtils.test.js | 25 +- .../extensions/GovernorTimelockAccess.test.js | 282 ++++++--- test/helpers/access-manager.js | 40 +- test/helpers/namespaced-storage.js | 30 + 8 files changed, 844 insertions(+), 714 deletions(-) create mode 100644 test/access/manager/AccessManager.predicate.js create mode 100644 test/helpers/namespaced-storage.js diff --git a/test/access/manager/AccessManaged.test.js b/test/access/manager/AccessManaged.test.js index 9e94af615..ee7924fec 100644 --- a/test/access/manager/AccessManaged.test.js +++ b/test/access/manager/AccessManaged.test.js @@ -59,7 +59,7 @@ contract('AccessManaged', function (accounts) { }); it('reverts if the operation is not scheduled', async function () { - const calldata = await this.managed.contract.methods[method]().encodeABI(); + const calldata = this.managed.contract.methods[method]().encodeABI(); const opId = await this.authority.hashOperation(roleMember, this.managed.address, calldata); await expectRevertCustomError(this.managed.methods[method]({ from: roleMember }), 'AccessManagerNotScheduled', [ @@ -70,7 +70,7 @@ contract('AccessManaged', function (accounts) { it('succeeds if the operation is scheduled', async function () { // Arguments const delay = time.duration.hours(12); - const calldata = await this.managed.contract.methods[method]().encodeABI(); + const calldata = this.managed.contract.methods[method]().encodeABI(); // Schedule const timestamp = await time.latest(); diff --git a/test/access/manager/AccessManager.behavior.js b/test/access/manager/AccessManager.behavior.js index d528ffb48..e5c7a3ca7 100644 --- a/test/access/manager/AccessManager.behavior.js +++ b/test/access/manager/AccessManager.behavior.js @@ -1,507 +1,45 @@ -const { time } = require('@openzeppelin/test-helpers'); -const { - time: { setNextBlockTimestamp }, - setStorageAt, - mine, -} = require('@nomicfoundation/hardhat-network-helpers'); -const { impersonate } = require('../../helpers/account'); +const { mine } = require('@nomicfoundation/hardhat-network-helpers'); const { expectRevertCustomError } = require('../../helpers/customError'); -const { EXPIRATION, EXECUTION_ID_STORAGE_SLOT } = require('../../helpers/access-manager'); - -// ============ COMMON PATHS ============ - -const COMMON_IS_EXECUTING_PATH = { - executing() { - it('succeeds', async function () { - await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); - }); - }, - notExecuting() { - it('reverts as AccessManagerUnauthorizedAccount', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerUnauthorizedAccount', - [this.caller, this.role.id], - ); - }); - }, -}; - -const COMMON_GET_ACCESS_PATH = { - requiredRoleIsGranted: { - roleGrantingIsDelayed: { - callerHasAnExecutionDelay: { - beforeGrantDelay() { - it('reverts as AccessManagerUnauthorizedAccount', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerUnauthorizedAccount', - [this.caller, this.role.id], - ); - }); - }, - afterGrantDelay: undefined, // Diverges if there's an operation delay or not - }, - callerHasNoExecutionDelay: { - beforeGrantDelay() { - it('reverts as AccessManagerUnauthorizedAccount', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerUnauthorizedAccount', - [this.caller, this.role.id], - ); - }); - }, - afterGrantDelay() { - it('succeeds called directly', async function () { - await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); - }); - - it('succeeds via execute', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); - }); - }, - }, - }, - roleGrantingIsNotDelayed: { - callerHasAnExecutionDelay: undefined, // Diverges if there's an operation to schedule or not - callerHasNoExecutionDelay() { - it('succeeds called directly', async function () { - await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); - }); - - it('succeeds via execute', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); - }); - }, - }, - }, - requiredRoleIsNotGranted() { - it('reverts as AccessManagerUnauthorizedAccount', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerUnauthorizedAccount', - [this.caller, this.role.id], - ); - }); - }, -}; - -const COMMON_SCHEDULABLE_PATH = { - scheduled: { - before() { - it('reverts as AccessManagerNotReady', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerNotReady', - [this.operationId], - ); - }); - }, - after() { - it('succeeds called directly', async function () { - await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); - }); - - it('succeeds via execute', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); - }); - }, - expired() { - it('reverts as AccessManagerExpired', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerExpired', - [this.operationId], - ); - }); - }, - }, - notScheduled() { - it('reverts as AccessManagerNotScheduled', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerNotScheduled', - [this.operationId], - ); - }); - }, -}; - -const COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY = { - scheduled: { - before() { - it.skip('is not reachable without a delay'); - }, - after() { - it.skip('is not reachable without a delay'); - }, - expired() { - it.skip('is not reachable without a delay'); - }, - }, - notScheduled() { - it('succeeds', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); - }); - }, -}; - -// ============ MODE HELPERS ============ - -/** - * @requires this.{manager,target} - */ -function shouldBehaveLikeClosable({ closed, open }) { - describe('when the manager is closed', function () { - beforeEach('close', async function () { - await this.manager.$_setTargetClosed(this.target.address, true); - }); - - closed(); - }); - - describe('when the manager is open', function () { - beforeEach('open', async function () { - await this.manager.$_setTargetClosed(this.target.address, false); - }); - - open(); - }); -} - -// ============ DELAY HELPERS ============ - -/** - * @requires this.{delay} - */ -function shouldBehaveLikeDelay(type, { before, after }) { - beforeEach('define timestamp when delay takes effect', async function () { - const timestamp = await time.latest(); - this.delayEffect = timestamp.add(this.delay); - }); - - describe(`when ${type} delay has not taken effect yet`, function () { - beforeEach(`set next block timestamp before ${type} takes effect`, async function () { - await setNextBlockTimestamp(this.delayEffect.subn(1)); - }); - - before(); - }); - - describe(`when ${type} delay has taken effect`, function () { - beforeEach(`set next block timestamp when ${type} takes effect`, async function () { - await setNextBlockTimestamp(this.delayEffect); - }); - - after(); - }); -} - -// ============ OPERATION HELPERS ============ - -/** - * @requires this.{manager,scheduleIn,caller,target,calldata} - */ -function shouldBehaveLikeSchedulableOperation({ scheduled: { before, after, expired }, notScheduled }) { - describe('when operation is scheduled', function () { - beforeEach('schedule operation', async function () { - await impersonate(this.caller); // May be a contract - const { operationId } = await scheduleOperation(this.manager, { - caller: this.caller, - target: this.target.address, - calldata: this.calldata, - delay: this.scheduleIn, - }); - this.operationId = operationId; - }); - - describe('when operation is not ready for execution', function () { - beforeEach('set next block time before operation is ready', async function () { - this.scheduledAt = await time.latest(); - const schedule = await this.manager.getSchedule(this.operationId); - await setNextBlockTimestamp(schedule.subn(1)); - }); - - before(); - }); - - describe('when operation is ready for execution', function () { - beforeEach('set next block time when operation is ready for execution', async function () { - this.scheduledAt = await time.latest(); - const schedule = await this.manager.getSchedule(this.operationId); - await setNextBlockTimestamp(schedule); - }); - - after(); - }); - - describe('when operation has expired', function () { - beforeEach('set next block time when operation expired', async function () { - this.scheduledAt = await time.latest(); - const schedule = await this.manager.getSchedule(this.operationId); - await setNextBlockTimestamp(schedule.add(EXPIRATION)); - }); - - expired(); - }); - }); - - describe('when operation is not scheduled', function () { - beforeEach('set expected operationId', async function () { - this.operationId = await this.manager.hashOperation(this.caller, this.target.address, this.calldata); - - // Assert operation is not scheduled - expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal(web3.utils.toBN(0)); - }); - - notScheduled(); - }); -} - -/** - * @requires this.{manager,roles,target,calldata} - */ -function shouldBehaveLikeARestrictedOperation({ callerIsNotTheManager, callerIsTheManager }) { - describe('when the call comes from the manager (msg.sender == manager)', function () { - beforeEach('define caller as manager', async function () { - this.caller = this.manager.address; - await impersonate(this.caller); - }); - - shouldBehaveLikeCanCallExecuting(callerIsTheManager); - }); - - describe('when the call does not come from the manager (msg.sender != manager)', function () { - beforeEach('define non manager caller', function () { - this.caller = this.roles.SOME.members[0]; - }); - - callerIsNotTheManager(); - }); -} - -/** - * @requires this.{manager,roles,executionDelay,operationDelay,target} - */ -function shouldBehaveLikeDelayedOperation() { - describe('with operation delay', function () { - describe('when operation delay is greater than execution delay', function () { - beforeEach('set operation delay', async function () { - this.operationDelay = this.executionDelay.add(time.duration.hours(1)); - await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); - this.scheduleIn = this.operationDelay; // For shouldBehaveLikeSchedulableOperation - }); - - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); - }); - - describe('when operation delay is shorter than execution delay', function () { - beforeEach('set operation delay', async function () { - this.operationDelay = this.executionDelay.sub(time.duration.hours(1)); - await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); - this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation - }); - - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); - }); - }); - - describe('without operation delay', function () { - beforeEach('set operation delay', async function () { - this.operationDelay = web3.utils.toBN(0); - await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); - this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation - }); - - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); - }); -} - -// ============ METHOD HELPERS ============ - -/** - * @requires this.{manager,roles,role,target,calldata} - */ -function shouldBehaveLikeCanCall({ - closed, - open: { - callerIsTheManager, - callerIsNotTheManager: { publicRoleIsRequired, specificRoleIsRequired }, - }, -}) { - shouldBehaveLikeClosable({ - closed, - open() { - shouldBehaveLikeARestrictedOperation({ - callerIsTheManager, - callerIsNotTheManager() { - shouldBehaveLikeHasRole({ - publicRoleIsRequired, - specificRoleIsRequired, - }); - }, - }); - }, - }); -} - -/** - * @requires this.{target,calldata} - */ -function shouldBehaveLikeCanCallExecuting({ executing, notExecuting }) { - describe('when _executionId is in storage for target and selector', function () { - beforeEach('set _executionId flag from calldata and target', async function () { - const executionId = await web3.utils.keccak256( - web3.eth.abi.encodeParameters(['address', 'bytes4'], [this.target.address, this.calldata.substring(0, 10)]), - ); - await setStorageAt(this.manager.address, EXECUTION_ID_STORAGE_SLOT, executionId); - }); - - executing(); - }); - - describe('when _executionId does not match target and selector', notExecuting); -} - -/** - * @requires this.{target,calldata,roles,role} - */ -function shouldBehaveLikeHasRole({ publicRoleIsRequired, specificRoleIsRequired }) { - describe('when the function requires the caller to be granted with the PUBLIC_ROLE', function () { - beforeEach('set target function role as PUBLIC_ROLE', async function () { - this.role = this.roles.PUBLIC; - await this.manager.$_setTargetFunctionRole(this.target.address, this.calldata.substring(0, 10), this.role.id, { - from: this.roles.ADMIN.members[0], - }); - }); - - publicRoleIsRequired(); - }); - - describe('when the function requires the caller to be granted with a role other than PUBLIC_ROLE', function () { - beforeEach('set target function role as PUBLIC_ROLE', async function () { - await this.manager.$_setTargetFunctionRole(this.target.address, this.calldata.substring(0, 10), this.role.id, { - from: this.roles.ADMIN.members[0], - }); - }); - - shouldBehaveLikeGetAccess(specificRoleIsRequired); - }); -} - -/** - * @requires this.{manager,role,caller} - */ -function shouldBehaveLikeGetAccess({ - requiredRoleIsGranted: { - roleGrantingIsDelayed: { - // Because both grant and execution delay are set within the same $_grantRole call - // it's not possible to create a set of tests that diverge between grant and execution delay. - // Therefore, the shouldBehaveLikeDelay arguments are renamed for clarity: - // before => beforeGrantDelay - // after => afterGrantDelay - callerHasAnExecutionDelay: { beforeGrantDelay: case1, afterGrantDelay: case2 }, - callerHasNoExecutionDelay: { beforeGrantDelay: case3, afterGrantDelay: case4 }, - }, - roleGrantingIsNotDelayed: { callerHasAnExecutionDelay: case5, callerHasNoExecutionDelay: case6 }, - }, - requiredRoleIsNotGranted, -}) { - describe('when the required role is granted to the caller', function () { - describe('when role granting is delayed', function () { - beforeEach('define delay', function () { - this.grantDelay = time.duration.minutes(3); - this.delay = this.grantDelay; // For shouldBehaveLikeDelay - }); - - describe('when caller has an execution delay', function () { - beforeEach('set role and delay', async function () { - this.executionDelay = time.duration.hours(10); - this.delay = this.grantDelay; - await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); - }); - - shouldBehaveLikeDelay('grant', { before: case1, after: case2 }); - }); - - describe('when caller has no execution delay', function () { - beforeEach('set role and delay', async function () { - this.executionDelay = web3.utils.toBN(0); - await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); - }); - - shouldBehaveLikeDelay('grant', { before: case3, after: case4 }); - }); - }); - - describe('when role granting is not delayed', function () { - beforeEach('define delay', function () { - this.grantDelay = web3.utils.toBN(0); - }); - - describe('when caller has an execution delay', function () { - beforeEach('set role and delay', async function () { - this.executionDelay = time.duration.hours(10); - await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); - }); - - case5(); - }); - - describe('when caller has no execution delay', function () { - beforeEach('set role and delay', async function () { - this.executionDelay = web3.utils.toBN(0); - await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); - }); - - case6(); - }); - }); - }); - - describe('when role is not granted', function () { - // Because this helper can be composed with other helpers, it's possible - // that role has been set already by another helper. - // Although this is highly unlikely, we check for it here to avoid false positives. - beforeEach('assert role is unset', async function () { - const { since } = await this.manager.getAccess(this.role.id, this.caller); - expect(since).to.be.bignumber.equal(web3.utils.toBN(0)); - }); - - requiredRoleIsNotGranted(); - }); -} - -// ============ ADMIN OPERATION HELPERS ============ +const { + LIKE_COMMON_IS_EXECUTING, + LIKE_COMMON_GET_ACCESS, + LIKE_COMMON_SCHEDULABLE, + testAsSchedulableOperation, + testAsRestrictedOperation, + testAsDelayedOperation, + testAsCanCall, + testAsHasRole, +} = require('./AccessManager.predicate'); + +// ============ ADMIN OPERATION ============ /** * @requires this.{manager,roles,calldata,role} */ function shouldBehaveLikeDelayedAdminOperation() { - const getAccessPath = COMMON_GET_ACCESS_PATH; + const getAccessPath = LIKE_COMMON_GET_ACCESS; getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = function () { beforeEach('consume previously set grant delay', async function () { // Consume previously set delay await mine(); }); - shouldBehaveLikeDelayedOperation(); + testAsDelayedOperation(); }; getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { beforeEach('set execution delay', async function () { - this.scheduleIn = this.executionDelay; // For shouldBehaveLikeDelayedOperation + this.scheduleIn = this.executionDelay; // For testAsDelayedOperation }); - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); }; beforeEach('set target as manager', function () { this.target = this.manager; }); - shouldBehaveLikeARestrictedOperation({ - callerIsTheManager: COMMON_IS_EXECUTING_PATH, + testAsRestrictedOperation({ + callerIsTheManager: LIKE_COMMON_IS_EXECUTING, callerIsNotTheManager() { - shouldBehaveLikeHasRole({ + testAsHasRole({ publicRoleIsRequired() { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expectRevertCustomError( @@ -524,29 +62,29 @@ function shouldBehaveLikeDelayedAdminOperation() { * @requires this.{manager,roles,calldata,role} */ function shouldBehaveLikeNotDelayedAdminOperation() { - const getAccessPath = COMMON_GET_ACCESS_PATH; + const getAccessPath = LIKE_COMMON_GET_ACCESS; getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = function () { beforeEach('set execution delay', async function () { await mine(); - this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation }); - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); }; getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { beforeEach('set execution delay', async function () { - this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation }); - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); }; beforeEach('set target as manager', function () { this.target = this.manager; }); - shouldBehaveLikeARestrictedOperation({ - callerIsTheManager: COMMON_IS_EXECUTING_PATH, + testAsRestrictedOperation({ + callerIsTheManager: LIKE_COMMON_IS_EXECUTING, callerIsNotTheManager() { - shouldBehaveLikeHasRole({ + testAsHasRole({ publicRoleIsRequired() { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expectRevertCustomError( @@ -566,29 +104,29 @@ function shouldBehaveLikeNotDelayedAdminOperation() { * @requires this.{manager,roles,calldata,role} */ function shouldBehaveLikeRoleAdminOperation(roleAdmin) { - const getAccessPath = COMMON_GET_ACCESS_PATH; + const getAccessPath = LIKE_COMMON_GET_ACCESS; getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = function () { beforeEach('set operation delay', async function () { await mine(); - this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation }); - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); }; getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { beforeEach('set execution delay', async function () { - this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation }); - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); }; beforeEach('set target as manager', function () { this.target = this.manager; }); - shouldBehaveLikeARestrictedOperation({ - callerIsTheManager: COMMON_IS_EXECUTING_PATH, + testAsRestrictedOperation({ + callerIsTheManager: LIKE_COMMON_IS_EXECUTING, callerIsNotTheManager() { - shouldBehaveLikeHasRole({ + testAsHasRole({ publicRoleIsRequired() { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expectRevertCustomError( @@ -604,7 +142,7 @@ function shouldBehaveLikeRoleAdminOperation(roleAdmin) { }); } -// ============ RESTRICTED OPERATION HELPERS ============ +// ============ RESTRICTED OPERATION ============ /** * @requires this.{manager,roles,calldata,role} @@ -620,7 +158,7 @@ function shouldBehaveLikeAManagedRestrictedOperation() { }); } - const getAccessPath = COMMON_GET_ACCESS_PATH; + const getAccessPath = LIKE_COMMON_GET_ACCESS; getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.beforeGrantDelay = revertUnauthorized; @@ -632,21 +170,21 @@ function shouldBehaveLikeAManagedRestrictedOperation() { beforeEach('consume previously set grant delay', async function () { // Consume previously set delay await mine(); - this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation }); - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); }; getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { beforeEach('consume previously set grant delay', async function () { - this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation }); - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); }; - const isExecutingPath = COMMON_IS_EXECUTING_PATH; + const isExecutingPath = LIKE_COMMON_IS_EXECUTING; isExecutingPath.notExecuting = revertUnauthorized; - shouldBehaveLikeCanCall({ + testAsCanCall({ closed: revertUnauthorized, open: { callerIsTheManager: isExecutingPath, @@ -666,46 +204,9 @@ function shouldBehaveLikeAManagedRestrictedOperation() { }); } -// ============ HELPERS ============ - -/** - * @requires this.{manager, caller, target, calldata} - */ -async function scheduleOperation(manager, { caller, target, calldata, delay }) { - const timestamp = await time.latest(); - const scheduledAt = timestamp.addn(1); - await setNextBlockTimestamp(scheduledAt); // Fix next block timestamp for predictability - const { receipt } = await manager.schedule(target, calldata, scheduledAt.add(delay), { - from: caller, - }); - - return { - receipt, - scheduledAt, - operationId: await manager.hashOperation(caller, target, calldata), - }; -} - module.exports = { - // COMMON PATHS - COMMON_SCHEDULABLE_PATH, - COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY, - // MODE HELPERS - shouldBehaveLikeClosable, - // DELAY HELPERS - shouldBehaveLikeDelay, - // OPERATION HELPERS - shouldBehaveLikeSchedulableOperation, - // METHOD HELPERS - shouldBehaveLikeCanCall, - shouldBehaveLikeGetAccess, - shouldBehaveLikeHasRole, - // ADMIN OPERATION HELPERS shouldBehaveLikeDelayedAdminOperation, shouldBehaveLikeNotDelayedAdminOperation, shouldBehaveLikeRoleAdminOperation, - // RESTRICTED OPERATION HELPERS shouldBehaveLikeAManagedRestrictedOperation, - // HELPERS - scheduleOperation, }; diff --git a/test/access/manager/AccessManager.predicate.js b/test/access/manager/AccessManager.predicate.js new file mode 100644 index 000000000..becbcb534 --- /dev/null +++ b/test/access/manager/AccessManager.predicate.js @@ -0,0 +1,461 @@ +const { setStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); +const { + time: { setNextBlockTimestamp }, +} = require('@nomicfoundation/hardhat-network-helpers'); +const { time } = require('@openzeppelin/test-helpers'); +const { EXECUTION_ID_STORAGE_SLOT, EXPIRATION, scheduleOperation } = require('../../helpers/access-manager'); +const { impersonate } = require('../../helpers/account'); +const { expectRevertCustomError } = require('../../helpers/customError'); + +// ============ COMMON PREDICATES ============ + +const LIKE_COMMON_IS_EXECUTING = { + executing() { + it('succeeds', async function () { + await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + }); + }, + notExecuting() { + it('reverts as AccessManagerUnauthorizedAccount', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerUnauthorizedAccount', + [this.caller, this.role.id], + ); + }); + }, +}; + +const LIKE_COMMON_GET_ACCESS = { + requiredRoleIsGranted: { + roleGrantingIsDelayed: { + callerHasAnExecutionDelay: { + beforeGrantDelay() { + it('reverts as AccessManagerUnauthorizedAccount', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerUnauthorizedAccount', + [this.caller, this.role.id], + ); + }); + }, + afterGrantDelay: undefined, // Diverges if there's an operation delay or not + }, + callerHasNoExecutionDelay: { + beforeGrantDelay() { + it('reverts as AccessManagerUnauthorizedAccount', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerUnauthorizedAccount', + [this.caller, this.role.id], + ); + }); + }, + afterGrantDelay() { + it('succeeds called directly', async function () { + await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + }); + + it('succeeds via execute', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); + }, + }, + }, + roleGrantingIsNotDelayed: { + callerHasAnExecutionDelay: undefined, // Diverges if there's an operation to schedule or not + callerHasNoExecutionDelay() { + it('succeeds called directly', async function () { + await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + }); + + it('succeeds via execute', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); + }, + }, + }, + requiredRoleIsNotGranted() { + it('reverts as AccessManagerUnauthorizedAccount', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerUnauthorizedAccount', + [this.caller, this.role.id], + ); + }); + }, +}; + +const LIKE_COMMON_SCHEDULABLE = { + scheduled: { + before() { + it('reverts as AccessManagerNotReady', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerNotReady', + [this.operationId], + ); + }); + }, + after() { + it('succeeds called directly', async function () { + await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + }); + + it('succeeds via execute', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); + }, + expired() { + it('reverts as AccessManagerExpired', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerExpired', + [this.operationId], + ); + }); + }, + }, + notScheduled() { + it('reverts as AccessManagerNotScheduled', async function () { + await expectRevertCustomError( + web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), + 'AccessManagerNotScheduled', + [this.operationId], + ); + }); + }, +}; + +// ============ MODE ============ + +/** + * @requires this.{manager,target} + */ +function testAsClosable({ closed, open }) { + describe('when the manager is closed', function () { + beforeEach('close', async function () { + await this.manager.$_setTargetClosed(this.target.address, true); + }); + + closed(); + }); + + describe('when the manager is open', function () { + beforeEach('open', async function () { + await this.manager.$_setTargetClosed(this.target.address, false); + }); + + open(); + }); +} + +// ============ DELAY ============ + +/** + * @requires this.{delay} + */ +function testAsDelay(type, { before, after }) { + beforeEach('define timestamp when delay takes effect', async function () { + const timestamp = await time.latest(); + this.delayEffect = timestamp.add(this.delay); + }); + + describe(`when ${type} delay has not taken effect yet`, function () { + beforeEach(`set next block timestamp before ${type} takes effect`, async function () { + await setNextBlockTimestamp(this.delayEffect.subn(1)); + }); + + before(); + }); + + describe(`when ${type} delay has taken effect`, function () { + beforeEach(`set next block timestamp when ${type} takes effect`, async function () { + await setNextBlockTimestamp(this.delayEffect); + }); + + after(); + }); +} + +// ============ OPERATION ============ + +/** + * @requires this.{manager,scheduleIn,caller,target,calldata} + */ +function testAsSchedulableOperation({ scheduled: { before, after, expired }, notScheduled }) { + describe('when operation is scheduled', function () { + beforeEach('schedule operation', async function () { + await impersonate(this.caller); // May be a contract + const { operationId } = await scheduleOperation(this.manager, { + caller: this.caller, + target: this.target.address, + calldata: this.calldata, + delay: this.scheduleIn, + }); + this.operationId = operationId; + }); + + describe('when operation is not ready for execution', function () { + beforeEach('set next block time before operation is ready', async function () { + this.scheduledAt = await time.latest(); + const schedule = await this.manager.getSchedule(this.operationId); + await setNextBlockTimestamp(schedule.subn(1)); + }); + + before(); + }); + + describe('when operation is ready for execution', function () { + beforeEach('set next block time when operation is ready for execution', async function () { + this.scheduledAt = await time.latest(); + const schedule = await this.manager.getSchedule(this.operationId); + await setNextBlockTimestamp(schedule); + }); + + after(); + }); + + describe('when operation has expired', function () { + beforeEach('set next block time when operation expired', async function () { + this.scheduledAt = await time.latest(); + const schedule = await this.manager.getSchedule(this.operationId); + await setNextBlockTimestamp(schedule.add(EXPIRATION)); + }); + + expired(); + }); + }); + + describe('when operation is not scheduled', function () { + beforeEach('set expected operationId', async function () { + this.operationId = await this.manager.hashOperation(this.caller, this.target.address, this.calldata); + + // Assert operation is not scheduled + expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal(web3.utils.toBN(0)); + }); + + notScheduled(); + }); +} + +/** + * @requires this.{manager,roles,target,calldata} + */ +function testAsRestrictedOperation({ callerIsTheManager: { executing, notExecuting }, callerIsNotTheManager }) { + describe('when the call comes from the manager (msg.sender == manager)', function () { + beforeEach('define caller as manager', async function () { + this.caller = this.manager.address; + await impersonate(this.caller); + }); + + describe('when _executionId is in storage for target and selector', function () { + beforeEach('set _executionId flag from calldata and target', async function () { + const executionId = web3.utils.keccak256( + web3.eth.abi.encodeParameters(['address', 'bytes4'], [this.target.address, this.calldata.substring(0, 10)]), + ); + await setStorageAt(this.manager.address, EXECUTION_ID_STORAGE_SLOT, executionId); + }); + + executing(); + }); + + describe('when _executionId does not match target and selector', notExecuting); + }); + + describe('when the call does not come from the manager (msg.sender != manager)', function () { + beforeEach('define non manager caller', function () { + this.caller = this.roles.SOME.members[0]; + }); + + callerIsNotTheManager(); + }); +} + +/** + * @requires this.{manager,scheduleIn,caller,target,calldata,executionDelay} + */ +function testAsDelayedOperation() { + describe('with operation delay', function () { + describe('when operation delay is greater than execution delay', function () { + beforeEach('set operation delay', async function () { + this.operationDelay = this.executionDelay.add(time.duration.hours(1)); + await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); + this.scheduleIn = this.operationDelay; // For testAsSchedulableOperation + }); + + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); + }); + + describe('when operation delay is shorter than execution delay', function () { + beforeEach('set operation delay', async function () { + this.operationDelay = this.executionDelay.sub(time.duration.hours(1)); + await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); + this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation + }); + + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); + }); + }); + + describe('without operation delay', function () { + beforeEach('set operation delay', async function () { + this.operationDelay = web3.utils.toBN(0); + await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); + this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation + }); + + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); + }); +} + +// ============ METHOD ============ + +/** + * @requires this.{manager,roles,role,target,calldata} + */ +function testAsCanCall({ + closed, + open: { + callerIsTheManager, + callerIsNotTheManager: { publicRoleIsRequired, specificRoleIsRequired }, + }, +}) { + testAsClosable({ + closed, + open() { + testAsRestrictedOperation({ + callerIsTheManager, + callerIsNotTheManager() { + testAsHasRole({ + publicRoleIsRequired, + specificRoleIsRequired, + }); + }, + }); + }, + }); +} + +/** + * @requires this.{target,calldata,roles,role} + */ +function testAsHasRole({ publicRoleIsRequired, specificRoleIsRequired }) { + describe('when the function requires the caller to be granted with the PUBLIC_ROLE', function () { + beforeEach('set target function role as PUBLIC_ROLE', async function () { + this.role = this.roles.PUBLIC; + await this.manager.$_setTargetFunctionRole(this.target.address, this.calldata.substring(0, 10), this.role.id, { + from: this.roles.ADMIN.members[0], + }); + }); + + publicRoleIsRequired(); + }); + + describe('when the function requires the caller to be granted with a role other than PUBLIC_ROLE', function () { + beforeEach('set target function role as PUBLIC_ROLE', async function () { + await this.manager.$_setTargetFunctionRole(this.target.address, this.calldata.substring(0, 10), this.role.id, { + from: this.roles.ADMIN.members[0], + }); + }); + + testAsGetAccess(specificRoleIsRequired); + }); +} + +/** + * @requires this.{manager,role,caller} + */ +function testAsGetAccess({ + requiredRoleIsGranted: { + roleGrantingIsDelayed: { + // Because both grant and execution delay are set within the same $_grantRole call + // it's not possible to create a set of tests that diverge between grant and execution delay. + // Therefore, the testAsDelay arguments are renamed for clarity: + // before => beforeGrantDelay + // after => afterGrantDelay + callerHasAnExecutionDelay: { beforeGrantDelay: case1, afterGrantDelay: case2 }, + callerHasNoExecutionDelay: { beforeGrantDelay: case3, afterGrantDelay: case4 }, + }, + roleGrantingIsNotDelayed: { callerHasAnExecutionDelay: case5, callerHasNoExecutionDelay: case6 }, + }, + requiredRoleIsNotGranted, +}) { + describe('when the required role is granted to the caller', function () { + describe('when role granting is delayed', function () { + beforeEach('define delay', function () { + this.grantDelay = time.duration.minutes(3); + this.delay = this.grantDelay; // For testAsDelay + }); + + describe('when caller has an execution delay', function () { + beforeEach('set role and delay', async function () { + this.executionDelay = time.duration.hours(10); + this.delay = this.grantDelay; + await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); + }); + + testAsDelay('grant', { before: case1, after: case2 }); + }); + + describe('when caller has no execution delay', function () { + beforeEach('set role and delay', async function () { + this.executionDelay = web3.utils.toBN(0); + await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); + }); + + testAsDelay('grant', { before: case3, after: case4 }); + }); + }); + + describe('when role granting is not delayed', function () { + beforeEach('define delay', function () { + this.grantDelay = web3.utils.toBN(0); + }); + + describe('when caller has an execution delay', function () { + beforeEach('set role and delay', async function () { + this.executionDelay = time.duration.hours(10); + await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); + }); + + case5(); + }); + + describe('when caller has no execution delay', function () { + beforeEach('set role and delay', async function () { + this.executionDelay = web3.utils.toBN(0); + await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); + }); + + case6(); + }); + }); + }); + + describe('when role is not granted', function () { + // Because this helper can be composed with other helpers, it's possible + // that role has been set already by another helper. + // Although this is highly unlikely, we check for it here to avoid false positives. + beforeEach('assert role is unset', async function () { + const { since } = await this.manager.getAccess(this.role.id, this.caller); + expect(since).to.be.bignumber.equal(web3.utils.toBN(0)); + }); + + requiredRoleIsNotGranted(); + }); +} + +module.exports = { + LIKE_COMMON_IS_EXECUTING, + LIKE_COMMON_GET_ACCESS, + LIKE_COMMON_SCHEDULABLE, + testAsClosable, + testAsDelay, + testAsSchedulableOperation, + testAsRestrictedOperation, + testAsDelayedOperation, + testAsCanCall, + testAsHasRole, + testAsGetAccess, +}; diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 705af1a8a..40c684505 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -10,30 +10,24 @@ const { MINSETBACK, EXECUTION_ID_STORAGE_SLOT, CONSUMING_SCHEDULE_STORAGE_SLOT, + scheduleOperation, + hashOperation, } = require('../../helpers/access-manager'); const { - // COMMON PATHS - COMMON_SCHEDULABLE_PATH, - COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY, - // MODE HELPERS - shouldBehaveLikeClosable, - // DELAY HELPERS - shouldBehaveLikeDelay, - // OPERATION HELPERS - shouldBehaveLikeSchedulableOperation, - // METHOD HELPERS - shouldBehaveLikeCanCall, - shouldBehaveLikeGetAccess, - shouldBehaveLikeHasRole, - // ADMIN OPERATION HELPERS shouldBehaveLikeDelayedAdminOperation, shouldBehaveLikeNotDelayedAdminOperation, shouldBehaveLikeRoleAdminOperation, - // RESTRICTED OPERATION HELPERS shouldBehaveLikeAManagedRestrictedOperation, - // HELPERS - scheduleOperation, } = require('./AccessManager.behavior'); +const { + LIKE_COMMON_SCHEDULABLE, + testAsClosable, + testAsDelay, + testAsSchedulableOperation, + testAsCanCall, + testAsHasRole, + testAsGetAccess, +} = require('./AccessManager.predicate'); const { default: Wallet } = require('ethereumjs-wallet'); const { mine, @@ -49,6 +43,20 @@ const Ownable = artifacts.require('$Ownable'); const someAddress = Wallet.generate().getChecksumAddressString(); +// This test suite is made using the following tools: +// +// * Predicates: Functions with common conditional setups without assertions. +// * Behaviors: Functions with common assertions. +// +// The behavioral tests are built by composing predicates and are used as templates +// for testing access to restricted functions. +// +// Similarly, unit tests in this suite will use predicates to test subsets of these +// behaviors and are helped by common assertions provided for some of the predicates. +// +// The predicates can be identified by the `testAs*` prefix while the behaviors +// are prefixed with `shouldBehave*`. The common assertions for predicates are +// defined as constants. contract('AccessManager', function (accounts) { const [admin, manager, guardian, member, user, other] = accounts; @@ -120,7 +128,7 @@ contract('AccessManager', function (accounts) { this.role = { id: web3.utils.toBN(379204) }; }); - shouldBehaveLikeCanCall({ + testAsCanCall({ closed() { it('should return false and no delay', async function () { const { immediate, delay } = await this.manager.canCall( @@ -193,10 +201,10 @@ contract('AccessManager', function (accounts) { beforeEach('consume previously set grant delay', async function () { // Consume previously set delay await mine(); - this.scheduleIn = this.executionDelay; // For shouldBehaveLikeSchedulableOperation + this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation }); - shouldBehaveLikeSchedulableOperation({ + testAsSchedulableOperation({ scheduled: { before() { beforeEach('consume previously set delay', async function () { @@ -350,7 +358,7 @@ contract('AccessManager', function (accounts) { }); describe('#isTargetClosed', function () { - shouldBehaveLikeClosable({ + testAsClosable({ closed() { it('returns true', async function () { expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(true); @@ -390,10 +398,10 @@ contract('AccessManager', function (accounts) { this.newDelay = time.duration.days(10); await this.manager.$_setTargetAdminDelay(this.target.address, this.newDelay); - this.delay = MINSETBACK; // For shouldBehaveLikeDelay + this.delay = MINSETBACK; // For testAsDelay }); - shouldBehaveLikeDelay('effect', { + testAsDelay('effect', { before() { beforeEach('consume previously set grant delay', async function () { // Consume previously set delay @@ -463,10 +471,10 @@ contract('AccessManager', function (accounts) { this.newDelay = time.duration.days(11); await this.manager.$_setGrantDelay(roleId, this.newDelay); - this.delay = MINSETBACK; // For shouldBehaveLikeDelay + this.delay = MINSETBACK; // For testAsDelay }); - shouldBehaveLikeDelay('grant', { + testAsDelay('grant', { before() { beforeEach('consume previously set grant delay', async function () { // Consume previously set delay @@ -501,7 +509,7 @@ contract('AccessManager', function (accounts) { this.caller = user; }); - shouldBehaveLikeGetAccess({ + testAsGetAccess({ requiredRoleIsGranted: { roleGrantingIsDelayed: { callerHasAnExecutionDelay: { @@ -618,13 +626,13 @@ contract('AccessManager', function (accounts) { }); describe('#hasRole', function () { - beforeEach('setup shouldBehaveLikeHasRole', function () { + beforeEach('setup testAsHasRole', function () { this.role = { id: web3.utils.toBN(49832) }; this.calldata = '0x1234'; this.caller = user; }); - shouldBehaveLikeHasRole({ + testAsHasRole({ publicRoleIsRequired() { it('has PUBLIC role', async function () { const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); @@ -724,11 +732,11 @@ contract('AccessManager', function (accounts) { await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // nonzero execution delay - this.calldata = await this.target.contract.methods[method]().encodeABI(); - this.scheduleIn = time.duration.days(10); // For shouldBehaveLikeSchedulableOperation + this.calldata = this.target.contract.methods[method]().encodeABI(); + this.scheduleIn = time.duration.days(10); // For testAsSchedulableOperation }); - shouldBehaveLikeSchedulableOperation({ + testAsSchedulableOperation({ scheduled: { before() { beforeEach('consume previously set grant delay', async function () { @@ -782,7 +790,7 @@ contract('AccessManager', function (accounts) { await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // nonzero execution delay - this.calldata = await this.target.contract.methods[method]().encodeABI(); + this.calldata = this.target.contract.methods[method]().encodeABI(); this.delay = time.duration.days(10); const { operationId } = await scheduleOperation(this.manager, { @@ -813,9 +821,7 @@ contract('AccessManager', function (accounts) { const args = [user, address, calldata]; - expect(await this.manager.hashOperation(...args)).to.be.bignumber.eq( - await web3.utils.keccak256(web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], args)), - ); + expect(await this.manager.hashOperation(...args)).to.be.bignumber.eq(hashOperation(...args)); }); }); }); @@ -1317,10 +1323,10 @@ contract('AccessManager', function (accounts) { }); this.receipt = receipt; - this.delay = this.grantDelay; // For shouldBehaveLikeDelay + this.delay = this.grantDelay; // For testAsDelay }); - shouldBehaveLikeDelay('grant', { + testAsDelay('grant', { before() { beforeEach('consume previously set grant delay', async function () { // Consume previously set delay @@ -1505,7 +1511,7 @@ contract('AccessManager', function (accounts) { this.grantTimestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); this.receipt = receipt; - this.delay = this.previousExecutionDelay.sub(this.newExecutionDelay); // For shouldBehaveLikeDelay + this.delay = this.previousExecutionDelay.sub(this.newExecutionDelay); // For testAsDelay }); it('emits event', function () { @@ -1518,7 +1524,7 @@ contract('AccessManager', function (accounts) { }); }); - shouldBehaveLikeDelay('execution delay effect', { + testAsDelay('execution delay effect', { before() { beforeEach('consume effect delay', async function () { // Consume previously set delay @@ -1631,7 +1637,7 @@ contract('AccessManager', function (accounts) { this.grantTimestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); this.receipt = receipt; - this.delay = this.previousExecutionDelay.sub(this.newExecutionDelay); // For shouldBehaveLikeDelay + this.delay = this.previousExecutionDelay.sub(this.newExecutionDelay); // For testAsDelay }); it('emits event', function () { @@ -1644,7 +1650,7 @@ contract('AccessManager', function (accounts) { }); }); - shouldBehaveLikeDelay('execution delay effect', { + testAsDelay('execution delay effect', { before() { beforeEach('consume effect delay', async function () { // Consume previously set delay @@ -1713,10 +1719,10 @@ contract('AccessManager', function (accounts) { this.grantDelay = time.duration.weeks(1); await this.manager.$_grantRole(ANOTHER_ROLE, user, this.grantDelay, 0); - this.delay = this.grantDelay; // For shouldBehaveLikeDelay + this.delay = this.grantDelay; // For testAsDelay }); - shouldBehaveLikeDelay('grant', { + testAsDelay('grant', { before() { beforeEach('consume previously set grant delay', async function () { // Consume previously set delay @@ -1915,7 +1921,7 @@ contract('AccessManager', function (accounts) { }); describe('restrictions', function () { - shouldBehaveLikeCanCall({ + testAsCanCall({ closed() { it('reverts as AccessManagerUnauthorizedCall', async function () { await expectRevertCustomError( @@ -2103,12 +2109,7 @@ contract('AccessManager', function (accounts) { it('increases the nonce of an operation scheduled more than once', async function () { // Setup and check initial nonce - const expectedOperationId = await web3.utils.keccak256( - web3.eth.abi.encodeParameters( - ['address', 'address', 'bytes'], - [this.caller, this.target.address, this.calldata], - ), - ); + const expectedOperationId = hashOperation(this.caller, this.target.address, this.calldata); expect(await this.manager.getNonce(expectedOperationId)).to.be.bignumber.eq('0'); // Schedule @@ -2244,7 +2245,7 @@ contract('AccessManager', function (accounts) { }); describe('restrictions', function () { - shouldBehaveLikeCanCall({ + testAsCanCall({ closed() { it('reverts as AccessManagerUnauthorizedCall', async function () { await expectRevertCustomError( @@ -2273,7 +2274,9 @@ contract('AccessManager', function (accounts) { }, callerIsNotTheManager: { publicRoleIsRequired() { - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY); + it('succeeds', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); }, specificRoleIsRequired: { requiredRoleIsGranted: { @@ -2295,7 +2298,7 @@ contract('AccessManager', function (accounts) { this.scheduleIn = time.duration.days(21); }); - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); }, }, callerHasNoExecutionDelay: { @@ -2314,7 +2317,9 @@ contract('AccessManager', function (accounts) { await mine(); }); - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY); + it('succeeds', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); }, }, }, @@ -2324,10 +2329,12 @@ contract('AccessManager', function (accounts) { this.scheduleIn = time.duration.days(15); }); - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH); + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); }, callerHasNoExecutionDelay() { - shouldBehaveLikeSchedulableOperation(COMMON_SCHEDULABLE_PATH_IF_ZERO_DELAY); + it('succeeds', async function () { + await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + }); }, }, }, @@ -2427,7 +2434,7 @@ contract('AccessManager', function (accounts) { await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // nonzero execution delay - this.scheduleIn = time.duration.hours(10); // For shouldBehaveLikeSchedulableOperation + this.scheduleIn = time.duration.hours(10); // For testAsSchedulableOperation }); describe('when caller is not consuming scheduled operation', function () { @@ -2450,7 +2457,7 @@ contract('AccessManager', function (accounts) { await this.target.setIsConsumingScheduledOp(true, `0x${CONSUMING_SCHEDULE_STORAGE_SLOT.toString(16)}`); }); - shouldBehaveLikeSchedulableOperation({ + testAsSchedulableOperation({ scheduled: { before() { it('reverts as AccessManagerNotReady', async function () { @@ -2511,11 +2518,11 @@ contract('AccessManager', function (accounts) { await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.roles.SOME.id); await this.manager.$_grantRole(this.roles.SOME.id, this.caller, 0, 1); // nonzero execution delay - this.calldata = await this.target.contract.methods[method]().encodeABI(); - this.scheduleIn = time.duration.days(10); // For shouldBehaveLikeSchedulableOperation + this.calldata = this.target.contract.methods[method]().encodeABI(); + this.scheduleIn = time.duration.days(10); // For testAsSchedulableOperation }); - shouldBehaveLikeSchedulableOperation({ + testAsSchedulableOperation({ scheduled: { before() { describe('when caller is the scheduler', function () { diff --git a/test/access/manager/AuthorityUtils.test.js b/test/access/manager/AuthorityUtils.test.js index 346be030b..3e1133083 100644 --- a/test/access/manager/AuthorityUtils.test.js +++ b/test/access/manager/AuthorityUtils.test.js @@ -53,22 +53,19 @@ contract('AuthorityUtils', function (accounts) { describe('when authority replies with a delay', function () { beforeEach(async function () { this.authority = await AuthorityDelayMock.new(); - this.immediate = true; - this.delay = web3.utils.toBN(42); - await this.authority._setImmediate(this.immediate); - await this.authority._setDelay(this.delay); }); - it('returns (immediate, delay)', async function () { - const { immediate, delay } = await this.mock.$canCallWithDelay( - this.authority.address, - user, - other, - '0x12345678', - ); - expect(immediate).to.equal(this.immediate); - expect(delay).to.be.bignumber.equal(this.delay); - }); + for (const immediate of [true, false]) { + for (const delay of ['0', '42']) { + it(`returns (immediate=${immediate}, delay=${delay})`, async function () { + await this.authority._setImmediate(immediate); + await this.authority._setDelay(delay); + const result = await this.mock.$canCallWithDelay(this.authority.address, user, other, '0x12345678'); + expect(result.immediate).to.equal(immediate); + expect(result.delay).to.be.bignumber.equal(delay); + }); + } + } }); describe('when authority replies with empty data', function () { diff --git a/test/governance/extensions/GovernorTimelockAccess.test.js b/test/governance/extensions/GovernorTimelockAccess.test.js index 68df99e85..252a3d52e 100644 --- a/test/governance/extensions/GovernorTimelockAccess.test.js +++ b/test/governance/extensions/GovernorTimelockAccess.test.js @@ -6,19 +6,18 @@ const { GovernorHelper, proposalStatesToBitMap } = require('../../helpers/govern const { expectRevertCustomError } = require('../../helpers/customError'); const { clockFromReceipt } = require('../../helpers/time'); const { selector } = require('../../helpers/methods'); +const { hashOperation } = require('../../helpers/access-manager'); const AccessManager = artifacts.require('$AccessManager'); const Governor = artifacts.require('$GovernorTimelockAccessMock'); const AccessManagedTarget = artifacts.require('$AccessManagedTarget'); +const Ownable = artifacts.require('$Ownable'); const TOKENS = [ { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' }, ]; -const hashOperation = (caller, target, data) => - web3.utils.keccak256(web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], [caller, target, data])); - contract('GovernorTimelockAccess', function (accounts) { const [admin, voter1, voter2, voter3, voter4, other] = accounts; @@ -245,6 +244,144 @@ contract('GovernorTimelockAccess', function (accounts) { } }); + it('does not need to queue proposals with no delay', async function () { + const roleId = '1'; + + const executionDelay = web3.utils.toBN(0); + const baseDelay = web3.utils.toBN(0); + + // Set execution delay + await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { + from: admin, + }); + await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + + // Set base delay + await this.mock.$_setBaseDelaySeconds(baseDelay); + + this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); + await this.helper.propose(); + expect(await this.mock.proposalNeedsQueuing(this.helper.currentProposal.id)).to.be.false; + }); + + it('needs to queue proposals with any delay', async function () { + const roleId = '1'; + + const delays = [ + [time.duration.hours(1), time.duration.hours(2)], + [time.duration.hours(2), time.duration.hours(1)], + ]; + + for (const [executionDelay, baseDelay] of delays) { + // Set execution delay + await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { + from: admin, + }); + await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + + // Set base delay + await this.mock.$_setBaseDelaySeconds(baseDelay); + + const helper = new GovernorHelper(this.mock, mode); + this.proposal = await helper.setProposal( + [this.restricted.operation], + `executionDelay=${executionDelay.toString()}}baseDelay=${baseDelay.toString()}}`, + ); + await helper.propose(); + expect(await this.mock.proposalNeedsQueuing(helper.currentProposal.id)).to.be.true; + } + }); + + describe('execution plan', function () { + it('returns plan for delayed operations', async function () { + const roleId = '1'; + + const delays = [ + [time.duration.hours(1), time.duration.hours(2)], + [time.duration.hours(2), time.duration.hours(1)], + ]; + + for (const [executionDelay, baseDelay] of delays) { + // Set execution delay + await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { + from: admin, + }); + await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + + // Set base delay + await this.mock.$_setBaseDelaySeconds(baseDelay); + + const helper = new GovernorHelper(this.mock, mode); + this.proposal = await helper.setProposal( + [this.restricted.operation], + `executionDelay=${executionDelay.toString()}}baseDelay=${baseDelay.toString()}}`, + ); + await helper.propose(); + const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); + const maxDelay = web3.utils.toBN(Math.max(baseDelay.toNumber(), executionDelay.toNumber())); + expect(planDelay).to.be.bignumber.eq(maxDelay); + expect(indirect).to.deep.eq([true]); + expect(withDelay).to.deep.eq([true]); + } + }); + + it('returns plan for not delayed operations', async function () { + const roleId = '1'; + + const executionDelay = web3.utils.toBN(0); + const baseDelay = web3.utils.toBN(0); + + // Set execution delay + await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { + from: admin, + }); + await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + + // Set base delay + await this.mock.$_setBaseDelaySeconds(baseDelay); + + this.proposal = await this.helper.setProposal([this.restricted.operation], `descr`); + await this.helper.propose(); + const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); + expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(0)); + expect(indirect).to.deep.eq([true]); + expect(withDelay).to.deep.eq([false]); + }); + + it('returns plan for an operation ignoring the manager', async function () { + await this.mock.$_setAccessManagerIgnored(this.receiver.address, this.restricted.selector, true); + + const roleId = '1'; + + const delays = [ + [time.duration.hours(1), time.duration.hours(2)], + [time.duration.hours(2), time.duration.hours(1)], + ]; + + for (const [executionDelay, baseDelay] of delays) { + // Set execution delay + await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { + from: admin, + }); + await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + + // Set base delay + await this.mock.$_setBaseDelaySeconds(baseDelay); + + const helper = new GovernorHelper(this.mock, mode); + this.proposal = await helper.setProposal( + [this.restricted.operation], + `executionDelay=${executionDelay.toString()}}baseDelay=${baseDelay.toString()}}`, + ); + await helper.propose(); + const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); + expect(planDelay).to.be.bignumber.eq(baseDelay); + expect(indirect).to.deep.eq([false]); + expect(withDelay).to.deep.eq([false]); + } + }); + }); + describe('base delay only', function () { for (const [delay, queue] of [ [0, true], @@ -257,10 +394,6 @@ contract('GovernorTimelockAccess', function (accounts) { this.proposal = await this.helper.setProposal([this.unrestricted.operation], 'descr'); await this.helper.propose(); - const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); - expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); - expect(indirect).to.deep.eq([false]); - expect(withDelay).to.deep.eq([false]); await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); @@ -286,12 +419,6 @@ contract('GovernorTimelockAccess', function (accounts) { this.proposal = await this.helper.setProposal([this.unrestricted.operation], 'descr'); await this.helper.propose(); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(true); - const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); - expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); - expect(indirect).to.deep.eq([false]); - expect(withDelay).to.deep.eq([false]); - await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -317,15 +444,6 @@ contract('GovernorTimelockAccess', function (accounts) { // Go through all the governance process await original.propose(); - expect(await this.mock.proposalNeedsQueuing(original.currentProposal.id)).to.be.eq(true); - const { - delay: planDelay, - indirect, - withDelay, - } = await this.mock.proposalExecutionPlan(original.currentProposal.id); - expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); - expect(indirect).to.deep.eq([true, false]); - expect(withDelay).to.deep.eq([true, false]); await original.waitForSnapshot(); await original.vote({ support: Enums.VoteType.For }, { from: voter1 }); await original.waitForDeadline(); @@ -367,12 +485,6 @@ contract('GovernorTimelockAccess', function (accounts) { this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); await this.helper.propose(); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(true); - const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); - expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); - expect(indirect).to.deep.eq([true]); - expect(withDelay).to.deep.eq([true]); - await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -417,12 +529,6 @@ contract('GovernorTimelockAccess', function (accounts) { ); await this.helper.propose(); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(true); - const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); - expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(baseDelay)); - expect(indirect).to.deep.eq([true, false, false]); - expect(withDelay).to.deep.eq([true, false, false]); - await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -465,12 +571,6 @@ contract('GovernorTimelockAccess', function (accounts) { this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); await this.helper.propose(); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(true); - const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); - expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); - expect(indirect).to.deep.eq([true]); - expect(withDelay).to.deep.eq([true]); - await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -498,15 +598,6 @@ contract('GovernorTimelockAccess', function (accounts) { // Go through all the governance process await original.propose(); - expect(await this.mock.proposalNeedsQueuing(original.currentProposal.id)).to.be.eq(true); - const { - delay: planDelay, - indirect, - withDelay, - } = await this.mock.proposalExecutionPlan(original.currentProposal.id); - expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(delay)); - expect(indirect).to.deep.eq([true]); - expect(withDelay).to.deep.eq([true]); await original.waitForSnapshot(); await original.vote({ support: Enums.VoteType.For }, { from: voter1 }); await original.waitForDeadline(); @@ -548,12 +639,6 @@ contract('GovernorTimelockAccess', function (accounts) { this.proposal = await this.helper.setProposal([this.unrestricted.operation], 'descr'); await this.helper.propose(); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(false); - const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); - expect(planDelay).to.be.bignumber.eq(web3.utils.toBN('0')); - expect(indirect).to.deep.eq([false]); - expect(withDelay).to.deep.eq([false]); - await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -575,12 +660,6 @@ contract('GovernorTimelockAccess', function (accounts) { this.proposal = await this.helper.setProposal([this.unrestricted.operation], 'descr'); await this.helper.propose(); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(false); - const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); - expect(planDelay).to.be.bignumber.eq(web3.utils.toBN('0')); - expect(indirect).to.deep.eq([false]); - expect(withDelay).to.deep.eq([false]); - await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -692,12 +771,6 @@ contract('GovernorTimelockAccess', function (accounts) { ); await this.helper.propose(); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(false); - const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); - expect(planDelay).to.be.bignumber.eq(web3.utils.toBN('0')); - expect(indirect).to.deep.eq([]); // Governor operations ignore access manager - expect(withDelay).to.deep.eq([]); // Governor operations ignore access manager - await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -738,14 +811,8 @@ contract('GovernorTimelockAccess', function (accounts) { await this.manager.setTargetFunctionRole(target, [selector], roleId, { from: admin }); await this.manager.grantRole(roleId, this.mock.address, 0, { from: admin }); - const proposal = await this.helper.setProposal([{ target, data, value: '0' }], '1'); + this.proposal = await this.helper.setProposal([{ target, data, value: '0' }], '1'); await this.helper.propose(); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(false); - const plan = await this.mock.proposalExecutionPlan(proposal.id); - expect(plan.delay).to.be.bignumber.eq(web3.utils.toBN('0')); - expect(plan.indirect).to.deep.eq([true]); - expect(plan.withDelay).to.deep.eq([false]); - await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -757,14 +824,8 @@ contract('GovernorTimelockAccess', function (accounts) { await this.mock.$_setAccessManagerIgnored(target, selector, true); - const proposalIgnored = await this.helper.setProposal([{ target, data, value: '0' }], '2'); + await this.helper.setProposal([{ target, data, value: '0' }], '2'); await this.helper.propose(); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.eq(false); - const planIgnored = await this.mock.proposalExecutionPlan(proposalIgnored.id); - expect(planIgnored.delay).to.be.bignumber.eq(web3.utils.toBN('0')); - expect(planIgnored.indirect).to.deep.eq([false]); - expect(planIgnored.withDelay).to.deep.eq([false]); - await this.helper.waitForSnapshot(); await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); await this.helper.waitForDeadline(); @@ -772,6 +833,65 @@ contract('GovernorTimelockAccess', function (accounts) { expectEvent.inTransaction(tx, this.token, 'Transfer', { from: this.mock.address }); }); }); + + describe('operating on an Ownable contract', function () { + const method = selector('$_checkOwner()'); + + beforeEach(async function () { + this.ownable = await Ownable.new(this.manager.address); + this.operation = { + target: this.ownable.address, + value: '0', + data: this.ownable.contract.methods.$_checkOwner().encodeABI(), + }; + }); + + it('succeeds with delay', async function () { + const roleId = '1'; + const executionDelay = time.duration.hours(2); + const baseDelay = time.duration.hours(1); + + // Set execution delay + await this.manager.setTargetFunctionRole(this.ownable.address, [method], roleId, { + from: admin, + }); + await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + + // Set base delay + await this.mock.$_setBaseDelaySeconds(baseDelay); + + this.proposal = await this.helper.setProposal([this.operation], `descr`); + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + await this.helper.queue(); + await this.helper.waitForEta(); + await this.helper.execute(); // Don't revert + }); + + it('succeeds without delay', async function () { + const roleId = '1'; + const executionDelay = web3.utils.toBN(0); + const baseDelay = web3.utils.toBN(0); + + // Set execution delay + await this.manager.setTargetFunctionRole(this.ownable.address, [method], roleId, { + from: admin, + }); + await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + + // Set base delay + await this.mock.$_setBaseDelaySeconds(baseDelay); + + this.proposal = await this.helper.setProposal([this.operation], `descr`); + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.waitForDeadline(); + await this.helper.execute(); // Don't revert + }); + }); }); } }); diff --git a/test/helpers/access-manager.js b/test/helpers/access-manager.js index 7dfc4c33d..beada69be 100644 --- a/test/helpers/access-manager.js +++ b/test/helpers/access-manager.js @@ -1,6 +1,9 @@ const { time } = require('@openzeppelin/test-helpers'); const { MAX_UINT64 } = require('./constants'); -const { artifacts } = require('hardhat'); +const { namespaceSlot } = require('./namespaced-storage'); +const { + time: { setNextBlockTimestamp }, +} = require('@nomicfoundation/hardhat-network-helpers'); function buildBaseRoles() { const roles = { @@ -44,21 +47,30 @@ const formatAccess = access => [access[0], access[1].toString()]; const MINSETBACK = time.duration.days(5); const EXPIRATION = time.duration.weeks(1); -let EXECUTION_ID_STORAGE_SLOT = 3n; -let CONSUMING_SCHEDULE_STORAGE_SLOT = 0n; -try { - // Try to get the artifact paths, will throw if it doesn't exist - artifacts._getArtifactPathSync('AccessManagerUpgradeable'); - artifacts._getArtifactPathSync('AccessManagedUpgradeable'); +const EXECUTION_ID_STORAGE_SLOT = namespaceSlot('AccessManager', 3n); +const CONSUMING_SCHEDULE_STORAGE_SLOT = namespaceSlot('AccessManaged', 0n); - // ERC-7201 namespace location for AccessManager - EXECUTION_ID_STORAGE_SLOT += 0x40c6c8c28789853c7efd823ab20824bbd71718a8a5915e855f6f288c9a26ad00n; - // ERC-7201 namespace location for AccessManaged - CONSUMING_SCHEDULE_STORAGE_SLOT += 0xf3177357ab46d8af007ab3fdb9af81da189e1068fefdc0073dca88a2cab40a00n; -} catch (_) { - // eslint-disable-next-line no-empty +/** + * @requires this.{manager, caller, target, calldata} + */ +async function scheduleOperation(manager, { caller, target, calldata, delay }) { + const timestamp = await time.latest(); + const scheduledAt = timestamp.addn(1); + await setNextBlockTimestamp(scheduledAt); // Fix next block timestamp for predictability + const { receipt } = await manager.schedule(target, calldata, scheduledAt.add(delay), { + from: caller, + }); + + return { + receipt, + scheduledAt, + operationId: hashOperation(caller, target, calldata), + }; } +const hashOperation = (caller, target, data) => + web3.utils.keccak256(web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], [caller, target, data])); + module.exports = { buildBaseRoles, formatAccess, @@ -66,4 +78,6 @@ module.exports = { EXPIRATION, EXECUTION_ID_STORAGE_SLOT, CONSUMING_SCHEDULE_STORAGE_SLOT, + scheduleOperation, + hashOperation, }; diff --git a/test/helpers/namespaced-storage.js b/test/helpers/namespaced-storage.js new file mode 100644 index 000000000..fdd761fdc --- /dev/null +++ b/test/helpers/namespaced-storage.js @@ -0,0 +1,30 @@ +const { artifacts } = require('hardhat'); + +function namespaceId(contractName) { + return `openzeppelin.storage.${contractName}`; +} + +function namespaceLocation(id) { + const hashIdBN = web3.utils.toBN(web3.utils.keccak256(id)).subn(1); // keccak256(id) - 1 + const hashIdHex = web3.utils.padLeft(web3.utils.numberToHex(hashIdBN), 64); + + const mask = BigInt(web3.utils.padLeft('0x00', 64, 'f')); // ~0xff + + return BigInt(web3.utils.keccak256(hashIdHex)) & mask; +} + +function namespaceSlot(contractName, offset) { + try { + // Try to get the artifact paths, will throw if it doesn't exist + artifacts._getArtifactPathSync(`${contractName}Upgradeable`); + return offset + namespaceLocation(namespaceId(contractName)); + } catch (_) { + return offset; + } +} + +module.exports = { + namespaceSlot, + namespaceLocation, + namespaceId, +}; From 16ee2e16da7829f4711edbc760254b84d7869203 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 12:17:48 -0600 Subject: [PATCH 096/167] Update dependency undici to v5.26.2 [SECURITY] (#4687) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0f4f9f55e..669e397ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "openzeppelin-solidity", - "version": "4.9.2", + "version": "5.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "openzeppelin-solidity", - "version": "4.9.2", + "version": "5.0.0", "license": "MIT", "devDependencies": { "@changesets/changelog-github": "^0.4.8", @@ -1403,6 +1403,15 @@ "@ethersproject/strings": "^5.7.0" } }, + "node_modules/@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", + "dev": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@frangio/servbot": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/@frangio/servbot/-/servbot-0.2.5.tgz", @@ -4749,18 +4758,6 @@ "node": ">=6.14.2" } }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dev": true, - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -13966,15 +13963,6 @@ "mixme": "^0.5.1" } }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", @@ -14918,12 +14906,12 @@ "dev": true }, "node_modules/undici": { - "version": "5.25.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.25.1.tgz", - "integrity": "sha512-nTw6b2G2OqP6btYPyghCgV4hSwjJlL/78FMJatVLCa3otj6PCOQSt6dVtYt82OtNqFz8XsnJ+vsXLADPXjPhqw==", + "version": "5.26.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.2.tgz", + "integrity": "sha512-a4PDLQgLTPHVzOK+x3F79/M4GtyYPl+aX9AAK7aQxpwxDwCqkeZCScy7Gk5kWT3JtdFq1uhO3uZJdLtHI4dK9A==", "dev": true, "dependencies": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" }, "engines": { "node": ">=14.0" From 9c22fb5f33ece00e35ed1be4a4a3eb82c6aefeaa Mon Sep 17 00:00:00 2001 From: ernestognw Date: Mon, 16 Oct 2023 15:51:33 -0600 Subject: [PATCH 097/167] Clarify is fine relying on the storage slot --- contracts/proxy/transparent/TransparentUpgradeableProxy.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol index b2021c74b..c4488f99f 100644 --- a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +++ b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol @@ -50,7 +50,8 @@ interface ITransparentUpgradeableProxy is IERC1967 { * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an - * undesirable state where the admin slot is different from the actual admin. + * undesirable state where the admin slot is different from the actual admin. Relying in the value of the admin slot + * is generally fine if the implementation is trusted. * * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the * compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new From aed22fbc2203a59cf8d092e8f2b51cc534d79355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Tue, 17 Oct 2023 02:03:04 -0600 Subject: [PATCH 098/167] Add `view` modifier to `proxyAdmin` in TransparentUpgradeableProxy (#4688) Co-authored-by: Eric Lau --- .changeset/eleven-planets-relax.md | 5 +++++ contracts/proxy/transparent/TransparentUpgradeableProxy.sol | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/eleven-planets-relax.md diff --git a/.changeset/eleven-planets-relax.md b/.changeset/eleven-planets-relax.md new file mode 100644 index 000000000..a1f1bbf1c --- /dev/null +++ b/.changeset/eleven-planets-relax.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': patch +--- + +`TransparentUpgradeableProxy`: Make internal `_proxyAdmin()` getter have `view` visibility. diff --git a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol index c4488f99f..2e3fbc538 100644 --- a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +++ b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol @@ -50,7 +50,7 @@ interface ITransparentUpgradeableProxy is IERC1967 { * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an - * undesirable state where the admin slot is different from the actual admin. Relying in the value of the admin slot + * undesirable state where the admin slot is different from the actual admin. Relying on the value of the admin slot * is generally fine if the implementation is trusted. * * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the @@ -84,7 +84,7 @@ contract TransparentUpgradeableProxy is ERC1967Proxy { /** * @dev Returns the admin of this proxy. */ - function _proxyAdmin() internal virtual returns (address) { + function _proxyAdmin() internal view virtual returns (address) { return _admin; } From 149e1b79fecb9db32f732c8c9f05ac2d8fa97471 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 17 Oct 2023 10:05:58 +0200 Subject: [PATCH 099/167] Migrate Ownable tests (#4657) Co-authored-by: ernestognw --- .github/workflows/checks.yml | 7 +- hardhat.config.js | 7 +- hardhat/env-artifacts.js | 38 +- hardhat/env-contract.js | 36 +- package-lock.json | 1086 +++++++++++++++++++++++-- package.json | 6 +- test/access/Ownable.test.js | 71 +- test/access/Ownable2Step.test.js | 91 ++- test/helpers/chainid.js | 2 + test/helpers/create.js | 22 +- test/helpers/customError.js | 2 + test/sanity.test.js | 40 + test/token/common/ERC2981.behavior.js | 2 +- 13 files changed, 1245 insertions(+), 165 deletions(-) create mode 100644 test/sanity.test.js diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 17dfb669d..9951280b7 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -64,6 +64,8 @@ jobs: cp -rnT contracts lib/openzeppelin-contracts/contracts - name: Transpile to upgradeable run: bash scripts/upgradeable/transpile.sh + - name: Compile contracts # TODO: Remove after migrating tests to ethers + run: npm run compile - name: Run tests run: npm run test - name: Check linearisation of the inheritance graph @@ -92,7 +94,10 @@ jobs: - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - - run: npm run coverage + - name: Compile contracts # TODO: Remove after migrating tests to ethers + run: npm run compile + - name: Run coverage + run: npm run coverage - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/hardhat.config.js b/hardhat.config.js index 4d5ab944a..3102cfda5 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -55,7 +55,9 @@ const argv = require('yargs/yargs')() }, }).argv; -require('@nomiclabs/hardhat-truffle5'); +require('@nomiclabs/hardhat-truffle5'); // deprecated +require('@nomicfoundation/hardhat-toolbox'); +require('@nomicfoundation/hardhat-ethers'); require('hardhat-ignore-warnings'); require('hardhat-exposed'); require('solidity-docgen'); @@ -69,7 +71,7 @@ for (const f of fs.readdirSync(path.join(__dirname, 'hardhat'))) { require(path.join(__dirname, 'hardhat', f)); } -const withOptimizations = argv.gas || argv.compileMode === 'production'; +const withOptimizations = argv.gas || argv.coverage || argv.compileMode === 'production'; /** * @type import('hardhat/config').HardhatUserConfig @@ -99,7 +101,6 @@ module.exports = { }, networks: { hardhat: { - blockGasLimit: 10000000, allowUnlimitedContractSize: !withOptimizations, }, }, diff --git a/hardhat/env-artifacts.js b/hardhat/env-artifacts.js index fbbea2e2d..4cda9387c 100644 --- a/hardhat/env-artifacts.js +++ b/hardhat/env-artifacts.js @@ -1,18 +1,40 @@ const { HardhatError } = require('hardhat/internal/core/errors'); -// Modifies `artifacts.require(X)` so that instead of X it loads the XUpgradeable contract. +function isExpectedError(e, suffix) { + // HH700: Artifact not found - from https://hardhat.org/hardhat-runner/docs/errors#HH700 + return HardhatError.isHardhatError(e) && e.number === 700 && suffix !== ''; +} + +// Modifies the artifact require functions so that instead of X it loads the XUpgradeable contract. // This allows us to run the same test suite on both the original and the transpiled and renamed Upgradeable contracts. +extendEnvironment(hre => { + const suffixes = ['UpgradeableWithInit', 'Upgradeable', '']; -extendEnvironment(env => { - const artifactsRequire = env.artifacts.require; + // Truffe (deprecated) + const originalRequire = hre.artifacts.require; + hre.artifacts.require = function (name) { + for (const suffix of suffixes) { + try { + return originalRequire.call(this, name + suffix); + } catch (e) { + if (isExpectedError(e, suffix)) { + continue; + } else { + throw e; + } + } + } + throw new Error('Unreachable'); + }; - env.artifacts.require = name => { - for (const suffix of ['UpgradeableWithInit', 'Upgradeable', '']) { + // Ethers + const originalReadArtifact = hre.artifacts.readArtifact; + hre.artifacts.readArtifact = async function (name) { + for (const suffix of suffixes) { try { - return artifactsRequire(name + suffix); + return await originalReadArtifact.call(this, name + suffix); } catch (e) { - // HH700: Artifact not found - from https://hardhat.org/hardhat-runner/docs/errors#HH700 - if (HardhatError.isHardhatError(e) && e.number === 700 && suffix !== '') { + if (isExpectedError(e, suffix)) { continue; } else { throw e; diff --git a/hardhat/env-contract.js b/hardhat/env-contract.js index c615249a3..06d4f187d 100644 --- a/hardhat/env-contract.js +++ b/hardhat/env-contract.js @@ -1,24 +1,40 @@ -extendEnvironment(env => { - const { contract } = env; +// Remove the default account from the accounts list used in tests, in order +// to protect tests against accidentally passing due to the contract +// deployer being used subsequently as function caller +// +// This operation affects: +// - the accounts (and signersAsPromise) parameters of `contract` blocks +// - the return of hre.ethers.getSigners() +extendEnvironment(hre => { + // TODO: replace with a mocha root hook. + // (see https://github.com/sc-forks/solidity-coverage/issues/819#issuecomment-1762963679) + if (!process.env.COVERAGE) { + // override hre.ethers.getSigner() + // note that we don't just discard the first signer, we also cache the value to improve speed. + const originalGetSigners = hre.ethers.getSigners; + const filteredSignersAsPromise = originalGetSigners().then(signers => signers.slice(1)); + hre.ethers.getSigners = () => filteredSignersAsPromise; + } - env.contract = function (name, body) { - const { takeSnapshot } = require('@nomicfoundation/hardhat-network-helpers'); - - contract(name, accounts => { - // reset the state of the chain in between contract test suites + // override hre.contract + const originalContract = hre.contract; + hre.contract = function (name, body) { + originalContract.call(this, name, accounts => { let snapshot; before(async function () { + // reset the state of the chain in between contract test suites + // TODO: this should be removed when migration to ethers is over + const { takeSnapshot } = require('@nomicfoundation/hardhat-network-helpers'); snapshot = await takeSnapshot(); }); after(async function () { + // reset the state of the chain in between contract test suites + // TODO: this should be removed when migration to ethers is over await snapshot.restore(); }); - // remove the default account from the accounts list used in tests, in order - // to protect tests against accidentally passing due to the contract - // deployer being used subsequently as function caller body(accounts.slice(1)); }); }; diff --git a/package-lock.json b/package-lock.json index 669e397ca..79ed96c12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,8 +13,11 @@ "@changesets/cli": "^2.26.0", "@changesets/pre": "^1.0.14", "@changesets/read": "^0.5.9", + "@nomicfoundation/hardhat-chai-matchers": "^2.0.2", + "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", + "@nomicfoundation/hardhat-toolbox": "^3.0.0", "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.5", @@ -28,9 +31,10 @@ "eth-sig-util": "^3.0.0", "ethereumjs-util": "^7.0.7", "ethereumjs-wallet": "^1.0.1", + "ethers": "^6.7.1", "glob": "^10.3.5", "graphlib": "^2.1.8", - "hardhat": "^2.9.1", + "hardhat": "^2.17.4", "hardhat-exposed": "^0.3.13", "hardhat-gas-reporter": "^1.0.9", "hardhat-ignore-warnings": "^0.2.0", @@ -63,6 +67,12 @@ "node": ">=0.10.0" } }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.9.2.tgz", + "integrity": "sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg==", + "dev": true + }, "node_modules/@babel/code-frame": { "version": "7.22.13", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", @@ -431,6 +441,19 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@ensdomains/address-encoder": { "version": "0.1.9", "resolved": "https://registry.npmjs.org/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz", @@ -1551,6 +1574,34 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true, + "peer": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@manypkg/find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", @@ -2022,6 +2073,38 @@ "node": ">=14" } }, + "node_modules/@nomicfoundation/hardhat-chai-matchers": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.2.tgz", + "integrity": "sha512-9Wu9mRtkj0U9ohgXYFbB/RQDa+PcEdyBm2suyEtsJf3PqzZEEjLUZgWnMjlFhATMk/fp3BjmnYVPrwl+gr8oEw==", + "dev": true, + "dependencies": { + "@types/chai-as-promised": "^7.1.3", + "chai-as-promised": "^7.1.1", + "deep-eql": "^4.0.1", + "ordinal": "^1.0.3" + }, + "peerDependencies": { + "@nomicfoundation/hardhat-ethers": "^3.0.0", + "chai": "^4.2.0", + "ethers": "^6.1.0", + "hardhat": "^2.9.4" + } + }, + "node_modules/@nomicfoundation/hardhat-ethers": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.4.tgz", + "integrity": "sha512-k9qbLoY7qn6C6Y1LI0gk2kyHXil2Tauj4kGzQ8pgxYXIGw8lWn8tuuL72E11CrlKaXRUvOgF0EXrv/msPI2SbA==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "lodash.isequal": "^4.5.0" + }, + "peerDependencies": { + "ethers": "^6.1.0", + "hardhat": "^2.0.0" + } + }, "node_modules/@nomicfoundation/hardhat-foundry": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-foundry/-/hardhat-foundry-1.1.1.tgz", @@ -2046,6 +2129,75 @@ "hardhat": "^2.9.5" } }, + "node_modules/@nomicfoundation/hardhat-toolbox": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-3.0.0.tgz", + "integrity": "sha512-MsteDXd0UagMksqm9KvcFG6gNKYNa3GGNCy73iQ6bEasEgg2v8Qjl6XA5hjs8o5UD5A3153B6W2BIVJ8SxYUtA==", + "dev": true, + "peerDependencies": { + "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", + "@nomicfoundation/hardhat-ethers": "^3.0.0", + "@nomicfoundation/hardhat-network-helpers": "^1.0.0", + "@nomicfoundation/hardhat-verify": "^1.0.0", + "@typechain/ethers-v6": "^0.4.0", + "@typechain/hardhat": "^8.0.0", + "@types/chai": "^4.2.0", + "@types/mocha": ">=9.1.0", + "@types/node": ">=12.0.0", + "chai": "^4.2.0", + "ethers": "^6.4.0", + "hardhat": "^2.11.0", + "hardhat-gas-reporter": "^1.0.8", + "solidity-coverage": "^0.8.1", + "ts-node": ">=8.0.0", + "typechain": "^8.2.0", + "typescript": ">=4.5.0" + } + }, + "node_modules/@nomicfoundation/hardhat-verify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-1.1.1.tgz", + "integrity": "sha512-9QsTYD7pcZaQFEA3tBb/D/oCStYDiEVDN7Dxeo/4SCyHRSm86APypxxdOMEPlGmXsAvd+p1j/dTODcpxb8aztA==", + "dev": true, + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.1.2", + "@ethersproject/address": "^5.0.2", + "cbor": "^8.1.0", + "chalk": "^2.4.2", + "debug": "^4.1.1", + "lodash.clonedeep": "^4.5.0", + "semver": "^6.3.0", + "table": "^6.8.0", + "undici": "^5.14.0" + }, + "peerDependencies": { + "hardhat": "^2.0.4" + } + }, + "node_modules/@nomicfoundation/hardhat-verify/node_modules/cbor": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", + "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", + "dev": true, + "peer": true, + "dependencies": { + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=12.19" + } + }, + "node_modules/@nomicfoundation/hardhat-verify/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@nomicfoundation/solidity-analyzer": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz", @@ -2283,6 +2435,64 @@ "web3-utils": "^1.2.1" } }, + "node_modules/@nomiclabs/truffle-contract/node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", + "dev": true + }, + "node_modules/@nomiclabs/truffle-contract/node_modules/ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "dev": true, + "dependencies": { + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "node_modules/@nomiclabs/truffle-contract/node_modules/hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/@nomiclabs/truffle-contract/node_modules/js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", + "dev": true + }, + "node_modules/@nomiclabs/truffle-contract/node_modules/scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "node_modules/@nomiclabs/truffle-contract/node_modules/setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", + "dev": true + }, + "node_modules/@nomiclabs/truffle-contract/node_modules/uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true + }, "node_modules/@openzeppelin/contract-loader": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/@openzeppelin/contract-loader/-/contract-loader-0.6.3.tgz", @@ -2977,6 +3187,12 @@ "node": "^16.20 || ^18.16 || >=20" } }, + "node_modules/@truffle/contract/node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", + "dev": true + }, "node_modules/@truffle/contract/node_modules/cross-fetch": { "version": "3.1.8", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", @@ -2997,6 +3213,58 @@ "xhr-request-promise": "^0.1.2" } }, + "node_modules/@truffle/contract/node_modules/ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "dev": true, + "dependencies": { + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "node_modules/@truffle/contract/node_modules/ethers/node_modules/scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "node_modules/@truffle/contract/node_modules/ethers/node_modules/uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true + }, + "node_modules/@truffle/contract/node_modules/hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/@truffle/contract/node_modules/js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", + "dev": true + }, + "node_modules/@truffle/contract/node_modules/setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", + "dev": true + }, "node_modules/@truffle/contract/node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -3367,6 +3635,12 @@ "node": "^16.20 || ^18.16 || >=20" } }, + "node_modules/@truffle/interface-adapter/node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", + "dev": true + }, "node_modules/@truffle/interface-adapter/node_modules/bignumber.js": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", @@ -3408,6 +3682,64 @@ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", "dev": true }, + "node_modules/@truffle/interface-adapter/node_modules/ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "dev": true, + "dependencies": { + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/ethers/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/@truffle/interface-adapter/node_modules/ethers/node_modules/scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "node_modules/@truffle/interface-adapter/node_modules/ethers/node_modules/uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true + }, + "node_modules/@truffle/interface-adapter/node_modules/hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", + "dev": true + }, + "node_modules/@truffle/interface-adapter/node_modules/setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", + "dev": true + }, "node_modules/@truffle/interface-adapter/node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -3745,6 +4077,105 @@ "node": ">=4" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true, + "peer": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "peer": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "peer": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "peer": true + }, + "node_modules/@typechain/ethers-v6": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v6/-/ethers-v6-0.4.3.tgz", + "integrity": "sha512-TrxBsyb4ryhaY9keP6RzhFCviWYApcLCIRMPyWaKp2cZZrfaM3QBoxXTnw/eO4+DAY3l+8O0brNW0WgeQeOiDA==", + "dev": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.15", + "ts-essentials": "^7.0.1" + }, + "peerDependencies": { + "ethers": "6.x", + "typechain": "^8.3.1", + "typescript": ">=4.7.0" + } + }, + "node_modules/@typechain/hardhat": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-8.0.3.tgz", + "integrity": "sha512-MytSmJJn+gs7Mqrpt/gWkTCOpOQ6ZDfRrRT2gtZL0rfGe4QrU4x9ZdW15fFbVM/XTa+5EsKiOMYXhRABibNeng==", + "dev": true, + "peer": true, + "dependencies": { + "fs-extra": "^9.1.0" + }, + "peerDependencies": { + "@typechain/ethers-v6": "^0.4.3", + "ethers": "^6.1.0", + "hardhat": "^2.9.9", + "typechain": "^8.3.1" + } + }, + "node_modules/@typechain/hardhat/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "peer": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typechain/hardhat/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "peer": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@typechain/hardhat/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/@types/bignumber.js": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-5.0.0.tgz", @@ -3782,6 +4213,15 @@ "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", "dev": true }, + "node_modules/@types/chai-as-promised": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.6.tgz", + "integrity": "sha512-cQLhk8fFarRVZAXUQV1xEnZgMoPxqKojBvRkqPCKPQCzEhpbbSKl1Uu75kDng7k5Ln6LQLUmNBjLlFthCgm1NA==", + "dev": true, + "dependencies": { + "@types/chai": "*" + } + }, "node_modules/@types/concat-stream": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", @@ -3852,6 +4292,13 @@ "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", "dev": true }, + "node_modules/@types/mocha": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", + "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", + "dev": true, + "peer": true + }, "node_modules/@types/node": { "version": "12.20.55", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", @@ -3873,6 +4320,13 @@ "@types/node": "*" } }, + "node_modules/@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true, + "peer": true + }, "node_modules/@types/qs": { "version": "6.9.8", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.8.tgz", @@ -4007,6 +4461,16 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/address": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz", @@ -4167,6 +4631,13 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "peer": true + }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -4176,6 +4647,16 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/array-buffer-byte-length": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", @@ -4361,6 +4842,16 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", @@ -4939,6 +5430,18 @@ "node": ">=4" } }, + "node_modules/chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 5" + } + }, "node_modules/chai-bn": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/chai-bn/-/chai-bn-0.2.2.tgz", @@ -5316,6 +5819,58 @@ "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", "dev": true }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", + "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^4.0.2", + "chalk": "^2.4.2", + "table-layout": "^1.0.2", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", @@ -5547,6 +6102,13 @@ "sha.js": "^2.4.8" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "peer": true + }, "node_modules/cross-fetch": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", @@ -5794,6 +6356,16 @@ "node": ">=6" } }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -7094,63 +7666,84 @@ } }, "node_modules/ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.7.1.tgz", + "integrity": "sha512-qX5kxIFMfg1i+epfgb0xF4WM7IqapIIu50pOJ17aebkxxa4BacW5jFrQRmCJpDEg2ZK2oNtR5QjrQ1WDBF29dA==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "dependencies": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" + "@adraffy/ens-normalize": "1.9.2", + "@noble/hashes": "1.1.2", + "@noble/secp256k1": "1.7.1", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", + "tslib": "2.4.0", + "ws": "8.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/ethers/node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "dev": true - }, - "node_modules/ethers/node_modules/hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "node_modules/ethers/node_modules/@noble/hashes": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz", + "integrity": "sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==", "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/ethers/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] }, - "node_modules/ethers/node_modules/scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "node_modules/ethers/node_modules/@types/node": { + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==", "dev": true }, - "node_modules/ethers/node_modules/setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", + "node_modules/ethers/node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", "dev": true }, - "node_modules/ethers/node_modules/uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "node_modules/ethers/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, + "node_modules/ethers/node_modules/ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/ethjs-abi": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", @@ -7520,6 +8113,19 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -8191,9 +8797,9 @@ } }, "node_modules/hardhat": { - "version": "2.17.3", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.17.3.tgz", - "integrity": "sha512-SFZoYVXW1bWJZrIIKXOA+IgcctfuKXDwENywiYNT2dM3YQc4fXNaTbuk/vpPzHIF50upByx4zW5EqczKYQubsA==", + "version": "2.17.4", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.17.4.tgz", + "integrity": "sha512-YTyHjVc9s14CY/O7Dbtzcr/92fcz6AzhrMaj6lYsZpYPIPLzOrFCZHHPxfGQB6FiE6IPNE0uJaAbr7zGF79goA==", "dev": true, "dependencies": { "@ethersproject/abi": "^5.1.2", @@ -9862,12 +10468,32 @@ "integrity": "sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw==", "dev": true }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true, + "peer": true + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true, + "peer": true + }, "node_modules/lodash.flatten": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", "dev": true }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -10029,6 +10655,13 @@ "yallist": "^3.0.2" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "peer": true + }, "node_modules/map-obj": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", @@ -11062,6 +11695,12 @@ "node": ">= 0.8.0" } }, + "node_modules/ordinal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", + "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", + "dev": true + }, "node_modules/os-locale": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", @@ -11908,6 +12547,16 @@ "node": ">=8" } }, + "node_modules/reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/regenerator-runtime": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", @@ -13981,6 +14630,13 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/string-format": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz", + "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==", + "dev": true, + "peer": true + }, "node_modules/string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -14341,6 +14997,42 @@ "node": ">=10.0.0" } }, + "node_modules/table-layout": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table-layout/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/table/node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", @@ -14585,6 +15277,162 @@ "node": ">=8" } }, + "node_modules/ts-command-line-args": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", + "integrity": "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==", + "dev": true, + "peer": true, + "dependencies": { + "chalk": "^4.1.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.0", + "string-format": "^2.0.0" + }, + "bin": { + "write-markdown": "dist/write-markdown.js" + } + }, + "node_modules/ts-command-line-args/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ts-command-line-args/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "peer": 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/ts-command-line-args/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ts-command-line-args/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "peer": true + }, + "node_modules/ts-command-line-args/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-command-line-args/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-essentials": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", + "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", + "dev": true, + "peer": true, + "peerDependencies": { + "typescript": ">=3.7.0" + } + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -14785,6 +15633,81 @@ "node": ">= 0.6" } }, + "node_modules/typechain": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.1.tgz", + "integrity": "sha512-fA7clol2IP/56yq6vkMTR+4URF1nGjV82Wx6Rf09EsqD4tkzMAvEaqYxVFCavJm/1xaRga/oD55K+4FtuXwQOQ==", + "dev": true, + "peer": true, + "dependencies": { + "@types/prettier": "^2.1.1", + "debug": "^4.3.1", + "fs-extra": "^7.0.0", + "glob": "7.1.7", + "js-sha3": "^0.8.0", + "lodash": "^4.17.15", + "mkdirp": "^1.0.4", + "prettier": "^2.3.1", + "ts-command-line-args": "^2.2.0", + "ts-essentials": "^7.0.1" + }, + "bin": { + "typechain": "dist/cli/cli.js" + }, + "peerDependencies": { + "typescript": ">=4.3.0" + } + }, + "node_modules/typechain/node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typechain/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "peer": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/typechain/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/typed-array-buffer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", @@ -14865,6 +15788,30 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typescript": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/uglify-js": { "version": "3.17.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", @@ -15021,6 +15968,13 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "peer": true + }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -16070,6 +17024,30 @@ "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "dev": true }, + "node_modules/wordwrapjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", + "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", + "dev": true, + "peer": true, + "dependencies": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/wordwrapjs/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -16511,6 +17489,16 @@ "node": ">=12" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index c7e92efa0..4b0be403d 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,11 @@ "@changesets/cli": "^2.26.0", "@changesets/pre": "^1.0.14", "@changesets/read": "^0.5.9", + "@nomicfoundation/hardhat-chai-matchers": "^2.0.2", + "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", + "@nomicfoundation/hardhat-toolbox": "^3.0.0", "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.5", @@ -68,9 +71,10 @@ "eth-sig-util": "^3.0.0", "ethereumjs-util": "^7.0.7", "ethereumjs-wallet": "^1.0.1", + "ethers": "^6.7.1", "glob": "^10.3.5", "graphlib": "^2.1.8", - "hardhat": "^2.9.1", + "hardhat": "^2.17.4", "hardhat-exposed": "^0.3.13", "hardhat-gas-reporter": "^1.0.9", "hardhat-ignore-warnings": "^0.2.0", diff --git a/test/access/Ownable.test.js b/test/access/Ownable.test.js index f85daec5d..fabcb7d52 100644 --- a/test/access/Ownable.test.js +++ b/test/access/Ownable.test.js @@ -1,72 +1,73 @@ -const { constants, expectEvent } = require('@openzeppelin/test-helpers'); -const { expectRevertCustomError } = require('../helpers/customError'); - -const { ZERO_ADDRESS } = constants; - +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const Ownable = artifacts.require('$Ownable'); - -contract('Ownable', function (accounts) { - const [owner, other] = accounts; +async function fixture() { + const [owner, other] = await ethers.getSigners(); + const ownable = await ethers.deployContract('$Ownable', [owner]); + return { owner, other, ownable }; +} +describe('Ownable', function () { beforeEach(async function () { - this.ownable = await Ownable.new(owner); + Object.assign(this, await loadFixture(fixture)); }); it('rejects zero address for initialOwner', async function () { - await expectRevertCustomError(Ownable.new(constants.ZERO_ADDRESS), 'OwnableInvalidOwner', [constants.ZERO_ADDRESS]); + await expect(ethers.deployContract('$Ownable', [ethers.ZeroAddress])) + .to.be.revertedWithCustomError({ interface: this.ownable.interface }, 'OwnableInvalidOwner') + .withArgs(ethers.ZeroAddress); }); it('has an owner', async function () { - expect(await this.ownable.owner()).to.equal(owner); + expect(await this.ownable.owner()).to.equal(this.owner.address); }); describe('transfer ownership', function () { it('changes owner after transfer', async function () { - const receipt = await this.ownable.transferOwnership(other, { from: owner }); - expectEvent(receipt, 'OwnershipTransferred'); + await expect(this.ownable.connect(this.owner).transferOwnership(this.other)) + .to.emit(this.ownable, 'OwnershipTransferred') + .withArgs(this.owner.address, this.other.address); - expect(await this.ownable.owner()).to.equal(other); + expect(await this.ownable.owner()).to.equal(this.other.address); }); it('prevents non-owners from transferring', async function () { - await expectRevertCustomError( - this.ownable.transferOwnership(other, { from: other }), - 'OwnableUnauthorizedAccount', - [other], - ); + await expect(this.ownable.connect(this.other).transferOwnership(this.other)) + .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') + .withArgs(this.other.address); }); it('guards ownership against stuck state', async function () { - await expectRevertCustomError( - this.ownable.transferOwnership(ZERO_ADDRESS, { from: owner }), - 'OwnableInvalidOwner', - [ZERO_ADDRESS], - ); + await expect(this.ownable.connect(this.owner).transferOwnership(ethers.ZeroAddress)) + .to.be.revertedWithCustomError(this.ownable, 'OwnableInvalidOwner') + .withArgs(ethers.ZeroAddress); }); }); describe('renounce ownership', function () { it('loses ownership after renouncement', async function () { - const receipt = await this.ownable.renounceOwnership({ from: owner }); - expectEvent(receipt, 'OwnershipTransferred'); + await expect(this.ownable.connect(this.owner).renounceOwnership()) + .to.emit(this.ownable, 'OwnershipTransferred') + .withArgs(this.owner.address, ethers.ZeroAddress); - expect(await this.ownable.owner()).to.equal(ZERO_ADDRESS); + expect(await this.ownable.owner()).to.equal(ethers.ZeroAddress); }); it('prevents non-owners from renouncement', async function () { - await expectRevertCustomError(this.ownable.renounceOwnership({ from: other }), 'OwnableUnauthorizedAccount', [ - other, - ]); + await expect(this.ownable.connect(this.other).renounceOwnership()) + .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') + .withArgs(this.other.address); }); it('allows to recover access using the internal _transferOwnership', async function () { - await this.ownable.renounceOwnership({ from: owner }); - const receipt = await this.ownable.$_transferOwnership(other); - expectEvent(receipt, 'OwnershipTransferred'); + await this.ownable.connect(this.owner).renounceOwnership(); + + await expect(this.ownable.$_transferOwnership(this.other)) + .to.emit(this.ownable, 'OwnershipTransferred') + .withArgs(ethers.ZeroAddress, this.other.address); - expect(await this.ownable.owner()).to.equal(other); + expect(await this.ownable.owner()).to.equal(this.other.address); }); }); }); diff --git a/test/access/Ownable2Step.test.js b/test/access/Ownable2Step.test.js index bdbac48fa..e77307d98 100644 --- a/test/access/Ownable2Step.test.js +++ b/test/access/Ownable2Step.test.js @@ -1,70 +1,85 @@ -const { constants, expectEvent } = require('@openzeppelin/test-helpers'); -const { ZERO_ADDRESS } = constants; +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../helpers/customError'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const Ownable2Step = artifacts.require('$Ownable2Step'); - -contract('Ownable2Step', function (accounts) { - const [owner, accountA, accountB] = accounts; +async function fixture() { + const [owner, accountA, accountB] = await ethers.getSigners(); + const ownable2Step = await ethers.deployContract('$Ownable2Step', [owner]); + return { + ownable2Step, + owner, + accountA, + accountB, + }; +} +describe('Ownable2Step', function () { beforeEach(async function () { - this.ownable2Step = await Ownable2Step.new(owner); + Object.assign(this, await loadFixture(fixture)); }); describe('transfer ownership', function () { it('starting a transfer does not change owner', async function () { - const receipt = await this.ownable2Step.transferOwnership(accountA, { from: owner }); - expectEvent(receipt, 'OwnershipTransferStarted', { previousOwner: owner, newOwner: accountA }); - expect(await this.ownable2Step.owner()).to.equal(owner); - expect(await this.ownable2Step.pendingOwner()).to.equal(accountA); + await expect(this.ownable2Step.connect(this.owner).transferOwnership(this.accountA)) + .to.emit(this.ownable2Step, 'OwnershipTransferStarted') + .withArgs(this.owner.address, this.accountA.address); + + expect(await this.ownable2Step.owner()).to.equal(this.owner.address); + expect(await this.ownable2Step.pendingOwner()).to.equal(this.accountA.address); }); it('changes owner after transfer', async function () { - await this.ownable2Step.transferOwnership(accountA, { from: owner }); - const receipt = await this.ownable2Step.acceptOwnership({ from: accountA }); - expectEvent(receipt, 'OwnershipTransferred', { previousOwner: owner, newOwner: accountA }); - expect(await this.ownable2Step.owner()).to.equal(accountA); - expect(await this.ownable2Step.pendingOwner()).to.not.equal(accountA); + await this.ownable2Step.connect(this.owner).transferOwnership(this.accountA); + + await expect(this.ownable2Step.connect(this.accountA).acceptOwnership()) + .to.emit(this.ownable2Step, 'OwnershipTransferred') + .withArgs(this.owner.address, this.accountA.address); + + expect(await this.ownable2Step.owner()).to.equal(this.accountA.address); + expect(await this.ownable2Step.pendingOwner()).to.equal(ethers.ZeroAddress); }); it('guards transfer against invalid user', async function () { - await this.ownable2Step.transferOwnership(accountA, { from: owner }); - await expectRevertCustomError( - this.ownable2Step.acceptOwnership({ from: accountB }), - 'OwnableUnauthorizedAccount', - [accountB], - ); + await this.ownable2Step.connect(this.owner).transferOwnership(this.accountA); + + await expect(this.ownable2Step.connect(this.accountB).acceptOwnership()) + .to.be.revertedWithCustomError(this.ownable2Step, 'OwnableUnauthorizedAccount') + .withArgs(this.accountB.address); }); }); describe('renouncing ownership', async function () { it('changes owner after renouncing ownership', async function () { - await this.ownable2Step.renounceOwnership({ from: owner }); + await expect(this.ownable2Step.connect(this.owner).renounceOwnership()) + .to.emit(this.ownable2Step, 'OwnershipTransferred') + .withArgs(this.owner.address, ethers.ZeroAddress); + // If renounceOwnership is removed from parent an alternative is needed ... // without it is difficult to cleanly renounce with the two step process // see: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3620#discussion_r957930388 - expect(await this.ownable2Step.owner()).to.equal(ZERO_ADDRESS); + expect(await this.ownable2Step.owner()).to.equal(ethers.ZeroAddress); }); it('pending owner resets after renouncing ownership', async function () { - await this.ownable2Step.transferOwnership(accountA, { from: owner }); - expect(await this.ownable2Step.pendingOwner()).to.equal(accountA); - await this.ownable2Step.renounceOwnership({ from: owner }); - expect(await this.ownable2Step.pendingOwner()).to.equal(ZERO_ADDRESS); - await expectRevertCustomError( - this.ownable2Step.acceptOwnership({ from: accountA }), - 'OwnableUnauthorizedAccount', - [accountA], - ); + await this.ownable2Step.connect(this.owner).transferOwnership(this.accountA); + expect(await this.ownable2Step.pendingOwner()).to.equal(this.accountA.address); + + await this.ownable2Step.connect(this.owner).renounceOwnership(); + expect(await this.ownable2Step.pendingOwner()).to.equal(ethers.ZeroAddress); + + await expect(this.ownable2Step.connect(this.accountA).acceptOwnership()) + .to.be.revertedWithCustomError(this.ownable2Step, 'OwnableUnauthorizedAccount') + .withArgs(this.accountA.address); }); it('allows to recover access using the internal _transferOwnership', async function () { - await this.ownable2Step.renounceOwnership({ from: owner }); - const receipt = await this.ownable2Step.$_transferOwnership(accountA); - expectEvent(receipt, 'OwnershipTransferred'); + await this.ownable2Step.connect(this.owner).renounceOwnership(); + + await expect(this.ownable2Step.$_transferOwnership(this.accountA)) + .to.emit(this.ownable2Step, 'OwnershipTransferred') + .withArgs(ethers.ZeroAddress, this.accountA.address); - expect(await this.ownable2Step.owner()).to.equal(accountA); + expect(await this.ownable2Step.owner()).to.equal(this.accountA.address); }); }); }); diff --git a/test/helpers/chainid.js b/test/helpers/chainid.js index 58757eb80..693a822e5 100644 --- a/test/helpers/chainid.js +++ b/test/helpers/chainid.js @@ -7,4 +7,6 @@ async function getChainId() { module.exports = { getChainId, + // TODO: when tests are ready to support bigint chainId + // getChainId: ethers.provider.getNetwork().then(network => network.chainId), }; diff --git a/test/helpers/create.js b/test/helpers/create.js index 98a0d4c47..fa837395a 100644 --- a/test/helpers/create.js +++ b/test/helpers/create.js @@ -1,22 +1,6 @@ -const RLP = require('rlp'); - -function computeCreateAddress(deployer, nonce) { - return web3.utils.toChecksumAddress(web3.utils.sha3(RLP.encode([deployer.address ?? deployer, nonce])).slice(-40)); -} - -function computeCreate2Address(saltHex, bytecode, deployer) { - return web3.utils.toChecksumAddress( - web3.utils - .sha3( - `0x${['ff', deployer.address ?? deployer, saltHex, web3.utils.soliditySha3(bytecode)] - .map(x => x.replace(/0x/, '')) - .join('')}`, - ) - .slice(-40), - ); -} +const { ethers } = require('hardhat'); module.exports = { - computeCreateAddress, - computeCreate2Address, + computeCreateAddress: (from, nonce) => ethers.getCreateAddress({ from, nonce }), + computeCreate2Address: (salt, bytecode, from) => ethers.getCreate2Address(from, salt, ethers.keccak256(bytecode)), }; diff --git a/test/helpers/customError.js b/test/helpers/customError.js index ea5c36820..acc3214eb 100644 --- a/test/helpers/customError.js +++ b/test/helpers/customError.js @@ -1,3 +1,5 @@ +// DEPRECATED: replace with hardhat-toolbox chai matchers. + const { expect } = require('chai'); /** Revert handler that supports custom errors. */ diff --git a/test/sanity.test.js b/test/sanity.test.js new file mode 100644 index 000000000..9728b14e4 --- /dev/null +++ b/test/sanity.test.js @@ -0,0 +1,40 @@ +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { loadFixture, mine } = require('@nomicfoundation/hardhat-network-helpers'); + +async function fixture() { + const signers = await ethers.getSigners(); + const addresses = await Promise.all(signers.map(s => s.getAddress())); + return { signers, addresses }; +} + +contract('Environment sanity', function (accounts) { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); + + describe('[skip-on-coverage] signers', function () { + it('match accounts', async function () { + expect(this.addresses).to.deep.equal(accounts); + }); + + it('signer #0 is skipped', async function () { + const signer = await ethers.provider.getSigner(0); + expect(this.addresses).to.not.include(await signer.getAddress()); + }); + }); + + describe('snapshot', function () { + let blockNumberBefore; + + it('cache and mine', async function () { + blockNumberBefore = await ethers.provider.getBlockNumber(); + await mine(); + expect(await ethers.provider.getBlockNumber()).to.be.equal(blockNumberBefore + 1); + }); + + it('check snapshot', async function () { + expect(await ethers.provider.getBlockNumber()).to.be.equal(blockNumberBefore); + }); + }); +}); diff --git a/test/token/common/ERC2981.behavior.js b/test/token/common/ERC2981.behavior.js index 15efa239f..1c062b052 100644 --- a/test/token/common/ERC2981.behavior.js +++ b/test/token/common/ERC2981.behavior.js @@ -108,7 +108,7 @@ function shouldBehaveLikeERC2981() { const token2Info = await this.token.royaltyInfo(this.tokenId2, this.salePrice); // must be different even at the same this.salePrice - expect(token1Info[1]).to.not.be.equal(token2Info.royaltyFraction); + expect(token1Info[1]).to.not.be.bignumber.equal(token2Info[1]); }); it('reverts if invalid parameters', async function () { From 7c8b7a27284f503ce8ae23d63ac9403096dcf6fe Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Mon, 23 Oct 2023 20:24:46 +0200 Subject: [PATCH 100/167] Migrate `MerkleProof` tests among other testing utilities (#4689) --- package-lock.json | 157 +++++------ package.json | 3 +- .../GovernorTimelockCompound.test.js | 4 +- test/helpers/account.js | 4 +- test/helpers/chainid.js | 12 +- test/helpers/constants.js | 8 +- test/helpers/create.js | 6 - test/helpers/eip712.js | 33 +-- test/helpers/erc1967.js | 17 +- test/helpers/methods.js | 4 +- test/helpers/time.js | 13 +- test/proxy/Clones.test.js | 4 +- test/proxy/transparent/ProxyAdmin.test.js | 4 +- .../TransparentUpgradeableProxy.behaviour.js | 5 +- test/utils/Create2.test.js | 34 ++- test/utils/cryptography/EIP712.test.js | 27 +- test/utils/cryptography/MerkleProof.test.js | 252 ++++++++---------- 17 files changed, 261 insertions(+), 326 deletions(-) delete mode 100644 test/helpers/create.js diff --git a/package-lock.json b/package-lock.json index 79ed96c12..97546e5b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.5", + "@openzeppelin/merkle-tree": "^1.0.5", "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", @@ -38,10 +39,8 @@ "hardhat-exposed": "^0.3.13", "hardhat-gas-reporter": "^1.0.9", "hardhat-ignore-warnings": "^0.2.0", - "keccak256": "^1.0.2", "lodash.startcase": "^4.4.0", "lodash.zip": "^4.2.0", - "merkletreejs": "^0.2.13", "micromatch": "^4.0.2", "p-limit": "^3.1.0", "prettier": "^3.0.0", @@ -2604,6 +2603,73 @@ "node": ">=8" } }, + "node_modules/@openzeppelin/merkle-tree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@openzeppelin/merkle-tree/-/merkle-tree-1.0.5.tgz", + "integrity": "sha512-JkwG2ysdHeIphrScNxYagPy6jZeNONgDRyqU6lbFgE8HKCZFSkcP8r6AjZs+3HZk4uRNV0kNBBzuWhKQ3YV7Kw==", + "dev": true, + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "ethereum-cryptography": "^1.1.2" + } + }, + "node_modules/@openzeppelin/merkle-tree/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/@openzeppelin/merkle-tree/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/@openzeppelin/merkle-tree/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/@openzeppelin/merkle-tree/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, "node_modules/@openzeppelin/test-helpers": { "version": "0.5.16", "resolved": "https://registry.npmjs.org/@openzeppelin/test-helpers/-/test-helpers-0.5.16.tgz", @@ -5218,12 +5284,6 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/buffer-reverse": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-reverse/-/buffer-reverse-1.0.1.tgz", - "integrity": "sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg==", - "dev": true - }, "node_modules/buffer-to-arraybuffer": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", @@ -6156,12 +6216,6 @@ "sha3": "^2.1.1" } }, - "node_modules/crypto-js": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", - "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", - "dev": true - }, "node_modules/css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", @@ -10209,47 +10263,6 @@ "node": ">=10.0.0" } }, - "node_modules/keccak256": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/keccak256/-/keccak256-1.0.6.tgz", - "integrity": "sha512-8GLiM01PkdJVGUhR1e6M/AvWnSqYS0HaERI+K/QtStGDGlSTx2B1zTqZk4Zlqu5TxHJNTxWAdP9Y+WI50OApUw==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.0", - "buffer": "^6.0.3", - "keccak": "^3.0.2" - } - }, - "node_modules/keccak256/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/keccak256/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "node_modules/keyv": { "version": "4.5.3", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", @@ -10784,31 +10797,6 @@ "node": ">= 8" } }, - "node_modules/merkletreejs": { - "version": "0.2.32", - "resolved": "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.2.32.tgz", - "integrity": "sha512-TostQBiwYRIwSE5++jGmacu3ODcKAgqb0Y/pnIohXS7sWxh1gCkSptbmF1a43faehRDpcHf7J/kv0Ml2D/zblQ==", - "dev": true, - "dependencies": { - "bignumber.js": "^9.0.1", - "buffer-reverse": "^1.0.1", - "crypto-js": "^3.1.9-1", - "treeify": "^1.1.0", - "web3-utils": "^1.3.4" - }, - "engines": { - "node": ">= 7.6.0" - } - }, - "node_modules/merkletreejs/node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -15259,15 +15247,6 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, - "node_modules/treeify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", - "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", diff --git a/package.json b/package.json index 4b0be403d..e5265dc51 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.5", + "@openzeppelin/merkle-tree": "^1.0.5", "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", @@ -78,10 +79,8 @@ "hardhat-exposed": "^0.3.13", "hardhat-gas-reporter": "^1.0.9", "hardhat-ignore-warnings": "^0.2.0", - "keccak256": "^1.0.2", "lodash.startcase": "^4.4.0", "lodash.zip": "^4.2.0", - "merkletreejs": "^0.2.13", "micromatch": "^4.0.2", "p-limit": "^3.1.0", "prettier": "^3.0.0", diff --git a/test/governance/extensions/GovernorTimelockCompound.test.js b/test/governance/extensions/GovernorTimelockCompound.test.js index e9d6f8373..56191eb50 100644 --- a/test/governance/extensions/GovernorTimelockCompound.test.js +++ b/test/governance/extensions/GovernorTimelockCompound.test.js @@ -1,10 +1,10 @@ +const { ethers } = require('ethers'); const { constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); const { expect } = require('chai'); const Enums = require('../../helpers/enums'); const { GovernorHelper, proposalStatesToBitMap } = require('../../helpers/governance'); const { expectRevertCustomError } = require('../../helpers/customError'); -const { computeCreateAddress } = require('../../helpers/create'); const { clockFromReceipt } = require('../../helpers/time'); const Timelock = artifacts.require('CompTimelock'); @@ -41,7 +41,7 @@ contract('GovernorTimelockCompound', function (accounts) { // Need to predict governance address to set it as timelock admin with a delayed transfer const nonce = await web3.eth.getTransactionCount(deployer); - const predictGovernor = computeCreateAddress(deployer, nonce + 1); + const predictGovernor = ethers.getCreateAddress({ from: deployer, nonce: nonce + 1 }); this.timelock = await Timelock.new(predictGovernor, defaultDelay); this.mock = await Governor.new( diff --git a/test/helpers/account.js b/test/helpers/account.js index 1b01a7214..8c0ea130b 100644 --- a/test/helpers/account.js +++ b/test/helpers/account.js @@ -1,8 +1,8 @@ -const { web3 } = require('hardhat'); +const { ethers } = require('hardhat'); const { impersonateAccount, setBalance } = require('@nomicfoundation/hardhat-network-helpers'); // Hardhat default balance -const DEFAULT_BALANCE = web3.utils.toBN('10000000000000000000000'); +const DEFAULT_BALANCE = 10000n * ethers.WeiPerEther; async function impersonate(account, balance = DEFAULT_BALANCE) { await impersonateAccount(account); diff --git a/test/helpers/chainid.js b/test/helpers/chainid.js index 693a822e5..e8181d55c 100644 --- a/test/helpers/chainid.js +++ b/test/helpers/chainid.js @@ -1,12 +1,6 @@ -const hre = require('hardhat'); - -async function getChainId() { - const chainIdHex = await hre.network.provider.send('eth_chainId', []); - return new hre.web3.utils.BN(chainIdHex, 'hex'); -} +const { ethers } = require('hardhat'); module.exports = { - getChainId, - // TODO: when tests are ready to support bigint chainId - // getChainId: ethers.provider.getNetwork().then(network => network.chainId), + // TODO: remove conversion toNumber() when bigint are supported + getChainId: () => ethers.provider.getNetwork().then(network => ethers.toNumber(network.chainId)), }; diff --git a/test/helpers/constants.js b/test/helpers/constants.js index 0f4d028cf..6a3a82f4f 100644 --- a/test/helpers/constants.js +++ b/test/helpers/constants.js @@ -1,7 +1,5 @@ -const MAX_UINT48 = web3.utils.toBN(1).shln(48).subn(1).toString(); -const MAX_UINT64 = web3.utils.toBN(1).shln(64).subn(1).toString(); - +// TODO: remove toString() when bigint are supported module.exports = { - MAX_UINT48, - MAX_UINT64, + MAX_UINT48: (2n ** 48n - 1n).toString(), + MAX_UINT64: (2n ** 64n - 1n).toString(), }; diff --git a/test/helpers/create.js b/test/helpers/create.js deleted file mode 100644 index fa837395a..000000000 --- a/test/helpers/create.js +++ /dev/null @@ -1,6 +0,0 @@ -const { ethers } = require('hardhat'); - -module.exports = { - computeCreateAddress: (from, nonce) => ethers.getCreateAddress({ from, nonce }), - computeCreate2Address: (salt, bytecode, from) => ethers.getCreate2Address(from, salt, ethers.keccak256(bytecode)), -}; diff --git a/test/helpers/eip712.js b/test/helpers/eip712.js index b12a6233e..0dd78b7e0 100644 --- a/test/helpers/eip712.js +++ b/test/helpers/eip712.js @@ -1,5 +1,4 @@ -const ethSigUtil = require('eth-sig-util'); -const keccak256 = require('keccak256'); +const { ethers } = require('ethers'); const EIP712Domain = [ { name: 'name', type: 'string' }, @@ -17,14 +16,6 @@ const Permit = [ { name: 'deadline', type: 'uint256' }, ]; -function bufferToHexString(buffer) { - return '0x' + buffer.toString('hex'); -} - -function hexStringToBuffer(hexstr) { - return Buffer.from(hexstr.replace(/^0x/, ''), 'hex'); -} - async function getDomain(contract) { const { fields, name, version, chainId, verifyingContract, salt, extensions } = await contract.eip712Domain(); @@ -32,7 +23,15 @@ async function getDomain(contract) { throw Error('Extensions not implemented'); } - const domain = { name, version, chainId, verifyingContract, salt }; + const domain = { + name, + version, + // TODO: remove check when contracts are all migrated to ethers + chainId: web3.utils.isBN(chainId) ? chainId.toNumber() : chainId, + verifyingContract, + salt, + }; + for (const [i, { name }] of EIP712Domain.entries()) { if (!(fields & (1 << i))) { delete domain[name]; @@ -46,15 +45,9 @@ function domainType(domain) { return EIP712Domain.filter(({ name }) => domain[name] !== undefined); } -function domainSeparator(domain) { - return bufferToHexString( - ethSigUtil.TypedDataUtils.hashStruct('EIP712Domain', domain, { EIP712Domain: domainType(domain) }), - ); -} - function hashTypedData(domain, structHash) { - return bufferToHexString( - keccak256(Buffer.concat(['0x1901', domainSeparator(domain), structHash].map(str => hexStringToBuffer(str)))), + return ethers.keccak256( + Buffer.concat(['0x1901', ethers.TypedDataEncoder.hashDomain(domain), structHash].map(ethers.toBeArray)), ); } @@ -62,6 +55,6 @@ module.exports = { Permit, getDomain, domainType, - domainSeparator, + domainSeparator: ethers.TypedDataEncoder.hashDomain, hashTypedData, }; diff --git a/test/helpers/erc1967.js b/test/helpers/erc1967.js index 4ad92c55c..50542c89a 100644 --- a/test/helpers/erc1967.js +++ b/test/helpers/erc1967.js @@ -1,3 +1,4 @@ +const { ethers } = require('hardhat'); const { getStorageAt, setStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); const ImplementationLabel = 'eip1967.proxy.implementation'; @@ -5,29 +6,27 @@ const AdminLabel = 'eip1967.proxy.admin'; const BeaconLabel = 'eip1967.proxy.beacon'; function labelToSlot(label) { - return '0x' + web3.utils.toBN(web3.utils.keccak256(label)).subn(1).toString(16); + return ethers.toBeHex(BigInt(ethers.keccak256(ethers.toUtf8Bytes(label))) - 1n); } function getSlot(address, slot) { return getStorageAt( - web3.utils.isAddress(address) ? address : address.address, - web3.utils.isHex(slot) ? slot : labelToSlot(slot), + ethers.isAddress(address) ? address : address.address, + ethers.isBytesLike(slot) ? slot : labelToSlot(slot), ); } function setSlot(address, slot, value) { - const hexValue = web3.utils.isHex(value) ? value : web3.utils.toHex(value); - return setStorageAt( - web3.utils.isAddress(address) ? address : address.address, - web3.utils.isHex(slot) ? slot : labelToSlot(slot), - web3.utils.padLeft(hexValue, 64), + ethers.isAddress(address) ? address : address.address, + ethers.isBytesLike(slot) ? slot : labelToSlot(slot), + value, ); } async function getAddressInSlot(address, slot) { const slotValue = await getSlot(address, slot); - return web3.utils.toChecksumAddress(slotValue.substring(slotValue.length - 40)); + return ethers.getAddress(slotValue.substring(slotValue.length - 40)); } module.exports = { diff --git a/test/helpers/methods.js b/test/helpers/methods.js index cb30d8727..94f01cff0 100644 --- a/test/helpers/methods.js +++ b/test/helpers/methods.js @@ -1,5 +1,5 @@ -const { soliditySha3 } = require('web3-utils'); +const { ethers } = require('hardhat'); module.exports = { - selector: signature => soliditySha3(signature).substring(0, 10), + selector: signature => ethers.FunctionFragment.from(signature).selector, }; diff --git a/test/helpers/time.js b/test/helpers/time.js index 30df8dc32..7a2a13d23 100644 --- a/test/helpers/time.js +++ b/test/helpers/time.js @@ -1,17 +1,18 @@ -const ozHelpers = require('@openzeppelin/test-helpers'); -const helpers = require('@nomicfoundation/hardhat-network-helpers'); +const { time, mineUpTo } = require('@nomicfoundation/hardhat-network-helpers'); module.exports = { clock: { - blocknumber: () => helpers.time.latestBlock(), - timestamp: () => helpers.time.latest(), + blocknumber: () => time.latestBlock(), + timestamp: () => time.latest(), }, clockFromReceipt: { blocknumber: receipt => Promise.resolve(receipt.blockNumber), timestamp: receipt => web3.eth.getBlock(receipt.blockNumber).then(block => block.timestamp), + // TODO: update for ethers receipt + // timestamp: receipt => receipt.getBlock().then(block => block.timestamp), }, forward: { - blocknumber: ozHelpers.time.advanceBlockTo, - timestamp: helpers.time.increaseTo, + blocknumber: mineUpTo, + timestamp: time.increaseTo, }, }; diff --git a/test/proxy/Clones.test.js b/test/proxy/Clones.test.js index 0862778f7..ad3dd537c 100644 --- a/test/proxy/Clones.test.js +++ b/test/proxy/Clones.test.js @@ -1,6 +1,6 @@ +const { ethers } = require('ethers'); const { expectEvent } = require('@openzeppelin/test-helpers'); const { expect } = require('chai'); -const { computeCreate2Address } = require('../helpers/create'); const { expectRevertCustomError } = require('../helpers/customError'); const shouldBehaveLikeClone = require('./Clones.behaviour'); @@ -52,7 +52,7 @@ contract('Clones', function (accounts) { '5af43d82803e903d91602b57fd5bf3', ].join(''); - expect(computeCreate2Address(salt, creationCode, factory.address)).to.be.equal(predicted); + expect(ethers.getCreate2Address(factory.address, salt, ethers.keccak256(creationCode))).to.be.equal(predicted); expectEvent(await factory.$cloneDeterministic(implementation, salt), 'return$cloneDeterministic', { instance: predicted, diff --git a/test/proxy/transparent/ProxyAdmin.test.js b/test/proxy/transparent/ProxyAdmin.test.js index 4d1a54f6a..a3122eae3 100644 --- a/test/proxy/transparent/ProxyAdmin.test.js +++ b/test/proxy/transparent/ProxyAdmin.test.js @@ -1,3 +1,4 @@ +const { ethers } = require('hardhat'); const { expectRevert } = require('@openzeppelin/test-helpers'); const { expect } = require('chai'); const ImplV1 = artifacts.require('DummyImplementation'); @@ -8,7 +9,6 @@ const ITransparentUpgradeableProxy = artifacts.require('ITransparentUpgradeableP const { getAddressInSlot, ImplementationSlot } = require('../../helpers/erc1967'); const { expectRevertCustomError } = require('../../helpers/customError'); -const { computeCreateAddress } = require('../../helpers/create'); contract('ProxyAdmin', function (accounts) { const [proxyAdminOwner, anotherAccount] = accounts; @@ -23,7 +23,7 @@ contract('ProxyAdmin', function (accounts) { const proxy = await TransparentUpgradeableProxy.new(this.implementationV1.address, proxyAdminOwner, initializeData); const proxyNonce = await web3.eth.getTransactionCount(proxy.address); - const proxyAdminAddress = computeCreateAddress(proxy.address, proxyNonce - 1); // Nonce already used + const proxyAdminAddress = ethers.getCreateAddress({ from: proxy.address, nonce: proxyNonce - 1 }); // Nonce already used this.proxyAdmin = await ProxyAdmin.at(proxyAdminAddress); this.proxy = await ITransparentUpgradeableProxy.at(proxy.address); diff --git a/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js b/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js index 103af7fc3..da4d99287 100644 --- a/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js +++ b/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js @@ -4,8 +4,7 @@ const { getAddressInSlot, ImplementationSlot, AdminSlot } = require('../../helpe const { expectRevertCustomError } = require('../../helpers/customError'); const { expect } = require('chai'); -const { web3 } = require('hardhat'); -const { computeCreateAddress } = require('../../helpers/create'); +const { ethers, web3 } = require('hardhat'); const { impersonate } = require('../../helpers/account'); const Implementation1 = artifacts.require('Implementation1'); @@ -27,7 +26,7 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy(createProx const proxy = await createProxy(logic, initData, opts); // Expect proxy admin to be the first and only contract created by the proxy - const proxyAdminAddress = computeCreateAddress(proxy.address, 1); + const proxyAdminAddress = ethers.getCreateAddress({ from: proxy.address, nonce: 1 }); await impersonate(proxyAdminAddress); return { diff --git a/test/utils/Create2.test.js b/test/utils/Create2.test.js index 336ab1acc..a4ad99237 100644 --- a/test/utils/Create2.test.js +++ b/test/utils/Create2.test.js @@ -1,6 +1,6 @@ -const { balance, ether, expectEvent, expectRevert, send } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { computeCreate2Address } = require('../helpers/create'); +const { balance, ether, expectEvent, expectRevert, send } = require('@openzeppelin/test-helpers'); const { expectRevertCustomError } = require('../helpers/customError'); const Create2 = artifacts.require('$Create2'); @@ -26,7 +26,11 @@ contract('Create2', function (accounts) { describe('computeAddress', function () { it('computes the correct contract address', async function () { const onChainComputed = await this.factory.$computeAddress(saltHex, web3.utils.keccak256(constructorByteCode)); - const offChainComputed = computeCreate2Address(saltHex, constructorByteCode, this.factory.address); + const offChainComputed = ethers.getCreate2Address( + this.factory.address, + saltHex, + ethers.keccak256(constructorByteCode), + ); expect(onChainComputed).to.equal(offChainComputed); }); @@ -36,14 +40,22 @@ contract('Create2', function (accounts) { web3.utils.keccak256(constructorByteCode), deployerAccount, ); - const offChainComputed = computeCreate2Address(saltHex, constructorByteCode, deployerAccount); + const offChainComputed = ethers.getCreate2Address( + deployerAccount, + saltHex, + ethers.keccak256(constructorByteCode), + ); expect(onChainComputed).to.equal(offChainComputed); }); }); describe('deploy', function () { it('deploys a contract without constructor', async function () { - const offChainComputed = computeCreate2Address(saltHex, ConstructorLessContract.bytecode, this.factory.address); + const offChainComputed = ethers.getCreate2Address( + this.factory.address, + saltHex, + ethers.keccak256(ConstructorLessContract.bytecode), + ); expectEvent(await this.factory.$deploy(0, saltHex, ConstructorLessContract.bytecode), 'return$deploy', { addr: offChainComputed, @@ -53,7 +65,11 @@ contract('Create2', function (accounts) { }); it('deploys a contract with constructor arguments', async function () { - const offChainComputed = computeCreate2Address(saltHex, constructorByteCode, this.factory.address); + const offChainComputed = ethers.getCreate2Address( + this.factory.address, + saltHex, + ethers.keccak256(constructorByteCode), + ); expectEvent(await this.factory.$deploy(0, saltHex, constructorByteCode), 'return$deploy', { addr: offChainComputed, @@ -69,7 +85,11 @@ contract('Create2', function (accounts) { await send.ether(deployerAccount, this.factory.address, deposit); expect(await balance.current(this.factory.address)).to.be.bignumber.equal(deposit); - const offChainComputed = computeCreate2Address(saltHex, constructorByteCode, this.factory.address); + const offChainComputed = ethers.getCreate2Address( + this.factory.address, + saltHex, + ethers.keccak256(constructorByteCode), + ); expectEvent(await this.factory.$deploy(deposit, saltHex, constructorByteCode), 'return$deploy', { addr: offChainComputed, diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js index faf01f1a3..dfad67906 100644 --- a/test/utils/cryptography/EIP712.test.js +++ b/test/utils/cryptography/EIP712.test.js @@ -1,6 +1,4 @@ -const ethSigUtil = require('eth-sig-util'); -const Wallet = require('ethereumjs-wallet').default; - +const { ethers } = require('hardhat'); const { getDomain, domainType, domainSeparator, hashTypedData } = require('../../helpers/eip712'); const { getChainId } = require('../../helpers/chainid'); const { mapValues } = require('../../helpers/iterate'); @@ -80,23 +78,18 @@ contract('EIP712', function (accounts) { contents: 'very interesting', }; - const data = { - types: { - EIP712Domain: this.domainType, - Mail: [ - { name: 'to', type: 'address' }, - { name: 'contents', type: 'string' }, - ], - }, - domain: this.domain, - primaryType: 'Mail', - message, + const types = { + Mail: [ + { name: 'to', type: 'address' }, + { name: 'contents', type: 'string' }, + ], }; - const wallet = Wallet.generate(); - const signature = ethSigUtil.signTypedMessage(wallet.getPrivateKey(), { data }); + const signer = ethers.Wallet.createRandom(); + const address = await signer.getAddress(); + const signature = await signer.signTypedData(this.domain, types, message); - await this.eip712.verify(signature, wallet.getAddressString(), message.to, message.contents); + await this.eip712.verify(signature, address, message.to, message.contents); }); it('name', async function () { diff --git a/test/utils/cryptography/MerkleProof.test.js b/test/utils/cryptography/MerkleProof.test.js index 5b87bc525..73e1ada95 100644 --- a/test/utils/cryptography/MerkleProof.test.js +++ b/test/utils/cryptography/MerkleProof.test.js @@ -1,207 +1,173 @@ -const { expectRevert } = require('@openzeppelin/test-helpers'); - -const { MerkleTree } = require('merkletreejs'); -const keccak256 = require('keccak256'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../../helpers/customError'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { StandardMerkleTree } = require('@openzeppelin/merkle-tree'); + +const toElements = str => str.split('').map(e => [e]); +const hashPair = (a, b) => ethers.keccak256(Buffer.concat([a, b].sort(Buffer.compare))); -const MerkleProof = artifacts.require('$MerkleProof'); +async function fixture() { + const mock = await ethers.deployContract('$MerkleProof'); + return { mock }; +} -contract('MerkleProof', function () { +describe('MerkleProof', function () { beforeEach(async function () { - this.merkleProof = await MerkleProof.new(); + Object.assign(this, await loadFixture(fixture)); }); describe('verify', function () { it('returns true for a valid Merkle proof', async function () { - const elements = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split(''); - const merkleTree = new MerkleTree(elements, keccak256, { hashLeaves: true, sortPairs: true }); - - const root = merkleTree.getHexRoot(); - - const leaf = keccak256(elements[0]); + const merkleTree = StandardMerkleTree.of( + toElements('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='), + ['string'], + ); - const proof = merkleTree.getHexProof(leaf); + const root = merkleTree.root; + const hash = merkleTree.leafHash(['A']); + const proof = merkleTree.getProof(['A']); - expect(await this.merkleProof.$verify(proof, root, leaf)).to.equal(true); - expect(await this.merkleProof.$verifyCalldata(proof, root, leaf)).to.equal(true); + expect(await this.mock.$verify(proof, root, hash)).to.equal(true); + expect(await this.mock.$verifyCalldata(proof, root, hash)).to.equal(true); // For demonstration, it is also possible to create valid proofs for certain 64-byte values *not* in elements: - const noSuchLeaf = keccak256( - Buffer.concat([keccak256(elements[0]), keccak256(elements[1])].sort(Buffer.compare)), + const noSuchLeaf = hashPair( + ethers.toBeArray(merkleTree.leafHash(['A'])), + ethers.toBeArray(merkleTree.leafHash(['B'])), ); - expect(await this.merkleProof.$verify(proof.slice(1), root, noSuchLeaf)).to.equal(true); - expect(await this.merkleProof.$verifyCalldata(proof.slice(1), root, noSuchLeaf)).to.equal(true); + expect(await this.mock.$verify(proof.slice(1), root, noSuchLeaf)).to.equal(true); + expect(await this.mock.$verifyCalldata(proof.slice(1), root, noSuchLeaf)).to.equal(true); }); it('returns false for an invalid Merkle proof', async function () { - const correctElements = ['a', 'b', 'c']; - const correctMerkleTree = new MerkleTree(correctElements, keccak256, { hashLeaves: true, sortPairs: true }); + const correctMerkleTree = StandardMerkleTree.of(toElements('abc'), ['string']); + const otherMerkleTree = StandardMerkleTree.of(toElements('def'), ['string']); - const correctRoot = correctMerkleTree.getHexRoot(); + const root = correctMerkleTree.root; + const hash = correctMerkleTree.leafHash(['a']); + const proof = otherMerkleTree.getProof(['d']); - const correctLeaf = keccak256(correctElements[0]); - - const badElements = ['d', 'e', 'f']; - const badMerkleTree = new MerkleTree(badElements); - - const badProof = badMerkleTree.getHexProof(badElements[0]); - - expect(await this.merkleProof.$verify(badProof, correctRoot, correctLeaf)).to.equal(false); - expect(await this.merkleProof.$verifyCalldata(badProof, correctRoot, correctLeaf)).to.equal(false); + expect(await this.mock.$verify(proof, root, hash)).to.equal(false); + expect(await this.mock.$verifyCalldata(proof, root, hash)).to.equal(false); }); it('returns false for a Merkle proof of invalid length', async function () { - const elements = ['a', 'b', 'c']; - const merkleTree = new MerkleTree(elements, keccak256, { hashLeaves: true, sortPairs: true }); - - const root = merkleTree.getHexRoot(); - - const leaf = keccak256(elements[0]); + const merkleTree = StandardMerkleTree.of(toElements('abc'), ['string']); - const proof = merkleTree.getHexProof(leaf); + const root = merkleTree.root; + const leaf = merkleTree.leafHash(['a']); + const proof = merkleTree.getProof(['a']); const badProof = proof.slice(0, proof.length - 5); - expect(await this.merkleProof.$verify(badProof, root, leaf)).to.equal(false); - expect(await this.merkleProof.$verifyCalldata(badProof, root, leaf)).to.equal(false); + expect(await this.mock.$verify(badProof, root, leaf)).to.equal(false); + expect(await this.mock.$verifyCalldata(badProof, root, leaf)).to.equal(false); }); }); describe('multiProofVerify', function () { it('returns true for a valid Merkle multi proof', async function () { - const leaves = ['a', 'b', 'c', 'd', 'e', 'f'].map(keccak256).sort(Buffer.compare); - const merkleTree = new MerkleTree(leaves, keccak256, { sort: true }); + const merkleTree = StandardMerkleTree.of(toElements('abcdef'), ['string']); - const root = merkleTree.getRoot(); - const proofLeaves = ['b', 'f', 'd'].map(keccak256).sort(Buffer.compare); - const proof = merkleTree.getMultiProof(proofLeaves); - const proofFlags = merkleTree.getProofFlags(proofLeaves, proof); + const root = merkleTree.root; + const { proof, proofFlags, leaves } = merkleTree.getMultiProof(toElements('bdf')); + const hashes = leaves.map(e => merkleTree.leafHash(e)); - expect(await this.merkleProof.$multiProofVerify(proof, proofFlags, root, proofLeaves)).to.equal(true); - expect(await this.merkleProof.$multiProofVerifyCalldata(proof, proofFlags, root, proofLeaves)).to.equal(true); + expect(await this.mock.$multiProofVerify(proof, proofFlags, root, hashes)).to.equal(true); + expect(await this.mock.$multiProofVerifyCalldata(proof, proofFlags, root, hashes)).to.equal(true); }); it('returns false for an invalid Merkle multi proof', async function () { - const leaves = ['a', 'b', 'c', 'd', 'e', 'f'].map(keccak256).sort(Buffer.compare); - const merkleTree = new MerkleTree(leaves, keccak256, { sort: true }); - - const root = merkleTree.getRoot(); - const badProofLeaves = ['g', 'h', 'i'].map(keccak256).sort(Buffer.compare); - const badMerkleTree = new MerkleTree(badProofLeaves); - const badProof = badMerkleTree.getMultiProof(badProofLeaves); - const badProofFlags = badMerkleTree.getProofFlags(badProofLeaves, badProof); - - expect(await this.merkleProof.$multiProofVerify(badProof, badProofFlags, root, badProofLeaves)).to.equal(false); - expect(await this.merkleProof.$multiProofVerifyCalldata(badProof, badProofFlags, root, badProofLeaves)).to.equal( - false, - ); + const merkleTree = StandardMerkleTree.of(toElements('abcdef'), ['string']); + const otherMerkleTree = StandardMerkleTree.of(toElements('ghi'), ['string']); + + const root = merkleTree.root; + const { proof, proofFlags, leaves } = otherMerkleTree.getMultiProof(toElements('ghi')); + const hashes = leaves.map(e => merkleTree.leafHash(e)); + + expect(await this.mock.$multiProofVerify(proof, proofFlags, root, hashes)).to.equal(false); + expect(await this.mock.$multiProofVerifyCalldata(proof, proofFlags, root, hashes)).to.equal(false); }); it('revert with invalid multi proof #1', async function () { - const fill = Buffer.alloc(32); // This could be anything, we are reconstructing a fake branch - const leaves = ['a', 'b', 'c', 'd'].map(keccak256).sort(Buffer.compare); - const badLeaf = keccak256('e'); - const merkleTree = new MerkleTree(leaves, keccak256, { sort: true }); - - const root = merkleTree.getRoot(); - - await expectRevertCustomError( - this.merkleProof.$multiProofVerify( - [leaves[1], fill, merkleTree.layers[1][1]], - [false, false, false], - root, - [leaves[0], badLeaf], // A, E - ), - 'MerkleProofInvalidMultiproof', - [], - ); - await expectRevertCustomError( - this.merkleProof.$multiProofVerifyCalldata( - [leaves[1], fill, merkleTree.layers[1][1]], - [false, false, false], - root, - [leaves[0], badLeaf], // A, E - ), - 'MerkleProofInvalidMultiproof', - [], + const merkleTree = StandardMerkleTree.of(toElements('abcd'), ['string']); + + const root = merkleTree.root; + const hashA = merkleTree.leafHash(['a']); + const hashB = merkleTree.leafHash(['b']); + const hashCD = hashPair( + ethers.toBeArray(merkleTree.leafHash(['c'])), + ethers.toBeArray(merkleTree.leafHash(['d'])), ); + const hashE = merkleTree.leafHash(['e']); // incorrect (not part of the tree) + const fill = ethers.randomBytes(32); + + await expect( + this.mock.$multiProofVerify([hashB, fill, hashCD], [false, false, false], root, [hashA, hashE]), + ).to.be.revertedWithCustomError(this.mock, 'MerkleProofInvalidMultiproof'); + + await expect( + this.mock.$multiProofVerifyCalldata([hashB, fill, hashCD], [false, false, false], root, [hashA, hashE]), + ).to.be.revertedWithCustomError(this.mock, 'MerkleProofInvalidMultiproof'); }); it('revert with invalid multi proof #2', async function () { - const fill = Buffer.alloc(32); // This could be anything, we are reconstructing a fake branch - const leaves = ['a', 'b', 'c', 'd'].map(keccak256).sort(Buffer.compare); - const badLeaf = keccak256('e'); - const merkleTree = new MerkleTree(leaves, keccak256, { sort: true }); - - const root = merkleTree.getRoot(); - - await expectRevert( - this.merkleProof.$multiProofVerify( - [leaves[1], fill, merkleTree.layers[1][1]], - [false, false, false, false], - root, - [badLeaf, leaves[0]], // A, E - ), - 'reverted with panic code 0x32', + const merkleTree = StandardMerkleTree.of(toElements('abcd'), ['string']); + + const root = merkleTree.root; + const hashA = merkleTree.leafHash(['a']); + const hashB = merkleTree.leafHash(['b']); + const hashCD = hashPair( + ethers.toBeArray(merkleTree.leafHash(['c'])), + ethers.toBeArray(merkleTree.leafHash(['d'])), ); + const hashE = merkleTree.leafHash(['e']); // incorrect (not part of the tree) + const fill = ethers.randomBytes(32); - await expectRevert( - this.merkleProof.$multiProofVerifyCalldata( - [leaves[1], fill, merkleTree.layers[1][1]], - [false, false, false, false], - root, - [badLeaf, leaves[0]], // A, E - ), - 'reverted with panic code 0x32', - ); + await expect( + this.mock.$multiProofVerify([hashB, fill, hashCD], [false, false, false, false], root, [hashE, hashA]), + ).to.be.revertedWithPanic(0x32); + + await expect( + this.mock.$multiProofVerifyCalldata([hashB, fill, hashCD], [false, false, false, false], root, [hashE, hashA]), + ).to.be.revertedWithPanic(0x32); }); it('limit case: works for tree containing a single leaf', async function () { - const leaves = ['a'].map(keccak256).sort(Buffer.compare); - const merkleTree = new MerkleTree(leaves, keccak256, { sort: true }); + const merkleTree = StandardMerkleTree.of(toElements('a'), ['string']); - const root = merkleTree.getRoot(); - const proofLeaves = ['a'].map(keccak256).sort(Buffer.compare); - const proof = merkleTree.getMultiProof(proofLeaves); - const proofFlags = merkleTree.getProofFlags(proofLeaves, proof); + const root = merkleTree.root; + const { proof, proofFlags, leaves } = merkleTree.getMultiProof(toElements('a')); + const hashes = leaves.map(e => merkleTree.leafHash(e)); - expect(await this.merkleProof.$multiProofVerify(proof, proofFlags, root, proofLeaves)).to.equal(true); - expect(await this.merkleProof.$multiProofVerifyCalldata(proof, proofFlags, root, proofLeaves)).to.equal(true); + expect(await this.mock.$multiProofVerify(proof, proofFlags, root, hashes)).to.equal(true); + expect(await this.mock.$multiProofVerifyCalldata(proof, proofFlags, root, hashes)).to.equal(true); }); it('limit case: can prove empty leaves', async function () { - const leaves = ['a', 'b', 'c', 'd'].map(keccak256).sort(Buffer.compare); - const merkleTree = new MerkleTree(leaves, keccak256, { sort: true }); + const merkleTree = StandardMerkleTree.of(toElements('abcd'), ['string']); - const root = merkleTree.getRoot(); - expect(await this.merkleProof.$multiProofVerify([root], [], root, [])).to.equal(true); - expect(await this.merkleProof.$multiProofVerifyCalldata([root], [], root, [])).to.equal(true); + const root = merkleTree.root; + expect(await this.mock.$multiProofVerify([root], [], root, [])).to.equal(true); + expect(await this.mock.$multiProofVerifyCalldata([root], [], root, [])).to.equal(true); }); it('reverts processing manipulated proofs with a zero-value node at depth 1', async function () { // Create a merkle tree that contains a zero leaf at depth 1 - const leaves = [keccak256('real leaf'), Buffer.alloc(32, 0)]; - const merkleTree = new MerkleTree(leaves, keccak256, { sortPairs: true }); - - const root = merkleTree.getRoot(); + const leave = ethers.id('real leaf'); + const root = hashPair(ethers.toBeArray(leave), Buffer.alloc(32, 0)); // Now we can pass any **malicious** fake leaves as valid! - const maliciousLeaves = ['malicious', 'leaves'].map(keccak256).sort(Buffer.compare); - const maliciousProof = [leaves[0], leaves[0]]; + const maliciousLeaves = ['malicious', 'leaves'].map(ethers.id).map(ethers.toBeArray).sort(Buffer.compare); + const maliciousProof = [leave, leave]; const maliciousProofFlags = [true, true, false]; - await expectRevertCustomError( - this.merkleProof.$multiProofVerify(maliciousProof, maliciousProofFlags, root, maliciousLeaves), - 'MerkleProofInvalidMultiproof', - [], - ); + await expect( + this.mock.$multiProofVerify(maliciousProof, maliciousProofFlags, root, maliciousLeaves), + ).to.be.revertedWithCustomError(this.mock, 'MerkleProofInvalidMultiproof'); - await expectRevertCustomError( - this.merkleProof.$multiProofVerifyCalldata(maliciousProof, maliciousProofFlags, root, maliciousLeaves), - 'MerkleProofInvalidMultiproof', - [], - ); + await expect( + this.mock.$multiProofVerifyCalldata(maliciousProof, maliciousProofFlags, root, maliciousLeaves), + ).to.be.revertedWithCustomError(this.mock, 'MerkleProofInvalidMultiproof'); }); }); }); From 2ec2ed96950a6f67a83ea72596bb464b5f4ebd88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Wed, 25 Oct 2023 20:52:09 -0600 Subject: [PATCH 101/167] Migrate `AccessControl` tests (#4694) Co-authored-by: Hadrien Croubois --- test/access/AccessControl.behavior.js | 860 +++++++++--------- test/access/AccessControl.test.js | 17 +- .../AccessControlDefaultAdminRules.test.js | 30 +- .../AccessControlEnumerable.test.js | 19 +- test/helpers/time.js | 13 +- .../SupportsInterface.behavior.js | 49 +- 6 files changed, 494 insertions(+), 494 deletions(-) diff --git a/test/access/AccessControl.behavior.js b/test/access/AccessControl.behavior.js index cc3e8d63f..836ca2d6a 100644 --- a/test/access/AccessControl.behavior.js +++ b/test/access/AccessControl.behavior.js @@ -1,353 +1,361 @@ -const { expectEvent, constants, BN } = require('@openzeppelin/test-helpers'); -const { expectRevertCustomError } = require('../helpers/customError'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); - -const { time } = require('@nomicfoundation/hardhat-network-helpers'); +const { bigint: time } = require('../helpers/time'); const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior'); -const { network } = require('hardhat'); -const { ZERO_ADDRESS } = require('@openzeppelin/test-helpers/src/constants'); -const DEFAULT_ADMIN_ROLE = '0x0000000000000000000000000000000000000000000000000000000000000000'; -const ROLE = web3.utils.soliditySha3('ROLE'); -const OTHER_ROLE = web3.utils.soliditySha3('OTHER_ROLE'); -const ZERO = web3.utils.toBN(0); +const DEFAULT_ADMIN_ROLE = ethers.ZeroHash; +const ROLE = ethers.id('ROLE'); +const OTHER_ROLE = ethers.id('OTHER_ROLE'); + +function shouldBehaveLikeAccessControl() { + beforeEach(async function () { + [this.authorized, this.other, this.otherAdmin] = this.accounts; + }); -function shouldBehaveLikeAccessControl(admin, authorized, other, otherAdmin) { shouldSupportInterfaces(['AccessControl']); describe('default admin', function () { it('deployer has default admin role', async function () { - expect(await this.accessControl.hasRole(DEFAULT_ADMIN_ROLE, admin)).to.equal(true); + expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.equal(true); }); it("other roles's admin is the default admin role", async function () { - expect(await this.accessControl.getRoleAdmin(ROLE)).to.equal(DEFAULT_ADMIN_ROLE); + expect(await this.mock.getRoleAdmin(ROLE)).to.equal(DEFAULT_ADMIN_ROLE); }); it("default admin role's admin is itself", async function () { - expect(await this.accessControl.getRoleAdmin(DEFAULT_ADMIN_ROLE)).to.equal(DEFAULT_ADMIN_ROLE); + expect(await this.mock.getRoleAdmin(DEFAULT_ADMIN_ROLE)).to.equal(DEFAULT_ADMIN_ROLE); }); }); describe('granting', function () { beforeEach(async function () { - await this.accessControl.grantRole(ROLE, authorized, { from: admin }); + await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized); }); it('non-admin cannot grant role to other accounts', async function () { - await expectRevertCustomError( - this.accessControl.grantRole(ROLE, authorized, { from: other }), - 'AccessControlUnauthorizedAccount', - [other, DEFAULT_ADMIN_ROLE], - ); + await expect(this.mock.connect(this.other).grantRole(ROLE, this.authorized)) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); }); it('accounts can be granted a role multiple times', async function () { - await this.accessControl.grantRole(ROLE, authorized, { from: admin }); - const receipt = await this.accessControl.grantRole(ROLE, authorized, { from: admin }); - expectEvent.notEmitted(receipt, 'RoleGranted'); + await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized); + expect(this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized)).to.not.emit( + this.mock, + 'RoleGranted', + ); }); }); describe('revoking', function () { it('roles that are not had can be revoked', async function () { - expect(await this.accessControl.hasRole(ROLE, authorized)).to.equal(false); + expect(await this.mock.hasRole(ROLE, this.authorized)).to.equal(false); - const receipt = await this.accessControl.revokeRole(ROLE, authorized, { from: admin }); - expectEvent.notEmitted(receipt, 'RoleRevoked'); + await expect(this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.authorized)).to.not.emit( + this.mock, + 'RoleRevoked', + ); }); context('with granted role', function () { beforeEach(async function () { - await this.accessControl.grantRole(ROLE, authorized, { from: admin }); + await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized); }); it('admin can revoke role', async function () { - const receipt = await this.accessControl.revokeRole(ROLE, authorized, { from: admin }); - expectEvent(receipt, 'RoleRevoked', { account: authorized, role: ROLE, sender: admin }); + await expect(this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.authorized)) + .to.emit(this.mock, 'RoleRevoked') + .withArgs(ROLE, this.authorized.address, this.defaultAdmin.address); - expect(await this.accessControl.hasRole(ROLE, authorized)).to.equal(false); + expect(await this.mock.hasRole(ROLE, this.authorized)).to.equal(false); }); it('non-admin cannot revoke role', async function () { - await expectRevertCustomError( - this.accessControl.revokeRole(ROLE, authorized, { from: other }), - 'AccessControlUnauthorizedAccount', - [other, DEFAULT_ADMIN_ROLE], - ); + await expect(this.mock.connect(this.other).revokeRole(ROLE, this.authorized)) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); }); it('a role can be revoked multiple times', async function () { - await this.accessControl.revokeRole(ROLE, authorized, { from: admin }); + await this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.authorized); - const receipt = await this.accessControl.revokeRole(ROLE, authorized, { from: admin }); - expectEvent.notEmitted(receipt, 'RoleRevoked'); + expect(this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.authorized)).to.not.emit( + this.mock, + 'RoleRevoked', + ); }); }); }); describe('renouncing', function () { it('roles that are not had can be renounced', async function () { - const receipt = await this.accessControl.renounceRole(ROLE, authorized, { from: authorized }); - expectEvent.notEmitted(receipt, 'RoleRevoked'); + await expect(this.mock.connect(this.authorized).renounceRole(ROLE, this.authorized)).to.not.emit( + this.mock, + 'RoleRevoked', + ); }); context('with granted role', function () { beforeEach(async function () { - await this.accessControl.grantRole(ROLE, authorized, { from: admin }); + await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized); }); it('bearer can renounce role', async function () { - const receipt = await this.accessControl.renounceRole(ROLE, authorized, { from: authorized }); - expectEvent(receipt, 'RoleRevoked', { account: authorized, role: ROLE, sender: authorized }); + await expect(this.mock.connect(this.authorized).renounceRole(ROLE, this.authorized)) + .to.emit(this.mock, 'RoleRevoked') + .withArgs(ROLE, this.authorized.address, this.authorized.address); - expect(await this.accessControl.hasRole(ROLE, authorized)).to.equal(false); + expect(await this.mock.hasRole(ROLE, this.authorized)).to.equal(false); }); it('only the sender can renounce their roles', async function () { - await expectRevertCustomError( - this.accessControl.renounceRole(ROLE, authorized, { from: admin }), + expect(this.mock.connect(this.defaultAdmin).renounceRole(ROLE, this.authorized)).to.be.revertedWithCustomError( + this.mock, 'AccessControlBadConfirmation', - [], ); }); it('a role can be renounced multiple times', async function () { - await this.accessControl.renounceRole(ROLE, authorized, { from: authorized }); + await this.mock.connect(this.authorized).renounceRole(ROLE, this.authorized); - const receipt = await this.accessControl.renounceRole(ROLE, authorized, { from: authorized }); - expectEvent.notEmitted(receipt, 'RoleRevoked'); + await expect(this.mock.connect(this.authorized).renounceRole(ROLE, this.authorized)).not.to.emit( + this.mock, + 'RoleRevoked', + ); }); }); }); describe('setting role admin', function () { beforeEach(async function () { - const receipt = await this.accessControl.$_setRoleAdmin(ROLE, OTHER_ROLE); - expectEvent(receipt, 'RoleAdminChanged', { - role: ROLE, - previousAdminRole: DEFAULT_ADMIN_ROLE, - newAdminRole: OTHER_ROLE, - }); + await expect(this.mock.$_setRoleAdmin(ROLE, OTHER_ROLE)) + .to.emit(this.mock, 'RoleAdminChanged') + .withArgs(ROLE, DEFAULT_ADMIN_ROLE, OTHER_ROLE); - await this.accessControl.grantRole(OTHER_ROLE, otherAdmin, { from: admin }); + await this.mock.connect(this.defaultAdmin).grantRole(OTHER_ROLE, this.otherAdmin); }); it("a role's admin role can be changed", async function () { - expect(await this.accessControl.getRoleAdmin(ROLE)).to.equal(OTHER_ROLE); + expect(await this.mock.getRoleAdmin(ROLE)).to.equal(OTHER_ROLE); }); it('the new admin can grant roles', async function () { - const receipt = await this.accessControl.grantRole(ROLE, authorized, { from: otherAdmin }); - expectEvent(receipt, 'RoleGranted', { account: authorized, role: ROLE, sender: otherAdmin }); + await expect(this.mock.connect(this.otherAdmin).grantRole(ROLE, this.authorized)) + .to.emit(this.mock, 'RoleGranted') + .withArgs(ROLE, this.authorized.address, this.otherAdmin.address); }); it('the new admin can revoke roles', async function () { - await this.accessControl.grantRole(ROLE, authorized, { from: otherAdmin }); - const receipt = await this.accessControl.revokeRole(ROLE, authorized, { from: otherAdmin }); - expectEvent(receipt, 'RoleRevoked', { account: authorized, role: ROLE, sender: otherAdmin }); + await this.mock.connect(this.otherAdmin).grantRole(ROLE, this.authorized); + await expect(this.mock.connect(this.otherAdmin).revokeRole(ROLE, this.authorized)) + .to.emit(this.mock, 'RoleRevoked') + .withArgs(ROLE, this.authorized.address, this.otherAdmin.address); }); it("a role's previous admins no longer grant roles", async function () { - await expectRevertCustomError( - this.accessControl.grantRole(ROLE, authorized, { from: admin }), - 'AccessControlUnauthorizedAccount', - [admin.toLowerCase(), OTHER_ROLE], - ); + await expect(this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized)) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.defaultAdmin.address, OTHER_ROLE); }); it("a role's previous admins no longer revoke roles", async function () { - await expectRevertCustomError( - this.accessControl.revokeRole(ROLE, authorized, { from: admin }), - 'AccessControlUnauthorizedAccount', - [admin.toLowerCase(), OTHER_ROLE], - ); + await expect(this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.authorized)) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.defaultAdmin.address, OTHER_ROLE); }); }); describe('onlyRole modifier', function () { beforeEach(async function () { - await this.accessControl.grantRole(ROLE, authorized, { from: admin }); + await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized); }); it('do not revert if sender has role', async function () { - await this.accessControl.methods['$_checkRole(bytes32)'](ROLE, { from: authorized }); + await this.mock.connect(this.authorized).$_checkRole(ROLE); }); it("revert if sender doesn't have role #1", async function () { - await expectRevertCustomError( - this.accessControl.methods['$_checkRole(bytes32)'](ROLE, { from: other }), - 'AccessControlUnauthorizedAccount', - [other, ROLE], - ); + await expect(this.mock.connect(this.other).$_checkRole(ROLE)) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, ROLE); }); it("revert if sender doesn't have role #2", async function () { - await expectRevertCustomError( - this.accessControl.methods['$_checkRole(bytes32)'](OTHER_ROLE, { from: authorized }), - 'AccessControlUnauthorizedAccount', - [authorized.toLowerCase(), OTHER_ROLE], - ); + await expect(this.mock.connect(this.authorized).$_checkRole(OTHER_ROLE)) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.authorized.address, OTHER_ROLE); }); }); describe('internal functions', function () { describe('_grantRole', function () { it('return true if the account does not have the role', async function () { - const receipt = await this.accessControl.$_grantRole(ROLE, authorized); - expectEvent(receipt, 'return$_grantRole', { ret0: true }); + await expect(this.mock.$_grantRole(ROLE, this.authorized)) + .to.emit(this.mock, 'return$_grantRole') + .withArgs(true); }); it('return false if the account has the role', async function () { - await this.accessControl.$_grantRole(ROLE, authorized); + await this.mock.$_grantRole(ROLE, this.authorized); - const receipt = await this.accessControl.$_grantRole(ROLE, authorized); - expectEvent(receipt, 'return$_grantRole', { ret0: false }); + await expect(this.mock.$_grantRole(ROLE, this.authorized)) + .to.emit(this.mock, 'return$_grantRole') + .withArgs(false); }); }); describe('_revokeRole', function () { it('return true if the account has the role', async function () { - await this.accessControl.$_grantRole(ROLE, authorized); + await this.mock.$_grantRole(ROLE, this.authorized); - const receipt = await this.accessControl.$_revokeRole(ROLE, authorized); - expectEvent(receipt, 'return$_revokeRole', { ret0: true }); + await expect(this.mock.$_revokeRole(ROLE, this.authorized)) + .to.emit(this.mock, 'return$_revokeRole') + .withArgs(true); }); it('return false if the account does not have the role', async function () { - const receipt = await this.accessControl.$_revokeRole(ROLE, authorized); - expectEvent(receipt, 'return$_revokeRole', { ret0: false }); + await expect(this.mock.$_revokeRole(ROLE, this.authorized)) + .to.emit(this.mock, 'return$_revokeRole') + .withArgs(false); }); }); }); } -function shouldBehaveLikeAccessControlEnumerable(admin, authorized, other, otherAdmin, otherAuthorized) { +function shouldBehaveLikeAccessControlEnumerable() { + beforeEach(async function () { + [this.authorized, this.other, this.otherAdmin, this.otherAuthorized] = this.accounts; + }); + shouldSupportInterfaces(['AccessControlEnumerable']); describe('enumerating', function () { it('role bearers can be enumerated', async function () { - await this.accessControl.grantRole(ROLE, authorized, { from: admin }); - await this.accessControl.grantRole(ROLE, other, { from: admin }); - await this.accessControl.grantRole(ROLE, otherAuthorized, { from: admin }); - await this.accessControl.revokeRole(ROLE, other, { from: admin }); + await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized); + await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.other); + await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.otherAuthorized); + await this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.other); - const memberCount = await this.accessControl.getRoleMemberCount(ROLE); - expect(memberCount).to.bignumber.equal('2'); + const memberCount = await this.mock.getRoleMemberCount(ROLE); + expect(memberCount).to.equal(2); const bearers = []; for (let i = 0; i < memberCount; ++i) { - bearers.push(await this.accessControl.getRoleMember(ROLE, i)); + bearers.push(await this.mock.getRoleMember(ROLE, i)); } - expect(bearers).to.have.members([authorized, otherAuthorized]); + expect(bearers).to.have.members([this.authorized.address, this.otherAuthorized.address]); }); + it('role enumeration should be in sync after renounceRole call', async function () { - expect(await this.accessControl.getRoleMemberCount(ROLE)).to.bignumber.equal('0'); - await this.accessControl.grantRole(ROLE, admin, { from: admin }); - expect(await this.accessControl.getRoleMemberCount(ROLE)).to.bignumber.equal('1'); - await this.accessControl.renounceRole(ROLE, admin, { from: admin }); - expect(await this.accessControl.getRoleMemberCount(ROLE)).to.bignumber.equal('0'); + expect(await this.mock.getRoleMemberCount(ROLE)).to.equal(0); + await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.defaultAdmin); + expect(await this.mock.getRoleMemberCount(ROLE)).to.equal(1); + await this.mock.connect(this.defaultAdmin).renounceRole(ROLE, this.defaultAdmin); + expect(await this.mock.getRoleMemberCount(ROLE)).to.equal(0); }); }); } -function shouldBehaveLikeAccessControlDefaultAdminRules(delay, defaultAdmin, newDefaultAdmin, other) { +function shouldBehaveLikeAccessControlDefaultAdminRules() { shouldSupportInterfaces(['AccessControlDefaultAdminRules']); + beforeEach(async function () { + [this.newDefaultAdmin, this.other] = this.accounts; + }); + for (const getter of ['owner', 'defaultAdmin']) { describe(`${getter}()`, function () { it('has a default set to the initial default admin', async function () { - const value = await this.accessControl[getter](); - expect(value).to.equal(defaultAdmin); - expect(await this.accessControl.hasRole(DEFAULT_ADMIN_ROLE, value)).to.be.true; + const value = await this.mock[getter](); + expect(value).to.equal(this.defaultAdmin.address); + expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, value)).to.be.true; }); it('changes if the default admin changes', async function () { // Starts an admin transfer - await this.accessControl.beginDefaultAdminTransfer(newDefaultAdmin, { from: defaultAdmin }); + await this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin); // Wait for acceptance - const acceptSchedule = web3.utils.toBN(await time.latest()).add(delay); - await time.setNextBlockTimestamp(acceptSchedule.addn(1)); - await this.accessControl.acceptDefaultAdminTransfer({ from: newDefaultAdmin }); + const acceptSchedule = (await time.clock.timestamp()) + this.delay; + await time.forward.timestamp(acceptSchedule + 1n, false); + await this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer(); - const value = await this.accessControl[getter](); - expect(value).to.equal(newDefaultAdmin); + const value = await this.mock[getter](); + expect(value).to.equal(this.newDefaultAdmin.address); }); }); } describe('pendingDefaultAdmin()', function () { it('returns 0 if no pending default admin transfer', async function () { - const { newAdmin, schedule } = await this.accessControl.pendingDefaultAdmin(); - expect(newAdmin).to.eq(ZERO_ADDRESS); - expect(schedule).to.be.bignumber.eq(ZERO); + const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); + expect(newAdmin).to.equal(ethers.ZeroAddress); + expect(schedule).to.equal(0); }); describe('when there is a scheduled default admin transfer', function () { beforeEach('begins admin transfer', async function () { - await this.accessControl.beginDefaultAdminTransfer(newDefaultAdmin, { from: defaultAdmin }); + await this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin); }); for (const [fromSchedule, tag] of [ - [-1, 'before'], - [0, 'exactly when'], - [1, 'after'], + [-1n, 'before'], + [0n, 'exactly when'], + [1n, 'after'], ]) { it(`returns pending admin and schedule ${tag} it passes if not accepted`, async function () { // Wait until schedule + fromSchedule - const { schedule: firstSchedule } = await this.accessControl.pendingDefaultAdmin(); - await time.setNextBlockTimestamp(firstSchedule.toNumber() + fromSchedule); - await network.provider.send('evm_mine'); // Mine a block to force the timestamp + const { schedule: firstSchedule } = await this.mock.pendingDefaultAdmin(); + await time.forward.timestamp(firstSchedule + fromSchedule); - const { newAdmin, schedule } = await this.accessControl.pendingDefaultAdmin(); - expect(newAdmin).to.eq(newDefaultAdmin); - expect(schedule).to.be.bignumber.eq(firstSchedule); + const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); + expect(newAdmin).to.equal(this.newDefaultAdmin.address); + expect(schedule).to.equal(firstSchedule); }); } it('returns 0 after schedule passes and the transfer was accepted', async function () { // Wait after schedule - const { schedule: firstSchedule } = await this.accessControl.pendingDefaultAdmin(); - await time.setNextBlockTimestamp(firstSchedule.addn(1)); + const { schedule: firstSchedule } = await this.mock.pendingDefaultAdmin(); + await time.forward.timestamp(firstSchedule + 1n, false); // Accepts - await this.accessControl.acceptDefaultAdminTransfer({ from: newDefaultAdmin }); + await this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer(); - const { newAdmin, schedule } = await this.accessControl.pendingDefaultAdmin(); - expect(newAdmin).to.eq(ZERO_ADDRESS); - expect(schedule).to.be.bignumber.eq(ZERO); + const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); + expect(newAdmin).to.equal(ethers.ZeroAddress); + expect(schedule).to.equal(0); }); }); }); describe('defaultAdminDelay()', function () { it('returns the current delay', async function () { - expect(await this.accessControl.defaultAdminDelay()).to.be.bignumber.eq(delay); + expect(await this.mock.defaultAdminDelay()).to.equal(this.delay); }); describe('when there is a scheduled delay change', function () { - const newDelay = web3.utils.toBN(0xdead); // Any change + const newDelay = 0x1337n; // Any change beforeEach('begins delay change', async function () { - await this.accessControl.changeDefaultAdminDelay(newDelay, { from: defaultAdmin }); + await this.mock.connect(this.defaultAdmin).changeDefaultAdminDelay(newDelay); }); - for (const [fromSchedule, tag, expectedDelay, delayTag] of [ - [-1, 'before', delay, 'old'], - [0, 'exactly when', delay, 'old'], - [1, 'after', newDelay, 'new'], + for (const [fromSchedule, tag, expectNew, delayTag] of [ + [-1n, 'before', false, 'old'], + [0n, 'exactly when', false, 'old'], + [1n, 'after', true, 'new'], ]) { it(`returns ${delayTag} delay ${tag} delay schedule passes`, async function () { // Wait until schedule + fromSchedule - const { schedule } = await this.accessControl.pendingDefaultAdminDelay(); - await time.setNextBlockTimestamp(schedule.toNumber() + fromSchedule); - await network.provider.send('evm_mine'); // Mine a block to force the timestamp + const { schedule } = await this.mock.pendingDefaultAdminDelay(); + await time.forward.timestamp(schedule + fromSchedule); - const currentDelay = await this.accessControl.defaultAdminDelay(); - expect(currentDelay).to.be.bignumber.eq(expectedDelay); + const currentDelay = await this.mock.defaultAdminDelay(); + expect(currentDelay).to.equal(expectNew ? newDelay : this.delay); }); } }); @@ -355,32 +363,31 @@ function shouldBehaveLikeAccessControlDefaultAdminRules(delay, defaultAdmin, new describe('pendingDefaultAdminDelay()', function () { it('returns 0 if not set', async function () { - const { newDelay, schedule } = await this.accessControl.pendingDefaultAdminDelay(); - expect(newDelay).to.be.bignumber.eq(ZERO); - expect(schedule).to.be.bignumber.eq(ZERO); + const { newDelay, schedule } = await this.mock.pendingDefaultAdminDelay(); + expect(newDelay).to.equal(0); + expect(schedule).to.equal(0); }); describe('when there is a scheduled delay change', function () { - const newDelay = web3.utils.toBN(0xdead); // Any change + const newDelay = 0x1337n; // Any change beforeEach('begins admin transfer', async function () { - await this.accessControl.changeDefaultAdminDelay(newDelay, { from: defaultAdmin }); + await this.mock.connect(this.defaultAdmin).changeDefaultAdminDelay(newDelay); }); for (const [fromSchedule, tag, expectedDelay, delayTag, expectZeroSchedule] of [ - [-1, 'before', newDelay, 'new'], - [0, 'exactly when', newDelay, 'new'], - [1, 'after', ZERO, 'zero', true], + [-1n, 'before', newDelay, 'new'], + [0n, 'exactly when', newDelay, 'new'], + [1n, 'after', 0, 'zero', true], ]) { it(`returns ${delayTag} delay ${tag} delay schedule passes`, async function () { // Wait until schedule + fromSchedule - const { schedule: firstSchedule } = await this.accessControl.pendingDefaultAdminDelay(); - await time.setNextBlockTimestamp(firstSchedule.toNumber() + fromSchedule); - await network.provider.send('evm_mine'); // Mine a block to force the timestamp + const { schedule: firstSchedule } = await this.mock.pendingDefaultAdminDelay(); + await time.forward.timestamp(firstSchedule + fromSchedule); - const { newDelay, schedule } = await this.accessControl.pendingDefaultAdminDelay(); - expect(newDelay).to.be.bignumber.eq(expectedDelay); - expect(schedule).to.be.bignumber.eq(expectZeroSchedule ? ZERO : firstSchedule); + const { newDelay, schedule } = await this.mock.pendingDefaultAdminDelay(); + expect(newDelay).to.equal(expectedDelay); + expect(schedule).to.equal(expectZeroSchedule ? 0 : firstSchedule); }); } }); @@ -388,207 +395,183 @@ function shouldBehaveLikeAccessControlDefaultAdminRules(delay, defaultAdmin, new describe('defaultAdminDelayIncreaseWait()', function () { it('should return 5 days (default)', async function () { - expect(await this.accessControl.defaultAdminDelayIncreaseWait()).to.be.bignumber.eq( - web3.utils.toBN(time.duration.days(5)), - ); + expect(await this.mock.defaultAdminDelayIncreaseWait()).to.equal(time.duration.days(5)); }); }); it('should revert if granting default admin role', async function () { - await expectRevertCustomError( - this.accessControl.grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin, { from: defaultAdmin }), - 'AccessControlEnforcedDefaultAdminRules', - [], - ); + await expect( + this.mock.connect(this.defaultAdmin).grantRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin), + ).to.be.revertedWithCustomError(this.mock, 'AccessControlEnforcedDefaultAdminRules'); }); it('should revert if revoking default admin role', async function () { - await expectRevertCustomError( - this.accessControl.revokeRole(DEFAULT_ADMIN_ROLE, defaultAdmin, { from: defaultAdmin }), - 'AccessControlEnforcedDefaultAdminRules', - [], - ); + await expect( + this.mock.connect(this.defaultAdmin).revokeRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin), + ).to.be.revertedWithCustomError(this.mock, 'AccessControlEnforcedDefaultAdminRules'); }); it("should revert if defaultAdmin's admin is changed", async function () { - await expectRevertCustomError( - this.accessControl.$_setRoleAdmin(DEFAULT_ADMIN_ROLE, OTHER_ROLE), + await expect(this.mock.$_setRoleAdmin(DEFAULT_ADMIN_ROLE, OTHER_ROLE)).to.be.revertedWithCustomError( + this.mock, 'AccessControlEnforcedDefaultAdminRules', - [], ); }); it('should not grant the default admin role twice', async function () { - await expectRevertCustomError( - this.accessControl.$_grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin), + await expect(this.mock.$_grantRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.revertedWithCustomError( + this.mock, 'AccessControlEnforcedDefaultAdminRules', - [], ); }); describe('begins a default admin transfer', function () { - let receipt; - let acceptSchedule; - it('reverts if called by non default admin accounts', async function () { - await expectRevertCustomError( - this.accessControl.beginDefaultAdminTransfer(newDefaultAdmin, { from: other }), - 'AccessControlUnauthorizedAccount', - [other, DEFAULT_ADMIN_ROLE], - ); + await expect(this.mock.connect(this.other).beginDefaultAdminTransfer(this.newDefaultAdmin)) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); }); describe('when there is no pending delay nor pending admin transfer', function () { - beforeEach('begins admin transfer', async function () { - receipt = await this.accessControl.beginDefaultAdminTransfer(newDefaultAdmin, { from: defaultAdmin }); - acceptSchedule = web3.utils.toBN(await time.latest()).add(delay); - }); - it('should set pending default admin and schedule', async function () { - const { newAdmin, schedule } = await this.accessControl.pendingDefaultAdmin(); - expect(newAdmin).to.equal(newDefaultAdmin); - expect(schedule).to.be.bignumber.equal(acceptSchedule); - expectEvent(receipt, 'DefaultAdminTransferScheduled', { - newAdmin, - acceptSchedule, - }); + const nextBlockTimestamp = (await time.clock.timestamp()) + 1n; + const acceptSchedule = nextBlockTimestamp + this.delay; + + await time.forward.timestamp(nextBlockTimestamp, false); // set timestamp but don't mine the block yet + await expect(this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin)) + .to.emit(this.mock, 'DefaultAdminTransferScheduled') + .withArgs(this.newDefaultAdmin.address, acceptSchedule); + + const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); + expect(newAdmin).to.equal(this.newDefaultAdmin.address); + expect(schedule).to.equal(acceptSchedule); }); }); describe('when there is a pending admin transfer', function () { beforeEach('sets a pending default admin transfer', async function () { - await this.accessControl.beginDefaultAdminTransfer(newDefaultAdmin, { from: defaultAdmin }); - acceptSchedule = web3.utils.toBN(await time.latest()).add(delay); + await this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin); + this.acceptSchedule = (await time.clock.timestamp()) + this.delay; }); for (const [fromSchedule, tag] of [ - [-1, 'before'], - [0, 'exactly when'], - [1, 'after'], + [-1n, 'before'], + [0n, 'exactly when'], + [1n, 'after'], ]) { it(`should be able to begin a transfer again ${tag} acceptSchedule passes`, async function () { // Wait until schedule + fromSchedule - await time.setNextBlockTimestamp(acceptSchedule.toNumber() + fromSchedule); + await time.forward.timestamp(this.acceptSchedule + fromSchedule, false); // defaultAdmin changes its mind and begin again to another address - const receipt = await this.accessControl.beginDefaultAdminTransfer(other, { from: defaultAdmin }); - const newSchedule = web3.utils.toBN(await time.latest()).add(delay); - const { newAdmin, schedule } = await this.accessControl.pendingDefaultAdmin(); - expect(newAdmin).to.equal(other); - expect(schedule).to.be.bignumber.equal(newSchedule); - - // Cancellation is always emitted since it was never accepted - expectEvent(receipt, 'DefaultAdminTransferCanceled'); + await expect(this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.other)).to.emit( + this.mock, + 'DefaultAdminTransferCanceled', // Cancellation is always emitted since it was never accepted + ); + const newSchedule = (await time.clock.timestamp()) + this.delay; + const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); + expect(newAdmin).to.equal(this.other.address); + expect(schedule).to.equal(newSchedule); }); } it('should not emit a cancellation event if the new default admin accepted', async function () { // Wait until the acceptSchedule has passed - await time.setNextBlockTimestamp(acceptSchedule.addn(1)); + await time.forward.timestamp(this.acceptSchedule + 1n, false); // Accept and restart - await this.accessControl.acceptDefaultAdminTransfer({ from: newDefaultAdmin }); - const receipt = await this.accessControl.beginDefaultAdminTransfer(other, { from: newDefaultAdmin }); - - expectEvent.notEmitted(receipt, 'DefaultAdminTransferCanceled'); + await this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer(); + await expect(this.mock.connect(this.newDefaultAdmin).beginDefaultAdminTransfer(this.other)).to.not.emit( + this.mock, + 'DefaultAdminTransferCanceled', + ); }); }); describe('when there is a pending delay', function () { - const newDelay = web3.utils.toBN(time.duration.hours(3)); + const newDelay = time.duration.hours(3); beforeEach('schedule a delay change', async function () { - await this.accessControl.changeDefaultAdminDelay(newDelay, { from: defaultAdmin }); - const pendingDefaultAdminDelay = await this.accessControl.pendingDefaultAdminDelay(); - acceptSchedule = pendingDefaultAdminDelay.schedule; + await this.mock.connect(this.defaultAdmin).changeDefaultAdminDelay(newDelay); + ({ schedule: this.effectSchedule } = await this.mock.pendingDefaultAdminDelay()); }); - for (const [fromSchedule, schedulePassed, expectedDelay, delayTag] of [ - [-1, 'before', delay, 'old'], - [0, 'exactly when', delay, 'old'], - [1, 'after', newDelay, 'new'], + for (const [fromSchedule, schedulePassed, expectNewDelay] of [ + [-1n, 'before', false], + [0n, 'exactly when', false], + [1n, 'after', true], ]) { - it(`should set the ${delayTag} delay and apply it to next default admin transfer schedule ${schedulePassed} acceptSchedule passed`, async function () { + it(`should set the ${ + expectNewDelay ? 'new' : 'old' + } delay and apply it to next default admin transfer schedule ${schedulePassed} effectSchedule passed`, async function () { // Wait until the expected fromSchedule time - await time.setNextBlockTimestamp(acceptSchedule.toNumber() + fromSchedule); + const nextBlockTimestamp = this.effectSchedule + fromSchedule; + await time.forward.timestamp(nextBlockTimestamp, false); // Start the new default admin transfer and get its schedule - const receipt = await this.accessControl.beginDefaultAdminTransfer(newDefaultAdmin, { from: defaultAdmin }); - const expectedAcceptSchedule = web3.utils.toBN(await time.latest()).add(expectedDelay); + const expectedDelay = expectNewDelay ? newDelay : this.delay; + const expectedAcceptSchedule = nextBlockTimestamp + expectedDelay; + await expect(this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin)) + .to.emit(this.mock, 'DefaultAdminTransferScheduled') + .withArgs(this.newDefaultAdmin.address, expectedAcceptSchedule); // Check that the schedule corresponds with the new delay - const { newAdmin, schedule: transferSchedule } = await this.accessControl.pendingDefaultAdmin(); - expect(newAdmin).to.equal(newDefaultAdmin); - expect(transferSchedule).to.be.bignumber.equal(expectedAcceptSchedule); - - expectEvent(receipt, 'DefaultAdminTransferScheduled', { - newAdmin, - acceptSchedule: expectedAcceptSchedule, - }); + const { newAdmin, schedule: transferSchedule } = await this.mock.pendingDefaultAdmin(); + expect(newAdmin).to.equal(this.newDefaultAdmin.address); + expect(transferSchedule).to.equal(expectedAcceptSchedule); }); } }); }); describe('accepts transfer admin', function () { - let acceptSchedule; - beforeEach(async function () { - await this.accessControl.beginDefaultAdminTransfer(newDefaultAdmin, { from: defaultAdmin }); - acceptSchedule = web3.utils.toBN(await time.latest()).add(delay); + await this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin); + this.acceptSchedule = (await time.clock.timestamp()) + this.delay; }); it('should revert if caller is not pending default admin', async function () { - await time.setNextBlockTimestamp(acceptSchedule.addn(1)); - await expectRevertCustomError( - this.accessControl.acceptDefaultAdminTransfer({ from: other }), - 'AccessControlInvalidDefaultAdmin', - [other], - ); + await time.forward.timestamp(this.acceptSchedule + 1n, false); + await expect(this.mock.connect(this.other).acceptDefaultAdminTransfer()) + .to.be.revertedWithCustomError(this.mock, 'AccessControlInvalidDefaultAdmin') + .withArgs(this.other.address); }); describe('when caller is pending default admin and delay has passed', function () { beforeEach(async function () { - await time.setNextBlockTimestamp(acceptSchedule.addn(1)); + await time.forward.timestamp(this.acceptSchedule + 1n, false); }); it('accepts a transfer and changes default admin', async function () { - const receipt = await this.accessControl.acceptDefaultAdminTransfer({ from: newDefaultAdmin }); + // Emit events + await expect(this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer()) + .to.emit(this.mock, 'RoleRevoked') + .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin.address, this.newDefaultAdmin.address) + .to.emit(this.mock, 'RoleGranted') + .withArgs(DEFAULT_ADMIN_ROLE, this.newDefaultAdmin.address, this.newDefaultAdmin.address); // Storage changes - expect(await this.accessControl.hasRole(DEFAULT_ADMIN_ROLE, defaultAdmin)).to.be.false; - expect(await this.accessControl.hasRole(DEFAULT_ADMIN_ROLE, newDefaultAdmin)).to.be.true; - expect(await this.accessControl.owner()).to.equal(newDefaultAdmin); - - // Emit events - expectEvent(receipt, 'RoleRevoked', { - role: DEFAULT_ADMIN_ROLE, - account: defaultAdmin, - }); - expectEvent(receipt, 'RoleGranted', { - role: DEFAULT_ADMIN_ROLE, - account: newDefaultAdmin, - }); + expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.false; + expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.newDefaultAdmin)).to.be.true; + expect(await this.mock.owner()).to.equal(this.newDefaultAdmin.address); // Resets pending default admin and schedule - const { newAdmin, schedule } = await this.accessControl.pendingDefaultAdmin(); - expect(newAdmin).to.equal(constants.ZERO_ADDRESS); - expect(schedule).to.be.bignumber.equal(ZERO); + const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); + expect(newAdmin).to.equal(ethers.ZeroAddress); + expect(schedule).to.equal(0); }); }); describe('schedule not passed', function () { for (const [fromSchedule, tag] of [ - [-1, 'less'], - [0, 'equal'], + [-1n, 'less'], + [0n, 'equal'], ]) { it(`should revert if block.timestamp is ${tag} to schedule`, async function () { - await time.setNextBlockTimestamp(acceptSchedule.toNumber() + fromSchedule); - await expectRevertCustomError( - this.accessControl.acceptDefaultAdminTransfer({ from: newDefaultAdmin }), - 'AccessControlEnforcedDefaultAdminDelay', - [acceptSchedule], - ); + await time.forward.timestamp(this.acceptSchedule + fromSchedule, false); + expect(this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer()) + .to.be.revertedWithCustomError(this.mock, 'AccessControlEnforcedDefaultAdminDelay') + .withArgs(this.acceptSchedule); }); } }); @@ -596,147 +579,132 @@ function shouldBehaveLikeAccessControlDefaultAdminRules(delay, defaultAdmin, new describe('cancels a default admin transfer', function () { it('reverts if called by non default admin accounts', async function () { - await expectRevertCustomError( - this.accessControl.cancelDefaultAdminTransfer({ from: other }), - 'AccessControlUnauthorizedAccount', - [other, DEFAULT_ADMIN_ROLE], - ); + await expect(this.mock.connect(this.other).cancelDefaultAdminTransfer()) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); }); describe('when there is a pending default admin transfer', function () { - let acceptSchedule; - beforeEach(async function () { - await this.accessControl.beginDefaultAdminTransfer(newDefaultAdmin, { from: defaultAdmin }); - acceptSchedule = web3.utils.toBN(await time.latest()).add(delay); + await this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin); + this.acceptSchedule = (await time.clock.timestamp()) + this.delay; }); for (const [fromSchedule, tag] of [ - [-1, 'before'], - [0, 'exactly when'], - [1, 'after'], + [-1n, 'before'], + [0n, 'exactly when'], + [1n, 'after'], ]) { it(`resets pending default admin and schedule ${tag} transfer schedule passes`, async function () { // Advance until passed delay - await time.setNextBlockTimestamp(acceptSchedule.toNumber() + fromSchedule); + await time.forward.timestamp(this.acceptSchedule + fromSchedule, false); - const receipt = await this.accessControl.cancelDefaultAdminTransfer({ from: defaultAdmin }); - - const { newAdmin, schedule } = await this.accessControl.pendingDefaultAdmin(); - expect(newAdmin).to.equal(constants.ZERO_ADDRESS); - expect(schedule).to.be.bignumber.equal(ZERO); + await expect(this.mock.connect(this.defaultAdmin).cancelDefaultAdminTransfer()).to.emit( + this.mock, + 'DefaultAdminTransferCanceled', + ); - expectEvent(receipt, 'DefaultAdminTransferCanceled'); + const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); + expect(newAdmin).to.equal(ethers.ZeroAddress); + expect(schedule).to.equal(0); }); } it('should revert if the previous default admin tries to accept', async function () { - await this.accessControl.cancelDefaultAdminTransfer({ from: defaultAdmin }); + await this.mock.connect(this.defaultAdmin).cancelDefaultAdminTransfer(); // Advance until passed delay - await time.setNextBlockTimestamp(acceptSchedule.addn(1)); + await time.forward.timestamp(this.acceptSchedule + 1n, false); // Previous pending default admin should not be able to accept after cancellation. - await expectRevertCustomError( - this.accessControl.acceptDefaultAdminTransfer({ from: newDefaultAdmin }), - 'AccessControlInvalidDefaultAdmin', - [newDefaultAdmin], - ); + await expect(this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer()) + .to.be.revertedWithCustomError(this.mock, 'AccessControlInvalidDefaultAdmin') + .withArgs(this.newDefaultAdmin.address); }); }); describe('when there is no pending default admin transfer', async function () { it('should succeed without changes', async function () { - const receipt = await this.accessControl.cancelDefaultAdminTransfer({ from: defaultAdmin }); - - const { newAdmin, schedule } = await this.accessControl.pendingDefaultAdmin(); - expect(newAdmin).to.equal(constants.ZERO_ADDRESS); - expect(schedule).to.be.bignumber.equal(ZERO); + await expect(this.mock.connect(this.defaultAdmin).cancelDefaultAdminTransfer()).to.not.emit( + this.mock, + 'DefaultAdminTransferCanceled', + ); - expectEvent.notEmitted(receipt, 'DefaultAdminTransferCanceled'); + const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); + expect(newAdmin).to.equal(ethers.ZeroAddress); + expect(schedule).to.equal(0); }); }); }); describe('renounces admin', function () { - let expectedSchedule; - let delayPassed; - let delayNotPassed; - beforeEach(async function () { - await this.accessControl.beginDefaultAdminTransfer(constants.ZERO_ADDRESS, { from: defaultAdmin }); - expectedSchedule = web3.utils.toBN(await time.latest()).add(delay); - delayNotPassed = expectedSchedule; - delayPassed = expectedSchedule.addn(1); + await this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(ethers.ZeroAddress); + this.expectedSchedule = (await time.clock.timestamp()) + this.delay; + this.delayNotPassed = this.expectedSchedule; + this.delayPassed = this.expectedSchedule + 1n; }); it('reverts if caller is not default admin', async function () { - await time.setNextBlockTimestamp(delayPassed); - await expectRevertCustomError( - this.accessControl.renounceRole(DEFAULT_ADMIN_ROLE, other, { from: defaultAdmin }), - 'AccessControlBadConfirmation', - [], - ); + await time.forward.timestamp(this.delayPassed, false); + await expect( + this.mock.connect(this.defaultAdmin).renounceRole(DEFAULT_ADMIN_ROLE, this.other), + ).to.be.revertedWithCustomError(this.mock, 'AccessControlBadConfirmation'); }); it("renouncing the admin role when not an admin doesn't affect the schedule", async function () { - await time.setNextBlockTimestamp(delayPassed); - await this.accessControl.renounceRole(DEFAULT_ADMIN_ROLE, other, { from: other }); + await time.forward.timestamp(this.delayPassed, false); + await this.mock.connect(this.other).renounceRole(DEFAULT_ADMIN_ROLE, this.other); - const { newAdmin, schedule } = await this.accessControl.pendingDefaultAdmin(); - expect(newAdmin).to.equal(constants.ZERO_ADDRESS); - expect(schedule).to.be.bignumber.equal(expectedSchedule); + const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); + expect(newAdmin).to.equal(ethers.ZeroAddress); + expect(schedule).to.equal(this.expectedSchedule); }); it('keeps defaultAdmin consistent with hasRole if another non-defaultAdmin user renounces the DEFAULT_ADMIN_ROLE', async function () { - await time.setNextBlockTimestamp(delayPassed); + await time.forward.timestamp(this.delayPassed, false); // This passes because it's a noop - await this.accessControl.renounceRole(DEFAULT_ADMIN_ROLE, other, { from: other }); + await this.mock.connect(this.other).renounceRole(DEFAULT_ADMIN_ROLE, this.other); - expect(await this.accessControl.hasRole(DEFAULT_ADMIN_ROLE, defaultAdmin)).to.be.true; - expect(await this.accessControl.defaultAdmin()).to.be.equal(defaultAdmin); + expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.true; + expect(await this.mock.defaultAdmin()).to.be.equal(this.defaultAdmin.address); }); it('renounces role', async function () { - await time.setNextBlockTimestamp(delayPassed); - const receipt = await this.accessControl.renounceRole(DEFAULT_ADMIN_ROLE, defaultAdmin, { from: defaultAdmin }); - - expect(await this.accessControl.hasRole(DEFAULT_ADMIN_ROLE, defaultAdmin)).to.be.false; - expect(await this.accessControl.defaultAdmin()).to.be.equal(constants.ZERO_ADDRESS); - expectEvent(receipt, 'RoleRevoked', { - role: DEFAULT_ADMIN_ROLE, - account: defaultAdmin, - }); - expect(await this.accessControl.owner()).to.equal(constants.ZERO_ADDRESS); - const { newAdmin, schedule } = await this.accessControl.pendingDefaultAdmin(); - expect(newAdmin).to.eq(ZERO_ADDRESS); - expect(schedule).to.be.bignumber.eq(ZERO); + await time.forward.timestamp(this.delayPassed, false); + await expect(this.mock.connect(this.defaultAdmin).renounceRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)) + .to.emit(this.mock, 'RoleRevoked') + .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin.address, this.defaultAdmin.address); + + expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.false; + expect(await this.mock.defaultAdmin()).to.be.equal(ethers.ZeroAddress); + expect(await this.mock.owner()).to.equal(ethers.ZeroAddress); + + const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); + expect(newAdmin).to.equal(ethers.ZeroAddress); + expect(schedule).to.equal(0); }); it('allows to recover access using the internal _grantRole', async function () { - await time.setNextBlockTimestamp(delayPassed); - await this.accessControl.renounceRole(DEFAULT_ADMIN_ROLE, defaultAdmin, { from: defaultAdmin }); + await time.forward.timestamp(this.delayPassed, false); + await this.mock.connect(this.defaultAdmin).renounceRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin); - const grantRoleReceipt = await this.accessControl.$_grantRole(DEFAULT_ADMIN_ROLE, other); - expectEvent(grantRoleReceipt, 'RoleGranted', { - role: DEFAULT_ADMIN_ROLE, - account: other, - }); + await expect(this.mock.connect(this.defaultAdmin).$_grantRole(DEFAULT_ADMIN_ROLE, this.other)) + .to.emit(this.mock, 'RoleGranted') + .withArgs(DEFAULT_ADMIN_ROLE, this.other.address, this.defaultAdmin.address); }); describe('schedule not passed', function () { for (const [fromSchedule, tag] of [ - [-1, 'less'], - [0, 'equal'], + [-1n, 'less'], + [0n, 'equal'], ]) { it(`reverts if block.timestamp is ${tag} to schedule`, async function () { - await time.setNextBlockTimestamp(delayNotPassed.toNumber() + fromSchedule); - await expectRevertCustomError( - this.accessControl.renounceRole(DEFAULT_ADMIN_ROLE, defaultAdmin, { from: defaultAdmin }), - 'AccessControlEnforcedDefaultAdminDelay', - [expectedSchedule], - ); + await time.forward.timestamp(this.delayNotPassed + fromSchedule, false); + await expect(this.mock.connect(this.defaultAdmin).renounceRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)) + .to.be.revertedWithCustomError(this.mock, 'AccessControlEnforcedDefaultAdminDelay') + .withArgs(this.expectedSchedule); }); } }); @@ -744,97 +712,95 @@ function shouldBehaveLikeAccessControlDefaultAdminRules(delay, defaultAdmin, new describe('changes delay', function () { it('reverts if called by non default admin accounts', async function () { - await expectRevertCustomError( - this.accessControl.changeDefaultAdminDelay(time.duration.hours(4), { - from: other, - }), - 'AccessControlUnauthorizedAccount', - [other, DEFAULT_ADMIN_ROLE], - ); + await expect(this.mock.connect(this.other).changeDefaultAdminDelay(time.duration.hours(4))) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); }); - for (const [newDefaultAdminDelay, delayChangeType] of [ - [web3.utils.toBN(delay).subn(time.duration.hours(1)), 'decreased'], - [web3.utils.toBN(delay).addn(time.duration.hours(1)), 'increased'], - [web3.utils.toBN(delay).addn(time.duration.days(5)), 'increased to more than 5 days'], + for (const [delayDifference, delayChangeType] of [ + [time.duration.hours(-1), 'decreased'], + [time.duration.hours(1), 'increased'], + [time.duration.days(5), 'increased to more than 5 days'], ]) { describe(`when the delay is ${delayChangeType}`, function () { - it('begins the delay change to the new delay', async function () { - // Begins the change - const receipt = await this.accessControl.changeDefaultAdminDelay(newDefaultAdminDelay, { - from: defaultAdmin, - }); + beforeEach(function () { + this.newDefaultAdminDelay = this.delay + delayDifference; + }); + it('begins the delay change to the new delay', async function () { // Calculate expected values - const cap = await this.accessControl.defaultAdminDelayIncreaseWait(); - const changeDelay = newDefaultAdminDelay.lte(delay) - ? delay.sub(newDefaultAdminDelay) - : BN.min(newDefaultAdminDelay, cap); - const timestamp = web3.utils.toBN(await time.latest()); - const effectSchedule = timestamp.add(changeDelay); + const capWait = await this.mock.defaultAdminDelayIncreaseWait(); + const minWait = capWait < this.newDefaultAdminDelay ? capWait : this.newDefaultAdminDelay; + const changeDelay = + this.newDefaultAdminDelay <= this.delay ? this.delay - this.newDefaultAdminDelay : minWait; + const nextBlockTimestamp = (await time.clock.timestamp()) + 1n; + const effectSchedule = nextBlockTimestamp + changeDelay; + + await time.forward.timestamp(nextBlockTimestamp, false); + + // Begins the change + await expect(this.mock.connect(this.defaultAdmin).changeDefaultAdminDelay(this.newDefaultAdminDelay)) + .to.emit(this.mock, 'DefaultAdminDelayChangeScheduled') + .withArgs(this.newDefaultAdminDelay, effectSchedule); // Assert - const { newDelay, schedule } = await this.accessControl.pendingDefaultAdminDelay(); - expect(newDelay).to.be.bignumber.eq(newDefaultAdminDelay); - expect(schedule).to.be.bignumber.eq(effectSchedule); - expectEvent(receipt, 'DefaultAdminDelayChangeScheduled', { - newDelay, - effectSchedule, - }); + const { newDelay, schedule } = await this.mock.pendingDefaultAdminDelay(); + expect(newDelay).to.equal(this.newDefaultAdminDelay); + expect(schedule).to.equal(effectSchedule); }); describe('scheduling again', function () { beforeEach('schedule once', async function () { - await this.accessControl.changeDefaultAdminDelay(newDefaultAdminDelay, { from: defaultAdmin }); + await this.mock.connect(this.defaultAdmin).changeDefaultAdminDelay(this.newDefaultAdminDelay); }); for (const [fromSchedule, tag] of [ - [-1, 'before'], - [0, 'exactly when'], - [1, 'after'], + [-1n, 'before'], + [0n, 'exactly when'], + [1n, 'after'], ]) { const passed = fromSchedule > 0; it(`succeeds ${tag} the delay schedule passes`, async function () { // Wait until schedule + fromSchedule - const { schedule: firstSchedule } = await this.accessControl.pendingDefaultAdminDelay(); - await time.setNextBlockTimestamp(firstSchedule.toNumber() + fromSchedule); - - // Default admin changes its mind and begins another delay change - const anotherNewDefaultAdminDelay = newDefaultAdminDelay.addn(time.duration.hours(2)); - const receipt = await this.accessControl.changeDefaultAdminDelay(anotherNewDefaultAdminDelay, { - from: defaultAdmin, - }); + const { schedule: firstSchedule } = await this.mock.pendingDefaultAdminDelay(); + const nextBlockTimestamp = firstSchedule + fromSchedule; + await time.forward.timestamp(nextBlockTimestamp, false); // Calculate expected values - const cap = await this.accessControl.defaultAdminDelayIncreaseWait(); - const timestamp = web3.utils.toBN(await time.latest()); - const effectSchedule = timestamp.add(BN.min(cap, anotherNewDefaultAdminDelay)); + const anotherNewDefaultAdminDelay = this.newDefaultAdminDelay + time.duration.hours(2); + const capWait = await this.mock.defaultAdminDelayIncreaseWait(); + const minWait = capWait < anotherNewDefaultAdminDelay ? capWait : anotherNewDefaultAdminDelay; + const effectSchedule = nextBlockTimestamp + minWait; + + // Default admin changes its mind and begins another delay change + await expect(this.mock.connect(this.defaultAdmin).changeDefaultAdminDelay(anotherNewDefaultAdminDelay)) + .to.emit(this.mock, 'DefaultAdminDelayChangeScheduled') + .withArgs(anotherNewDefaultAdminDelay, effectSchedule); // Assert - const { newDelay, schedule } = await this.accessControl.pendingDefaultAdminDelay(); - expect(newDelay).to.be.bignumber.eq(anotherNewDefaultAdminDelay); - expect(schedule).to.be.bignumber.eq(effectSchedule); - expectEvent(receipt, 'DefaultAdminDelayChangeScheduled', { - newDelay, - effectSchedule, - }); + const { newDelay, schedule } = await this.mock.pendingDefaultAdminDelay(); + expect(newDelay).to.equal(anotherNewDefaultAdminDelay); + expect(schedule).to.equal(effectSchedule); }); const emit = passed ? 'not emit' : 'emit'; it(`should ${emit} a cancellation event ${tag} the delay schedule passes`, async function () { // Wait until schedule + fromSchedule - const { schedule: firstSchedule } = await this.accessControl.pendingDefaultAdminDelay(); - await time.setNextBlockTimestamp(firstSchedule.toNumber() + fromSchedule); + const { schedule: firstSchedule } = await this.mock.pendingDefaultAdminDelay(); + await time.forward.timestamp(firstSchedule + fromSchedule, false); // Default admin changes its mind and begins another delay change - const anotherNewDefaultAdminDelay = newDefaultAdminDelay.addn(time.duration.hours(2)); - const receipt = await this.accessControl.changeDefaultAdminDelay(anotherNewDefaultAdminDelay, { - from: defaultAdmin, - }); - - const eventMatcher = passed ? expectEvent.notEmitted : expectEvent; - eventMatcher(receipt, 'DefaultAdminDelayChangeCanceled'); + const anotherNewDefaultAdminDelay = this.newDefaultAdminDelay + time.duration.hours(2); + + const expected = expect( + this.mock.connect(this.defaultAdmin).changeDefaultAdminDelay(anotherNewDefaultAdminDelay), + ); + if (passed) { + await expected.to.not.emit(this.mock, 'DefaultAdminDelayChangeCanceled'); + } else { + await expected.to.emit(this.mock, 'DefaultAdminDelayChangeCanceled'); + } }); } }); @@ -844,58 +810,58 @@ function shouldBehaveLikeAccessControlDefaultAdminRules(delay, defaultAdmin, new describe('rollbacks a delay change', function () { it('reverts if called by non default admin accounts', async function () { - await expectRevertCustomError( - this.accessControl.rollbackDefaultAdminDelay({ from: other }), - 'AccessControlUnauthorizedAccount', - [other, DEFAULT_ADMIN_ROLE], - ); + await expect(this.mock.connect(this.other).rollbackDefaultAdminDelay()) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); }); describe('when there is a pending delay', function () { beforeEach('set pending delay', async function () { - await this.accessControl.changeDefaultAdminDelay(time.duration.hours(12), { from: defaultAdmin }); + await this.mock.connect(this.defaultAdmin).changeDefaultAdminDelay(time.duration.hours(12)); }); for (const [fromSchedule, tag] of [ - [-1, 'before'], - [0, 'exactly when'], - [1, 'after'], + [-1n, 'before'], + [0n, 'exactly when'], + [1n, 'after'], ]) { const passed = fromSchedule > 0; it(`resets pending delay and schedule ${tag} delay change schedule passes`, async function () { // Wait until schedule + fromSchedule - const { schedule: firstSchedule } = await this.accessControl.pendingDefaultAdminDelay(); - await time.setNextBlockTimestamp(firstSchedule.toNumber() + fromSchedule); + const { schedule: firstSchedule } = await this.mock.pendingDefaultAdminDelay(); + await time.forward.timestamp(firstSchedule + fromSchedule, false); - await this.accessControl.rollbackDefaultAdminDelay({ from: defaultAdmin }); + await this.mock.connect(this.defaultAdmin).rollbackDefaultAdminDelay(); - const { newDelay, schedule } = await this.accessControl.pendingDefaultAdminDelay(); - expect(newDelay).to.be.bignumber.eq(ZERO); - expect(schedule).to.be.bignumber.eq(ZERO); + const { newDelay, schedule } = await this.mock.pendingDefaultAdminDelay(); + expect(newDelay).to.equal(0); + expect(schedule).to.equal(0); }); const emit = passed ? 'not emit' : 'emit'; it(`should ${emit} a cancellation event ${tag} the delay schedule passes`, async function () { // Wait until schedule + fromSchedule - const { schedule: firstSchedule } = await this.accessControl.pendingDefaultAdminDelay(); - await time.setNextBlockTimestamp(firstSchedule.toNumber() + fromSchedule); - - const receipt = await this.accessControl.rollbackDefaultAdminDelay({ from: defaultAdmin }); - - const eventMatcher = passed ? expectEvent.notEmitted : expectEvent; - eventMatcher(receipt, 'DefaultAdminDelayChangeCanceled'); + const { schedule: firstSchedule } = await this.mock.pendingDefaultAdminDelay(); + await time.forward.timestamp(firstSchedule + fromSchedule, false); + + const expected = expect(this.mock.connect(this.defaultAdmin).rollbackDefaultAdminDelay()); + if (passed) { + await expected.to.not.emit(this.mock, 'DefaultAdminDelayChangeCanceled'); + } else { + await expected.to.emit(this.mock, 'DefaultAdminDelayChangeCanceled'); + } }); } }); describe('when there is no pending delay', function () { it('succeeds without changes', async function () { - await this.accessControl.rollbackDefaultAdminDelay({ from: defaultAdmin }); + await this.mock.connect(this.defaultAdmin).rollbackDefaultAdminDelay(); - const { newDelay, schedule } = await this.accessControl.pendingDefaultAdminDelay(); - expect(newDelay).to.be.bignumber.eq(ZERO); - expect(schedule).to.be.bignumber.eq(ZERO); + const { newDelay, schedule } = await this.mock.pendingDefaultAdminDelay(); + expect(newDelay).to.equal(0); + expect(schedule).to.equal(0); }); }); }); diff --git a/test/access/AccessControl.test.js b/test/access/AccessControl.test.js index 14463b505..6a78e54c2 100644 --- a/test/access/AccessControl.test.js +++ b/test/access/AccessControl.test.js @@ -1,12 +1,19 @@ +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl } = require('./AccessControl.behavior.js'); -const AccessControl = artifacts.require('$AccessControl'); +async function fixture() { + const [defaultAdmin, ...accounts] = await ethers.getSigners(); + const mock = await ethers.deployContract('$AccessControl'); + await mock.$_grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin); + return { mock, defaultAdmin, accounts }; +} -contract('AccessControl', function (accounts) { +describe('AccessControl', function () { beforeEach(async function () { - this.accessControl = await AccessControl.new({ from: accounts[0] }); - await this.accessControl.$_grantRole(DEFAULT_ADMIN_ROLE, accounts[0]); + Object.assign(this, await loadFixture(fixture)); }); - shouldBehaveLikeAccessControl(...accounts); + shouldBehaveLikeAccessControl(); }); diff --git a/test/access/extensions/AccessControlDefaultAdminRules.test.js b/test/access/extensions/AccessControlDefaultAdminRules.test.js index af34143f1..5b030a3f9 100644 --- a/test/access/extensions/AccessControlDefaultAdminRules.test.js +++ b/test/access/extensions/AccessControlDefaultAdminRules.test.js @@ -1,26 +1,30 @@ -const { time, constants, expectRevert } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { bigint: time } = require('../../helpers/time'); + const { shouldBehaveLikeAccessControl, shouldBehaveLikeAccessControlDefaultAdminRules, } = require('../AccessControl.behavior.js'); -const AccessControlDefaultAdminRules = artifacts.require('$AccessControlDefaultAdminRules'); - -contract('AccessControlDefaultAdminRules', function (accounts) { - const delay = web3.utils.toBN(time.duration.hours(10)); +async function fixture() { + const delay = time.duration.hours(10); + const [defaultAdmin, ...accounts] = await ethers.getSigners(); + const mock = await ethers.deployContract('$AccessControlDefaultAdminRules', [delay, defaultAdmin]); + return { mock, defaultAdmin, delay, accounts }; +} +describe('AccessControlDefaultAdminRules', function () { beforeEach(async function () { - this.accessControl = await AccessControlDefaultAdminRules.new(delay, accounts[0], { from: accounts[0] }); + Object.assign(this, await loadFixture(fixture)); }); it('initial admin not zero', async function () { - await expectRevert( - AccessControlDefaultAdminRules.new(delay, constants.ZERO_ADDRESS), - 'AccessControlInvalidDefaultAdmin', - [constants.ZERO_ADDRESS], - ); + await expect(ethers.deployContract('$AccessControlDefaultAdminRules', [this.delay, ethers.ZeroAddress])) + .to.be.revertedWithCustomError(this.mock, 'AccessControlInvalidDefaultAdmin') + .withArgs(ethers.ZeroAddress); }); - shouldBehaveLikeAccessControl(...accounts); - shouldBehaveLikeAccessControlDefaultAdminRules(delay, ...accounts); + shouldBehaveLikeAccessControl(); + shouldBehaveLikeAccessControlDefaultAdminRules(); }); diff --git a/test/access/extensions/AccessControlEnumerable.test.js b/test/access/extensions/AccessControlEnumerable.test.js index 7dfb0bce8..a4ad372d5 100644 --- a/test/access/extensions/AccessControlEnumerable.test.js +++ b/test/access/extensions/AccessControlEnumerable.test.js @@ -1,17 +1,24 @@ +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl, shouldBehaveLikeAccessControlEnumerable, } = require('../AccessControl.behavior.js'); -const AccessControlEnumerable = artifacts.require('$AccessControlEnumerable'); +async function fixture() { + const [defaultAdmin, ...accounts] = await ethers.getSigners(); + const mock = await ethers.deployContract('$AccessControlEnumerable'); + await mock.$_grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin); + return { mock, defaultAdmin, accounts }; +} -contract('AccessControlEnumerable', function (accounts) { +describe('AccessControlEnumerable', function () { beforeEach(async function () { - this.accessControl = await AccessControlEnumerable.new({ from: accounts[0] }); - await this.accessControl.$_grantRole(DEFAULT_ADMIN_ROLE, accounts[0]); + Object.assign(this, await loadFixture(fixture)); }); - shouldBehaveLikeAccessControl(...accounts); - shouldBehaveLikeAccessControlEnumerable(...accounts); + shouldBehaveLikeAccessControl(); + shouldBehaveLikeAccessControlEnumerable(); }); diff --git a/test/helpers/time.js b/test/helpers/time.js index 7a2a13d23..1f83a4aa2 100644 --- a/test/helpers/time.js +++ b/test/helpers/time.js @@ -1,5 +1,7 @@ const { time, mineUpTo } = require('@nomicfoundation/hardhat-network-helpers'); +const mapObject = (obj, fn) => Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, fn(value)])); + module.exports = { clock: { blocknumber: () => time.latestBlock(), @@ -13,6 +15,15 @@ module.exports = { }, forward: { blocknumber: mineUpTo, - timestamp: time.increaseTo, + timestamp: (to, mine = true) => (mine ? time.increaseTo(to) : time.setNextBlockTimestamp(to)), }, + duration: time.duration, +}; + +// TODO: deprecate the old version in favor of this one +module.exports.bigint = { + clock: mapObject(module.exports.clock, fn => () => fn().then(BigInt)), + clockFromReceipt: mapObject(module.exports.clockFromReceipt, fn => receipt => fn(receipt).then(BigInt)), + forward: module.exports.forward, + duration: mapObject(module.exports.duration, fn => n => BigInt(fn(n))), }; diff --git a/test/utils/introspection/SupportsInterface.behavior.js b/test/utils/introspection/SupportsInterface.behavior.js index 7ef2c533f..243dfb5d6 100644 --- a/test/utils/introspection/SupportsInterface.behavior.js +++ b/test/utils/introspection/SupportsInterface.behavior.js @@ -1,9 +1,9 @@ -const { makeInterfaceId } = require('@openzeppelin/test-helpers'); - +const { ethers } = require('ethers'); const { expect } = require('chai'); +const { selector } = require('../../helpers/methods'); const INVALID_ID = '0xffffffff'; -const INTERFACES = { +const SIGNATURES = { ERC165: ['supportsInterface(bytes4)'], ERC721: [ 'balanceOf(address)', @@ -81,27 +81,27 @@ const INTERFACES = { ERC2981: ['royaltyInfo(uint256,uint256)'], }; -const INTERFACE_IDS = {}; -const FN_SIGNATURES = {}; -for (const k of Object.getOwnPropertyNames(INTERFACES)) { - INTERFACE_IDS[k] = makeInterfaceId.ERC165(INTERFACES[k]); - for (const fnName of INTERFACES[k]) { - // the interface id of a single function is equivalent to its function signature - FN_SIGNATURES[fnName] = makeInterfaceId.ERC165([fnName]); - } -} +const INTERFACE_IDS = Object.fromEntries( + Object.entries(SIGNATURES).map(([name, signatures]) => [ + name, + ethers.toBeHex( + signatures.reduce((id, fnSig) => id ^ BigInt(selector(fnSig)), 0n), + 4, + ), + ]), +); function shouldSupportInterfaces(interfaces = []) { describe('ERC165', function () { beforeEach(function () { - this.contractUnderTest = this.mock || this.token || this.holder || this.accessControl; + this.contractUnderTest = this.mock || this.token || this.holder; }); describe('when the interfaceId is supported', function () { it('uses less than 30k gas', async function () { for (const k of interfaces) { - const interfaceId = INTERFACE_IDS[k] ?? k; - expect(await this.contractUnderTest.supportsInterface.estimateGas(interfaceId)).to.be.lte(30000); + const interface = INTERFACE_IDS[k] ?? k; + expect(await this.contractUnderTest.supportsInterface.estimateGas(interface)).to.be.lte(30000); } }); @@ -126,13 +126,18 @@ function shouldSupportInterfaces(interfaces = []) { it('all interface functions are in ABI', async function () { for (const k of interfaces) { // skip interfaces for which we don't have a function list - if (INTERFACES[k] === undefined) continue; - for (const fnName of INTERFACES[k]) { - const fnSig = FN_SIGNATURES[fnName]; - expect(this.contractUnderTest.abi.filter(fn => fn.signature === fnSig).length).to.equal( - 1, - `did not find ${fnName}`, - ); + if (SIGNATURES[k] === undefined) continue; + for (const fnSig of SIGNATURES[k]) { + // TODO: Remove Truffle case when ethersjs migration is done + if (this.contractUnderTest.abi) { + const fnSelector = selector(fnSig); + return expect(this.contractUnderTest.abi.filter(fn => fn.signature === fnSelector).length).to.equal( + 1, + `did not find ${fnSig}`, + ); + } + + expect(!!this.contractUnderTest.interface.getFunction(fnSig), `did not find ${fnSig}`).to.be.true; } } }); From 94697be8a3f0dfcd95dfb13ffbd39b5973f5c65d Mon Sep 17 00:00:00 2001 From: 0xprinc <0xprinc@gmail.com> Date: Fri, 27 Oct 2023 00:01:45 +0530 Subject: [PATCH 102/167] Fixed Misleading Typo in CHANGELOG.md related to false solidity version (#4697) Co-authored-by: Hadrien Croubois --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 249eb76a4..bf9a27a1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,7 +48,7 @@ These removals were implemented in the following PRs: [#3637](https://github.com #### General - Replaced revert strings and require statements with custom errors. ([#4261](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4261)) -- Bumped minimum compiler version required to 0.8.20 ([#4288](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4288)) +- Bumped minimum compiler version required to 0.8.20 ([#4288](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4288), [#4489](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4489)) - Use of `abi.encodeCall` in place of `abi.encodeWithSelector` and `abi.encodeWithSignature` for improved type-checking of parameters ([#4293](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4293)) - Replaced some uses of `abi.encodePacked` with clearer alternatives (e.g. `bytes.concat`, `string.concat`). ([#4504](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4504)) ([#4296](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4296)) - Overrides are now used internally for a number of functions that were previously hardcoded to their default implementation in certain locations: `ERC1155Supply.totalSupply`, `ERC721.ownerOf`, `ERC721.balanceOf` and `ERC721.totalSupply` in `ERC721Enumerable`, `ERC20.totalSupply` in `ERC20FlashMint`, and `ERC1967._getImplementation` in `ERC1967Proxy`. ([#4299](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4299)) From 74016c376ad7c1a902a7bef6803090f68f2433fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Tue, 7 Nov 2023 16:35:58 +0000 Subject: [PATCH 103/167] Update docs for Ownable2Step (#4721) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nicolás Venturo --- contracts/access/Ownable2Step.sol | 6 ++++++ docs/modules/ROOT/pages/access-control.adoc | 2 ++ 2 files changed, 8 insertions(+) diff --git a/contracts/access/Ownable2Step.sol b/contracts/access/Ownable2Step.sol index f0427e2fd..46765c4da 100644 --- a/contracts/access/Ownable2Step.sol +++ b/contracts/access/Ownable2Step.sol @@ -10,6 +10,12 @@ import {Ownable} from "./Ownable.sol"; * there is an account (an owner) that can be granted exclusive access to * specific functions. * + * This extension of the {Ownable} contract includes a two-step mechanism to transfer + * ownership, where the new owner must call {acceptOwnership} in order to replace the + * old one. This can help prevent common mistakes, such as transfers of ownership to + * incorrect accounts, or to contracts that are unable to interact with the + * permission system. + * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * diff --git a/docs/modules/ROOT/pages/access-control.adoc b/docs/modules/ROOT/pages/access-control.adoc index 2a977a2b1..5513a47f9 100644 --- a/docs/modules/ROOT/pages/access-control.adoc +++ b/docs/modules/ROOT/pages/access-control.adoc @@ -22,6 +22,8 @@ Ownable also lets you: WARNING: Removing the owner altogether will mean that administrative tasks that are protected by `onlyOwner` will no longer be callable! +Ownable is a simple and effective way to implement access control, but you should be mindful of the dangers associated with transferring the ownership to an incorrect account that can't interact with this contract anymore. An alternative to this problem is using xref:api:access.adoc#Ownable2Step[`Ownable2Step`]; a variant of Ownable that requires the new owner to explicitly accept the ownership transfer by calling xref:api:access.adoc#Ownable2Step-acceptOwnership--[`acceptOwnership`]. + Note that *a contract can also be the owner of another one*! This opens the door to using, for example, a https://gnosis-safe.io[Gnosis Safe], an https://aragon.org[Aragon DAO], or a totally custom contract that _you_ create. In this way, you can use _composability_ to add additional layers of access control complexity to your contracts. Instead of having a single regular Ethereum account (Externally Owned Account, or EOA) as the owner, you could use a 2-of-3 multisig run by your project leads, for example. Prominent projects in the space, such as https://makerdao.com[MakerDAO], use systems similar to this one. From 248be2fab08fc10f6da82e31a7e2cb311375a01e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Wed, 8 Nov 2023 16:18:23 +0000 Subject: [PATCH 104/167] Improve ERC4626 virtual offset notes (#4722) --- contracts/token/ERC20/extensions/ERC4626.sol | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/contracts/token/ERC20/extensions/ERC4626.sol b/contracts/token/ERC20/extensions/ERC4626.sol index ec6087231..dccf6900a 100644 --- a/contracts/token/ERC20/extensions/ERC4626.sol +++ b/contracts/token/ERC20/extensions/ERC4626.sol @@ -27,14 +27,14 @@ import {Math} from "../../../utils/math/Math.sol"; * verifying the amount received is as expected, using a wrapper that performs these checks such as * https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router]. * - * Since v4.9, this implementation uses virtual assets and shares to mitigate that risk. The `_decimalsOffset()` - * corresponds to an offset in the decimal representation between the underlying asset's decimals and the vault - * decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which itself - * determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default offset - * (0) makes it non-profitable, as a result of the value being captured by the virtual shares (out of the attacker's - * donation) matching the attacker's expected gains. With a larger offset, the attack becomes orders of magnitude more - * expensive than it is profitable. More details about the underlying math can be found - * xref:erc4626.adoc#inflation-attack[here]. + * Since v4.9, this implementation introduces configurable virtual assets and shares to help developers mitigate that risk. + * The `_decimalsOffset()` corresponds to an offset in the decimal representation between the underlying asset's decimals + * and the vault decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which + * itself determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default + * offset (0) makes it non-profitable even if an attacker is able to capture value from multiple user deposits, as a result + * of the value being captured by the virtual shares (out of the attacker's donation) matching the attacker's expected gains. + * With a larger offset, the attack becomes orders of magnitude more expensive than it is profitable. More details about the + * underlying math can be found xref:erc4626.adoc#inflation-attack[here]. * * The drawback of this approach is that the virtual shares do capture (a very small) part of the value being accrued * to the vault. Also, if the vault experiences losses, the users try to exit the vault, the virtual shares and assets From f1f427ddaf7c4f365782a4a7a4e4b0fec64c3f7c Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Wed, 8 Nov 2023 18:14:06 +0000 Subject: [PATCH 105/167] Migrate finance tests to ethers.js (#4723) Co-authored-by: Hadrien Croubois Co-authored-by: ernestognw --- test/finance/VestingWallet.behavior.js | 48 +++++----------- test/finance/VestingWallet.test.js | 78 +++++++++++++++----------- 2 files changed, 59 insertions(+), 67 deletions(-) diff --git a/test/finance/VestingWallet.behavior.js b/test/finance/VestingWallet.behavior.js index afd4c0495..c1e0f8013 100644 --- a/test/finance/VestingWallet.behavior.js +++ b/test/finance/VestingWallet.behavior.js @@ -1,54 +1,36 @@ -const { time } = require('@nomicfoundation/hardhat-network-helpers'); -const { expectEvent } = require('@openzeppelin/test-helpers'); const { expect } = require('chai'); +const { bigint: time } = require('../helpers/time'); -function releasedEvent(token, amount) { - return token ? ['ERC20Released', { token: token.address, amount }] : ['EtherReleased', { amount }]; -} - -function shouldBehaveLikeVesting(beneficiary) { +function shouldBehaveLikeVesting() { it('check vesting schedule', async function () { - const [vestedAmount, releasable, ...args] = this.token - ? ['vestedAmount(address,uint64)', 'releasable(address)', this.token.address] - : ['vestedAmount(uint64)', 'releasable()']; - for (const timestamp of this.schedule) { - await time.increaseTo(timestamp); + await time.forward.timestamp(timestamp); const vesting = this.vestingFn(timestamp); - expect(await this.mock.methods[vestedAmount](...args, timestamp)).to.be.bignumber.equal(vesting); - - expect(await this.mock.methods[releasable](...args)).to.be.bignumber.equal(vesting); + expect(await this.mock.vestedAmount(...this.args, timestamp)).to.be.equal(vesting); + expect(await this.mock.releasable(...this.args)).to.be.equal(vesting); } }); it('execute vesting schedule', async function () { - const [release, ...args] = this.token ? ['release(address)', this.token.address] : ['release()']; - - let released = web3.utils.toBN(0); - const before = await this.getBalance(beneficiary); - + let released = 0n; { - const receipt = await this.mock.methods[release](...args); - - await expectEvent.inTransaction(receipt.tx, this.mock, ...releasedEvent(this.token, '0')); - - await this.checkRelease(receipt, beneficiary, '0'); + const tx = await this.mock.release(...this.args); + await expect(tx) + .to.emit(this.mock, this.releasedEvent) + .withArgs(...this.argsVerify, 0); - expect(await this.getBalance(beneficiary)).to.be.bignumber.equal(before); + await this.checkRelease(tx, 0n); } for (const timestamp of this.schedule) { - await time.setNextBlockTimestamp(timestamp); + await time.forward.timestamp(timestamp, false); const vested = this.vestingFn(timestamp); - const receipt = await this.mock.methods[release](...args); - await expectEvent.inTransaction(receipt.tx, this.mock, ...releasedEvent(this.token, vested.sub(released))); - - await this.checkRelease(receipt, beneficiary, vested.sub(released)); - - expect(await this.getBalance(beneficiary)).to.be.bignumber.equal(before.add(vested)); + const tx = await this.mock.release(...this.args); + await expect(tx).to.emit(this.mock, this.releasedEvent); + await this.checkRelease(tx, vested - released); released = vested; } }); diff --git a/test/finance/VestingWallet.test.js b/test/finance/VestingWallet.test.js index 918e56345..e3739dd90 100644 --- a/test/finance/VestingWallet.test.js +++ b/test/finance/VestingWallet.test.js @@ -1,69 +1,79 @@ -const { constants, expectEvent, time } = require('@openzeppelin/test-helpers'); -const { web3 } = require('@openzeppelin/test-helpers/src/setup'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { BNmin } = require('../helpers/math'); -const { expectRevertCustomError } = require('../helpers/customError'); - -const VestingWallet = artifacts.require('VestingWallet'); -const ERC20 = artifacts.require('$ERC20'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { bigint: time } = require('../helpers/time'); +const { min } = require('../helpers/math'); const { shouldBehaveLikeVesting } = require('./VestingWallet.behavior'); -contract('VestingWallet', function (accounts) { - const [sender, beneficiary] = accounts; +async function fixture() { + const amount = ethers.parseEther('100'); + const duration = time.duration.years(4); + const start = (await time.clock.timestamp()) + time.duration.hours(1); - const amount = web3.utils.toBN(web3.utils.toWei('100')); - const duration = web3.utils.toBN(4 * 365 * 86400); // 4 years + const [sender, beneficiary] = await ethers.getSigners(); + const mock = await ethers.deployContract('VestingWallet', [beneficiary, start, duration]); + return { mock, amount, duration, start, sender, beneficiary }; +} +describe('VestingWallet', function () { beforeEach(async function () { - this.start = (await time.latest()).addn(3600); // in 1 hour - this.mock = await VestingWallet.new(beneficiary, this.start, duration); + Object.assign(this, await loadFixture(fixture)); }); it('rejects zero address for beneficiary', async function () { - await expectRevertCustomError( - VestingWallet.new(constants.ZERO_ADDRESS, this.start, duration), - 'OwnableInvalidOwner', - [constants.ZERO_ADDRESS], - ); + await expect(ethers.deployContract('VestingWallet', [ethers.ZeroAddress, this.start, this.duration])) + .revertedWithCustomError(this.mock, 'OwnableInvalidOwner') + .withArgs(ethers.ZeroAddress); }); it('check vesting contract', async function () { - expect(await this.mock.owner()).to.be.equal(beneficiary); - expect(await this.mock.start()).to.be.bignumber.equal(this.start); - expect(await this.mock.duration()).to.be.bignumber.equal(duration); - expect(await this.mock.end()).to.be.bignumber.equal(this.start.add(duration)); + expect(await this.mock.owner()).to.be.equal(this.beneficiary.address); + expect(await this.mock.start()).to.be.equal(this.start); + expect(await this.mock.duration()).to.be.equal(this.duration); + expect(await this.mock.end()).to.be.equal(this.start + this.duration); }); describe('vesting schedule', function () { - beforeEach(async function () { + beforeEach(function () { this.schedule = Array(64) .fill() - .map((_, i) => web3.utils.toBN(i).mul(duration).divn(60).add(this.start)); - this.vestingFn = timestamp => BNmin(amount, amount.mul(timestamp.sub(this.start)).div(duration)); + .map((_, i) => (BigInt(i) * this.duration) / 60n + this.start); + this.vestingFn = timestamp => min(this.amount, (this.amount * (timestamp - this.start)) / this.duration); }); describe('Eth vesting', function () { beforeEach(async function () { - await web3.eth.sendTransaction({ from: sender, to: this.mock.address, value: amount }); - this.getBalance = account => web3.eth.getBalance(account).then(web3.utils.toBN); - this.checkRelease = () => {}; + await this.sender.sendTransaction({ to: this.mock, value: this.amount }); + + this.getBalance = signer => ethers.provider.getBalance(signer); + this.checkRelease = (tx, amount) => expect(tx).to.changeEtherBalances([this.beneficiary], [amount]); + + this.releasedEvent = 'EtherReleased'; + this.args = []; + this.argsVerify = []; }); - shouldBehaveLikeVesting(beneficiary); + shouldBehaveLikeVesting(); }); describe('ERC20 vesting', function () { beforeEach(async function () { - this.token = await ERC20.new('Name', 'Symbol'); + this.token = await ethers.deployContract('$ERC20', ['Name', 'Symbol']); + await this.token.$_mint(this.mock, this.amount); + this.getBalance = account => this.token.balanceOf(account); - this.checkRelease = (receipt, to, value) => - expectEvent.inTransaction(receipt.tx, this.token, 'Transfer', { from: this.mock.address, to, value }); + this.checkRelease = async (tx, amount) => { + await expect(tx).to.emit(this.token, 'Transfer').withArgs(this.mock.target, this.beneficiary.address, amount); + await expect(tx).to.changeTokenBalances(this.token, [this.mock, this.beneficiary], [-amount, amount]); + }; - await this.token.$_mint(this.mock.address, amount); + this.releasedEvent = 'ERC20Released'; + this.args = [ethers.Typed.address(this.token.target)]; + this.argsVerify = [this.token.target]; }); - shouldBehaveLikeVesting(beneficiary); + shouldBehaveLikeVesting(); }); }); }); From cb1ef861e57658f9334fa76e4a34d6f27c7532b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 9 Nov 2023 15:09:05 +0000 Subject: [PATCH 106/167] Add `AccessManager` guide (#4691) Co-authored-by: Hadrien Croubois Co-authored-by: Eric Lau Co-authored-by: Zack Reneau-Wedeen --- .../AccessControlERC20MintBase.sol | 25 ++ .../AccessControlERC20MintMissing.sol | 24 ++ .../AccessControlERC20MintOnlyRole.sol | 23 ++ .../AccessManagedERC20MintBase.sol | 16 ++ .../MyContractOwnable.sol | 2 +- .../ROOT/images/access-control-multiple.svg | 97 ++++++++ .../ROOT/images/access-manager-functions.svg | 47 ++++ docs/modules/ROOT/images/access-manager.svg | 99 ++++++++ docs/modules/ROOT/pages/access-control.adoc | 229 ++++++++++++------ 9 files changed, 487 insertions(+), 75 deletions(-) create mode 100644 contracts/mocks/docs/access-control/AccessControlERC20MintBase.sol create mode 100644 contracts/mocks/docs/access-control/AccessControlERC20MintMissing.sol create mode 100644 contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRole.sol create mode 100644 contracts/mocks/docs/access-control/AccessManagedERC20MintBase.sol rename contracts/mocks/docs/{ => access-control}/MyContractOwnable.sol (86%) create mode 100644 docs/modules/ROOT/images/access-control-multiple.svg create mode 100644 docs/modules/ROOT/images/access-manager-functions.svg create mode 100644 docs/modules/ROOT/images/access-manager.svg diff --git a/contracts/mocks/docs/access-control/AccessControlERC20MintBase.sol b/contracts/mocks/docs/access-control/AccessControlERC20MintBase.sol new file mode 100644 index 000000000..25139cbc4 --- /dev/null +++ b/contracts/mocks/docs/access-control/AccessControlERC20MintBase.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {AccessControl} from "../../../access/AccessControl.sol"; +import {ERC20} from "../../../token/ERC20/ERC20.sol"; + +contract AccessControlERC20MintBase is ERC20, AccessControl { + // Create a new role identifier for the minter role + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + + error CallerNotMinter(address caller); + + constructor(address minter) ERC20("MyToken", "TKN") { + // Grant the minter role to a specified account + _grantRole(MINTER_ROLE, minter); + } + + function mint(address to, uint256 amount) public { + // Check that the calling account has the minter role + if (!hasRole(MINTER_ROLE, msg.sender)) { + revert CallerNotMinter(msg.sender); + } + _mint(to, amount); + } +} diff --git a/contracts/mocks/docs/access-control/AccessControlERC20MintMissing.sol b/contracts/mocks/docs/access-control/AccessControlERC20MintMissing.sol new file mode 100644 index 000000000..46002fd04 --- /dev/null +++ b/contracts/mocks/docs/access-control/AccessControlERC20MintMissing.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {AccessControl} from "../../../access/AccessControl.sol"; +import {ERC20} from "../../../token/ERC20/ERC20.sol"; + +contract AccessControlERC20MintMissing is ERC20, AccessControl { + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); + + constructor() ERC20("MyToken", "TKN") { + // Grant the contract deployer the default admin role: it will be able + // to grant and revoke any roles + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + } + + function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) { + _mint(to, amount); + } + + function burn(address from, uint256 amount) public onlyRole(BURNER_ROLE) { + _burn(from, amount); + } +} diff --git a/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRole.sol b/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRole.sol new file mode 100644 index 000000000..a71060ad8 --- /dev/null +++ b/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRole.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {AccessControl} from "../../../access/AccessControl.sol"; +import {ERC20} from "../../../token/ERC20/ERC20.sol"; + +contract AccessControlERC20Mint is ERC20, AccessControl { + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); + + constructor(address minter, address burner) ERC20("MyToken", "TKN") { + _grantRole(MINTER_ROLE, minter); + _grantRole(BURNER_ROLE, burner); + } + + function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) { + _mint(to, amount); + } + + function burn(address from, uint256 amount) public onlyRole(BURNER_ROLE) { + _burn(from, amount); + } +} diff --git a/contracts/mocks/docs/access-control/AccessManagedERC20MintBase.sol b/contracts/mocks/docs/access-control/AccessManagedERC20MintBase.sol new file mode 100644 index 000000000..02ae00a1a --- /dev/null +++ b/contracts/mocks/docs/access-control/AccessManagedERC20MintBase.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {AccessManaged} from "../../../access/manager/AccessManaged.sol"; +import {ERC20} from "../../../token/ERC20/ERC20.sol"; + +contract AccessManagedERC20Mint is ERC20, AccessManaged { + constructor(address manager) ERC20("MyToken", "TKN") AccessManaged(manager) {} + + // Minting is restricted according to the manager rules for this function. + // The function is identified by its selector: 0x40c10f19. + // Calculated with bytes4(keccak256('mint(address,uint256)')) + function mint(address to, uint256 amount) public restricted { + _mint(to, amount); + } +} diff --git a/contracts/mocks/docs/MyContractOwnable.sol b/contracts/mocks/docs/access-control/MyContractOwnable.sol similarity index 86% rename from contracts/mocks/docs/MyContractOwnable.sol rename to contracts/mocks/docs/access-control/MyContractOwnable.sol index 01847c036..0dfc804f2 100644 --- a/contracts/mocks/docs/MyContractOwnable.sol +++ b/contracts/mocks/docs/access-control/MyContractOwnable.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; -import {Ownable} from "../../access/Ownable.sol"; +import {Ownable} from "../../../access/Ownable.sol"; contract MyContract is Ownable { constructor(address initialOwner) Ownable(initialOwner) {} diff --git a/docs/modules/ROOT/images/access-control-multiple.svg b/docs/modules/ROOT/images/access-control-multiple.svg new file mode 100644 index 000000000..0314e09e4 --- /dev/null +++ b/docs/modules/ROOT/images/access-control-multiple.svg @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/modules/ROOT/images/access-manager-functions.svg b/docs/modules/ROOT/images/access-manager-functions.svg new file mode 100644 index 000000000..dbbf04179 --- /dev/null +++ b/docs/modules/ROOT/images/access-manager-functions.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/modules/ROOT/images/access-manager.svg b/docs/modules/ROOT/images/access-manager.svg new file mode 100644 index 000000000..12f91bae7 --- /dev/null +++ b/docs/modules/ROOT/images/access-manager.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/modules/ROOT/pages/access-control.adoc b/docs/modules/ROOT/pages/access-control.adoc index 5513a47f9..b2d6dbbfd 100644 --- a/docs/modules/ROOT/pages/access-control.adoc +++ b/docs/modules/ROOT/pages/access-control.adoc @@ -10,10 +10,10 @@ The most common and basic form of access control is the concept of _ownership_: OpenZeppelin Contracts provides xref:api:access.adoc#Ownable[`Ownable`] for implementing ownership in your contracts. ```solidity -include::api:example$MyContractOwnable.sol[] +include::api:example$access-control/MyContractOwnable.sol[] ``` -By default, the xref:api:access.adoc#Ownable-owner--[`owner`] of an `Ownable` contract is the account that deployed it, which is usually exactly what you want. +At deployment, the xref:api:access.adoc#Ownable-owner--[`owner`] of an `Ownable` contract is set to the provided `initialOwner` parameter. Ownable also lets you: @@ -43,32 +43,11 @@ Most software uses access control systems that are role-based: some users are re OpenZeppelin Contracts provides xref:api:access.adoc#AccessControl[`AccessControl`] for implementing role-based access control. Its usage is straightforward: for each role that you want to define, you will create a new _role identifier_ that is used to grant, revoke, and check if an account has that role. -Here's a simple example of using `AccessControl` in an xref:tokens.adoc#ERC20[`ERC20` token] to define a 'minter' role, which allows accounts that have it create new tokens: +Here's a simple example of using `AccessControl` in an xref:erc20.adoc[`ERC20` token] to define a 'minter' role, which allows accounts that have it create new tokens: [source,solidity] ---- -// contracts/MyToken.sol -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; - -import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; -import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -contract MyToken is ERC20, AccessControl { - // Create a new role identifier for the minter role - bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); - - constructor(address minter) ERC20("MyToken", "TKN") { - // Grant the minter role to a specified account - _grantRole(MINTER_ROLE, minter); - } - - function mint(address to, uint256 amount) public { - // Check that the calling account has the minter role - require(hasRole(MINTER_ROLE, msg.sender), "Caller is not a minter"); - _mint(to, amount); - } -} +include::api:example$access-control/AccessControlERC20MintBase.sol[] ---- NOTE: Make sure you fully understand how xref:api:access.adoc#AccessControl[`AccessControl`] works before using it on your system, or copy-pasting the examples from this guide. @@ -79,30 +58,7 @@ Let's augment our ERC20 token example by also defining a 'burner' role, which le [source,solidity] ---- -// contracts/MyToken.sol -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; - -import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; -import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -contract MyToken is ERC20, AccessControl { - bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); - bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); - - constructor(address minter, address burner) ERC20("MyToken", "TKN") { - _grantRole(MINTER_ROLE, minter); - _grantRole(BURNER_ROLE, burner); - } - - function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) { - _mint(to, amount); - } - - function burn(address from, uint256 amount) public onlyRole(BURNER_ROLE) { - _burn(from, amount); - } -} +include::api:example$access-control/AccessControlERC20MintOnlyRole.sol[] ---- So clean! By splitting concerns this way, more granular levels of permission may be implemented than were possible with the simpler _ownership_ approach to access control. Limiting what each component of a system is able to do is known as the https://en.wikipedia.org/wiki/Principle_of_least_privilege[principle of least privilege], and is a good security practice. Note that each account may still have more than one role, if so desired. @@ -124,31 +80,7 @@ Let's take a look at the ERC20 token example, this time taking advantage of the [source,solidity] ---- -// contracts/MyToken.sol -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; - -import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; -import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -contract MyToken is ERC20, AccessControl { - bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); - bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); - - constructor() ERC20("MyToken", "TKN") { - // Grant the contract deployer the default admin role: it will be able - // to grant and revoke any roles - _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); - } - - function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) { - _mint(to, amount); - } - - function burn(address from, uint256 amount) public onlyRole(BURNER_ROLE) { - _burn(from, amount); - } -} +include::api:example$access-control/AccessControlERC20MintMissing.sol[] ---- Note that, unlike the previous examples, no accounts are granted the 'minter' or 'burner' roles. However, because those roles' admin role is the default admin role, and _that_ role was granted to `msg.sender`, that same account can call `grantRole` to give minting or burning permission, and `revokeRole` to remove it. @@ -204,3 +136,152 @@ TIP: A recommended configuration is to grant both roles to a secure governance c Operations executed by the xref:api:governance.adoc#TimelockController[`TimelockController`] are not subject to a fixed delay but rather a minimum delay. Some major updates might call for a longer delay. For example, if a delay of just a few days might be sufficient for users to audit a minting operation, it makes sense to use a delay of a few weeks, or even a few months, when scheduling a smart contract upgrade. The minimum delay (accessible through the xref:api:governance.adoc#TimelockController-getMinDelay--[`getMinDelay`] method) can be updated by calling the xref:api:governance.adoc#TimelockController-updateDelay-uint256-[`updateDelay`] function. Bear in mind that access to this function is only accessible by the timelock itself, meaning this maintenance operation has to go through the timelock itself. + +[[access-management]] +== Access Management + +For a system of contracts, better integrated role management can be achieved with an xref:api:access.adoc#AccessManager[`AccessManager`] instance. Instead of managing each contract's permission separately, AccessManager stores all the permissions in a single contract, making your protocol easier to audit and maintain. + +Although xref:api:access.adoc#AccessControl[`AccessControl`] offers a more dynamic solution for adding permissions to your contracts than Ownable, decentralized protocols tend to become more complex after integrating new contract instances and requires you to keep track of permissions separately in each contract. This increases the complexity of permissions management and monitoring across the system. + +image::access-control-multiple.svg[Access Control multiple] + +Protocols managing permissions in production systems often require more integrated alternatives to fragmented permissions through multiple `AccessControl` instances. + +image::access-manager.svg[AccessManager] + +The AccessManager is designed around the concept of role and target functions: + +* Roles are granted to accounts (addresses) following a many-to-many approach for flexibility. This means that each user can have one or multiple roles and multiple users can have the same role. +* Access to a restricted target function is limited to one role. A target function is defined by one https://docs.soliditylang.org/en/v0.8.20/abi-spec.html#function-selector[function selector] on one contract (called target). + +For a call to be authorized, the caller must bear the role that is assigned to the current target function (contract address + function selector). + +image::access-manager-functions.svg[AccessManager functions] + +=== Using `AccessManager` + +OpenZeppelin Contracts provides xref:api:access.adoc#AccessManager[`AccessManager`] for managing roles across any number of contracts. The `AccessManager` itself is a contract that can be deployed and used out of the box. It sets an initial admin in the constructor who will be allowed to perform management operations. + +In order to restrict access to some functions of your contract, you should inherit from the xref:api:access.adoc#AccessManaged[`AccessManaged`] contract provided along with the manager. This provides the `restricted` modifier that can be used to protect any externally facing function. Note that you will have to specify the address of the AccessManager instance (xref:api:access.adoc#AccessManaged-constructor-address-[`initialAuthority`]) in the constructor so the `restricted` modifier knows which manager to use for checking permissions. + +Here's a simple example of an xref:tokens.adoc#ERC20[`ERC20` token] that defines a `mint` function that is restricted by an xref:api:access.adoc#AccessManager[`AccessManager`]: + +```solidity +include::api:example$access-control/AccessManagedERC20MintBase.sol[] +``` + +NOTE: Make sure you fully understand how xref:api:access.adoc#AccessManager[`AccessManager`] works before using it or copy-pasting the examples from this guide. + +Once the managed contract has been deployed, it is now under the manager's control. The initial admin can then assign the minter role to an address and also allow the role to call the `mint` function. For example, this is demonstrated in the following Javascript code using Ethers.js: + +```javascript +// const target = ...; +// const user = ...; +const MINTER = 42n; // Roles are uint64 (0 is reserved for the ADMIN_ROLE) + +// Grant the minter role with no execution delay +await manager.grantRole(MINTER, user, 0); + +// Allow the minter role to call the function selector +// corresponding to the mint function +await manager.setTargetFunctionRole( + target, + ['0x40c10f19'], // bytes4(keccak256('mint(address,uint256)')) + MINTER +); + +Even though each role has its own list of function permissions, each role member (`address`) has an execution delay that will dictate how long the account should wait to execute a function that requires its role. Delayed operations must have the xref:api:access.adoc#AccessManager-schedule-address-bytes-uint48-[`schedule`] function called on them first in the AccessManager before they can be executed, either by calling to the target function or using the AccessManager's xref:api:access.adoc#AccessManager-execute-address-bytes-[`execute`] function. + +Additionally, roles can have a granting delay that prevents adding members immediately. The AccessManager admins can set this grant delay as follows: + +```javascript +const HOUR = 60 * 60; + +const GRANT_DELAY = 24 * HOUR; +const EXECUTION_DELAY = 5 * HOUR; +const ACCOUNT = "0x..."; + +await manager.connect(initialAdmin).setGrantDelay(MINTER, GRANT_DELAY); + +// The role will go into effect after the GRANT_DELAY passes +await manager.connect(initialAdmin).grantRole(MINTER, ACCOUNT, EXECUTION_DELAY); +``` + +Note that roles do not define a name. As opposed to the xref:api:access.adoc#AccessControl[`AccessControl`] case, roles are identified as numeric values instead of being hardcoded in the contract as `bytes32` values. It is still possible to allow for tooling discovery (e.g. for role exploration) using role labeling with the xref:api:access.adoc#AccessManager-labelRole-uint64-string-[`labelRole`] function. + +```javascript +await manager.labelRole(MINTER, "MINTER"); +``` + +Given the admins of the `AccessManaged` can modify all of its permissions, it's recommended to keep only a single admin address secured under a multisig or governance layer. To achieve this, it is possible for the initial admin to set up all the required permissions, targets, and functions, assign a new admin, and finally renounce its admin role. + +For improved incident response coordination, the manager includes a mode where administrators can completely close a target contract. When closed, all calls to restricted target functions in a target contract will revert. + +Closing and opening contracts don't alter any of their settings, neither permissions nor delays. Particularly, the roles required for calling specific target functions are not modified. + +This mode is useful for incident response operations that require temporarily shutting down a contract in order to evaluate emergencies and reconfigure permissions. + +```javascript +const target = await myToken.getAddress(); + +// Token's `restricted` functions closed +await manager.setTargetClosed(target, true); + +// Token's `restricted` functions open +await manager.setTargetClosed(target, false); +``` + +WARNING: Even if an `AccessManager` defines permissions for a target function, these won't be applied if the managed contract instance is not using the xref:api:access.adoc#AccessManaged-restricted--[`restricted`] modifier for that function, or if its manager is a different one. + +=== Role Admins and Guardians + +An important aspect of the AccessControl contract is that roles aren't granted nor revoked by role members. Instead, it relies on the concept of a role admin for granting and revoking. + +In the case of the `AccessManager`, the same rule applies and only the role's admins are able to call xref:api:access.adoc#AccessManager-grantRole-uint64-address-uint32-[grant] and xref:api:access.adoc#AccessManager-revokeRole-uint64-address-[revoke] functions. Note that calling these functions will be subject to the execution delay that the executing role admin has. + +Additionally, the `AccessManager` stores a _guardian_ as an extra protection for each role. This guardian has the ability to cancel operations that have been scheduled by any role member with an execution delay. Consider that a role will have its initial admin and guardian default to the `ADMIN_ROLE` (`0`). + +IMPORTANT: Be careful with the members of `ADMIN_ROLE`, since it acts as the default admin and guardian for every role. A misbehaved guardian can cancel operations at will, affecting the AccessManager's operation. + +=== Manager configuration + +The `AccessManager` provides a built-in interface for configuring permission settings that can be accessed by its `ADMIN_ROLE` members. + +This configuration interface includes the following functions: + +* Add a label to a role using the xref:api:access.adoc#AccessManager-labelRole-uint64-string-[`labelRole`] function. +* Assign the admin and guardian of a role with xref:api:access.adoc#AccessManager-setRoleAdmin-uint64-uint64-[`setRoleAdmin`] and xref:api:access.adoc#AccessManager-setRoleGuardian-uint64-uint64-[`setRoleGuardian`]. +* Set each role's grant delay via xref:api:access.adoc#AccessManager-setGrantDelay-uint64-uint32-[`setGrantDelay`]. + +As an admin, some actions will require a delay. Similar to each member's execution delay, some admin operations require waiting for execution and should follow the xref:api:access.adoc#AccessManager-schedule-address-bytes-uint48-[`schedule`] and xref:api:access.adoc#AccessManager-execute-address-bytes-[`execute`] workflow. + +More specifically, these delayed functions are those for configuring the settings of a specific target contract. The delay applied to these functions can be adjusted by the manager admins with xref:api:access.adoc#AccessManager-setTargetAdminDelay-address-uint32-[`setTargetAdminDelay`]. + +The delayed admin actions are: + +* Updating an `AccessManaged` contract xref:api:access.adoc#AccessManaged-authority--[authority] using xref:api:access.adoc#AccessManager-updateAuthority-address-address-[`updateAuthority`]. +* Closing or opening a target via xref:api:access.adoc#AccessManager-setTargetClosed-address-bool-[`setTargetClosed`]. +* Changing permissions of whether a role can call a target function with xref:api:access.adoc#AccessManager-setTargetFunctionRole-address-bytes4---uint64-[`setTargetFunctionRole`]. + +=== Using with Ownable + +Contracts already inheriting from xref:api:access.adoc#Ownable[`Ownable`] can migrate to AccessManager by transferring ownership to the manager. After that, all calls to functions with the `onlyOwner` modifier should be called through the manager's xref:api:access.adoc#AccessManager-execute-address-bytes-[`execute`] function, even if the caller doesn't require a delay. + +```javascript +await ownable.connect(owner).transferOwnership(accessManager); +``` + +=== Using with AccessControl + +For systems already using xref:api:access.adoc#AccessControl[`AccessControl`], the `DEFAULT_ADMIN_ROLE` can be granted to the `AccessManager` after revoking every other role. Subsequent calls should be made through the manager's xref:api:access.adoc#AccessManager-execute-address-bytes-[`execute`] method, similar to the Ownable case. + +```javascript +// Revoke old roles +await accessControl.connect(admin).revokeRoke(MINTER_ROLE, account); + +// Grant the admin role to the access manager +await accessControl.connect(admin).grantRole(DEFAULT_ADMIN_ROLE, accessManager); + +await accessControl.connect(admin).renounceRole(DEFAULT_ADMIN_ROLE, admin); +``` From cf6ff90b6d4d0180f0c862e16976f4dcf9847c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 9 Nov 2023 15:56:54 +0000 Subject: [PATCH 107/167] Migrate `AccessManager` tests to ethers (#4710) Co-authored-by: Hadrien Croubois --- contracts/mocks/AuthorityMock.sol | 2 +- test/access/Ownable.test.js | 6 + test/access/manager/AccessManaged.test.js | 149 +- test/access/manager/AccessManager.behavior.js | 125 +- .../access/manager/AccessManager.predicate.js | 165 +- test/access/manager/AccessManager.test.js | 2114 ++++++++--------- test/access/manager/AuthorityUtils.test.js | 69 +- test/helpers/access-manager.js | 42 +- test/helpers/constants.js | 11 +- test/helpers/namespaced-storage.js | 12 +- 10 files changed, 1244 insertions(+), 1451 deletions(-) diff --git a/contracts/mocks/AuthorityMock.sol b/contracts/mocks/AuthorityMock.sol index bf2434b0a..4f3e1de3a 100644 --- a/contracts/mocks/AuthorityMock.sol +++ b/contracts/mocks/AuthorityMock.sol @@ -52,7 +52,7 @@ contract AuthorityNoResponse { function canCall(address /* caller */, address /* target */, bytes4 /* selector */) external view {} } -contract AuthoritiyObserveIsConsuming { +contract AuthorityObserveIsConsuming { event ConsumeScheduledOpCalled(address caller, bytes data, bytes4 isConsuming); function canCall( diff --git a/test/access/Ownable.test.js b/test/access/Ownable.test.js index fabcb7d52..568d52b68 100644 --- a/test/access/Ownable.test.js +++ b/test/access/Ownable.test.js @@ -13,6 +13,12 @@ describe('Ownable', function () { Object.assign(this, await loadFixture(fixture)); }); + it('emits ownership transfer events during construction', async function () { + await expect(await this.ownable.deploymentTransaction()) + .to.emit(this.ownable, 'OwnershipTransferred') + .withArgs(ethers.ZeroAddress, this.owner.address); + }); + it('rejects zero address for initialOwner', async function () { await expect(ethers.deployContract('$Ownable', [ethers.ZeroAddress])) .to.be.revertedWithCustomError({ interface: this.ownable.interface }, 'OwnableInvalidOwner') diff --git a/test/access/manager/AccessManaged.test.js b/test/access/manager/AccessManaged.test.js index ee7924fec..f3a433ebd 100644 --- a/test/access/manager/AccessManaged.test.js +++ b/test/access/manager/AccessManaged.test.js @@ -1,142 +1,145 @@ -const { expectEvent, time, expectRevert } = require('@openzeppelin/test-helpers'); -const { selector } = require('../../helpers/methods'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const { - time: { setNextBlockTimestamp }, -} = require('@nomicfoundation/hardhat-network-helpers'); +const { bigint: time } = require('../../helpers/time'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { impersonate } = require('../../helpers/account'); +const { ethers } = require('hardhat'); -const AccessManaged = artifacts.require('$AccessManagedTarget'); -const AccessManager = artifacts.require('$AccessManager'); +async function fixture() { + const [admin, roleMember, other] = await ethers.getSigners(); -const AuthoritiyObserveIsConsuming = artifacts.require('$AuthoritiyObserveIsConsuming'); + const authority = await ethers.deployContract('$AccessManager', [admin]); + const managed = await ethers.deployContract('$AccessManagedTarget', [authority]); -contract('AccessManaged', function (accounts) { - const [admin, roleMember, other] = accounts; + const anotherAuthority = await ethers.deployContract('$AccessManager', [admin]); + const authorityObserveIsConsuming = await ethers.deployContract('$AuthorityObserveIsConsuming'); + await impersonate(authority.target); + const authorityAsSigner = await ethers.getSigner(authority.target); + + return { + roleMember, + other, + authorityAsSigner, + authority, + managed, + authorityObserveIsConsuming, + anotherAuthority, + }; +} + +describe('AccessManaged', function () { beforeEach(async function () { - this.authority = await AccessManager.new(admin); - this.managed = await AccessManaged.new(this.authority.address); + Object.assign(this, await loadFixture(fixture)); }); it('sets authority and emits AuthorityUpdated event during construction', async function () { - await expectEvent.inConstruction(this.managed, 'AuthorityUpdated', { - authority: this.authority.address, - }); - expect(await this.managed.authority()).to.eq(this.authority.address); + await expect(await this.managed.deploymentTransaction()) + .to.emit(this.managed, 'AuthorityUpdated') + .withArgs(this.authority.target); }); describe('restricted modifier', function () { - const method = 'fnRestricted()'; - beforeEach(async function () { - this.selector = selector(method); - this.role = web3.utils.toBN(42); - await this.authority.$_setTargetFunctionRole(this.managed.address, this.selector, this.role); - await this.authority.$_grantRole(this.role, roleMember, 0, 0); + this.selector = this.managed.fnRestricted.getFragment().selector; + this.role = 42n; + await this.authority.$_setTargetFunctionRole(this.managed, this.selector, this.role); + await this.authority.$_grantRole(this.role, this.roleMember, 0, 0); }); it('succeeds when role is granted without execution delay', async function () { - await this.managed.methods[method]({ from: roleMember }); + await this.managed.connect(this.roleMember)[this.selector](); }); it('reverts when role is not granted', async function () { - await expectRevertCustomError(this.managed.methods[method]({ from: other }), 'AccessManagedUnauthorized', [ - other, - ]); + await expect(this.managed.connect(this.other)[this.selector]()) + .to.be.revertedWithCustomError(this.managed, 'AccessManagedUnauthorized') + .withArgs(this.other.address); }); it('panics in short calldata', async function () { // We avoid adding the `restricted` modifier to the fallback function because other tests may depend on it // being accessible without restrictions. We check for the internal `_checkCanCall` instead. - await expectRevert.unspecified(this.managed.$_checkCanCall(other, '0x1234')); + await expect(this.managed.$_checkCanCall(this.roleMember, '0x1234')).to.be.reverted; }); describe('when role is granted with execution delay', function () { beforeEach(async function () { - const executionDelay = web3.utils.toBN(911); - await this.authority.$_grantRole(this.role, roleMember, 0, executionDelay); + const executionDelay = 911n; + await this.authority.$_grantRole(this.role, this.roleMember, 0, executionDelay); }); it('reverts if the operation is not scheduled', async function () { - const calldata = this.managed.contract.methods[method]().encodeABI(); - const opId = await this.authority.hashOperation(roleMember, this.managed.address, calldata); + const fn = this.managed.interface.getFunction(this.selector); + const calldata = this.managed.interface.encodeFunctionData(fn, []); + const opId = await this.authority.hashOperation(this.roleMember, this.managed, calldata); - await expectRevertCustomError(this.managed.methods[method]({ from: roleMember }), 'AccessManagerNotScheduled', [ - opId, - ]); + await expect(this.managed.connect(this.roleMember)[this.selector]()) + .to.be.revertedWithCustomError(this.authority, 'AccessManagerNotScheduled') + .withArgs(opId); }); it('succeeds if the operation is scheduled', async function () { // Arguments const delay = time.duration.hours(12); - const calldata = this.managed.contract.methods[method]().encodeABI(); + const fn = this.managed.interface.getFunction(this.selector); + const calldata = this.managed.interface.encodeFunctionData(fn, []); // Schedule - const timestamp = await time.latest(); - const scheduledAt = timestamp.addn(1); - const when = scheduledAt.add(delay); - await setNextBlockTimestamp(scheduledAt); - await this.authority.schedule(this.managed.address, calldata, when, { - from: roleMember, - }); + const timestamp = await time.clock.timestamp(); + const scheduledAt = timestamp + 1n; + const when = scheduledAt + delay; + await time.forward.timestamp(scheduledAt, false); + await this.authority.connect(this.roleMember).schedule(this.managed, calldata, when); // Set execution date - await setNextBlockTimestamp(when); + await time.forward.timestamp(when, false); // Shouldn't revert - await this.managed.methods[method]({ from: roleMember }); + await this.managed.connect(this.roleMember)[this.selector](); }); }); }); describe('setAuthority', function () { - beforeEach(async function () { - this.newAuthority = await AccessManager.new(admin); - }); - it('reverts if the caller is not the authority', async function () { - await expectRevertCustomError(this.managed.setAuthority(other, { from: other }), 'AccessManagedUnauthorized', [ - other, - ]); + await expect(this.managed.connect(this.other).setAuthority(this.other)) + .to.be.revertedWithCustomError(this.managed, 'AccessManagedUnauthorized') + .withArgs(this.other.address); }); it('reverts if the new authority is not a valid authority', async function () { - await impersonate(this.authority.address); - await expectRevertCustomError( - this.managed.setAuthority(other, { from: this.authority.address }), - 'AccessManagedInvalidAuthority', - [other], - ); + await expect(this.managed.connect(this.authorityAsSigner).setAuthority(this.other)) + .to.be.revertedWithCustomError(this.managed, 'AccessManagedInvalidAuthority') + .withArgs(this.other.address); }); it('sets authority and emits AuthorityUpdated event', async function () { - await impersonate(this.authority.address); - const { receipt } = await this.managed.setAuthority(this.newAuthority.address, { from: this.authority.address }); - await expectEvent(receipt, 'AuthorityUpdated', { - authority: this.newAuthority.address, - }); - expect(await this.managed.authority()).to.eq(this.newAuthority.address); + await expect(this.managed.connect(this.authorityAsSigner).setAuthority(this.anotherAuthority)) + .to.emit(this.managed, 'AuthorityUpdated') + .withArgs(this.anotherAuthority.target); + + expect(await this.managed.authority()).to.equal(this.anotherAuthority.target); }); }); describe('isConsumingScheduledOp', function () { beforeEach(async function () { - this.authority = await AuthoritiyObserveIsConsuming.new(); - this.managed = await AccessManaged.new(this.authority.address); + await this.managed.connect(this.authorityAsSigner).setAuthority(this.authorityObserveIsConsuming); }); it('returns bytes4(0) when not consuming operation', async function () { - expect(await this.managed.isConsumingScheduledOp()).to.eq('0x00000000'); + expect(await this.managed.isConsumingScheduledOp()).to.equal('0x00000000'); }); it('returns isConsumingScheduledOp selector when consuming operation', async function () { - const receipt = await this.managed.fnRestricted({ from: other }); - await expectEvent.inTransaction(receipt.tx, this.authority, 'ConsumeScheduledOpCalled', { - caller: other, - data: this.managed.contract.methods.fnRestricted().encodeABI(), - isConsuming: selector('isConsumingScheduledOp()'), - }); + const isConsumingScheduledOp = this.managed.interface.getFunction('isConsumingScheduledOp()'); + const fnRestricted = this.managed.fnRestricted.getFragment(); + await expect(this.managed.connect(this.other).fnRestricted()) + .to.emit(this.authorityObserveIsConsuming, 'ConsumeScheduledOpCalled') + .withArgs( + this.other.address, + this.managed.interface.encodeFunctionData(fnRestricted, []), + isConsumingScheduledOp.selector, + ); }); }); }); diff --git a/test/access/manager/AccessManager.behavior.js b/test/access/manager/AccessManager.behavior.js index e5c7a3ca7..eb26b9a48 100644 --- a/test/access/manager/AccessManager.behavior.js +++ b/test/access/manager/AccessManager.behavior.js @@ -1,5 +1,3 @@ -const { mine } = require('@nomicfoundation/hardhat-network-helpers'); -const { expectRevertCustomError } = require('../../helpers/customError'); const { LIKE_COMMON_IS_EXECUTING, LIKE_COMMON_GET_ACCESS, @@ -18,13 +16,9 @@ const { */ function shouldBehaveLikeDelayedAdminOperation() { const getAccessPath = LIKE_COMMON_GET_ACCESS; - getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = function () { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); - testAsDelayedOperation(); - }; + testAsDelayedOperation.mineDelay = true; + getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = + testAsDelayedOperation; getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { beforeEach('set execution delay', async function () { this.scheduleIn = this.executionDelay; // For testAsDelayedOperation @@ -42,14 +36,12 @@ function shouldBehaveLikeDelayedAdminOperation() { testAsHasRole({ publicRoleIsRequired() { it('reverts as AccessManagerUnauthorizedAccount', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerUnauthorizedAccount', - [ - this.caller, + await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) + .to.be.revertedWithCustomError(this.target, 'AccessManagerUnauthorizedAccount') + .withArgs( + this.caller.address, this.roles.ADMIN.id, // Although PUBLIC is required, target function role doesn't apply to admin ops - ], - ); + ); }); }, specificRoleIsRequired: getAccessPath, @@ -63,19 +55,20 @@ function shouldBehaveLikeDelayedAdminOperation() { */ function shouldBehaveLikeNotDelayedAdminOperation() { const getAccessPath = LIKE_COMMON_GET_ACCESS; - getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = function () { - beforeEach('set execution delay', async function () { - await mine(); - this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation - }); - testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); - }; - getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { - beforeEach('set execution delay', async function () { - this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation - }); - testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); - }; + + function testScheduleOperation(mineDelay) { + return function self() { + self.mineDelay = mineDelay; + beforeEach('set execution delay', async function () { + this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation + }); + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); + }; + } + + getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = + testScheduleOperation(true); + getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = testScheduleOperation(false); beforeEach('set target as manager', function () { this.target = this.manager; @@ -87,11 +80,12 @@ function shouldBehaveLikeNotDelayedAdminOperation() { testAsHasRole({ publicRoleIsRequired() { it('reverts as AccessManagerUnauthorizedAccount', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerUnauthorizedAccount', - [this.caller, this.roles.ADMIN.id], // Although PUBLIC_ROLE is required, admin ops are not subject to target function roles - ); + await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) + .to.be.revertedWithCustomError(this.target, 'AccessManagerUnauthorizedAccount') + .withArgs( + this.caller.address, + this.roles.ADMIN.id, // Although PUBLIC_ROLE is required, admin ops are not subject to target function roles + ); }); }, specificRoleIsRequired: getAccessPath, @@ -105,19 +99,17 @@ function shouldBehaveLikeNotDelayedAdminOperation() { */ function shouldBehaveLikeRoleAdminOperation(roleAdmin) { const getAccessPath = LIKE_COMMON_GET_ACCESS; - getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = function () { - beforeEach('set operation delay', async function () { - await mine(); - this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation - }); - testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); - }; - getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { + + function afterGrantDelay() { + afterGrantDelay.mineDelay = true; beforeEach('set execution delay', async function () { this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation }); testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); - }; + } + + getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = afterGrantDelay; + getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = afterGrantDelay; beforeEach('set target as manager', function () { this.target = this.manager; @@ -129,11 +121,9 @@ function shouldBehaveLikeRoleAdminOperation(roleAdmin) { testAsHasRole({ publicRoleIsRequired() { it('reverts as AccessManagerUnauthorizedAccount', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerUnauthorizedAccount', - [this.caller, roleAdmin], // Role admin ops require the role's admin - ); + await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) + .to.be.revertedWithCustomError(this.target, 'AccessManagerUnauthorizedAccount') + .withArgs(this.caller.address, roleAdmin); }); }, specificRoleIsRequired: getAccessPath, @@ -150,11 +140,9 @@ function shouldBehaveLikeRoleAdminOperation(roleAdmin) { function shouldBehaveLikeAManagedRestrictedOperation() { function revertUnauthorized() { it('reverts as AccessManagedUnauthorized', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagedUnauthorized', - [this.caller], - ); + await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) + .to.be.revertedWithCustomError(this.target, 'AccessManagedUnauthorized') + .withArgs(this.caller.address); }); } @@ -166,20 +154,19 @@ function shouldBehaveLikeAManagedRestrictedOperation() { revertUnauthorized; getAccessPath.requiredRoleIsNotGranted = revertUnauthorized; - getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = function () { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation - }); - testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); - }; - getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = function () { - beforeEach('consume previously set grant delay', async function () { - this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation - }); - testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); - }; + function testScheduleOperation(mineDelay) { + return function self() { + self.mineDelay = mineDelay; + beforeEach('sets execution delay', async function () { + this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation + }); + testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); + }; + } + + getAccessPath.requiredRoleIsGranted.roleGrantingIsDelayed.callerHasAnExecutionDelay.afterGrantDelay = + testScheduleOperation(true); + getAccessPath.requiredRoleIsGranted.roleGrantingIsNotDelayed.callerHasAnExecutionDelay = testScheduleOperation(false); const isExecutingPath = LIKE_COMMON_IS_EXECUTING; isExecutingPath.notExecuting = revertUnauthorized; @@ -191,11 +178,11 @@ function shouldBehaveLikeAManagedRestrictedOperation() { callerIsNotTheManager: { publicRoleIsRequired() { it('succeeds called directly', async function () { - await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + await this.caller.sendTransaction({ to: this.target, data: this.calldata }); }); it('succeeds via execute', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + await this.manager.connect(this.caller).execute(this.target, this.calldata); }); }, specificRoleIsRequired: getAccessPath, diff --git a/test/access/manager/AccessManager.predicate.js b/test/access/manager/AccessManager.predicate.js index becbcb534..048437e03 100644 --- a/test/access/manager/AccessManager.predicate.js +++ b/test/access/manager/AccessManager.predicate.js @@ -1,27 +1,22 @@ const { setStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); -const { - time: { setNextBlockTimestamp }, -} = require('@nomicfoundation/hardhat-network-helpers'); -const { time } = require('@openzeppelin/test-helpers'); -const { EXECUTION_ID_STORAGE_SLOT, EXPIRATION, scheduleOperation } = require('../../helpers/access-manager'); +const { EXECUTION_ID_STORAGE_SLOT, EXPIRATION, prepareOperation } = require('../../helpers/access-manager'); const { impersonate } = require('../../helpers/account'); -const { expectRevertCustomError } = require('../../helpers/customError'); +const { bigint: time } = require('../../helpers/time'); +const { ethers } = require('hardhat'); // ============ COMMON PREDICATES ============ const LIKE_COMMON_IS_EXECUTING = { executing() { it('succeeds', async function () { - await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + await this.caller.sendTransaction({ to: this.target, data: this.calldata }); }); }, notExecuting() { it('reverts as AccessManagerUnauthorizedAccount', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerUnauthorizedAccount', - [this.caller, this.role.id], - ); + await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') + .withArgs(this.caller.address, this.role.id); }); }, }; @@ -32,11 +27,9 @@ const LIKE_COMMON_GET_ACCESS = { callerHasAnExecutionDelay: { beforeGrantDelay() { it('reverts as AccessManagerUnauthorizedAccount', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerUnauthorizedAccount', - [this.caller, this.role.id], - ); + await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') + .withArgs(this.caller.address, this.role.id); }); }, afterGrantDelay: undefined, // Diverges if there's an operation delay or not @@ -44,20 +37,18 @@ const LIKE_COMMON_GET_ACCESS = { callerHasNoExecutionDelay: { beforeGrantDelay() { it('reverts as AccessManagerUnauthorizedAccount', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerUnauthorizedAccount', - [this.caller, this.role.id], - ); + await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') + .withArgs(this.caller.address, this.role.id); }); }, afterGrantDelay() { it('succeeds called directly', async function () { - await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + await this.caller.sendTransaction({ to: this.target, data: this.calldata }); }); it('succeeds via execute', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + await this.manager.connect(this.caller).execute(this.target, this.calldata); }); }, }, @@ -66,22 +57,20 @@ const LIKE_COMMON_GET_ACCESS = { callerHasAnExecutionDelay: undefined, // Diverges if there's an operation to schedule or not callerHasNoExecutionDelay() { it('succeeds called directly', async function () { - await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + await this.caller.sendTransaction({ to: this.target, data: this.calldata }); }); it('succeeds via execute', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + await this.manager.connect(this.caller).execute(this.target, this.calldata); }); }, }, }, requiredRoleIsNotGranted() { it('reverts as AccessManagerUnauthorizedAccount', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerUnauthorizedAccount', - [this.caller, this.role.id], - ); + await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') + .withArgs(this.caller.address, this.role.id); }); }, }; @@ -90,39 +79,33 @@ const LIKE_COMMON_SCHEDULABLE = { scheduled: { before() { it('reverts as AccessManagerNotReady', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerNotReady', - [this.operationId], - ); + await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerNotReady') + .withArgs(this.operationId); }); }, after() { it('succeeds called directly', async function () { - await web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }); + await this.caller.sendTransaction({ to: this.target, data: this.calldata }); }); it('succeeds via execute', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + await this.manager.connect(this.caller).execute(this.target, this.calldata); }); }, expired() { it('reverts as AccessManagerExpired', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerExpired', - [this.operationId], - ); + await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerExpired') + .withArgs(this.operationId); }); }, }, notScheduled() { it('reverts as AccessManagerNotScheduled', async function () { - await expectRevertCustomError( - web3.eth.sendTransaction({ to: this.target.address, data: this.calldata, from: this.caller }), - 'AccessManagerNotScheduled', - [this.operationId], - ); + await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerNotScheduled') + .withArgs(this.operationId); }); }, }; @@ -135,7 +118,7 @@ const LIKE_COMMON_SCHEDULABLE = { function testAsClosable({ closed, open }) { describe('when the manager is closed', function () { beforeEach('close', async function () { - await this.manager.$_setTargetClosed(this.target.address, true); + await this.manager.$_setTargetClosed(this.target, true); }); closed(); @@ -143,7 +126,7 @@ function testAsClosable({ closed, open }) { describe('when the manager is open', function () { beforeEach('open', async function () { - await this.manager.$_setTargetClosed(this.target.address, false); + await this.manager.$_setTargetClosed(this.target, false); }); open(); @@ -157,13 +140,13 @@ function testAsClosable({ closed, open }) { */ function testAsDelay(type, { before, after }) { beforeEach('define timestamp when delay takes effect', async function () { - const timestamp = await time.latest(); - this.delayEffect = timestamp.add(this.delay); + const timestamp = await time.clock.timestamp(); + this.delayEffect = timestamp + this.delay; }); describe(`when ${type} delay has not taken effect yet`, function () { beforeEach(`set next block timestamp before ${type} takes effect`, async function () { - await setNextBlockTimestamp(this.delayEffect.subn(1)); + await time.forward.timestamp(this.delayEffect - 1n, !!before.mineDelay); }); before(); @@ -171,7 +154,7 @@ function testAsDelay(type, { before, after }) { describe(`when ${type} delay has taken effect`, function () { beforeEach(`set next block timestamp when ${type} takes effect`, async function () { - await setNextBlockTimestamp(this.delayEffect); + await time.forward.timestamp(this.delayEffect, !!after.mineDelay); }); after(); @@ -186,21 +169,25 @@ function testAsDelay(type, { before, after }) { function testAsSchedulableOperation({ scheduled: { before, after, expired }, notScheduled }) { describe('when operation is scheduled', function () { beforeEach('schedule operation', async function () { - await impersonate(this.caller); // May be a contract - const { operationId } = await scheduleOperation(this.manager, { + if (this.caller.target) { + await impersonate(this.caller.target); + this.caller = await ethers.getSigner(this.caller.target); + } + const { operationId, schedule } = await prepareOperation(this.manager, { caller: this.caller, - target: this.target.address, + target: this.target, calldata: this.calldata, delay: this.scheduleIn, }); + await schedule(); this.operationId = operationId; }); describe('when operation is not ready for execution', function () { beforeEach('set next block time before operation is ready', async function () { - this.scheduledAt = await time.latest(); + this.scheduledAt = await time.clock.timestamp(); const schedule = await this.manager.getSchedule(this.operationId); - await setNextBlockTimestamp(schedule.subn(1)); + await time.forward.timestamp(schedule - 1n, !!before.mineDelay); }); before(); @@ -208,9 +195,9 @@ function testAsSchedulableOperation({ scheduled: { before, after, expired }, not describe('when operation is ready for execution', function () { beforeEach('set next block time when operation is ready for execution', async function () { - this.scheduledAt = await time.latest(); + this.scheduledAt = await time.clock.timestamp(); const schedule = await this.manager.getSchedule(this.operationId); - await setNextBlockTimestamp(schedule); + await time.forward.timestamp(schedule, !!after.mineDelay); }); after(); @@ -218,9 +205,9 @@ function testAsSchedulableOperation({ scheduled: { before, after, expired }, not describe('when operation has expired', function () { beforeEach('set next block time when operation expired', async function () { - this.scheduledAt = await time.latest(); + this.scheduledAt = await time.clock.timestamp(); const schedule = await this.manager.getSchedule(this.operationId); - await setNextBlockTimestamp(schedule.add(EXPIRATION)); + await time.forward.timestamp(schedule + EXPIRATION, !!expired.mineDelay); }); expired(); @@ -229,10 +216,10 @@ function testAsSchedulableOperation({ scheduled: { before, after, expired }, not describe('when operation is not scheduled', function () { beforeEach('set expected operationId', async function () { - this.operationId = await this.manager.hashOperation(this.caller, this.target.address, this.calldata); + this.operationId = await this.manager.hashOperation(this.caller, this.target, this.calldata); // Assert operation is not scheduled - expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal(web3.utils.toBN(0)); + expect(await this.manager.getSchedule(this.operationId)).to.equal(0n); }); notScheduled(); @@ -245,16 +232,22 @@ function testAsSchedulableOperation({ scheduled: { before, after, expired }, not function testAsRestrictedOperation({ callerIsTheManager: { executing, notExecuting }, callerIsNotTheManager }) { describe('when the call comes from the manager (msg.sender == manager)', function () { beforeEach('define caller as manager', async function () { - this.caller = this.manager.address; - await impersonate(this.caller); + this.caller = this.manager; + if (this.caller.target) { + await impersonate(this.caller.target); + this.caller = await ethers.getSigner(this.caller.target); + } }); describe('when _executionId is in storage for target and selector', function () { beforeEach('set _executionId flag from calldata and target', async function () { - const executionId = web3.utils.keccak256( - web3.eth.abi.encodeParameters(['address', 'bytes4'], [this.target.address, this.calldata.substring(0, 10)]), + const executionId = ethers.keccak256( + ethers.AbiCoder.defaultAbiCoder().encode( + ['address', 'bytes4'], + [this.target.target, this.calldata.substring(0, 10)], + ), ); - await setStorageAt(this.manager.address, EXECUTION_ID_STORAGE_SLOT, executionId); + await setStorageAt(this.manager.target, EXECUTION_ID_STORAGE_SLOT, executionId); }); executing(); @@ -279,8 +272,8 @@ function testAsDelayedOperation() { describe('with operation delay', function () { describe('when operation delay is greater than execution delay', function () { beforeEach('set operation delay', async function () { - this.operationDelay = this.executionDelay.add(time.duration.hours(1)); - await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); + this.operationDelay = this.executionDelay + time.duration.hours(1); + await this.manager.$_setTargetAdminDelay(this.target, this.operationDelay); this.scheduleIn = this.operationDelay; // For testAsSchedulableOperation }); @@ -289,8 +282,8 @@ function testAsDelayedOperation() { describe('when operation delay is shorter than execution delay', function () { beforeEach('set operation delay', async function () { - this.operationDelay = this.executionDelay.sub(time.duration.hours(1)); - await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); + this.operationDelay = this.executionDelay - time.duration.hours(1); + await this.manager.$_setTargetAdminDelay(this.target, this.operationDelay); this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation }); @@ -300,8 +293,8 @@ function testAsDelayedOperation() { describe('without operation delay', function () { beforeEach('set operation delay', async function () { - this.operationDelay = web3.utils.toBN(0); - await this.manager.$_setTargetAdminDelay(this.target.address, this.operationDelay); + this.operationDelay = 0n; + await this.manager.$_setTargetAdminDelay(this.target, this.operationDelay); this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation }); @@ -344,9 +337,9 @@ function testAsHasRole({ publicRoleIsRequired, specificRoleIsRequired }) { describe('when the function requires the caller to be granted with the PUBLIC_ROLE', function () { beforeEach('set target function role as PUBLIC_ROLE', async function () { this.role = this.roles.PUBLIC; - await this.manager.$_setTargetFunctionRole(this.target.address, this.calldata.substring(0, 10), this.role.id, { - from: this.roles.ADMIN.members[0], - }); + await this.manager + .connect(this.roles.ADMIN.members[0]) + .$_setTargetFunctionRole(this.target, this.calldata.substring(0, 10), this.role.id); }); publicRoleIsRequired(); @@ -354,9 +347,9 @@ function testAsHasRole({ publicRoleIsRequired, specificRoleIsRequired }) { describe('when the function requires the caller to be granted with a role other than PUBLIC_ROLE', function () { beforeEach('set target function role as PUBLIC_ROLE', async function () { - await this.manager.$_setTargetFunctionRole(this.target.address, this.calldata.substring(0, 10), this.role.id, { - from: this.roles.ADMIN.members[0], - }); + await this.manager + .connect(this.roles.ADMIN.members[0]) + .$_setTargetFunctionRole(this.target, this.calldata.substring(0, 10), this.role.id); }); testAsGetAccess(specificRoleIsRequired); @@ -400,7 +393,7 @@ function testAsGetAccess({ describe('when caller has no execution delay', function () { beforeEach('set role and delay', async function () { - this.executionDelay = web3.utils.toBN(0); + this.executionDelay = 0n; await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); }); @@ -410,7 +403,7 @@ function testAsGetAccess({ describe('when role granting is not delayed', function () { beforeEach('define delay', function () { - this.grantDelay = web3.utils.toBN(0); + this.grantDelay = 0n; }); describe('when caller has an execution delay', function () { @@ -424,7 +417,7 @@ function testAsGetAccess({ describe('when caller has no execution delay', function () { beforeEach('set role and delay', async function () { - this.executionDelay = web3.utils.toBN(0); + this.executionDelay = 0n; await this.manager.$_grantRole(this.role.id, this.caller, this.grantDelay, this.executionDelay); }); @@ -439,7 +432,7 @@ function testAsGetAccess({ // Although this is highly unlikely, we check for it here to avoid false positives. beforeEach('assert role is unset', async function () { const { since } = await this.manager.getAccess(this.role.id, this.caller); - expect(since).to.be.bignumber.equal(web3.utils.toBN(0)); + expect(since).to.equal(0n); }); requiredRoleIsNotGranted(); diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 40c684505..b26a246af 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -1,8 +1,5 @@ -const { web3 } = require('hardhat'); -const { constants, expectEvent, time, expectRevert } = require('@openzeppelin/test-helpers'); -const { expectRevertCustomError } = require('../../helpers/customError'); +const { ethers, expect } = require('hardhat'); const { selector } = require('../../helpers/methods'); -const { clockFromReceipt } = require('../../helpers/time'); const { buildBaseRoles, formatAccess, @@ -10,7 +7,7 @@ const { MINSETBACK, EXECUTION_ID_STORAGE_SLOT, CONSUMING_SCHEDULE_STORAGE_SLOT, - scheduleOperation, + prepareOperation, hashOperation, } = require('../../helpers/access-manager'); const { @@ -28,20 +25,68 @@ const { testAsHasRole, testAsGetAccess, } = require('./AccessManager.predicate'); -const { default: Wallet } = require('ethereumjs-wallet'); + const { - mine, - time: { setNextBlockTimestamp }, + time: { increase }, getStorageAt, + loadFixture, } = require('@nomicfoundation/hardhat-network-helpers'); const { MAX_UINT48 } = require('../../helpers/constants'); const { impersonate } = require('../../helpers/account'); +const { bigint: time } = require('../../helpers/time'); +const { ZeroAddress: ZERO_ADDRESS, Wallet, toBeHex, id } = require('ethers'); + +const { address: someAddress } = Wallet.createRandom(); + +async function fixture() { + const [admin, roleAdmin, roleGuardian, member, user, other] = await ethers.getSigners(); + + // Build roles + const roles = buildBaseRoles(); -const AccessManager = artifacts.require('$AccessManager'); -const AccessManagedTarget = artifacts.require('$AccessManagedTarget'); -const Ownable = artifacts.require('$Ownable'); + // Add members + roles.ADMIN.members = [admin]; + roles.SOME_ADMIN.members = [roleAdmin]; + roles.SOME_GUARDIAN.members = [roleGuardian]; + roles.SOME.members = [member]; + roles.PUBLIC.members = [admin, roleAdmin, roleGuardian, member, user, other]; -const someAddress = Wallet.generate().getChecksumAddressString(); + const manager = await ethers.deployContract('$AccessManager', [admin]); + const target = await ethers.deployContract('$AccessManagedTarget', [manager]); + + for (const { id: roleId, admin, guardian, members } of Object.values(roles)) { + if (roleId === roles.PUBLIC.id) continue; // Every address belong to public and is locked + if (roleId === roles.ADMIN.id) continue; // Admin set during construction and is locked + + // Set admin role avoiding default + if (admin.id !== roles.ADMIN.id) { + await manager.$_setRoleAdmin(roleId, admin.id); + } + + // Set guardian role avoiding default + if (guardian.id !== roles.ADMIN.id) { + await manager.$_setRoleGuardian(roleId, guardian.id); + } + + // Grant role to members + for (const member of members) { + await manager.$_grantRole(roleId, member, 0, 0); + } + } + + return { + // TODO: Check if all signers are actually used + admin, + roleAdmin, + roleGuardian, + member, + user, + other, + roles, + manager, + target, + }; +} // This test suite is made using the following tools: // @@ -57,59 +102,29 @@ const someAddress = Wallet.generate().getChecksumAddressString(); // The predicates can be identified by the `testAs*` prefix while the behaviors // are prefixed with `shouldBehave*`. The common assertions for predicates are // defined as constants. -contract('AccessManager', function (accounts) { - const [admin, manager, guardian, member, user, other] = accounts; +contract('AccessManager', function () { + // const [admin, manager, guardian, member, user, other] = accounts; beforeEach(async function () { - this.roles = buildBaseRoles(); - - // Add members - this.roles.ADMIN.members = [admin]; - this.roles.SOME_ADMIN.members = [manager]; - this.roles.SOME_GUARDIAN.members = [guardian]; - this.roles.SOME.members = [member]; - this.roles.PUBLIC.members = [admin, manager, guardian, member, user, other]; - - this.manager = await AccessManager.new(admin); - this.target = await AccessManagedTarget.new(this.manager.address); - - for (const { id: roleId, admin, guardian, members } of Object.values(this.roles)) { - if (roleId === this.roles.PUBLIC.id) continue; // Every address belong to public and is locked - if (roleId === this.roles.ADMIN.id) continue; // Admin set during construction and is locked - - // Set admin role avoiding default - if (admin.id !== this.roles.ADMIN.id) { - await this.manager.$_setRoleAdmin(roleId, admin.id); - } - - // Set guardian role avoiding default - if (guardian.id !== this.roles.ADMIN.id) { - await this.manager.$_setRoleGuardian(roleId, guardian.id); - } - - // Grant role to members - for (const member of members) { - await this.manager.$_grantRole(roleId, member, 0, 0); - } - } + Object.assign(this, await loadFixture(fixture)); }); describe('during construction', function () { it('grants admin role to initialAdmin', async function () { - const manager = await AccessManager.new(other); - expect(await manager.hasRole(this.roles.ADMIN.id, other).then(formatAccess)).to.be.deep.equal([true, '0']); + const manager = await ethers.deployContract('$AccessManager', [this.other]); + expect(await manager.hasRole(this.roles.ADMIN.id, this.other).then(formatAccess)).to.be.deep.equal([true, '0']); }); it('rejects zero address for initialAdmin', async function () { - await expectRevertCustomError(AccessManager.new(constants.ZERO_ADDRESS), 'AccessManagerInvalidInitialAdmin', [ - constants.ZERO_ADDRESS, - ]); + await expect(ethers.deployContract('$AccessManager', [ethers.ZeroAddress])) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerInvalidInitialAdmin') + .withArgs(ZERO_ADDRESS); }); it('initializes setup roles correctly', async function () { for (const { id: roleId, admin, guardian, members } of Object.values(this.roles)) { - expect(await this.manager.getRoleAdmin(roleId)).to.be.bignumber.equal(admin.id); - expect(await this.manager.getRoleGuardian(roleId)).to.be.bignumber.equal(guardian.id); + expect(await this.manager.getRoleAdmin(roleId)).to.equal(admin.id); + expect(await this.manager.getRoleGuardian(roleId)).to.equal(guardian.id); for (const user of this.roles.PUBLIC.members) { expect(await this.manager.hasRole(roleId, user).then(formatAccess)).to.be.deep.equal([ @@ -125,7 +140,7 @@ contract('AccessManager', function (accounts) { describe('#canCall', function () { beforeEach('set calldata', function () { this.calldata = '0x12345678'; - this.role = { id: web3.utils.toBN(379204) }; + this.role = { id: 379204n }; }); testAsCanCall({ @@ -133,11 +148,11 @@ contract('AccessManager', function (accounts) { it('should return false and no delay', async function () { const { immediate, delay } = await this.manager.canCall( someAddress, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(false); - expect(delay).to.be.bignumber.equal('0'); + expect(immediate).to.be.false; + expect(delay).to.equal(0n); }); }, open: { @@ -146,22 +161,22 @@ contract('AccessManager', function (accounts) { it('should return true and no delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(true); - expect(delay).to.be.bignumber.equal('0'); + expect(immediate).to.be.true; + expect(delay).to.equal(0n); }); }, notExecuting() { it('should return false and no delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(false); - expect(delay).to.be.bignumber.equal('0'); + expect(immediate).to.be.false; + expect(delay).to.equal(0n); }); }, }, @@ -170,87 +185,76 @@ contract('AccessManager', function (accounts) { it('should return true and no delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(true); - expect(delay).to.be.bignumber.equal('0'); + expect(immediate).to.be.true; + expect(delay).to.equal(0n); }); }, specificRoleIsRequired: { requiredRoleIsGranted: { roleGrantingIsDelayed: { callerHasAnExecutionDelay: { - beforeGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + beforeGrantDelay: function self() { + self.mineDelay = true; it('should return false and no execution delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(false); - expect(delay).to.be.bignumber.equal('0'); + expect(immediate).to.be.false; + expect(delay).to.equal(0n); }); }, - afterGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); + afterGrantDelay: function self() { + self.mineDelay = true; + + beforeEach('sets execution delay', function () { this.scheduleIn = this.executionDelay; // For testAsSchedulableOperation }); testAsSchedulableOperation({ scheduled: { - before() { - beforeEach('consume previously set delay', async function () { - // Consume previously set delay - await mine(); - }); + before: function self() { + self.mineDelay = true; it('should return false and execution delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(false); - expect(delay).to.be.bignumber.equal(this.executionDelay); + expect(immediate).to.be.false; + expect(delay).to.equal(this.executionDelay); }); }, - after() { - beforeEach('consume previously set delay', async function () { - // Consume previously set delay - await mine(); - }); + after: function self() { + self.mineDelay = true; it('should return false and execution delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(false); - expect(delay).to.be.bignumber.equal(this.executionDelay); + expect(immediate).to.be.false; + expect(delay).to.equal(this.executionDelay); }); }, - expired() { - beforeEach('consume previously set delay', async function () { - // Consume previously set delay - await mine(); - }); + expired: function self() { + self.mineDelay = true; + it('should return false and execution delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(false); - expect(delay).to.be.bignumber.equal(this.executionDelay); + expect(immediate).to.be.false; + expect(delay).to.equal(this.executionDelay); }); }, }, @@ -258,47 +262,41 @@ contract('AccessManager', function (accounts) { it('should return false and execution delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(false); - expect(delay).to.be.bignumber.equal(this.executionDelay); + expect(immediate).to.be.false; + expect(delay).to.equal(this.executionDelay); }); }, }); }, }, callerHasNoExecutionDelay: { - beforeGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + beforeGrantDelay: function self() { + self.mineDelay = true; it('should return false and no execution delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(false); - expect(delay).to.be.bignumber.equal('0'); + expect(immediate).to.be.false; + expect(delay).to.equal(0n); }); }, - afterGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + afterGrantDelay: function self() { + self.mineDelay = true; it('should return true and no execution delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(true); - expect(delay).to.be.bignumber.equal('0'); + expect(immediate).to.be.true; + expect(delay).to.equal(0n); }); }, }, @@ -308,22 +306,22 @@ contract('AccessManager', function (accounts) { it('should return false and execution delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(false); - expect(delay).to.be.bignumber.equal(this.executionDelay); + expect(immediate).to.be.false; + expect(delay).to.equal(this.executionDelay); }); }, callerHasNoExecutionDelay() { it('should return true and no execution delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(true); - expect(delay).to.be.bignumber.equal('0'); + expect(immediate).to.be.true; + expect(delay).to.equal(0n); }); }, }, @@ -332,11 +330,11 @@ contract('AccessManager', function (accounts) { it('should return false and no execution delay', async function () { const { immediate, delay } = await this.manager.canCall( this.caller, - this.target.address, + this.target, this.calldata.substring(0, 10), ); - expect(immediate).to.be.equal(false); - expect(delay).to.be.bignumber.equal('0'); + expect(immediate).to.be.false; + expect(delay).to.equal(0n); }); }, }, @@ -347,13 +345,13 @@ contract('AccessManager', function (accounts) { describe('#expiration', function () { it('has a 7 days default expiration', async function () { - expect(await this.manager.expiration()).to.be.bignumber.equal(EXPIRATION); + expect(await this.manager.expiration()).to.equal(EXPIRATION); }); }); describe('#minSetback', function () { it('has a 5 days default minimum setback', async function () { - expect(await this.manager.minSetback()).to.be.bignumber.equal(MINSETBACK); + expect(await this.manager.minSetback()).to.equal(MINSETBACK); }); }); @@ -361,12 +359,12 @@ contract('AccessManager', function (accounts) { testAsClosable({ closed() { it('returns true', async function () { - expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(true); + expect(await this.manager.isTargetClosed(this.target)).to.be.true; }); }, open() { it('returns false', async function () { - expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(false); + expect(await this.manager.isTargetClosed(this.target)).to.be.false; }); }, }); @@ -376,94 +374,84 @@ contract('AccessManager', function (accounts) { const methodSelector = selector('something(address,bytes)'); it('returns the target function role', async function () { - const roleId = web3.utils.toBN(21498); - await this.manager.$_setTargetFunctionRole(this.target.address, methodSelector, roleId); + const roleId = 21498n; + await this.manager.$_setTargetFunctionRole(this.target, methodSelector, roleId); - expect(await this.manager.getTargetFunctionRole(this.target.address, methodSelector)).to.be.bignumber.equal( - roleId, - ); + expect(await this.manager.getTargetFunctionRole(this.target, methodSelector)).to.equal(roleId); }); it('returns the ADMIN role if not set', async function () { - expect(await this.manager.getTargetFunctionRole(this.target.address, methodSelector)).to.be.bignumber.equal( - this.roles.ADMIN.id, - ); + expect(await this.manager.getTargetFunctionRole(this.target, methodSelector)).to.equal(this.roles.ADMIN.id); }); }); describe('#getTargetAdminDelay', function () { describe('when the target admin delay is setup', function () { beforeEach('set target admin delay', async function () { - this.oldDelay = await this.manager.getTargetAdminDelay(this.target.address); + this.oldDelay = await this.manager.getTargetAdminDelay(this.target); this.newDelay = time.duration.days(10); - await this.manager.$_setTargetAdminDelay(this.target.address, this.newDelay); + await this.manager.$_setTargetAdminDelay(this.target, this.newDelay); this.delay = MINSETBACK; // For testAsDelay }); testAsDelay('effect', { - before() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + before: function self() { + self.mineDelay = true; it('returns the old target admin delay', async function () { - expect(await this.manager.getTargetAdminDelay(this.target.address)).to.be.bignumber.equal(this.oldDelay); + expect(await this.manager.getTargetAdminDelay(this.target)).to.equal(this.oldDelay); }); }, - after() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + after: function self() { + self.mineDelay = true; it('returns the new target admin delay', async function () { - expect(await this.manager.getTargetAdminDelay(this.target.address)).to.be.bignumber.equal(this.newDelay); + expect(await this.manager.getTargetAdminDelay(this.target)).to.equal(this.newDelay); }); }, }); }); it('returns the 0 if not set', async function () { - expect(await this.manager.getTargetAdminDelay(this.target.address)).to.be.bignumber.equal('0'); + expect(await this.manager.getTargetAdminDelay(this.target)).to.equal(0n); }); }); describe('#getRoleAdmin', function () { - const roleId = web3.utils.toBN(5234907); + const roleId = 5234907n; it('returns the role admin', async function () { - const adminId = web3.utils.toBN(789433); + const adminId = 789433n; await this.manager.$_setRoleAdmin(roleId, adminId); - expect(await this.manager.getRoleAdmin(roleId)).to.be.bignumber.equal(adminId); + expect(await this.manager.getRoleAdmin(roleId)).to.equal(adminId); }); it('returns the ADMIN role if not set', async function () { - expect(await this.manager.getRoleAdmin(roleId)).to.be.bignumber.equal(this.roles.ADMIN.id); + expect(await this.manager.getRoleAdmin(roleId)).to.equal(this.roles.ADMIN.id); }); }); describe('#getRoleGuardian', function () { - const roleId = web3.utils.toBN(5234907); + const roleId = 5234907n; it('returns the role guardian', async function () { - const guardianId = web3.utils.toBN(789433); + const guardianId = 789433n; await this.manager.$_setRoleGuardian(roleId, guardianId); - expect(await this.manager.getRoleGuardian(roleId)).to.be.bignumber.equal(guardianId); + expect(await this.manager.getRoleGuardian(roleId)).to.equal(guardianId); }); it('returns the ADMIN role if not set', async function () { - expect(await this.manager.getRoleGuardian(roleId)).to.be.bignumber.equal(this.roles.ADMIN.id); + expect(await this.manager.getRoleGuardian(roleId)).to.equal(this.roles.ADMIN.id); }); }); describe('#getRoleGrantDelay', function () { - const roleId = web3.utils.toBN(9248439); + const roleId = 9248439n; describe('when the grant admin delay is setup', function () { beforeEach('set grant admin delay', async function () { @@ -475,113 +463,95 @@ contract('AccessManager', function (accounts) { }); testAsDelay('grant', { - before() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + before: function self() { + self.mineDelay = true; it('returns the old role grant delay', async function () { - expect(await this.manager.getRoleGrantDelay(roleId)).to.be.bignumber.equal(this.oldDelay); + expect(await this.manager.getRoleGrantDelay(roleId)).to.equal(this.oldDelay); }); }, - after() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + after: function self() { + self.mineDelay = true; it('returns the new role grant delay', async function () { - expect(await this.manager.getRoleGrantDelay(roleId)).to.be.bignumber.equal(this.newDelay); + expect(await this.manager.getRoleGrantDelay(roleId)).to.equal(this.newDelay); }); }, }); }); it('returns 0 if delay is not set', async function () { - expect(await this.manager.getTargetAdminDelay(this.target.address)).to.be.bignumber.equal('0'); + expect(await this.manager.getTargetAdminDelay(this.target)).to.equal(0n); }); }); describe('#getAccess', function () { beforeEach('set role', function () { - this.role = { id: web3.utils.toBN(9452) }; - this.caller = user; + this.role = { id: 9452n }; + this.caller = this.user; }); testAsGetAccess({ requiredRoleIsGranted: { roleGrantingIsDelayed: { callerHasAnExecutionDelay: { - beforeGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + beforeGrantDelay: function self() { + self.mineDelay = true; it('role is not in effect and execution delay is set', async function () { const access = await this.manager.getAccess(this.role.id, this.caller); - expect(access[0]).to.be.bignumber.equal(this.delayEffect); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + expect(access[0]).to.equal(this.delayEffect); // inEffectSince + expect(access[1]).to.equal(this.executionDelay); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Not in effect yet - expect(await time.latest()).to.be.bignumber.lt(access[0]); + expect(await time.clock.timestamp()).to.lt(access[0]); }); }, - afterGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + afterGrantDelay: function self() { + self.mineDelay = true; it('access has role in effect and execution delay is set', async function () { const access = await this.manager.getAccess(this.role.id, this.caller); - expect(access[0]).to.be.bignumber.equal(this.delayEffect); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + expect(access[0]).to.equal(this.delayEffect); // inEffectSince + expect(access[1]).to.equal(this.executionDelay); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Already in effect - expect(await time.latest()).to.be.bignumber.equal(access[0]); + expect(await time.clock.timestamp()).to.equal(access[0]); }); }, }, callerHasNoExecutionDelay: { - beforeGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + beforeGrantDelay: function self() { + self.mineDelay = true; it('access has role not in effect without execution delay', async function () { const access = await this.manager.getAccess(this.role.id, this.caller); - expect(access[0]).to.be.bignumber.equal(this.delayEffect); // inEffectSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + expect(access[0]).to.equal(this.delayEffect); // inEffectSince + expect(access[1]).to.equal(0n); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Not in effect yet - expect(await time.latest()).to.be.bignumber.lt(access[0]); + expect(await time.clock.timestamp()).to.lt(access[0]); }); }, - afterGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + afterGrantDelay: function self() { + self.mineDelay = true; it('role is in effect without execution delay', async function () { const access = await this.manager.getAccess(this.role.id, this.caller); - expect(access[0]).to.be.bignumber.equal(this.delayEffect); // inEffectSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + expect(access[0]).to.equal(this.delayEffect); // inEffectSince + expect(access[1]).to.equal(0n); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Already in effect - expect(await time.latest()).to.be.bignumber.equal(access[0]); + expect(await time.clock.timestamp()).to.equal(access[0]); }); }, }, @@ -590,25 +560,25 @@ contract('AccessManager', function (accounts) { callerHasAnExecutionDelay() { it('access has role in effect and execution delay is set', async function () { const access = await this.manager.getAccess(this.role.id, this.caller); - expect(access[0]).to.be.bignumber.equal(await time.latest()); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + expect(access[0]).to.equal(await time.clock.timestamp()); // inEffectSince + expect(access[1]).to.equal(this.executionDelay); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Already in effect - expect(await time.latest()).to.be.bignumber.equal(access[0]); + expect(await time.clock.timestamp()).to.equal(access[0]); }); }, callerHasNoExecutionDelay() { it('access has role in effect without execution delay', async function () { const access = await this.manager.getAccess(this.role.id, this.caller); - expect(access[0]).to.be.bignumber.equal(await time.latest()); // inEffectSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + expect(access[0]).to.equal(await time.clock.timestamp()); // inEffectSince + expect(access[1]).to.equal(0n); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Already in effect - expect(await time.latest()).to.be.bignumber.equal(access[0]); + expect(await time.clock.timestamp()).to.equal(access[0]); }); }, }, @@ -616,10 +586,10 @@ contract('AccessManager', function (accounts) { requiredRoleIsNotGranted() { it('has empty access', async function () { const access = await this.manager.getAccess(this.role.id, this.caller); - expect(access[0]).to.be.bignumber.equal('0'); // inEffectSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + expect(access[0]).to.equal(0n); // inEffectSince + expect(access[1]).to.equal(0n); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect }); }, }); @@ -627,9 +597,9 @@ contract('AccessManager', function (accounts) { describe('#hasRole', function () { beforeEach('setup testAsHasRole', function () { - this.role = { id: web3.utils.toBN(49832) }; - this.calldata = '0x1234'; - this.caller = user; + this.role = { id: 49832n }; + this.calldata = '0x12345678'; + this.caller = this.user; }); testAsHasRole({ @@ -637,61 +607,49 @@ contract('AccessManager', function (accounts) { it('has PUBLIC role', async function () { const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); expect(isMember).to.be.true; - expect(executionDelay).to.be.bignumber.eq('0'); + expect(executionDelay).to.equal('0'); }); }, specificRoleIsRequired: { requiredRoleIsGranted: { roleGrantingIsDelayed: { callerHasAnExecutionDelay: { - beforeGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + beforeGrantDelay: function self() { + self.mineDelay = true; it('does not have role but execution delay', async function () { const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); expect(isMember).to.be.false; - expect(executionDelay).to.be.bignumber.eq(this.executionDelay); + expect(executionDelay).to.equal(this.executionDelay); }); }, - afterGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + afterGrantDelay: function self() { + self.mineDelay = true; it('has role and execution delay', async function () { const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); expect(isMember).to.be.true; - expect(executionDelay).to.be.bignumber.eq(this.executionDelay); + expect(executionDelay).to.equal(this.executionDelay); }); }, }, callerHasNoExecutionDelay: { - beforeGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + beforeGrantDelay: function self() { + self.mineDelay = true; it('does not have role nor execution delay', async function () { const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); expect(isMember).to.be.false; - expect(executionDelay).to.be.bignumber.eq('0'); + expect(executionDelay).to.equal('0'); }); }, - afterGrantDelay() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + afterGrantDelay: function self() { + self.mineDelay = true; it('has role and no execution delay', async function () { const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); expect(isMember).to.be.true; - expect(executionDelay).to.be.bignumber.eq('0'); + expect(executionDelay).to.equal('0'); }); }, }, @@ -701,14 +659,14 @@ contract('AccessManager', function (accounts) { it('has role and execution delay', async function () { const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); expect(isMember).to.be.true; - expect(executionDelay).to.be.bignumber.eq(this.executionDelay); + expect(executionDelay).to.equal(this.executionDelay); }); }, callerHasNoExecutionDelay() { it('has role and no execution delay', async function () { const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); expect(isMember).to.be.true; - expect(executionDelay).to.be.bignumber.eq('0'); + expect(executionDelay).to.equal('0'); }); }, }, @@ -717,7 +675,7 @@ contract('AccessManager', function (accounts) { it('has no role and no execution delay', async function () { const { isMember, executionDelay } = await this.manager.hasRole(this.role.id, this.caller); expect(isMember).to.be.false; - expect(executionDelay).to.be.bignumber.eq('0'); + expect(executionDelay).to.equal('0'); }); }, }, @@ -726,56 +684,47 @@ contract('AccessManager', function (accounts) { describe('#getSchedule', function () { beforeEach('set role and calldata', async function () { - const method = 'fnRestricted()'; - this.caller = user; - this.role = { id: web3.utils.toBN(493590) }; - await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + const fnRestricted = this.target.fnRestricted.getFragment().selector; + this.caller = this.user; + this.role = { id: 493590n }; + await this.manager.$_setTargetFunctionRole(this.target, fnRestricted, this.role.id); await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // nonzero execution delay - this.calldata = this.target.contract.methods[method]().encodeABI(); + this.calldata = this.target.interface.encodeFunctionData(fnRestricted, []); this.scheduleIn = time.duration.days(10); // For testAsSchedulableOperation }); testAsSchedulableOperation({ scheduled: { - before() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + before: function self() { + self.mineDelay = true; it('returns schedule in the future', async function () { const schedule = await this.manager.getSchedule(this.operationId); - expect(schedule).to.be.bignumber.equal(this.scheduledAt.add(this.scheduleIn)); - expect(schedule).to.be.bignumber.gt(await time.latest()); + expect(schedule).to.equal(this.scheduledAt + this.scheduleIn); + expect(schedule).to.gt(await time.clock.timestamp()); }); }, - after() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + after: function self() { + self.mineDelay = true; it('returns schedule', async function () { const schedule = await this.manager.getSchedule(this.operationId); - expect(schedule).to.be.bignumber.equal(this.scheduledAt.add(this.scheduleIn)); - expect(schedule).to.be.bignumber.eq(await time.latest()); + expect(schedule).to.equal(this.scheduledAt + this.scheduleIn); + expect(schedule).to.equal(await time.clock.timestamp()); }); }, - expired() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + expired: function self() { + self.mineDelay = true; it('returns 0', async function () { - expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal('0'); + expect(await this.manager.getSchedule(this.operationId)).to.equal(0n); }); }, }, notScheduled() { it('defaults to 0', async function () { - expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal('0'); + expect(await this.manager.getSchedule(this.operationId)).to.equal(0n); }); }, }); @@ -784,32 +733,33 @@ contract('AccessManager', function (accounts) { describe('#getNonce', function () { describe('when operation is scheduled', function () { beforeEach('schedule operation', async function () { - const method = 'fnRestricted()'; - this.caller = user; - this.role = { id: web3.utils.toBN(4209043) }; - await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + const fnRestricted = this.target.fnRestricted.getFragment().selector; + this.caller = this.user; + this.role = { id: 4209043n }; + await this.manager.$_setTargetFunctionRole(this.target, fnRestricted, this.role.id); await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // nonzero execution delay - this.calldata = this.target.contract.methods[method]().encodeABI(); + this.calldata = this.target.interface.encodeFunctionData(fnRestricted, []); this.delay = time.duration.days(10); - const { operationId } = await scheduleOperation(this.manager, { + const { operationId, schedule } = await prepareOperation(this.manager, { caller: this.caller, - target: this.target.address, + target: this.target, calldata: this.calldata, delay: this.delay, }); + await schedule(); this.operationId = operationId; }); it('returns nonce', async function () { - expect(await this.manager.getNonce(this.operationId)).to.be.bignumber.equal('1'); + expect(await this.manager.getNonce(this.operationId)).to.equal(1n); }); }); describe('when is not scheduled', function () { it('returns default 0', async function () { - expect(await this.manager.getNonce(web3.utils.keccak256('operation'))).to.be.bignumber.equal('0'); + expect(await this.manager.getNonce(id('operation'))).to.equal(0n); }); }); }); @@ -819,9 +769,9 @@ contract('AccessManager', function (accounts) { const calldata = '0x123543'; const address = someAddress; - const args = [user, address, calldata]; + const args = [this.user.address, address, calldata]; - expect(await this.manager.hashOperation(...args)).to.be.bignumber.eq(hashOperation(...args)); + expect(await this.manager.hashOperation(...args)).to.equal(hashOperation(...args)); }); }); }); @@ -835,167 +785,147 @@ contract('AccessManager', function (accounts) { describe('#labelRole', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const method = 'labelRole(uint64,string)'; const args = [123443, 'TEST']; - this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + const method = this.manager.interface.getFunction('labelRole(uint64,string)'); + this.calldata = this.manager.interface.encodeFunctionData(method, args); }); shouldBehaveLikeDelayedAdminOperation(); }); it('emits an event with the label', async function () { - expectEvent(await this.manager.labelRole(this.roles.SOME.id, 'Some label', { from: admin }), 'RoleLabel', { - roleId: this.roles.SOME.id, - label: 'Some label', - }); + await expect(this.manager.connect(this.admin).labelRole(this.roles.SOME.id, 'Some label')) + .to.emit(this.manager, 'RoleLabel') + .withArgs(this.roles.SOME.id, 'Some label'); }); it('updates label on a second call', async function () { - await this.manager.labelRole(this.roles.SOME.id, 'Some label', { from: admin }); + await this.manager.connect(this.admin).labelRole(this.roles.SOME.id, 'Some label'); - expectEvent(await this.manager.labelRole(this.roles.SOME.id, 'Updated label', { from: admin }), 'RoleLabel', { - roleId: this.roles.SOME.id, - label: 'Updated label', - }); + await expect(this.manager.connect(this.admin).labelRole(this.roles.SOME.id, 'Updated label')) + .to.emit(this.manager, 'RoleLabel') + .withArgs(this.roles.SOME.id, 'Updated label'); }); it('reverts labeling PUBLIC_ROLE', async function () { - await expectRevertCustomError( - this.manager.labelRole(this.roles.PUBLIC.id, 'Some label', { from: admin }), - 'AccessManagerLockedRole', - [this.roles.PUBLIC.id], - ); + await expect(this.manager.connect(this.admin).labelRole(this.roles.PUBLIC.id, 'Some label')) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedRole') + .withArgs(this.roles.PUBLIC.id); }); it('reverts labeling ADMIN_ROLE', async function () { - await expectRevertCustomError( - this.manager.labelRole(this.roles.ADMIN.id, 'Some label', { from: admin }), - 'AccessManagerLockedRole', - [this.roles.ADMIN.id], - ); + await expect(this.manager.connect(this.admin).labelRole(this.roles.ADMIN.id, 'Some label')) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedRole') + .withArgs(this.roles.ADMIN.id); }); }); describe('#setRoleAdmin', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const method = 'setRoleAdmin(uint64,uint64)'; const args = [93445, 84532]; - this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + const method = this.manager.interface.getFunction('setRoleAdmin(uint64,uint64)'); + this.calldata = this.manager.interface.encodeFunctionData(method, args); }); shouldBehaveLikeDelayedAdminOperation(); }); it("sets any role's admin if called by an admin", async function () { - expect(await this.manager.getRoleAdmin(this.roles.SOME.id)).to.be.bignumber.equal(this.roles.SOME_ADMIN.id); + expect(await this.manager.getRoleAdmin(this.roles.SOME.id)).to.equal(this.roles.SOME_ADMIN.id); - const { receipt } = await this.manager.setRoleAdmin(this.roles.SOME.id, this.roles.ADMIN.id, { from: admin }); - expectEvent(receipt, 'RoleAdminChanged', { roleId: this.roles.SOME.id, admin: this.roles.ADMIN.id }); + await expect(this.manager.connect(this.admin).setRoleAdmin(this.roles.SOME.id, this.roles.ADMIN.id)) + .to.emit(this.manager, 'RoleAdminChanged') + .withArgs(this.roles.SOME.id, this.roles.ADMIN.id); - expect(await this.manager.getRoleAdmin(this.roles.SOME.id)).to.be.bignumber.equal(this.roles.ADMIN.id); + expect(await this.manager.getRoleAdmin(this.roles.SOME.id)).to.equal(this.roles.ADMIN.id); }); it('reverts setting PUBLIC_ROLE admin', async function () { - await expectRevertCustomError( - this.manager.setRoleAdmin(this.roles.PUBLIC.id, this.roles.ADMIN.id, { from: admin }), - 'AccessManagerLockedRole', - [this.roles.PUBLIC.id], - ); + await expect(this.manager.connect(this.admin).setRoleAdmin(this.roles.PUBLIC.id, this.roles.ADMIN.id)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedRole') + .withArgs(this.roles.PUBLIC.id); }); it('reverts setting ADMIN_ROLE admin', async function () { - await expectRevertCustomError( - this.manager.setRoleAdmin(this.roles.ADMIN.id, this.roles.ADMIN.id, { from: admin }), - 'AccessManagerLockedRole', - [this.roles.ADMIN.id], - ); + await expect(this.manager.connect(this.admin).setRoleAdmin(this.roles.ADMIN.id, this.roles.ADMIN.id)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedRole') + .withArgs(this.roles.ADMIN.id); }); }); describe('#setRoleGuardian', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const method = 'setRoleGuardian(uint64,uint64)'; const args = [93445, 84532]; - this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + const method = this.manager.interface.getFunction('setRoleGuardian(uint64,uint64)'); + this.calldata = this.manager.interface.encodeFunctionData(method, args); }); shouldBehaveLikeDelayedAdminOperation(); }); it("sets any role's guardian if called by an admin", async function () { - expect(await this.manager.getRoleGuardian(this.roles.SOME.id)).to.be.bignumber.equal( - this.roles.SOME_GUARDIAN.id, - ); + expect(await this.manager.getRoleGuardian(this.roles.SOME.id)).to.equal(this.roles.SOME_GUARDIAN.id); - const { receipt } = await this.manager.setRoleGuardian(this.roles.SOME.id, this.roles.ADMIN.id, { - from: admin, - }); - expectEvent(receipt, 'RoleGuardianChanged', { roleId: this.roles.SOME.id, guardian: this.roles.ADMIN.id }); + await expect(this.manager.connect(this.admin).setRoleGuardian(this.roles.SOME.id, this.roles.ADMIN.id)) + .to.emit(this.manager, 'RoleGuardianChanged') + .withArgs(this.roles.SOME.id, this.roles.ADMIN.id); - expect(await this.manager.getRoleGuardian(this.roles.SOME.id)).to.be.bignumber.equal(this.roles.ADMIN.id); + expect(await this.manager.getRoleGuardian(this.roles.SOME.id)).to.equal(this.roles.ADMIN.id); }); it('reverts setting PUBLIC_ROLE admin', async function () { - await expectRevertCustomError( - this.manager.setRoleGuardian(this.roles.PUBLIC.id, this.roles.ADMIN.id, { from: admin }), - 'AccessManagerLockedRole', - [this.roles.PUBLIC.id], - ); + await expect(this.manager.connect(this.admin).setRoleGuardian(this.roles.PUBLIC.id, this.roles.ADMIN.id)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedRole') + .withArgs(this.roles.PUBLIC.id); }); it('reverts setting ADMIN_ROLE admin', async function () { - await expectRevertCustomError( - this.manager.setRoleGuardian(this.roles.ADMIN.id, this.roles.ADMIN.id, { from: admin }), - 'AccessManagerLockedRole', - [this.roles.ADMIN.id], - ); + await expect(this.manager.connect(this.admin).setRoleGuardian(this.roles.ADMIN.id, this.roles.ADMIN.id)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedRole') + .withArgs(this.roles.ADMIN.id); }); }); describe('#setGrantDelay', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const method = 'setGrantDelay(uint64,uint32)'; const args = [984910, time.duration.days(2)]; - this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + const method = this.manager.interface.getFunction('setGrantDelay(uint64,uint32)'); + this.calldata = this.manager.interface.encodeFunctionData(method, args); }); shouldBehaveLikeDelayedAdminOperation(); }); - it('reverts setting grant delay for the PUBLIC_ROLE', async function () { - await expectRevertCustomError( - this.manager.setGrantDelay(this.roles.PUBLIC.id, web3.utils.toBN(69), { from: admin }), - 'AccessManagerLockedRole', - [this.roles.PUBLIC.id], - ); + it('reverts setting grant delay for the PUBLIC_ROLE', function () { + expect(this.manager.connect(this.admin).setGrantDelay(this.roles.PUBLIC.id, 69n)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedRole') + .withArgs(this.roles.PUBLIC.id); }); describe('when increasing the delay', function () { - const oldDelay = web3.utils.toBN(10); - const newDelay = web3.utils.toBN(100); + const oldDelay = 10n; + const newDelay = 100n; beforeEach('sets old delay', async function () { this.role = this.roles.SOME; await this.manager.$_setGrantDelay(this.role.id, oldDelay); - await time.increase(MINSETBACK); - expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(oldDelay); + await increase(MINSETBACK); + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(oldDelay); }); it('increases the delay after minsetback', async function () { - const { receipt } = await this.manager.setGrantDelay(this.role.id, newDelay, { from: admin }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'RoleGrantDelayChanged', { - roleId: this.role.id, - delay: newDelay, - since: timestamp.add(MINSETBACK), - }); - - expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(oldDelay); - await time.increase(MINSETBACK); - expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(newDelay); + const txResponse = await this.manager.connect(this.admin).setGrantDelay(this.role.id, newDelay); + const setGrantDelayAt = await time.clockFromReceipt.timestamp(txResponse); + expect(txResponse) + .to.emit(this.manager, 'RoleGrantDelayChanged') + .withArgs(this.role.id, newDelay, setGrantDelayAt + MINSETBACK); + + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(oldDelay); + await increase(MINSETBACK); + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(newDelay); }); }); @@ -1005,48 +935,46 @@ contract('AccessManager', function (accounts) { beforeEach('sets old delay', async function () { this.role = this.roles.SOME; await this.manager.$_setGrantDelay(this.role.id, oldDelay); - await time.increase(MINSETBACK); - expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(oldDelay); + await increase(MINSETBACK); + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(oldDelay); }); describe('when the delay difference is shorter than minimum setback', function () { - const newDelay = oldDelay.subn(1); + const newDelay = oldDelay - 1n; it('increases the delay after minsetback', async function () { - const { receipt } = await this.manager.setGrantDelay(this.role.id, newDelay, { from: admin }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'RoleGrantDelayChanged', { - roleId: this.role.id, - delay: newDelay, - since: timestamp.add(MINSETBACK), - }); - - expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(oldDelay); - await time.increase(MINSETBACK); - expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(newDelay); + const txResponse = await this.manager.connect(this.admin).setGrantDelay(this.role.id, newDelay); + const setGrantDelayAt = await time.clockFromReceipt.timestamp(txResponse); + expect(txResponse) + .to.emit(this.manager, 'RoleGrantDelayChanged') + .withArgs(this.role.id, newDelay, setGrantDelayAt + MINSETBACK); + + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(oldDelay); + await increase(MINSETBACK); + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(newDelay); }); }); describe('when the delay difference is longer than minimum setback', function () { - const newDelay = web3.utils.toBN(1); + const newDelay = 1n; beforeEach('assert delay difference is higher than minsetback', function () { - expect(oldDelay.sub(newDelay)).to.be.bignumber.gt(MINSETBACK); + expect(oldDelay - newDelay).to.gt(MINSETBACK); }); it('increases the delay after delay difference', async function () { - const setback = oldDelay.sub(newDelay); - const { receipt } = await this.manager.setGrantDelay(this.role.id, newDelay, { from: admin }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'RoleGrantDelayChanged', { - roleId: this.role.id, - delay: newDelay, - since: timestamp.add(setback), - }); + const setback = oldDelay - newDelay; + + const txResponse = await this.manager.connect(this.admin).setGrantDelay(this.role.id, newDelay); + const setGrantDelayAt = await time.clockFromReceipt.timestamp(txResponse); + + expect(txResponse) + .to.emit(this.manager, 'RoleGrantDelayChanged') + .withArgs(this.role.id, newDelay, setGrantDelayAt + setback); - expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(oldDelay); - await time.increase(setback); - expect(await this.manager.getRoleGrantDelay(this.role.id)).to.be.bignumber.equal(newDelay); + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(oldDelay); + await increase(setback); + expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(newDelay); }); }); }); @@ -1055,9 +983,9 @@ contract('AccessManager', function (accounts) { describe('#setTargetAdminDelay', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const method = 'setTargetAdminDelay(address,uint32)'; const args = [someAddress, time.duration.days(3)]; - this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + const method = this.manager.interface.getFunction('setTargetAdminDelay(address,uint32)'); + this.calldata = this.manager.interface.encodeFunctionData(method, args); }); shouldBehaveLikeDelayedAdminOperation(); @@ -1070,22 +998,20 @@ contract('AccessManager', function (accounts) { beforeEach('sets old delay', async function () { await this.manager.$_setTargetAdminDelay(target, oldDelay); - await time.increase(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(oldDelay); + await increase(MINSETBACK); + expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); }); it('increases the delay after minsetback', async function () { - const { receipt } = await this.manager.setTargetAdminDelay(target, newDelay, { from: admin }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'TargetAdminDelayUpdated', { - target, - delay: newDelay, - since: timestamp.add(MINSETBACK), - }); - - expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(oldDelay); - await time.increase(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(newDelay); + const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(target, newDelay); + const setTargetAdminDelayAt = await time.clockFromReceipt.timestamp(txResponse); + expect(txResponse) + .to.emit(this.manager, 'TargetAdminDelayUpdated') + .withArgs(target, newDelay, setTargetAdminDelayAt + MINSETBACK); + + expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + await increase(MINSETBACK); + expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); }); }); @@ -1095,48 +1021,46 @@ contract('AccessManager', function (accounts) { beforeEach('sets old delay', async function () { await this.manager.$_setTargetAdminDelay(target, oldDelay); - await time.increase(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(oldDelay); + await increase(MINSETBACK); + expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); }); describe('when the delay difference is shorter than minimum setback', function () { - const newDelay = oldDelay.subn(1); + const newDelay = oldDelay - 1n; it('increases the delay after minsetback', async function () { - const { receipt } = await this.manager.setTargetAdminDelay(target, newDelay, { from: admin }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'TargetAdminDelayUpdated', { - target, - delay: newDelay, - since: timestamp.add(MINSETBACK), - }); - - expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(oldDelay); - await time.increase(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(newDelay); + const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(target, newDelay); + const setTargetAdminDelayAt = await time.clockFromReceipt.timestamp(txResponse); + expect(txResponse) + .to.emit(this.manager, 'TargetAdminDelayUpdated') + .withArgs(target, newDelay, setTargetAdminDelayAt + MINSETBACK); + + expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + await increase(MINSETBACK); + expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); }); }); describe('when the delay difference is longer than minimum setback', function () { - const newDelay = web3.utils.toBN(1); + const newDelay = 1n; beforeEach('assert delay difference is higher than minsetback', function () { - expect(oldDelay.sub(newDelay)).to.be.bignumber.gt(MINSETBACK); + expect(oldDelay - newDelay).to.gt(MINSETBACK); }); it('increases the delay after delay difference', async function () { - const setback = oldDelay.sub(newDelay); - const { receipt } = await this.manager.setTargetAdminDelay(target, newDelay, { from: admin }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'TargetAdminDelayUpdated', { - target, - delay: newDelay, - since: timestamp.add(setback), - }); + const setback = oldDelay - newDelay; + + const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(target, newDelay); + const setTargetAdminDelayAt = await time.clockFromReceipt.timestamp(txResponse); + + expect(txResponse) + .to.emit(this.manager, 'TargetAdminDelayUpdated') + .withArgs(target, newDelay, setTargetAdminDelayAt + setback); - expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(oldDelay); - await time.increase(setback); - expect(await this.manager.getTargetAdminDelay(target)).to.be.bignumber.equal(newDelay); + expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + await increase(setback); + expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); }); }); }); @@ -1146,73 +1070,68 @@ contract('AccessManager', function (accounts) { describe('not subject to a delay', function () { describe('#updateAuthority', function () { beforeEach('create a target and a new authority', async function () { - this.newAuthority = await AccessManager.new(admin); - this.newManagedTarget = await AccessManagedTarget.new(this.manager.address); + this.newAuthority = await ethers.deployContract('$AccessManager', [this.admin]); + this.newManagedTarget = await ethers.deployContract('$AccessManagedTarget', [this.manager]); }); describe('restrictions', function () { beforeEach('set method and args', function () { - const method = 'updateAuthority(address,address)'; - const args = [this.newManagedTarget.address, this.newAuthority.address]; - this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + this.calldata = this.manager.interface.encodeFunctionData('updateAuthority(address,address)', [ + this.newManagedTarget.target, + this.newAuthority.target, + ]); }); shouldBehaveLikeNotDelayedAdminOperation(); }); it('changes the authority', async function () { - expect(await this.newManagedTarget.authority()).to.be.equal(this.manager.address); + expect(await this.newManagedTarget.authority()).to.be.equal(this.manager.target); - const { tx } = await this.manager.updateAuthority(this.newManagedTarget.address, this.newAuthority.address, { - from: admin, - }); + await expect(this.manager.connect(this.admin).updateAuthority(this.newManagedTarget, this.newAuthority)) + .to.emit(this.newManagedTarget, 'AuthorityUpdated') // Managed contract is responsible of notifying the change through an event + .withArgs(this.newAuthority.target); - // Managed contract is responsible of notifying the change through an event - await expectEvent.inTransaction(tx, this.newManagedTarget, 'AuthorityUpdated', { - authority: this.newAuthority.address, - }); - - expect(await this.newManagedTarget.authority()).to.be.equal(this.newAuthority.address); + expect(await this.newManagedTarget.authority()).to.be.equal(this.newAuthority.target); }); }); describe('#setTargetClosed', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const method = 'setTargetClosed(address,bool)'; const args = [someAddress, true]; - this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + const method = this.manager.interface.getFunction('setTargetClosed(address,bool)'); + this.calldata = this.manager.interface.encodeFunctionData(method, args); }); shouldBehaveLikeNotDelayedAdminOperation(); }); it('closes and opens a target', async function () { - const close = await this.manager.setTargetClosed(this.target.address, true, { from: admin }); - expectEvent(close.receipt, 'TargetClosed', { target: this.target.address, closed: true }); - - expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(true); - - const open = await this.manager.setTargetClosed(this.target.address, false, { from: admin }); - expectEvent(open.receipt, 'TargetClosed', { target: this.target.address, closed: false }); - expect(await this.manager.isTargetClosed(this.target.address)).to.be.equal(false); + await expect(this.manager.connect(this.admin).setTargetClosed(this.target, true)) + .to.emit(this.manager, 'TargetClosed') + .withArgs(this.target.target, true); + expect(await this.manager.isTargetClosed(this.target)).to.be.true; + + await expect(this.manager.connect(this.admin).setTargetClosed(this.target, false)) + .to.emit(this.manager, 'TargetClosed') + .withArgs(this.target.target, false); + expect(await this.manager.isTargetClosed(this.target)).to.be.false; }); it('reverts if closing the manager', async function () { - await expectRevertCustomError( - this.manager.setTargetClosed(this.manager.address, true, { from: admin }), - 'AccessManagerLockedAccount', - [this.manager.address], - ); + await expect(this.manager.connect(this.admin).setTargetClosed(this.manager, true)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedAccount') + .withArgs(this.manager.target); }); }); describe('#setTargetFunctionRole', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const method = 'setTargetFunctionRole(address,bytes4[],uint64)'; const args = [someAddress, ['0x12345678'], 443342]; - this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + const method = this.manager.interface.getFunction('setTargetFunctionRole(address,bytes4[],uint64)'); + this.calldata = this.manager.interface.encodeFunctionData(method, args); }); shouldBehaveLikeNotDelayedAdminOperation(); @@ -1222,47 +1141,28 @@ contract('AccessManager', function (accounts) { it('sets function roles', async function () { for (const sig of sigs) { - expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal( - this.roles.ADMIN.id, - ); + expect(await this.manager.getTargetFunctionRole(this.target, sig)).to.equal(this.roles.ADMIN.id); } - const { receipt: receipt1 } = await this.manager.setTargetFunctionRole( - this.target.address, - sigs, - this.roles.SOME.id, - { - from: admin, - }, - ); + const allowRole = await this.manager + .connect(this.admin) + .setTargetFunctionRole(this.target, sigs, this.roles.SOME.id); for (const sig of sigs) { - expectEvent(receipt1, 'TargetFunctionRoleUpdated', { - target: this.target.address, - selector: sig, - roleId: this.roles.SOME.id, - }); - expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal( - this.roles.SOME.id, - ); + expect(allowRole) + .to.emit(this.manager, 'TargetFunctionRoleUpdated') + .withArgs(this.target.target, sig, this.roles.SOME.id); + expect(await this.manager.getTargetFunctionRole(this.target, sig)).to.equal(this.roles.SOME.id); } - const { receipt: receipt2 } = await this.manager.setTargetFunctionRole( - this.target.address, - [sigs[1]], - this.roles.SOME_ADMIN.id, - { - from: admin, - }, - ); - expectEvent(receipt2, 'TargetFunctionRoleUpdated', { - target: this.target.address, - selector: sigs[1], - roleId: this.roles.SOME_ADMIN.id, - }); + await expect( + this.manager.connect(this.admin).setTargetFunctionRole(this.target, [sigs[1]], this.roles.SOME_ADMIN.id), + ) + .to.emit(this.manager, 'TargetFunctionRoleUpdated') + .withArgs(this.target.target, sigs[1], this.roles.SOME_ADMIN.id); for (const sig of sigs) { - expect(await this.manager.getTargetFunctionRole(this.target.address, sig)).to.be.bignumber.equal( + expect(await this.manager.getTargetFunctionRole(this.target, sig)).to.equal( sig == sigs[1] ? this.roles.SOME_ADMIN.id : this.roles.SOME.id, ); } @@ -1270,38 +1170,33 @@ contract('AccessManager', function (accounts) { }); describe('role admin operations', function () { - const ANOTHER_ADMIN = web3.utils.toBN(0xdeadc0de1); - const ANOTHER_ROLE = web3.utils.toBN(0xdeadc0de2); + const ANOTHER_ADMIN = 0xdeadc0de1n; + const ANOTHER_ROLE = 0xdeadc0de2n; beforeEach('set required role', async function () { // Make admin a member of ANOTHER_ADMIN - await this.manager.$_grantRole(ANOTHER_ADMIN, admin, 0, 0); + await this.manager.$_grantRole(ANOTHER_ADMIN, this.admin, 0, 0); await this.manager.$_setRoleAdmin(ANOTHER_ROLE, ANOTHER_ADMIN); this.role = { id: ANOTHER_ADMIN }; - this.user = user; await this.manager.$_grantRole(this.role.id, this.user, 0, 0); }); describe('#grantRole', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const method = 'grantRole(uint64,address,uint32)'; const args = [ANOTHER_ROLE, someAddress, 0]; - this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + const method = this.manager.interface.getFunction('grantRole(uint64,address,uint32)'); + this.calldata = this.manager.interface.encodeFunctionData(method, args); }); shouldBehaveLikeRoleAdminOperation(ANOTHER_ADMIN); }); it('reverts when granting PUBLIC_ROLE', async function () { - await expectRevertCustomError( - this.manager.grantRole(this.roles.PUBLIC.id, user, 0, { - from: admin, - }), - 'AccessManagerLockedRole', - [this.roles.PUBLIC.id], - ); + await expect(this.manager.connect(this.admin).grantRole(this.roles.PUBLIC.id, this.user, 0)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedRole') + .withArgs(this.roles.PUBLIC.id); }); describe('when the user is not a role member', function () { @@ -1310,7 +1205,7 @@ contract('AccessManager', function (accounts) { // Delay granting this.grantDelay = time.duration.weeks(2); await this.manager.$_setGrantDelay(ANOTHER_ROLE, this.grantDelay); - await time.increase(MINSETBACK); + await increase(MINSETBACK); // Grant role this.executionDelay = time.duration.days(3); @@ -1318,74 +1213,59 @@ contract('AccessManager', function (accounts) { false, '0', ]); - const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.executionDelay, { - from: admin, - }); - this.receipt = receipt; + this.txResponse = await this.manager + .connect(this.admin) + .grantRole(ANOTHER_ROLE, this.user, this.executionDelay); this.delay = this.grantDelay; // For testAsDelay }); testAsDelay('grant', { - before() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + before: function self() { + self.mineDelay = true; it('does not grant role to the user yet', async function () { - const timestamp = await clockFromReceipt.timestamp(this.receipt).then(web3.utils.toBN); - expectEvent(this.receipt, 'RoleGranted', { - roleId: ANOTHER_ROLE, - account: this.user, - since: timestamp.add(this.grantDelay), - delay: this.executionDelay, - newMember: true, - }); + const timestamp = await time.clockFromReceipt.timestamp(this.txResponse); + expect(this.txResponse) + .to.emit(this.manager, 'RoleGranted') + .withArgs(ANOTHER_ROLE, this.user, timestamp + this.grantDelay, this.executionDelay, true); // Access is correctly stored - const access = await this.manager.getAccess(ANOTHER_ROLE, user); - expect(access[0]).to.be.bignumber.equal(timestamp.add(this.grantDelay)); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); + expect(access[0]).to.equal(timestamp + this.grantDelay); // inEffectSince + expect(access[1]).to.equal(this.executionDelay); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Not in effect yet - const currentTimestamp = await time.latest(); - expect(currentTimestamp).to.be.a.bignumber.lt(access[0]); - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + const currentTimestamp = await time.clock.timestamp(); + expect(currentTimestamp).to.be.lt(access[0]); + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ false, this.executionDelay.toString(), ]); }); }, - after() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + after: function self() { + self.mineDelay = true; it('grants role to the user', async function () { - const timestamp = await clockFromReceipt.timestamp(this.receipt).then(web3.utils.toBN); - expectEvent(this.receipt, 'RoleGranted', { - roleId: ANOTHER_ROLE, - account: this.user, - since: timestamp.add(this.grantDelay), - delay: this.executionDelay, - newMember: true, - }); + const timestamp = await time.clockFromReceipt.timestamp(this.txResponse); + expect(this.txResponse) + .to.emit(this.manager, 'RoleAccessRequested') + .withArgs(ANOTHER_ROLE, this.user, timestamp + this.grantDelay, this.executionDelay, true); // Access is correctly stored - const access = await this.manager.getAccess(ANOTHER_ROLE, user); - expect(access[0]).to.be.bignumber.equal(timestamp.add(this.grantDelay)); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); + expect(access[0]).to.equal(timestamp + this.grantDelay); // inEffectSince + expect(access[1]).to.equal(this.executionDelay); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Already in effect - const currentTimestamp = await time.latest(); - expect(currentTimestamp).to.be.a.bignumber.equal(access[0]); - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + const currentTimestamp = await time.clock.timestamp(); + expect(currentTimestamp).to.be.equal(access[0]); + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ true, this.executionDelay.toString(), ]); @@ -1399,41 +1279,36 @@ contract('AccessManager', function (accounts) { // Delay granting this.grantDelay = 0; await this.manager.$_setGrantDelay(ANOTHER_ROLE, this.grantDelay); - await time.increase(MINSETBACK); + await increase(MINSETBACK); }); it('immediately grants the role to the user', async function () { - this.executionDelay = time.duration.days(6); + const executionDelay = time.duration.days(6); expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ false, '0', ]); - const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.executionDelay, { - from: admin, - }); - - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - expectEvent(receipt, 'RoleGranted', { - roleId: ANOTHER_ROLE, - account: this.user, - since: timestamp, - delay: this.executionDelay, - newMember: true, - }); + const txResponse = await this.manager + .connect(this.admin) + .grantRole(ANOTHER_ROLE, this.user, executionDelay); + const grantedAt = await time.clockFromReceipt.timestamp(txResponse); + expect(txResponse) + .to.emit(this.manager, 'RoleGranted') + .withArgs(ANOTHER_ROLE, this.user.address, executionDelay, grantedAt, true); // Access is correctly stored - const access = await this.manager.getAccess(ANOTHER_ROLE, user); - expect(access[0]).to.be.bignumber.equal(timestamp); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.executionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); + expect(access[0]).to.equal(grantedAt); // inEffectSince + expect(access[1]).to.equal(executionDelay); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Already in effect - const currentTimestamp = await time.latest(); - expect(currentTimestamp).to.be.a.bignumber.equal(access[0]); - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + const currentTimestamp = await time.clock.timestamp(); + expect(currentTimestamp).to.be.equal(access[0]); + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ true, - this.executionDelay.toString(), + executionDelay.toString(), ]); }); }); @@ -1443,7 +1318,7 @@ contract('AccessManager', function (accounts) { beforeEach('make user role member', async function () { this.previousExecutionDelay = time.duration.days(6); await this.manager.$_grantRole(ANOTHER_ROLE, this.user, 0, this.previousExecutionDelay); - this.oldAccess = await this.manager.getAccess(ANOTHER_ROLE, user); + this.oldAccess = await this.manager.getAccess(ANOTHER_ROLE, this.user); }); describe('with grant delay', function () { @@ -1451,7 +1326,7 @@ contract('AccessManager', function (accounts) { // Delay granting const grantDelay = time.duration.weeks(2); await this.manager.$_setGrantDelay(ANOTHER_ROLE, grantDelay); - await time.increase(MINSETBACK); + await increase(MINSETBACK); }); describe('when increasing the execution delay', function () { @@ -1461,7 +1336,7 @@ contract('AccessManager', function (accounts) { this.previousExecutionDelay.toString(), ]); - this.newExecutionDelay = this.previousExecutionDelay.add(time.duration.days(4)); + this.newExecutionDelay = this.previousExecutionDelay + time.duration.days(4); }); it('emits event and immediately changes the execution delay', async function () { @@ -1469,28 +1344,24 @@ contract('AccessManager', function (accounts) { true, this.previousExecutionDelay.toString(), ]); - const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay, { - from: admin, - }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - - expectEvent(receipt, 'RoleGranted', { - roleId: ANOTHER_ROLE, - account: this.user, - since: timestamp, - delay: this.newExecutionDelay, - newMember: false, - }); + const txResponse = await this.manager + .connect(this.admin) + .grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay); + const timestamp = await time.clockFromReceipt.timestamp(txResponse); + + expect(txResponse) + .to.emit(this.manager, 'RoleGranted') + .withArgs(ANOTHER_ROLE, this.user.address, timestamp, this.newExecutionDelay, false); // Access is correctly stored - const access = await this.manager.getAccess(ANOTHER_ROLE, user); - expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.newExecutionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); + expect(access[0]).to.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.equal(this.newExecutionDelay); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Already in effect - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ true, this.newExecutionDelay.toString(), ]); @@ -1504,65 +1375,60 @@ contract('AccessManager', function (accounts) { this.previousExecutionDelay.toString(), ]); - this.newExecutionDelay = this.previousExecutionDelay.sub(time.duration.days(4)); - const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay, { - from: admin, - }); - this.grantTimestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + this.newExecutionDelay = this.previousExecutionDelay - time.duration.days(4); + this.txResponse = await this.manager + .connect(this.admin) + .grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay); + this.grantTimestamp = await time.clockFromReceipt.timestamp(this.txResponse); - this.receipt = receipt; - this.delay = this.previousExecutionDelay.sub(this.newExecutionDelay); // For testAsDelay + this.delay = this.previousExecutionDelay - this.newExecutionDelay; // For testAsDelay }); it('emits event', function () { - expectEvent(this.receipt, 'RoleGranted', { - roleId: ANOTHER_ROLE, - account: this.user, - since: this.grantTimestamp.add(this.delay), - delay: this.newExecutionDelay, - newMember: false, - }); + expect(this.txResponse) + .to.emit(this.manager, 'RoleGranted') + .withArgs( + ANOTHER_ROLE, + this.user.address, + this.grantTimestamp + this.delay, + this.newExecutionDelay, + false, + ); }); testAsDelay('execution delay effect', { - before() { - beforeEach('consume effect delay', async function () { - // Consume previously set delay - await mine(); - }); + before: function self() { + self.mineDelay = true; it('does not change the execution delay yet', async function () { // Access is correctly stored - const access = await this.manager.getAccess(ANOTHER_ROLE, user); - expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.previousExecutionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal(this.newExecutionDelay); // pendingDelay - expect(access[3]).to.be.bignumber.equal(this.grantTimestamp.add(this.delay)); // pendingDelayEffect + const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); + expect(access[0]).to.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.equal(this.previousExecutionDelay); // currentDelay + expect(access[2]).to.equal(this.newExecutionDelay); // pendingDelay + expect(access[3]).to.equal(this.grantTimestamp + this.delay); // pendingDelayEffect // Not in effect yet - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ true, this.previousExecutionDelay.toString(), ]); }); }, - after() { - beforeEach('consume effect delay', async function () { - // Consume previously set delay - await mine(); - }); + after: function self() { + self.mineDelay = true; it('changes the execution delay', async function () { // Access is correctly stored - const access = await this.manager.getAccess(ANOTHER_ROLE, user); + const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); - expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.newExecutionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + expect(access[0]).to.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.equal(this.newExecutionDelay); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Already in effect - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ true, this.newExecutionDelay.toString(), ]); @@ -1577,7 +1443,7 @@ contract('AccessManager', function (accounts) { // Delay granting const grantDelay = 0; await this.manager.$_setGrantDelay(ANOTHER_ROLE, grantDelay); - await time.increase(MINSETBACK); + await increase(MINSETBACK); }); describe('when increasing the execution delay', function () { @@ -1587,7 +1453,7 @@ contract('AccessManager', function (accounts) { this.previousExecutionDelay.toString(), ]); - this.newExecutionDelay = this.previousExecutionDelay.add(time.duration.days(4)); + this.newExecutionDelay = this.previousExecutionDelay + time.duration.days(4); }); it('emits event and immediately changes the execution delay', async function () { @@ -1595,28 +1461,24 @@ contract('AccessManager', function (accounts) { true, this.previousExecutionDelay.toString(), ]); - const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay, { - from: admin, - }); - const timestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); - - expectEvent(receipt, 'RoleGranted', { - roleId: ANOTHER_ROLE, - account: this.user, - since: timestamp, - delay: this.newExecutionDelay, - newMember: false, - }); + const txResponse = await this.manager + .connect(this.admin) + .grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay); + const timestamp = await time.clockFromReceipt.timestamp(txResponse); + + expect(txResponse) + .to.emit(this.manager, 'RoleGranted') + .withArgs(ANOTHER_ROLE, this.user.address, timestamp, this.newExecutionDelay, false); // Access is correctly stored - const access = await this.manager.getAccess(ANOTHER_ROLE, user); - expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.newExecutionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); + expect(access[0]).to.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.equal(this.newExecutionDelay); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Already in effect - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ true, this.newExecutionDelay.toString(), ]); @@ -1630,65 +1492,60 @@ contract('AccessManager', function (accounts) { this.previousExecutionDelay.toString(), ]); - this.newExecutionDelay = this.previousExecutionDelay.sub(time.duration.days(4)); - const { receipt } = await this.manager.grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay, { - from: admin, - }); - this.grantTimestamp = await clockFromReceipt.timestamp(receipt).then(web3.utils.toBN); + this.newExecutionDelay = this.previousExecutionDelay - time.duration.days(4); + this.txResponse = await this.manager + .connect(this.admin) + .grantRole(ANOTHER_ROLE, this.user, this.newExecutionDelay); + this.grantTimestamp = await time.clockFromReceipt.timestamp(this.txResponse); - this.receipt = receipt; - this.delay = this.previousExecutionDelay.sub(this.newExecutionDelay); // For testAsDelay + this.delay = this.previousExecutionDelay - this.newExecutionDelay; // For testAsDelay }); it('emits event', function () { - expectEvent(this.receipt, 'RoleGranted', { - roleId: ANOTHER_ROLE, - account: this.user, - since: this.grantTimestamp.add(this.delay), - delay: this.newExecutionDelay, - newMember: false, - }); + expect(this.txResponse) + .to.emit(this.manager, 'RoleGranted') + .withArgs( + ANOTHER_ROLE, + this.user.address, + this.grantTimestamp + this.delay, + this.newExecutionDelay, + false, + ); }); testAsDelay('execution delay effect', { - before() { - beforeEach('consume effect delay', async function () { - // Consume previously set delay - await mine(); - }); + before: function self() { + self.mineDelay = true; it('does not change the execution delay yet', async function () { // Access is correctly stored - const access = await this.manager.getAccess(ANOTHER_ROLE, user); - expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.previousExecutionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal(this.newExecutionDelay); // pendingDelay - expect(access[3]).to.be.bignumber.equal(this.grantTimestamp.add(this.delay)); // pendingDelayEffect + const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); + expect(access[0]).to.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.equal(this.previousExecutionDelay); // currentDelay + expect(access[2]).to.equal(this.newExecutionDelay); // pendingDelay + expect(access[3]).to.equal(this.grantTimestamp + this.delay); // pendingDelayEffect // Not in effect yet - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ true, this.previousExecutionDelay.toString(), ]); }); }, - after() { - beforeEach('consume effect delay', async function () { - // Consume previously set delay - await mine(); - }); + after: function self() { + self.mineDelay = true; it('changes the execution delay', async function () { // Access is correctly stored - const access = await this.manager.getAccess(ANOTHER_ROLE, user); + const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); - expect(access[0]).to.be.bignumber.equal(this.oldAccess[0]); // inEffectSince - expect(access[1]).to.be.bignumber.equal(this.newExecutionDelay); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // pendingDelayEffect + expect(access[0]).to.equal(this.oldAccess[0]); // inEffectSince + expect(access[1]).to.equal(this.newExecutionDelay); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // pendingDelayEffect // Already in effect - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ true, this.newExecutionDelay.toString(), ]); @@ -1703,9 +1560,9 @@ contract('AccessManager', function (accounts) { describe('#revokeRole', function () { describe('restrictions', function () { beforeEach('set method and args', async function () { - const method = 'revokeRole(uint64,address)'; const args = [ANOTHER_ROLE, someAddress]; - this.calldata = this.manager.contract.methods[method](...args).encodeABI(); + const method = this.manager.interface.getFunction('revokeRole(uint64,address)'); + this.calldata = this.manager.interface.encodeFunctionData(method, args); // Need to be set before revoking await this.manager.$_grantRole(...args, 0, 0); @@ -1717,64 +1574,60 @@ contract('AccessManager', function (accounts) { describe('when role has been granted', function () { beforeEach('grant role with grant delay', async function () { this.grantDelay = time.duration.weeks(1); - await this.manager.$_grantRole(ANOTHER_ROLE, user, this.grantDelay, 0); + await this.manager.$_grantRole(ANOTHER_ROLE, this.user, this.grantDelay, 0); this.delay = this.grantDelay; // For testAsDelay }); testAsDelay('grant', { - before() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + before: function self() { + self.mineDelay = true; it('revokes a granted role that will take effect in the future', async function () { - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ false, '0', ]); - const { receipt } = await this.manager.revokeRole(ANOTHER_ROLE, user, { from: admin }); - expectEvent(receipt, 'RoleRevoked', { roleId: ANOTHER_ROLE, account: user }); + await expect(this.manager.connect(this.admin).revokeRole(ANOTHER_ROLE, this.user)) + .to.emit(this.manager, 'RoleRevoked') + .withArgs(ANOTHER_ROLE, this.user.address); - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ false, '0', ]); - const access = await this.manager.getAccess(ANOTHER_ROLE, user); - expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect + const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); + expect(access[0]).to.equal(0n); // inRoleSince + expect(access[1]).to.equal(0n); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // effect }); }, - after() { - beforeEach('consume previously set grant delay', async function () { - // Consume previously set delay - await mine(); - }); + after: function self() { + self.mineDelay = true; it('revokes a granted role that already took effect', async function () { - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ true, '0', ]); - const { receipt } = await this.manager.revokeRole(ANOTHER_ROLE, user, { from: admin }); - expectEvent(receipt, 'RoleRevoked', { roleId: ANOTHER_ROLE, account: user }); + await expect(this.manager.connect(this.admin).revokeRole(ANOTHER_ROLE, this.user)) + .to.emit(this.manager, 'RoleRevoked') + .withArgs(ANOTHER_ROLE, this.user.address); - expect(await this.manager.hasRole(ANOTHER_ROLE, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ false, '0', ]); - const access = await this.manager.getAccess(ANOTHER_ROLE, user); - expect(access[0]).to.be.bignumber.equal('0'); // inRoleSince - expect(access[1]).to.be.bignumber.equal('0'); // currentDelay - expect(access[2]).to.be.bignumber.equal('0'); // pendingDelay - expect(access[3]).to.be.bignumber.equal('0'); // effect + const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); + expect(access[0]).to.equal(0n); // inRoleSince + expect(access[1]).to.equal(0n); // currentDelay + expect(access[2]).to.equal(0n); // pendingDelay + expect(access[3]).to.equal(0n); // effect }); }, }); @@ -1782,13 +1635,15 @@ contract('AccessManager', function (accounts) { describe('when role has not been granted', function () { it('has no effect', async function () { - expect(await this.manager.hasRole(this.roles.SOME.id, user).then(formatAccess)).to.be.deep.equal([ + expect(await this.manager.hasRole(this.roles.SOME.id, this.user).then(formatAccess)).to.be.deep.equal([ false, '0', ]); - const { receipt } = await this.manager.revokeRole(this.roles.SOME.id, user, { from: manager }); - expectEvent.notEmitted(receipt, 'RoleRevoked', { roleId: ANOTHER_ROLE, account: user }); - expect(await this.manager.hasRole(this.roles.SOME.id, user).then(formatAccess)).to.be.deep.equal([ + await expect(this.manager.connect(this.roleAdmin).revokeRole(this.roles.SOME.id, this.user)).to.not.emit( + this.manager, + 'RoleRevoked', + ); + expect(await this.manager.hasRole(this.roles.SOME.id, this.user).then(formatAccess)).to.be.deep.equal([ false, '0', ]); @@ -1796,11 +1651,9 @@ contract('AccessManager', function (accounts) { }); it('reverts revoking PUBLIC_ROLE', async function () { - await expectRevertCustomError( - this.manager.revokeRole(this.roles.PUBLIC.id, user, { from: admin }), - 'AccessManagerLockedRole', - [this.roles.PUBLIC.id], - ); + await expect(this.manager.connect(this.admin).revokeRole(this.roles.PUBLIC.id, this.user)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedRole') + .withArgs(this.roles.PUBLIC.id); }); }); }); @@ -1808,8 +1661,8 @@ contract('AccessManager', function (accounts) { describe('self role operations', function () { describe('#renounceRole', function () { beforeEach('grant role', async function () { - this.role = { id: web3.utils.toBN(783164) }; - this.caller = user; + this.role = { id: 783164n }; + this.caller = this.user; await this.manager.$_grantRole(this.role.id, this.caller, 0, 0); }); @@ -1818,13 +1671,9 @@ contract('AccessManager', function (accounts) { true, '0', ]); - const { receipt } = await this.manager.renounceRole(this.role.id, this.caller, { - from: this.caller, - }); - expectEvent(receipt, 'RoleRevoked', { - roleId: this.role.id, - account: this.caller, - }); + await expect(this.manager.connect(this.caller).renounceRole(this.role.id, this.caller)) + .to.emit(this.manager, 'RoleRevoked') + .withArgs(this.role.id, this.caller.address); expect(await this.manager.hasRole(this.role.id, this.caller).then(formatAccess)).to.be.deep.equal([ false, '0', @@ -1832,23 +1681,15 @@ contract('AccessManager', function (accounts) { }); it('reverts if renouncing the PUBLIC_ROLE', async function () { - await expectRevertCustomError( - this.manager.renounceRole(this.roles.PUBLIC.id, this.caller, { - from: this.caller, - }), - 'AccessManagerLockedRole', - [this.roles.PUBLIC.id], - ); + await expect(this.manager.connect(this.caller).renounceRole(this.roles.PUBLIC.id, this.caller)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedRole') + .withArgs(this.roles.PUBLIC.id); }); it('reverts if renouncing with bad caller confirmation', async function () { - await expectRevertCustomError( - this.manager.renounceRole(this.role.id, someAddress, { - from: this.caller, - }), - 'AccessManagerBadConfirmation', - [], - ); + await expect( + this.manager.connect(this.caller).renounceRole(this.role.id, someAddress), + ).to.be.revertedWithCustomError(this.manager, 'AccessManagerBadConfirmation'); }); }); }); @@ -1857,32 +1698,31 @@ contract('AccessManager', function (accounts) { describe('access managed target operations', function () { describe('when calling a restricted target function', function () { - const method = 'fnRestricted()'; - beforeEach('set required role', function () { - this.role = { id: web3.utils.toBN(3597243) }; - this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + this.method = this.target.fnRestricted.getFragment(); + this.role = { id: 3597243n }; + this.manager.$_setTargetFunctionRole(this.target, this.method.selector, this.role.id); }); describe('restrictions', function () { beforeEach('set method and args', function () { - this.calldata = this.target.contract.methods[method]().encodeABI(); - this.caller = user; + this.calldata = this.target.interface.encodeFunctionData(this.method, []); + this.caller = this.user; }); shouldBehaveLikeAManagedRestrictedOperation(); }); it('succeeds called by a role member', async function () { - await this.manager.$_grantRole(this.role.id, user, 0, 0); + await this.manager.$_grantRole(this.role.id, this.user, 0, 0); - const { receipt } = await this.target.methods[method]({ - data: this.calldata, - from: user, - }); - expectEvent(receipt, 'CalledRestricted', { - caller: user, - }); + await expect( + this.target.connect(this.user)[this.method.selector]({ + data: this.calldata, + }), + ) + .to.emit(this.target, 'CalledRestricted') + .withArgs(this.user.address); }); }); @@ -1890,33 +1730,36 @@ contract('AccessManager', function (accounts) { const method = 'fnUnrestricted()'; beforeEach('set required role', async function () { - this.role = { id: web3.utils.toBN(879435) }; - await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + this.role = { id: 879435n }; + await this.manager.$_setTargetFunctionRole( + this.target, + this.target[method].getFragment().selector, + this.role.id, + ); }); it('succeeds called by anyone', async function () { - const { receipt } = await this.target.methods[method]({ - data: this.calldata, - from: user, - }); - expectEvent(receipt, 'CalledUnrestricted', { - caller: user, - }); + await expect( + this.target.connect(this.user)[method]({ + data: this.calldata, + }), + ) + .to.emit(this.target, 'CalledUnrestricted') + .withArgs(this.user.address); }); }); }); describe('#schedule', function () { - const method = 'fnRestricted()'; - beforeEach('set target function role', async function () { - this.role = { id: web3.utils.toBN(498305) }; - this.caller = user; + this.method = this.target.fnRestricted.getFragment(); + this.role = { id: 498305n }; + this.caller = this.user; - await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + await this.manager.$_setTargetFunctionRole(this.target, this.method.selector, this.role.id); await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // nonzero execution delay - this.calldata = this.target.contract.methods[method]().encodeABI(); + this.calldata = this.target.interface.encodeFunctionData(this.method, []); this.delay = time.duration.weeks(2); }); @@ -1924,16 +1767,15 @@ contract('AccessManager', function (accounts) { testAsCanCall({ closed() { it('reverts as AccessManagerUnauthorizedCall', async function () { - await expectRevertCustomError( - scheduleOperation(this.manager, { - caller: this.caller, - target: this.target.address, - calldata: this.calldata, - delay: this.delay, - }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + const { schedule } = await prepareOperation(this.manager, { + caller: this.caller, + target: this.target, + calldata: this.calldata, + delay: this.delay, + }); + await expect(schedule()) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, open: { @@ -1943,30 +1785,25 @@ contract('AccessManager', function (accounts) { }, notExecuting() { it('reverts as AccessManagerUnauthorizedCall', async function () { - await expectRevertCustomError( - scheduleOperation(this.manager, { - caller: this.caller, - target: this.target.address, - calldata: this.calldata, - delay: this.delay, - }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + const { schedule } = await prepareOperation(this.manager, { + caller: this.caller, + target: this.target, + calldata: this.calldata, + delay: this.delay, + }); + await expect(schedule()) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, }, callerIsNotTheManager: { publicRoleIsRequired() { it('reverts as AccessManagerUnauthorizedCall', async function () { - // scheduleOperation is not used here because it alters the next block timestamp - await expectRevertCustomError( - this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { - from: this.caller, - }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + // prepareOperation is not used here because it alters the next block timestamp + await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, specificRoleIsRequired: { @@ -1975,48 +1812,34 @@ contract('AccessManager', function (accounts) { callerHasAnExecutionDelay: { beforeGrantDelay() { it('reverts as AccessManagerUnauthorizedCall', async function () { - // scheduleOperation is not used here because it alters the next block timestamp - await expectRevertCustomError( - this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { - from: this.caller, - }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + // prepareOperation is not used here because it alters the next block timestamp + await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, afterGrantDelay() { it('succeeds', async function () { - // scheduleOperation is not used here because it alters the next block timestamp - await this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { - from: this.caller, - }); + // prepareOperation is not used here because it alters the next block timestamp + await this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48); }); }, }, callerHasNoExecutionDelay: { beforeGrantDelay() { it('reverts as AccessManagerUnauthorizedCall', async function () { - // scheduleOperation is not used here because it alters the next block timestamp - await expectRevertCustomError( - this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { - from: this.caller, - }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + // prepareOperation is not used here because it alters the next block timestamp + await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, afterGrantDelay() { it('reverts as AccessManagerUnauthorizedCall', async function () { - // scheduleOperation is not used here because it alters the next block timestamp - await expectRevertCustomError( - this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { - from: this.caller, - }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + // prepareOperation is not used here because it alters the next block timestamp + await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, }, @@ -2024,40 +1847,37 @@ contract('AccessManager', function (accounts) { roleGrantingIsNotDelayed: { callerHasAnExecutionDelay() { it('succeeds', async function () { - await scheduleOperation(this.manager, { + const { schedule } = await prepareOperation(this.manager, { caller: this.caller, - target: this.target.address, + target: this.target, calldata: this.calldata, delay: this.delay, }); + + await schedule(); }); }, callerHasNoExecutionDelay() { it('reverts as AccessManagerUnauthorizedCall', async function () { - // scheduleOperation is not used here because it alters the next block timestamp - await expectRevertCustomError( - this.manager.schedule(this.target.address, this.calldata, MAX_UINT48, { - from: this.caller, - }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + // prepareOperation is not used here because it alters the next block timestamp + await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, }, }, requiredRoleIsNotGranted() { it('reverts as AccessManagerUnauthorizedCall', async function () { - await expectRevertCustomError( - scheduleOperation(this.manager, { - caller: this.caller, - target: this.target.address, - calldata: this.calldata, - delay: this.delay, - }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + const { schedule } = await prepareOperation(this.manager, { + caller: this.caller, + target: this.target, + calldata: this.calldata, + delay: this.delay, + }); + await expect(schedule()) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, }, @@ -2067,215 +1887,206 @@ contract('AccessManager', function (accounts) { }); it('schedules an operation at the specified execution date if it is larger than caller execution delay', async function () { - const { operationId, scheduledAt, receipt } = await scheduleOperation(this.manager, { + const { operationId, scheduledAt, schedule } = await prepareOperation(this.manager, { caller: this.caller, - target: this.target.address, + target: this.target, calldata: this.calldata, delay: this.delay, }); - expect(await this.manager.getSchedule(operationId)).to.be.bignumber.equal(scheduledAt.add(this.delay)); - expectEvent(receipt, 'OperationScheduled', { - operationId, - nonce: '1', - schedule: scheduledAt.add(this.delay), - target: this.target.address, - data: this.calldata, - }); + const txResponse = await schedule(); + + expect(await this.manager.getSchedule(operationId)).to.equal(scheduledAt + this.delay); + expect(txResponse) + .to.emit(this.manager, 'OperationScheduled') + .withArgs(operationId, '1', scheduledAt + this.delay, this.target.target, this.calldata); }); it('schedules an operation at the minimum execution date if no specified execution date (when == 0)', async function () { const executionDelay = await time.duration.hours(72); await this.manager.$_grantRole(this.role.id, this.caller, 0, executionDelay); - const timestamp = await time.latest(); - const scheduledAt = timestamp.addn(1); - await setNextBlockTimestamp(scheduledAt); - const { receipt } = await this.manager.schedule(this.target.address, this.calldata, 0, { - from: this.caller, - }); + const txResponse = await this.manager.connect(this.caller).schedule(this.target, this.calldata, 0); + const scheduledAt = await time.clockFromReceipt.timestamp(txResponse); - const operationId = await this.manager.hashOperation(this.caller, this.target.address, this.calldata); + const operationId = await this.manager.hashOperation(this.caller, this.target, this.calldata); - expect(await this.manager.getSchedule(operationId)).to.be.bignumber.equal(scheduledAt.add(executionDelay)); - expectEvent(receipt, 'OperationScheduled', { - operationId, - nonce: '1', - schedule: scheduledAt.add(executionDelay), - target: this.target.address, - data: this.calldata, - }); + expect(await this.manager.getSchedule(operationId)).to.equal(scheduledAt + executionDelay); + expect(txResponse) + .to.emit(this.manager, 'OperationScheduled') + .withArgs(operationId, '1', scheduledAt + executionDelay, this.target.target, this.calldata); }); it('increases the nonce of an operation scheduled more than once', async function () { // Setup and check initial nonce - const expectedOperationId = hashOperation(this.caller, this.target.address, this.calldata); - expect(await this.manager.getNonce(expectedOperationId)).to.be.bignumber.eq('0'); + const expectedOperationId = hashOperation(this.caller, this.target, this.calldata); + expect(await this.manager.getNonce(expectedOperationId)).to.equal('0'); // Schedule - const op1 = await scheduleOperation(this.manager, { + const op1 = await prepareOperation(this.manager, { caller: this.caller, - target: this.target.address, + target: this.target, calldata: this.calldata, delay: this.delay, }); - expectEvent(op1.receipt, 'OperationScheduled', { - operationId: op1.operationId, - nonce: '1', - schedule: op1.scheduledAt.add(this.delay), - target: this.target.address, - data: this.calldata, - }); - expect(expectedOperationId).to.eq(op1.operationId); + await expect(op1.schedule()) + .to.emit(this.manager, 'OperationScheduled') + .withArgs( + op1.operationId, + 1n, + op1.scheduledAt + this.delay, + this.caller.address, + this.target.target, + this.calldata, + ); + expect(expectedOperationId).to.equal(op1.operationId); // Consume - await time.increase(this.delay); + await increase(this.delay); await this.manager.$_consumeScheduledOp(expectedOperationId); // Check nonce - expect(await this.manager.getNonce(expectedOperationId)).to.be.bignumber.eq('1'); + expect(await this.manager.getNonce(expectedOperationId)).to.equal('1'); // Schedule again - const op2 = await scheduleOperation(this.manager, { + const op2 = await prepareOperation(this.manager, { caller: this.caller, - target: this.target.address, + target: this.target, calldata: this.calldata, delay: this.delay, }); - expectEvent(op2.receipt, 'OperationScheduled', { - operationId: op2.operationId, - nonce: '2', - schedule: op2.scheduledAt.add(this.delay), - target: this.target.address, - data: this.calldata, - }); - expect(expectedOperationId).to.eq(op2.operationId); + await expect(op2.schedule()) + .to.emit(this.manager, 'OperationScheduled') + .withArgs( + op2.operationId, + 2n, + op2.scheduledAt + this.delay, + this.caller.address, + this.target.target, + this.calldata, + ); + expect(expectedOperationId).to.equal(op2.operationId); // Check final nonce - expect(await this.manager.getNonce(expectedOperationId)).to.be.bignumber.eq('2'); + expect(await this.manager.getNonce(expectedOperationId)).to.equal('2'); }); it('reverts if the specified execution date is before the current timestamp + caller execution delay', async function () { - const executionDelay = time.duration.weeks(1).add(this.delay); + const executionDelay = time.duration.weeks(1) + this.delay; await this.manager.$_grantRole(this.role.id, this.caller, 0, executionDelay); - await expectRevertCustomError( - scheduleOperation(this.manager, { - caller: this.caller, - target: this.target.address, - calldata: this.calldata, - delay: this.delay, - }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + const { schedule } = await prepareOperation(this.manager, { + caller: this.caller, + target: this.target, + calldata: this.calldata, + delay: this.delay, + }); + + await expect(schedule()) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); it('reverts if an operation is already schedule', async function () { - const { operationId } = await scheduleOperation(this.manager, { + const op1 = await prepareOperation(this.manager, { caller: this.caller, - target: this.target.address, + target: this.target, calldata: this.calldata, delay: this.delay, }); - await expectRevertCustomError( - scheduleOperation(this.manager, { - caller: this.caller, - target: this.target.address, - calldata: this.calldata, - delay: this.delay, - }), - 'AccessManagerAlreadyScheduled', - [operationId], - ); + await op1.schedule(); + + const op2 = await prepareOperation(this.manager, { + caller: this.caller, + target: this.target, + calldata: this.calldata, + delay: this.delay, + }); + + await expect(op2.schedule()) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerAlreadyScheduled') + .withArgs(op1.operationId); }); it('panics scheduling calldata with less than 4 bytes', async function () { const calldata = '0x1234'; // 2 bytes // Managed contract - await expectRevert.unspecified( - scheduleOperation(this.manager, { - caller: this.caller, - target: this.target.address, - calldata: calldata, - delay: this.delay, - }), - ); + const op1 = await prepareOperation(this.manager, { + caller: this.caller, + target: this.target, + calldata: calldata, + delay: this.delay, + }); + await expect(op1.schedule()).to.be.revertedWithoutReason(); // Manager contract - await expectRevert.unspecified( - scheduleOperation(this.manager, { - caller: this.caller, - target: this.manager.address, - calldata: calldata, - delay: this.delay, - }), - ); + const op2 = await prepareOperation(this.manager, { + caller: this.caller, + target: this.manager, + calldata: calldata, + delay: this.delay, + }); + await expect(op2.schedule()).to.be.revertedWithoutReason(); }); it('reverts scheduling an unknown operation to the manager', async function () { const calldata = '0x12345678'; - await expectRevertCustomError( - scheduleOperation(this.manager, { - caller: this.caller, - target: this.manager.address, - calldata, - delay: this.delay, - }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.manager.address, calldata], - ); + const { schedule } = await prepareOperation(this.manager, { + caller: this.caller, + target: this.manager, + calldata, + delay: this.delay, + }); + + await expect(schedule()) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.manager.target, calldata); }); }); describe('#execute', function () { - const method = 'fnRestricted()'; - beforeEach('set target function role', async function () { - this.role = { id: web3.utils.toBN(9825430) }; - this.caller = user; + this.method = this.target.fnRestricted.getFragment(); + this.role = { id: 9825430n }; + this.caller = this.user; - await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + await this.manager.$_setTargetFunctionRole(this.target, this.method.selector, this.role.id); await this.manager.$_grantRole(this.role.id, this.caller, 0, 0); - this.calldata = this.target.contract.methods[method]().encodeABI(); + this.calldata = this.target.interface.encodeFunctionData(this.method, []); }); describe('restrictions', function () { testAsCanCall({ closed() { it('reverts as AccessManagerUnauthorizedCall', async function () { - await expectRevertCustomError( - this.manager.execute(this.target.address, this.calldata, { from: this.caller }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, open: { callerIsTheManager: { executing() { it('succeeds', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + await this.manager.connect(this.caller).execute(this.target, this.calldata); }); }, notExecuting() { it('reverts as AccessManagerUnauthorizedCall', async function () { - await expectRevertCustomError( - this.manager.execute(this.target.address, this.calldata, { from: this.caller }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, }, callerIsNotTheManager: { publicRoleIsRequired() { it('succeeds', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + await this.manager.connect(this.caller).execute(this.target, this.calldata); }); }, specificRoleIsRequired: { @@ -2284,18 +2095,16 @@ contract('AccessManager', function (accounts) { callerHasAnExecutionDelay: { beforeGrantDelay() { it('reverts as AccessManagerUnauthorizedCall', async function () { - await expectRevertCustomError( - this.manager.execute(this.target.address, this.calldata, { from: this.caller }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, - afterGrantDelay() { - beforeEach('define schedule delay', async function () { - // Consume previously set delay - await mine(); - this.scheduleIn = time.duration.days(21); + afterGrantDelay: function self() { + self.mineDelay = true; + + beforeEach('define schedule delay', function () { + this.scheduleIn = time.duration.days(21); // For testAsSchedulableOperation }); testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); @@ -2304,47 +2113,40 @@ contract('AccessManager', function (accounts) { callerHasNoExecutionDelay: { beforeGrantDelay() { it('reverts as AccessManagerUnauthorizedCall', async function () { - await expectRevertCustomError( - this.manager.execute(this.target.address, this.calldata, { from: this.caller }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, - afterGrantDelay() { - beforeEach('define schedule delay', async function () { - // Consume previously set delay - await mine(); - }); + afterGrantDelay: function self() { + self.mineDelay = true; it('succeeds', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + await this.manager.connect(this.caller).execute(this.target, this.calldata); }); }, }, }, roleGrantingIsNotDelayed: { callerHasAnExecutionDelay() { - beforeEach('define schedule delay', async function () { - this.scheduleIn = time.duration.days(15); + beforeEach('define schedule delay', function () { + this.scheduleIn = time.duration.days(15); // For testAsSchedulableOperation }); testAsSchedulableOperation(LIKE_COMMON_SCHEDULABLE); }, callerHasNoExecutionDelay() { it('succeeds', async function () { - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); + await this.manager.connect(this.caller).execute(this.target, this.calldata); }); }, }, }, requiredRoleIsNotGranted() { it('reverts as AccessManagerUnauthorizedCall', async function () { - await expectRevertCustomError( - this.manager.execute(this.target.address, this.calldata, { from: this.caller }), - 'AccessManagerUnauthorizedCall', - [this.caller, this.target.address, this.calldata.substring(0, 10)], - ); + await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); }); }, }, @@ -2357,19 +2159,19 @@ contract('AccessManager', function (accounts) { const delay = time.duration.hours(4); await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // Execution delay is needed so the operation is consumed - const { operationId } = await scheduleOperation(this.manager, { + const { operationId, schedule } = await prepareOperation(this.manager, { caller: this.caller, - target: this.target.address, + target: this.target, calldata: this.calldata, delay, }); - await time.increase(delay); - const { receipt } = await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); - expectEvent(receipt, 'OperationExecuted', { - operationId, - nonce: '1', - }); - expect(await this.manager.getSchedule(operationId)).to.be.bignumber.equal('0'); + await schedule(); + await increase(delay); + await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) + .to.emit(this.manager, 'OperationExecuted') + .withArgs(operationId, 1n); + + expect(await this.manager.getSchedule(operationId)).to.equal(0n); }); it('executes with no delay consuming a scheduled operation', async function () { @@ -2378,60 +2180,60 @@ contract('AccessManager', function (accounts) { // give caller an execution delay await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); - const { operationId } = await scheduleOperation(this.manager, { + const { operationId, schedule } = await prepareOperation(this.manager, { caller: this.caller, - target: this.target.address, + target: this.target, calldata: this.calldata, delay, }); + await schedule(); // remove the execution delay await this.manager.$_grantRole(this.role.id, this.caller, 0, 0); - await time.increase(delay); - const { receipt } = await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); - expectEvent(receipt, 'OperationExecuted', { - operationId, - nonce: '1', - }); - expect(await this.manager.getSchedule(operationId)).to.be.bignumber.equal('0'); + await increase(delay); + await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) + .to.emit(this.manager, 'OperationExecuted') + .withArgs(operationId, 1n); + + expect(await this.manager.getSchedule(operationId)).to.equal(0n); }); it('keeps the original _executionId after finishing the call', async function () { - const executionIdBefore = await getStorageAt(this.manager.address, EXECUTION_ID_STORAGE_SLOT); - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); - const executionIdAfter = await getStorageAt(this.manager.address, EXECUTION_ID_STORAGE_SLOT); - expect(executionIdBefore).to.be.bignumber.equal(executionIdAfter); + const executionIdBefore = await getStorageAt(this.manager.target, EXECUTION_ID_STORAGE_SLOT); + await this.manager.connect(this.caller).execute(this.target, this.calldata); + const executionIdAfter = await getStorageAt(this.manager.target, EXECUTION_ID_STORAGE_SLOT); + expect(executionIdBefore).to.equal(executionIdAfter); }); it('reverts executing twice', async function () { const delay = time.duration.hours(2); await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // Execution delay is needed so the operation is consumed - const { operationId } = await scheduleOperation(this.manager, { + const { operationId, schedule } = await prepareOperation(this.manager, { caller: this.caller, - target: this.target.address, + target: this.target, calldata: this.calldata, delay, }); - await time.increase(delay); - await this.manager.execute(this.target.address, this.calldata, { from: this.caller }); - await expectRevertCustomError( - this.manager.execute(this.target.address, this.calldata, { from: this.caller }), - 'AccessManagerNotScheduled', - [operationId], - ); + await schedule(); + await increase(delay); + await this.manager.connect(this.caller).execute(this.target, this.calldata); + await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerNotScheduled') + .withArgs(operationId); }); }); describe('#consumeScheduledOp', function () { beforeEach('define scheduling parameters', async function () { - const method = 'fnRestricted()'; - this.caller = this.target.address; - this.calldata = this.target.contract.methods[method]().encodeABI(); - this.role = { id: web3.utils.toBN(9834983) }; + const method = this.target.fnRestricted.getFragment(); + this.caller = await ethers.getSigner(this.target.target); + await impersonate(this.caller.address); + this.calldata = this.target.interface.encodeFunctionData(method, []); + this.role = { id: 9834983n }; - await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.role.id); + await this.manager.$_setTargetFunctionRole(this.target, method.selector, this.role.id); await this.manager.$_grantRole(this.role.id, this.caller, 0, 1); // nonzero execution delay this.scheduleIn = time.duration.hours(10); // For testAsSchedulableOperation @@ -2439,71 +2241,53 @@ contract('AccessManager', function (accounts) { describe('when caller is not consuming scheduled operation', function () { beforeEach('set consuming false', async function () { - await this.target.setIsConsumingScheduledOp(false, `0x${CONSUMING_SCHEDULE_STORAGE_SLOT.toString(16)}`); + await this.target.setIsConsumingScheduledOp(false, toBeHex(CONSUMING_SCHEDULE_STORAGE_SLOT, 32)); }); it('reverts as AccessManagerUnauthorizedConsume', async function () { - await impersonate(this.caller); - await expectRevertCustomError( - this.manager.consumeScheduledOp(this.caller, this.calldata, { from: this.caller }), - 'AccessManagerUnauthorizedConsume', - [this.caller], - ); + await expect(this.manager.connect(this.caller).consumeScheduledOp(this.caller, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedConsume') + .withArgs(this.caller.address); }); }); describe('when caller is consuming scheduled operation', function () { beforeEach('set consuming true', async function () { - await this.target.setIsConsumingScheduledOp(true, `0x${CONSUMING_SCHEDULE_STORAGE_SLOT.toString(16)}`); + await this.target.setIsConsumingScheduledOp(true, toBeHex(CONSUMING_SCHEDULE_STORAGE_SLOT, 32)); }); testAsSchedulableOperation({ scheduled: { before() { it('reverts as AccessManagerNotReady', async function () { - await impersonate(this.caller); - await expectRevertCustomError( - this.manager.consumeScheduledOp(this.caller, this.calldata, { from: this.caller }), - 'AccessManagerNotReady', - [this.operationId], - ); + await expect(this.manager.connect(this.caller).consumeScheduledOp(this.caller, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerNotReady') + .withArgs(this.operationId); }); }, after() { it('consumes the scheduled operation and resets timepoint', async function () { - expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal( - this.scheduledAt.add(this.scheduleIn), - ); - await impersonate(this.caller); - const { receipt } = await this.manager.consumeScheduledOp(this.caller, this.calldata, { - from: this.caller, - }); - expectEvent(receipt, 'OperationExecuted', { - operationId: this.operationId, - nonce: '1', - }); - expect(await this.manager.getSchedule(this.operationId)).to.be.bignumber.equal('0'); + expect(await this.manager.getSchedule(this.operationId)).to.equal(this.scheduledAt + this.scheduleIn); + + await expect(this.manager.connect(this.caller).consumeScheduledOp(this.caller, this.calldata)) + .to.emit(this.manager, 'OperationExecuted') + .withArgs(this.operationId, 1n); + expect(await this.manager.getSchedule(this.operationId)).to.equal(0n); }); }, expired() { it('reverts as AccessManagerExpired', async function () { - await impersonate(this.caller); - await expectRevertCustomError( - this.manager.consumeScheduledOp(this.caller, this.calldata, { from: this.caller }), - 'AccessManagerExpired', - [this.operationId], - ); + await expect(this.manager.connect(this.caller).consumeScheduledOp(this.caller, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerExpired') + .withArgs(this.operationId); }); }, }, notScheduled() { it('reverts as AccessManagerNotScheduled', async function () { - await impersonate(this.caller); - await expectRevertCustomError( - this.manager.consumeScheduledOp(this.caller, this.calldata, { from: this.caller }), - 'AccessManagerNotScheduled', - [this.operationId], - ); + await expect(this.manager.connect(this.caller).consumeScheduledOp(this.caller, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerNotScheduled') + .withArgs(this.operationId); }); }, }); @@ -2511,14 +2295,13 @@ contract('AccessManager', function (accounts) { }); describe('#cancelScheduledOp', function () { - const method = 'fnRestricted()'; - beforeEach('setup scheduling', async function () { + this.method = this.target.fnRestricted.getFragment(); this.caller = this.roles.SOME.members[0]; - await this.manager.$_setTargetFunctionRole(this.target.address, selector(method), this.roles.SOME.id); + await this.manager.$_setTargetFunctionRole(this.target, this.method.selector, this.roles.SOME.id); await this.manager.$_grantRole(this.roles.SOME.id, this.caller, 0, 1); // nonzero execution delay - this.calldata = this.target.contract.methods[method]().encodeABI(); + this.calldata = this.target.interface.encodeFunctionData(this.method, []); this.scheduleIn = time.duration.days(10); // For testAsSchedulableOperation }); @@ -2527,162 +2310,161 @@ contract('AccessManager', function (accounts) { before() { describe('when caller is the scheduler', function () { it('succeeds', async function () { - await this.manager.cancel(this.caller, this.target.address, this.calldata, { from: this.caller }); + await this.manager.connect(this.caller).cancel(this.caller, this.target, this.calldata); }); }); describe('when caller is an admin', function () { it('succeeds', async function () { - await this.manager.cancel(this.caller, this.target.address, this.calldata, { - from: this.roles.ADMIN.members[0], - }); + await this.manager.connect(this.roles.ADMIN.members[0]).cancel(this.caller, this.target, this.calldata); }); }); describe('when caller is the role guardian', function () { it('succeeds', async function () { - await this.manager.cancel(this.caller, this.target.address, this.calldata, { - from: this.roles.SOME_GUARDIAN.members[0], - }); + await this.manager + .connect(this.roles.SOME_GUARDIAN.members[0]) + .cancel(this.caller, this.target, this.calldata); }); }); describe('when caller is any other account', function () { it('reverts as AccessManagerUnauthorizedCancel', async function () { - await expectRevertCustomError( - this.manager.cancel(this.caller, this.target.address, this.calldata, { from: other }), - 'AccessManagerUnauthorizedCancel', - [other, this.caller, this.target.address, selector(method)], - ); + await expect(this.manager.connect(this.other).cancel(this.caller, this.target, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCancel') + .withArgs(this.other.address, this.caller.address, this.target.target, this.method.selector); }); }); }, after() { it('succeeds', async function () { - await this.manager.cancel(this.caller, this.target.address, this.calldata, { from: this.caller }); + await this.manager.connect(this.caller).cancel(this.caller, this.target, this.calldata); }); }, expired() { it('succeeds', async function () { - await this.manager.cancel(this.caller, this.target.address, this.calldata, { from: this.caller }); + await this.manager.connect(this.caller).cancel(this.caller, this.target, this.calldata); }); }, }, notScheduled() { it('reverts as AccessManagerNotScheduled', async function () { - await expectRevertCustomError( - this.manager.cancel(this.caller, this.target.address, this.calldata), - 'AccessManagerNotScheduled', - [this.operationId], - ); + await expect(this.manager.cancel(this.caller, this.target, this.calldata)) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerNotScheduled') + .withArgs(this.operationId); }); }, }); it('cancels an operation and resets schedule', async function () { - const { operationId } = await scheduleOperation(this.manager, { + const { operationId, schedule } = await prepareOperation(this.manager, { caller: this.caller, - target: this.target.address, + target: this.target, calldata: this.calldata, delay: this.scheduleIn, }); - const { receipt } = await this.manager.cancel(this.caller, this.target.address, this.calldata, { - from: this.caller, - }); - expectEvent(receipt, 'OperationCanceled', { - operationId, - nonce: '1', - }); - expect(await this.manager.getSchedule(operationId)).to.be.bignumber.eq('0'); + await schedule(); + await expect(this.manager.connect(this.caller).cancel(this.caller, this.target, this.calldata)) + .to.emit(this.manager, 'OperationCanceled') + .withArgs(operationId, 1n); + expect(await this.manager.getSchedule(operationId)).to.equal('0'); }); }); describe('with Ownable target contract', function () { - const roleId = web3.utils.toBN(1); + const roleId = 1n; beforeEach(async function () { - this.ownable = await Ownable.new(this.manager.address); + this.ownable = await ethers.deployContract('$Ownable', [this.manager]); // add user to role - await this.manager.$_grantRole(roleId, user, 0, 0); + await this.manager.$_grantRole(roleId, this.user, 0, 0); }); it('initial state', async function () { - expect(await this.ownable.owner()).to.be.equal(this.manager.address); + expect(await this.ownable.owner()).to.be.equal(this.manager.target); }); describe('Contract is closed', function () { beforeEach(async function () { - await this.manager.$_setTargetClosed(this.ownable.address, true); + await this.manager.$_setTargetClosed(this.ownable, true); }); it('directly call: reverts', async function () { - await expectRevertCustomError(this.ownable.$_checkOwner({ from: user }), 'OwnableUnauthorizedAccount', [user]); + await expect(this.ownable.connect(this.user).$_checkOwner()) + .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') + .withArgs(this.user.address); }); it('relayed call (with role): reverts', async function () { - await expectRevertCustomError( - this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: user }), - 'AccessManagerUnauthorizedCall', - [user, this.ownable.address, selector('$_checkOwner()')], - ); + await expect( + this.manager.connect(this.user).execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector), + ) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.user.address, this.ownable.target, this.ownable.$_checkOwner.getFragment().selector); }); it('relayed call (without role): reverts', async function () { - await expectRevertCustomError( - this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: other }), - 'AccessManagerUnauthorizedCall', - [other, this.ownable.address, selector('$_checkOwner()')], - ); + await expect( + this.manager.connect(this.other).execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector), + ) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.other.address, this.ownable.target, this.ownable.$_checkOwner.getFragment().selector); }); }); describe('Contract is managed', function () { describe('function is open to specific role', function () { beforeEach(async function () { - await this.manager.$_setTargetFunctionRole(this.ownable.address, selector('$_checkOwner()'), roleId); + await this.manager.$_setTargetFunctionRole( + this.ownable, + this.ownable.$_checkOwner.getFragment().selector, + roleId, + ); }); it('directly call: reverts', async function () { - await expectRevertCustomError(this.ownable.$_checkOwner({ from: user }), 'OwnableUnauthorizedAccount', [ - user, - ]); + await expect(this.ownable.connect(this.user).$_checkOwner()) + .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') + .withArgs(this.user.address); }); it('relayed call (with role): success', async function () { - await this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: user }); + await this.manager.connect(this.user).execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector); }); it('relayed call (without role): reverts', async function () { - await expectRevertCustomError( - this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: other }), - 'AccessManagerUnauthorizedCall', - [other, this.ownable.address, selector('$_checkOwner()')], - ); + await expect( + this.manager.connect(this.other).execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector), + ) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') + .withArgs(this.other.address, this.ownable.target, this.ownable.$_checkOwner.getFragment().selector); }); }); describe('function is open to public role', function () { beforeEach(async function () { await this.manager.$_setTargetFunctionRole( - this.ownable.address, - selector('$_checkOwner()'), + this.ownable, + this.ownable.$_checkOwner.getFragment().selector, this.roles.PUBLIC.id, ); }); it('directly call: reverts', async function () { - await expectRevertCustomError(this.ownable.$_checkOwner({ from: user }), 'OwnableUnauthorizedAccount', [ - user, - ]); + await expect(this.ownable.connect(this.user).$_checkOwner()) + .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') + .withArgs(this.user.address); }); it('relayed call (with role): success', async function () { - await this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: user }); + await this.manager.connect(this.user).execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector); }); it('relayed call (without role): success', async function () { - await this.manager.execute(this.ownable.address, selector('$_checkOwner()'), { from: other }); + await this.manager + .connect(this.other) + .execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector); }); }); }); diff --git a/test/access/manager/AuthorityUtils.test.js b/test/access/manager/AuthorityUtils.test.js index 3e1133083..6c353f206 100644 --- a/test/access/manager/AuthorityUtils.test.js +++ b/test/access/manager/AuthorityUtils.test.js @@ -1,68 +1,81 @@ -require('@openzeppelin/test-helpers'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { ethers } = require('hardhat'); -const AuthorityUtils = artifacts.require('$AuthorityUtils'); -const NotAuthorityMock = artifacts.require('NotAuthorityMock'); -const AuthorityNoDelayMock = artifacts.require('AuthorityNoDelayMock'); -const AuthorityDelayMock = artifacts.require('AuthorityDelayMock'); -const AuthorityNoResponse = artifacts.require('AuthorityNoResponse'); +async function fixture() { + const [user, other] = await ethers.getSigners(); -contract('AuthorityUtils', function (accounts) { - const [user, other] = accounts; + const mock = await ethers.deployContract('$AuthorityUtils'); + const notAuthorityMock = await ethers.deployContract('NotAuthorityMock'); + const authorityNoDelayMock = await ethers.deployContract('AuthorityNoDelayMock'); + const authorityDelayMock = await ethers.deployContract('AuthorityDelayMock'); + const authorityNoResponse = await ethers.deployContract('AuthorityNoResponse'); + return { + user, + other, + mock, + notAuthorityMock, + authorityNoDelayMock, + authorityDelayMock, + authorityNoResponse, + }; +} + +describe('AuthorityUtils', function () { beforeEach(async function () { - this.mock = await AuthorityUtils.new(); + Object.assign(this, await loadFixture(fixture)); }); describe('canCallWithDelay', function () { describe('when authority does not have a canCall function', function () { beforeEach(async function () { - this.authority = await NotAuthorityMock.new(); + this.authority = this.notAuthorityMock; }); it('returns (immediate = 0, delay = 0)', async function () { const { immediate, delay } = await this.mock.$canCallWithDelay( - this.authority.address, - user, - other, + this.authority, + this.user, + this.other, '0x12345678', ); expect(immediate).to.equal(false); - expect(delay).to.be.bignumber.equal('0'); + expect(delay).to.be.equal(0n); }); }); describe('when authority has no delay', function () { beforeEach(async function () { - this.authority = await AuthorityNoDelayMock.new(); + this.authority = this.authorityNoDelayMock; this.immediate = true; await this.authority._setImmediate(this.immediate); }); it('returns (immediate, delay = 0)', async function () { const { immediate, delay } = await this.mock.$canCallWithDelay( - this.authority.address, - user, - other, + this.authority, + this.user, + this.other, '0x12345678', ); expect(immediate).to.equal(this.immediate); - expect(delay).to.be.bignumber.equal('0'); + expect(delay).to.be.equal(0n); }); }); describe('when authority replies with a delay', function () { beforeEach(async function () { - this.authority = await AuthorityDelayMock.new(); + this.authority = this.authorityDelayMock; }); for (const immediate of [true, false]) { - for (const delay of ['0', '42']) { + for (const delay of [0n, 42n]) { it(`returns (immediate=${immediate}, delay=${delay})`, async function () { await this.authority._setImmediate(immediate); await this.authority._setDelay(delay); - const result = await this.mock.$canCallWithDelay(this.authority.address, user, other, '0x12345678'); + const result = await this.mock.$canCallWithDelay(this.authority, this.user, this.other, '0x12345678'); expect(result.immediate).to.equal(immediate); - expect(result.delay).to.be.bignumber.equal(delay); + expect(result.delay).to.be.equal(delay); }); } } @@ -70,18 +83,18 @@ contract('AuthorityUtils', function (accounts) { describe('when authority replies with empty data', function () { beforeEach(async function () { - this.authority = await AuthorityNoResponse.new(); + this.authority = this.authorityNoResponse; }); it('returns (immediate = 0, delay = 0)', async function () { const { immediate, delay } = await this.mock.$canCallWithDelay( - this.authority.address, - user, - other, + this.authority, + this.user, + this.other, '0x12345678', ); expect(immediate).to.equal(false); - expect(delay).to.be.bignumber.equal('0'); + expect(delay).to.be.equal(0n); }); }); }); diff --git a/test/helpers/access-manager.js b/test/helpers/access-manager.js index beada69be..5f55dd518 100644 --- a/test/helpers/access-manager.js +++ b/test/helpers/access-manager.js @@ -1,23 +1,23 @@ -const { time } = require('@openzeppelin/test-helpers'); -const { MAX_UINT64 } = require('./constants'); -const { namespaceSlot } = require('./namespaced-storage'); const { - time: { setNextBlockTimestamp }, -} = require('@nomicfoundation/hardhat-network-helpers'); + bigint: { MAX_UINT64 }, +} = require('./constants'); +const { namespaceSlot } = require('./namespaced-storage'); +const { bigint: time } = require('./time'); +const { keccak256, AbiCoder } = require('ethers'); function buildBaseRoles() { const roles = { ADMIN: { - id: web3.utils.toBN(0), + id: 0n, }, SOME_ADMIN: { - id: web3.utils.toBN(17), + id: 17n, }, SOME_GUARDIAN: { - id: web3.utils.toBN(35), + id: 35n, }, SOME: { - id: web3.utils.toBN(42), + id: 42n, }, PUBLIC: { id: MAX_UINT64, @@ -53,23 +53,27 @@ const CONSUMING_SCHEDULE_STORAGE_SLOT = namespaceSlot('AccessManaged', 0n); /** * @requires this.{manager, caller, target, calldata} */ -async function scheduleOperation(manager, { caller, target, calldata, delay }) { - const timestamp = await time.latest(); - const scheduledAt = timestamp.addn(1); - await setNextBlockTimestamp(scheduledAt); // Fix next block timestamp for predictability - const { receipt } = await manager.schedule(target, calldata, scheduledAt.add(delay), { - from: caller, - }); +async function prepareOperation(manager, { caller, target, calldata, delay }) { + const timestamp = await time.clock.timestamp(); + const scheduledAt = timestamp + 1n; + await time.forward.timestamp(scheduledAt, false); // Fix next block timestamp for predictability return { - receipt, + schedule: () => manager.connect(caller).schedule(target, calldata, scheduledAt + delay), scheduledAt, operationId: hashOperation(caller, target, calldata), }; } +const lazyGetAddress = addressable => addressable.address ?? addressable.target ?? addressable; + const hashOperation = (caller, target, data) => - web3.utils.keccak256(web3.eth.abi.encodeParameters(['address', 'address', 'bytes'], [caller, target, data])); + keccak256( + AbiCoder.defaultAbiCoder().encode( + ['address', 'address', 'bytes'], + [lazyGetAddress(caller), lazyGetAddress(target), data], + ), + ); module.exports = { buildBaseRoles, @@ -78,6 +82,6 @@ module.exports = { EXPIRATION, EXECUTION_ID_STORAGE_SLOT, CONSUMING_SCHEDULE_STORAGE_SLOT, - scheduleOperation, + prepareOperation, hashOperation, }; diff --git a/test/helpers/constants.js b/test/helpers/constants.js index 6a3a82f4f..17937bee1 100644 --- a/test/helpers/constants.js +++ b/test/helpers/constants.js @@ -1,5 +1,12 @@ +// TODO: deprecate the old version in favor of this one +const bigint = { + MAX_UINT48: 2n ** 48n - 1n, + MAX_UINT64: 2n ** 64n - 1n, +}; + // TODO: remove toString() when bigint are supported module.exports = { - MAX_UINT48: (2n ** 48n - 1n).toString(), - MAX_UINT64: (2n ** 64n - 1n).toString(), + MAX_UINT48: bigint.MAX_UINT48.toString(), + MAX_UINT64: bigint.MAX_UINT64.toString(), + bigint, }; diff --git a/test/helpers/namespaced-storage.js b/test/helpers/namespaced-storage.js index fdd761fdc..9fa704113 100644 --- a/test/helpers/namespaced-storage.js +++ b/test/helpers/namespaced-storage.js @@ -1,16 +1,14 @@ +const { keccak256, id, toBeHex, MaxUint256 } = require('ethers'); const { artifacts } = require('hardhat'); function namespaceId(contractName) { return `openzeppelin.storage.${contractName}`; } -function namespaceLocation(id) { - const hashIdBN = web3.utils.toBN(web3.utils.keccak256(id)).subn(1); // keccak256(id) - 1 - const hashIdHex = web3.utils.padLeft(web3.utils.numberToHex(hashIdBN), 64); - - const mask = BigInt(web3.utils.padLeft('0x00', 64, 'f')); // ~0xff - - return BigInt(web3.utils.keccak256(hashIdHex)) & mask; +function namespaceLocation(value) { + const hashIdBN = BigInt(id(value)) - 1n; // keccak256(id) - 1 + const mask = MaxUint256 - 0xffn; // ~0xff + return BigInt(keccak256(toBeHex(hashIdBN, 32))) & mask; } function namespaceSlot(contractName, offset) { From 7de6fd4a2604764497990bcc0013f95763713190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 9 Nov 2023 16:27:40 +0000 Subject: [PATCH 108/167] Close `access-control.adoc` code block (#4726) --- docs/modules/ROOT/pages/access-control.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/modules/ROOT/pages/access-control.adoc b/docs/modules/ROOT/pages/access-control.adoc index b2d6dbbfd..baf5652f8 100644 --- a/docs/modules/ROOT/pages/access-control.adoc +++ b/docs/modules/ROOT/pages/access-control.adoc @@ -190,6 +190,7 @@ await manager.setTargetFunctionRole( ['0x40c10f19'], // bytes4(keccak256('mint(address,uint256)')) MINTER ); +``` Even though each role has its own list of function permissions, each role member (`address`) has an execution delay that will dictate how long the account should wait to execute a function that requires its role. Delayed operations must have the xref:api:access.adoc#AccessManager-schedule-address-bytes-uint48-[`schedule`] function called on them first in the AccessManager before they can be executed, either by calling to the target function or using the AccessManager's xref:api:access.adoc#AccessManager-execute-address-bytes-[`execute`] function. From 7294d34c17ca215c201b3772ff67036fa4b1ef12 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Fri, 10 Nov 2023 15:15:38 +0000 Subject: [PATCH 109/167] Rename VotesTimestamp to ERC20VotesTimestampMock (#4731) --- .../token/{VotesTimestamp.sol => ERC20VotesTimestampMock.sol} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename contracts/mocks/token/{VotesTimestamp.sol => ERC20VotesTimestampMock.sol} (100%) diff --git a/contracts/mocks/token/VotesTimestamp.sol b/contracts/mocks/token/ERC20VotesTimestampMock.sol similarity index 100% rename from contracts/mocks/token/VotesTimestamp.sol rename to contracts/mocks/token/ERC20VotesTimestampMock.sol From 4e419d407cb13c4ebd64d3f47faa78964cbbdd71 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 12 Nov 2023 15:48:07 +0000 Subject: [PATCH 110/167] Bump axios from 1.5.1 to 1.6.1 (#4734) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 97546e5b1..f96576102 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4946,9 +4946,9 @@ "dev": true }, "node_modules/axios": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", - "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "dev": true, "dependencies": { "follow-redirects": "^1.15.0", From 4e17c2e95821b9bff7c2b1e099b078d319142c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Tue, 14 Nov 2023 21:40:26 +0000 Subject: [PATCH 111/167] Update SECURITY.md and remove support for 2.x version (#4683) --- SECURITY.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index e9a5148ec..9922c45e7 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -8,7 +8,7 @@ Security vulnerabilities should be disclosed to the project maintainers through Responsible disclosure of security vulnerabilities is rewarded through a bug bounty program on [Immunefi]. -There is a bonus reward for issues introduced in release candidates that are reported before making it into a stable release. +There is a bonus reward for issues introduced in release candidates that are reported before making it into a stable release. Learn more about release candidates at [`RELEASING.md`](./RELEASING.md). ## Security Patches @@ -30,13 +30,14 @@ Only critical severity bug fixes will be backported to past major releases. | Version | Critical security fixes | Other security fixes | | ------- | ----------------------- | -------------------- | -| 4.x | :white_check_mark: | :white_check_mark: | +| 5.x | :white_check_mark: | :white_check_mark: | +| 4.9 | :white_check_mark: | :x: | | 3.4 | :white_check_mark: | :x: | -| 2.5 | :white_check_mark: | :x: | +| 2.5 | :x: | :x: | | < 2.0 | :x: | :x: | Note as well that the Solidity language itself only guarantees security updates for the latest release. ## Legal -Smart contracts are a nascent technology and carry a high level of technical risk and uncertainty. OpenZeppelin Contracts is made available under the MIT License, which disclaims all warranties in relation to the project and which limits the liability of those that contribute and maintain the project, including OpenZeppelin. Your use of the project is also governed by the terms found at www.openzeppelin.com/tos (the "Terms"). As set out in the Terms, you are solely responsible for any use of OpenZeppelin Contracts and you assume all risks associated with any such use. This Security Policy in no way evidences or represents an on-going duty by any contributor, including OpenZeppelin, to correct any flaws or alert you to all or any of the potential risks of utilizing the project. +Smart contracts are a nascent technology and carry a high level of technical risk and uncertainty. OpenZeppelin Contracts is made available under the MIT License, which disclaims all warranties in relation to the project and which limits the liability of those that contribute and maintain the project, including OpenZeppelin. Your use of the project is also governed by the terms found at www.openzeppelin.com/tos (the "Terms"). As set out in the Terms, you are solely responsible for any use of OpenZeppelin Contracts and you assume all risks associated with any such use. This Security Policy in no way evidences or represents an on-going duty by any contributor, including OpenZeppelin, to correct any flaws or alert you to all or any of the potential risks of utilizing the project. From 6bc1173c8e37ca7de2201a0230bb08e395074da1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:34:51 +0300 Subject: [PATCH 112/167] Update dependency @nomicfoundation/hardhat-toolbox to v4 (#4742) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 101 +++++++++++++++++++++++++++++++++------------- package.json | 2 +- 2 files changed, 74 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index f96576102..9242999c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", - "@nomicfoundation/hardhat-toolbox": "^3.0.0", + "@nomicfoundation/hardhat-toolbox": "^4.0.0", "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.5", @@ -1613,6 +1613,12 @@ "fs-extra": "^8.1.0" } }, + "node_modules/@manypkg/find-root/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true + }, "node_modules/@manypkg/find-root/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -2129,34 +2135,34 @@ } }, "node_modules/@nomicfoundation/hardhat-toolbox": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-3.0.0.tgz", - "integrity": "sha512-MsteDXd0UagMksqm9KvcFG6gNKYNa3GGNCy73iQ6bEasEgg2v8Qjl6XA5hjs8o5UD5A3153B6W2BIVJ8SxYUtA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-4.0.0.tgz", + "integrity": "sha512-jhcWHp0aHaL0aDYj8IJl80v4SZXWMS1A2XxXa1CA6pBiFfJKuZinCkO6wb+POAt0LIfXB3gA3AgdcOccrcwBwA==", "dev": true, "peerDependencies": { "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", "@nomicfoundation/hardhat-ethers": "^3.0.0", "@nomicfoundation/hardhat-network-helpers": "^1.0.0", - "@nomicfoundation/hardhat-verify": "^1.0.0", - "@typechain/ethers-v6": "^0.4.0", - "@typechain/hardhat": "^8.0.0", + "@nomicfoundation/hardhat-verify": "^2.0.0", + "@typechain/ethers-v6": "^0.5.0", + "@typechain/hardhat": "^9.0.0", "@types/chai": "^4.2.0", "@types/mocha": ">=9.1.0", - "@types/node": ">=12.0.0", + "@types/node": ">=16.0.0", "chai": "^4.2.0", "ethers": "^6.4.0", "hardhat": "^2.11.0", "hardhat-gas-reporter": "^1.0.8", "solidity-coverage": "^0.8.1", "ts-node": ">=8.0.0", - "typechain": "^8.2.0", + "typechain": "^8.3.0", "typescript": ">=4.5.0" } }, "node_modules/@nomicfoundation/hardhat-verify": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-1.1.1.tgz", - "integrity": "sha512-9QsTYD7pcZaQFEA3tBb/D/oCStYDiEVDN7Dxeo/4SCyHRSm86APypxxdOMEPlGmXsAvd+p1j/dTODcpxb8aztA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.1.tgz", + "integrity": "sha512-TuJrhW5p9x92wDRiRhNkGQ/wzRmOkfCLkoRg8+IRxyeLigOALbayQEmkNiGWR03vGlxZS4znXhKI7y97JwZ6Og==", "dev": true, "peer": true, "dependencies": { @@ -3253,6 +3259,12 @@ "node": "^16.20 || ^18.16 || >=20" } }, + "node_modules/@truffle/contract/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true + }, "node_modules/@truffle/contract/node_modules/aes-js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", @@ -3701,6 +3713,12 @@ "node": "^16.20 || ^18.16 || >=20" } }, + "node_modules/@truffle/interface-adapter/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true + }, "node_modules/@truffle/interface-adapter/node_modules/aes-js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", @@ -4172,9 +4190,9 @@ "peer": true }, "node_modules/@typechain/ethers-v6": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@typechain/ethers-v6/-/ethers-v6-0.4.3.tgz", - "integrity": "sha512-TrxBsyb4ryhaY9keP6RzhFCviWYApcLCIRMPyWaKp2cZZrfaM3QBoxXTnw/eO4+DAY3l+8O0brNW0WgeQeOiDA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v6/-/ethers-v6-0.5.1.tgz", + "integrity": "sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==", "dev": true, "peer": true, "dependencies": { @@ -4183,24 +4201,24 @@ }, "peerDependencies": { "ethers": "6.x", - "typechain": "^8.3.1", + "typechain": "^8.3.2", "typescript": ">=4.7.0" } }, "node_modules/@typechain/hardhat": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-8.0.3.tgz", - "integrity": "sha512-MytSmJJn+gs7Mqrpt/gWkTCOpOQ6ZDfRrRT2gtZL0rfGe4QrU4x9ZdW15fFbVM/XTa+5EsKiOMYXhRABibNeng==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-9.1.0.tgz", + "integrity": "sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==", "dev": true, "peer": true, "dependencies": { "fs-extra": "^9.1.0" }, "peerDependencies": { - "@typechain/ethers-v6": "^0.4.3", + "@typechain/ethers-v6": "^0.5.1", "ethers": "^6.1.0", "hardhat": "^2.9.9", - "typechain": "^8.3.1" + "typechain": "^8.3.2" } }, "node_modules/@typechain/hardhat/node_modules/fs-extra": { @@ -4366,10 +4384,13 @@ "peer": true }, "node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true + "version": "20.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", + "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -15613,9 +15634,9 @@ } }, "node_modules/typechain": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.1.tgz", - "integrity": "sha512-fA7clol2IP/56yq6vkMTR+4URF1nGjV82Wx6Rf09EsqD4tkzMAvEaqYxVFCavJm/1xaRga/oD55K+4FtuXwQOQ==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.2.tgz", + "integrity": "sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==", "dev": true, "peer": true, "dependencies": { @@ -15843,6 +15864,12 @@ "node": ">=14.0" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -16036,6 +16063,12 @@ "node": ">=8.0.0" } }, + "node_modules/web3-bzz/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true + }, "node_modules/web3-core": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.2.tgz", @@ -16256,6 +16289,12 @@ "node": ">=8.0.0" } }, + "node_modules/web3-core/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true + }, "node_modules/web3-core/node_modules/bignumber.js": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", @@ -16590,6 +16629,12 @@ "node": ">=8.0.0" } }, + "node_modules/web3-eth-personal/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true + }, "node_modules/web3-eth-personal/node_modules/bn.js": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", diff --git a/package.json b/package.json index e5265dc51..c2c3a2675 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", - "@nomicfoundation/hardhat-toolbox": "^3.0.0", + "@nomicfoundation/hardhat-toolbox": "^4.0.0", "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.5", From e473bcf859e1ac4b6fd736d8e29b462a6192705c Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 23 Nov 2023 03:24:21 +0100 Subject: [PATCH 113/167] Migrate metatx tests to ethers.js (#4737) Co-authored-by: ernestognw --- test/helpers/account.js | 8 +- test/helpers/math.js | 1 + test/metatx/ERC2771Context.test.js | 155 +++--- test/metatx/ERC2771Forwarder.test.js | 678 ++++++++++++--------------- test/utils/Context.behavior.js | 48 +- test/utils/Context.test.js | 19 +- 6 files changed, 416 insertions(+), 493 deletions(-) diff --git a/test/helpers/account.js b/test/helpers/account.js index 8c0ea130b..96874b16b 100644 --- a/test/helpers/account.js +++ b/test/helpers/account.js @@ -4,10 +4,10 @@ const { impersonateAccount, setBalance } = require('@nomicfoundation/hardhat-net // Hardhat default balance const DEFAULT_BALANCE = 10000n * ethers.WeiPerEther; -async function impersonate(account, balance = DEFAULT_BALANCE) { - await impersonateAccount(account); - await setBalance(account, balance); -} +const impersonate = (account, balance = DEFAULT_BALANCE) => + impersonateAccount(account) + .then(() => setBalance(account, balance)) + .then(() => ethers.getSigner(account)); module.exports = { impersonate, diff --git a/test/helpers/math.js b/test/helpers/math.js index 2bc654c51..134f8b045 100644 --- a/test/helpers/math.js +++ b/test/helpers/math.js @@ -1,6 +1,7 @@ module.exports = { // sum of integer / bignumber sum: (...args) => args.reduce((acc, n) => acc + n, 0), + bigintSum: (...args) => args.reduce((acc, n) => acc + n, 0n), BNsum: (...args) => args.reduce((acc, n) => acc.add(n), web3.utils.toBN(0)), // min of integer / bignumber min: (...args) => args.slice(1).reduce((x, y) => (x < y ? x : y), args[0]), diff --git a/test/metatx/ERC2771Context.test.js b/test/metatx/ERC2771Context.test.js index b0ebccca8..bb6718ce2 100644 --- a/test/metatx/ERC2771Context.test.js +++ b/test/metatx/ERC2771Context.test.js @@ -1,134 +1,117 @@ -const ethSigUtil = require('eth-sig-util'); -const Wallet = require('ethereumjs-wallet').default; -const { getDomain, domainType } = require('../helpers/eip712'); -const { MAX_UINT48 } = require('../helpers/constants'); - -const { expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const ERC2771ContextMock = artifacts.require('ERC2771ContextMock'); -const ERC2771Forwarder = artifacts.require('ERC2771Forwarder'); -const ContextMockCaller = artifacts.require('ContextMockCaller'); +const { impersonate } = require('../helpers/account'); +const { getDomain } = require('../helpers/eip712'); +const { MAX_UINT48 } = require('../helpers/constants'); const { shouldBehaveLikeRegularContext } = require('../utils/Context.behavior'); -contract('ERC2771Context', function (accounts) { - const [, trustedForwarder] = accounts; - +async function fixture() { + const [sender] = await ethers.getSigners(); + + const forwarder = await ethers.deployContract('ERC2771Forwarder', []); + const forwarderAsSigner = await impersonate(forwarder.target); + const context = await ethers.deployContract('ERC2771ContextMock', [forwarder]); + const domain = await getDomain(forwarder); + const types = { + ForwardRequest: [ + { name: 'from', type: 'address' }, + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'gas', type: 'uint256' }, + { name: 'nonce', type: 'uint256' }, + { name: 'deadline', type: 'uint48' }, + { name: 'data', type: 'bytes' }, + ], + }; + + return { sender, forwarder, forwarderAsSigner, context, domain, types }; +} + +describe('ERC2771Context', function () { beforeEach(async function () { - this.forwarder = await ERC2771Forwarder.new('ERC2771Forwarder'); - this.recipient = await ERC2771ContextMock.new(this.forwarder.address); - - this.domain = await getDomain(this.forwarder); - this.types = { - EIP712Domain: domainType(this.domain), - ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'deadline', type: 'uint48' }, - { name: 'data', type: 'bytes' }, - ], - }; + Object.assign(this, await loadFixture(fixture)); }); it('recognize trusted forwarder', async function () { - expect(await this.recipient.isTrustedForwarder(this.forwarder.address)).to.equal(true); + expect(await this.context.isTrustedForwarder(this.forwarder)).to.equal(true); }); it('returns the trusted forwarder', async function () { - expect(await this.recipient.trustedForwarder()).to.equal(this.forwarder.address); + expect(await this.context.trustedForwarder()).to.equal(this.forwarder.target); }); - context('when called directly', function () { - beforeEach(async function () { - this.context = this.recipient; // The Context behavior expects the contract in this.context - this.caller = await ContextMockCaller.new(); - }); - - shouldBehaveLikeRegularContext(...accounts); + describe('when called directly', function () { + shouldBehaveLikeRegularContext(); }); - context('when receiving a relayed call', function () { - beforeEach(async function () { - this.wallet = Wallet.generate(); - this.sender = web3.utils.toChecksumAddress(this.wallet.getAddressString()); - this.data = { - types: this.types, - domain: this.domain, - primaryType: 'ForwardRequest', - }; - }); - + describe('when receiving a relayed call', function () { describe('msgSender', function () { it('returns the relayed transaction original sender', async function () { - const data = this.recipient.contract.methods.msgSender().encodeABI(); + const nonce = await this.forwarder.nonces(this.sender); + const data = this.context.interface.encodeFunctionData('msgSender'); const req = { - from: this.sender, - to: this.recipient.address, - value: '0', - gas: '100000', - nonce: (await this.forwarder.nonces(this.sender)).toString(), - deadline: MAX_UINT48, + from: await this.sender.getAddress(), + to: await this.context.getAddress(), + value: 0n, data, + gas: 100000n, + nonce, + deadline: MAX_UINT48, }; - req.signature = ethSigUtil.signTypedMessage(this.wallet.getPrivateKey(), { - data: { ...this.data, message: req }, - }); + req.signature = await this.sender.signTypedData(this.domain, this.types, req); + expect(await this.forwarder.verify(req)).to.equal(true); - const { tx } = await this.forwarder.execute(req); - await expectEvent.inTransaction(tx, ERC2771ContextMock, 'Sender', { sender: this.sender }); + await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender.address); }); it('returns the original sender when calldata length is less than 20 bytes (address length)', async function () { - // The forwarder doesn't produce calls with calldata length less than 20 bytes - const recipient = await ERC2771ContextMock.new(trustedForwarder); - - const { receipt } = await recipient.msgSender({ from: trustedForwarder }); - - await expectEvent(receipt, 'Sender', { sender: trustedForwarder }); + // The forwarder doesn't produce calls with calldata length less than 20 bytes so `this.forwarderAsSigner` is used instead. + await expect(this.context.connect(this.forwarderAsSigner).msgSender()) + .to.emit(this.context, 'Sender') + .withArgs(this.forwarder.target); }); }); describe('msgData', function () { it('returns the relayed transaction original data', async function () { - const integerValue = '42'; - const stringValue = 'OpenZeppelin'; - const data = this.recipient.contract.methods.msgData(integerValue, stringValue).encodeABI(); + const args = [42n, 'OpenZeppelin']; + + const nonce = await this.forwarder.nonces(this.sender); + const data = this.context.interface.encodeFunctionData('msgData', args); const req = { - from: this.sender, - to: this.recipient.address, - value: '0', - gas: '100000', - nonce: (await this.forwarder.nonces(this.sender)).toString(), - deadline: MAX_UINT48, + from: await this.sender.getAddress(), + to: await this.context.getAddress(), + value: 0n, data, + gas: 100000n, + nonce, + deadline: MAX_UINT48, }; - req.signature = ethSigUtil.signTypedMessage(this.wallet.getPrivateKey(), { - data: { ...this.data, message: req }, - }); + req.signature = this.sender.signTypedData(this.domain, this.types, req); + expect(await this.forwarder.verify(req)).to.equal(true); - const { tx } = await this.forwarder.execute(req); - await expectEvent.inTransaction(tx, ERC2771ContextMock, 'Data', { data, integerValue, stringValue }); + await expect(this.forwarder.execute(req)) + .to.emit(this.context, 'Data') + .withArgs(data, ...args); }); }); it('returns the full original data when calldata length is less than 20 bytes (address length)', async function () { - // The forwarder doesn't produce calls with calldata length less than 20 bytes - const recipient = await ERC2771ContextMock.new(trustedForwarder); - - const { receipt } = await recipient.msgDataShort({ from: trustedForwarder }); + const data = this.context.interface.encodeFunctionData('msgDataShort'); - const data = recipient.contract.methods.msgDataShort().encodeABI(); - await expectEvent(receipt, 'DataShort', { data }); + // The forwarder doesn't produce calls with calldata length less than 20 bytes so `this.forwarderAsSigner` is used instead. + await expect(await this.context.connect(this.forwarderAsSigner).msgDataShort()) + .to.emit(this.context, 'DataShort') + .withArgs(data); }); }); }); diff --git a/test/metatx/ERC2771Forwarder.test.js b/test/metatx/ERC2771Forwarder.test.js index 0e0998832..a665471f3 100644 --- a/test/metatx/ERC2771Forwarder.test.js +++ b/test/metatx/ERC2771Forwarder.test.js @@ -1,245 +1,217 @@ -const ethSigUtil = require('eth-sig-util'); -const Wallet = require('ethereumjs-wallet').default; -const { getDomain, domainType } = require('../helpers/eip712'); -const { expectRevertCustomError } = require('../helpers/customError'); - -const { constants, expectRevert, expectEvent, time } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); - -const ERC2771Forwarder = artifacts.require('ERC2771Forwarder'); -const CallReceiverMockTrustingForwarder = artifacts.require('CallReceiverMockTrustingForwarder'); - -contract('ERC2771Forwarder', function (accounts) { - const [, refundReceiver, another] = accounts; - - const tamperedValues = { - from: another, - value: web3.utils.toWei('0.5'), - data: '0x1742', +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + +const { getDomain } = require('../helpers/eip712'); +const { bigint: time } = require('../helpers/time'); +const { bigintSum: sum } = require('../helpers/math'); + +async function fixture() { + const [sender, refundReceiver, another, ...accounts] = await ethers.getSigners(); + + const forwarder = await ethers.deployContract('ERC2771Forwarder', ['ERC2771Forwarder']); + const receiver = await ethers.deployContract('CallReceiverMockTrustingForwarder', [forwarder]); + const domain = await getDomain(forwarder); + const types = { + ForwardRequest: [ + { name: 'from', type: 'address' }, + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'gas', type: 'uint256' }, + { name: 'nonce', type: 'uint256' }, + { name: 'deadline', type: 'uint48' }, + { name: 'data', type: 'bytes' }, + ], }; - beforeEach(async function () { - this.forwarder = await ERC2771Forwarder.new('ERC2771Forwarder'); - - this.domain = await getDomain(this.forwarder); - this.types = { - EIP712Domain: domainType(this.domain), - ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'deadline', type: 'uint48' }, - { name: 'data', type: 'bytes' }, - ], - }; - - this.alice = Wallet.generate(); - this.alice.address = web3.utils.toChecksumAddress(this.alice.getAddressString()); - - this.timestamp = await time.latest(); - this.receiver = await CallReceiverMockTrustingForwarder.new(this.forwarder.address); - this.request = { - from: this.alice.address, - to: this.receiver.address, - value: '0', - gas: '100000', - data: this.receiver.contract.methods.mockFunction().encodeABI(), - deadline: this.timestamp.toNumber() + 60, // 1 minute - }; - this.requestData = { - ...this.request, - nonce: (await this.forwarder.nonces(this.alice.address)).toString(), + const forgeRequest = async (override = {}, signer = sender) => { + const req = { + from: await signer.getAddress(), + to: await receiver.getAddress(), + value: 0n, + data: receiver.interface.encodeFunctionData('mockFunction'), + gas: 100000n, + deadline: (await time.clock.timestamp()) + 60n, + nonce: await forwarder.nonces(sender), + ...override, }; + req.signature = await signer.signTypedData(domain, types, req); + return req; + }; - this.forgeData = request => ({ - types: this.types, - domain: this.domain, - primaryType: 'ForwardRequest', - message: { ...this.requestData, ...request }, + const estimateRequest = request => + ethers.provider.estimateGas({ + from: forwarder, + to: request.to, + data: ethers.solidityPacked(['bytes', 'address'], [request.data, request.from]), + value: request.value, + gasLimit: request.gas, }); - this.sign = (privateKey, request) => - ethSigUtil.signTypedMessage(privateKey, { - data: this.forgeData(request), - }); - this.estimateRequest = request => - web3.eth.estimateGas({ - from: this.forwarder.address, - to: request.to, - data: web3.utils.encodePacked({ value: request.data, type: 'bytes' }, { value: request.from, type: 'address' }), - value: request.value, - gas: request.gas, - }); - this.requestData.signature = this.sign(this.alice.getPrivateKey()); + return { + sender, + refundReceiver, + another, + accounts, + forwarder, + receiver, + forgeRequest, + estimateRequest, + domain, + types, + }; +} + +// values or function to tamper with a signed request. +const tamperedValues = { + from: ethers.Wallet.createRandom().address, + to: ethers.Wallet.createRandom().address, + value: ethers.parseEther('0.5'), + data: '0x1742', + signature: s => { + const t = ethers.toBeArray(s); + t[42] ^= 0xff; + return ethers.hexlify(t); + }, +}; + +describe('ERC2771Forwarder', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); - context('verify', function () { - context('with valid signature', function () { + describe('verify', function () { + describe('with valid signature', function () { it('returns true without altering the nonce', async function () { - expect(await this.forwarder.nonces(this.requestData.from)).to.be.bignumber.equal( - web3.utils.toBN(this.requestData.nonce), - ); - expect(await this.forwarder.verify(this.requestData)).to.be.equal(true); - expect(await this.forwarder.nonces(this.requestData.from)).to.be.bignumber.equal( - web3.utils.toBN(this.requestData.nonce), - ); + const request = await this.forgeRequest(); + expect(await this.forwarder.nonces(request.from)).to.be.equal(request.nonce); + expect(await this.forwarder.verify(request)).to.be.equal(true); + expect(await this.forwarder.nonces(request.from)).to.be.equal(request.nonce); }); }); - context('with tampered values', function () { + describe('with tampered values', function () { for (const [key, value] of Object.entries(tamperedValues)) { it(`returns false with tampered ${key}`, async function () { - expect(await this.forwarder.verify(this.forgeData({ [key]: value }).message)).to.be.equal(false); + const request = await this.forgeRequest(); + request[key] = typeof value == 'function' ? value(request[key]) : value; + + expect(await this.forwarder.verify(request)).to.be.equal(false); }); } - it('returns false with an untrustful to', async function () { - expect(await this.forwarder.verify(this.forgeData({ to: another }).message)).to.be.equal(false); - }); - - it('returns false with tampered signature', async function () { - const tamperedsign = web3.utils.hexToBytes(this.requestData.signature); - tamperedsign[42] ^= 0xff; - this.requestData.signature = web3.utils.bytesToHex(tamperedsign); - expect(await this.forwarder.verify(this.requestData)).to.be.equal(false); - }); - it('returns false with valid signature for non-current nonce', async function () { - const req = { - ...this.requestData, - nonce: this.requestData.nonce + 1, - }; - req.signature = this.sign(this.alice.getPrivateKey(), req); - expect(await this.forwarder.verify(req)).to.be.equal(false); + const request = await this.forgeRequest({ nonce: 1337n }); + expect(await this.forwarder.verify(request)).to.be.equal(false); }); it('returns false with valid signature for expired deadline', async function () { - const req = { - ...this.requestData, - deadline: this.timestamp - 1, - }; - req.signature = this.sign(this.alice.getPrivateKey(), req); - expect(await this.forwarder.verify(req)).to.be.equal(false); + const request = await this.forgeRequest({ deadline: (await time.clock.timestamp()) - 1n }); + expect(await this.forwarder.verify(request)).to.be.equal(false); }); }); }); - context('execute', function () { - context('with valid requests', function () { - beforeEach(async function () { - expect(await this.forwarder.nonces(this.requestData.from)).to.be.bignumber.equal( - web3.utils.toBN(this.requestData.nonce), - ); - }); - + describe('execute', function () { + describe('with valid requests', function () { it('emits an event and consumes nonce for a successful request', async function () { - const receipt = await this.forwarder.execute(this.requestData); - await expectEvent.inTransaction(receipt.tx, this.receiver, 'MockFunctionCalled'); - await expectEvent.inTransaction(receipt.tx, this.forwarder, 'ExecutedForwardRequest', { - signer: this.requestData.from, - nonce: web3.utils.toBN(this.requestData.nonce), - success: true, - }); - expect(await this.forwarder.nonces(this.requestData.from)).to.be.bignumber.equal( - web3.utils.toBN(this.requestData.nonce + 1), - ); + const request = await this.forgeRequest(); + + expect(await this.forwarder.nonces(request.from)).to.equal(request.nonce); + + await expect(this.forwarder.execute(request)) + .to.emit(this.receiver, 'MockFunctionCalled') + .to.emit(this.forwarder, 'ExecutedForwardRequest') + .withArgs(request.from, request.nonce, true); + + expect(await this.forwarder.nonces(request.from)).to.be.equal(request.nonce + 1n); }); it('reverts with an unsuccessful request', async function () { - const req = { - ...this.requestData, - data: this.receiver.contract.methods.mockFunctionRevertsNoReason().encodeABI(), - }; - req.signature = this.sign(this.alice.getPrivateKey(), req); - await expectRevertCustomError(this.forwarder.execute(req), 'FailedInnerCall', []); + const request = await this.forgeRequest({ + data: this.receiver.interface.encodeFunctionData('mockFunctionRevertsNoReason'), + }); + + await expect(this.forwarder.execute(request)).to.be.revertedWithCustomError(this.forwarder, 'FailedInnerCall'); }); }); - context('with tampered request', function () { + describe('with tampered request', function () { for (const [key, value] of Object.entries(tamperedValues)) { it(`reverts with tampered ${key}`, async function () { - const data = this.forgeData({ [key]: value }); - await expectRevertCustomError( - this.forwarder.execute(data.message, { - value: key == 'value' ? value : 0, // To avoid MismatchedValue error - }), - 'ERC2771ForwarderInvalidSigner', - [ethSigUtil.recoverTypedSignature({ data, sig: this.requestData.signature }), data.message.from], - ); + const request = await this.forgeRequest(); + request[key] = typeof value == 'function' ? value(request[key]) : value; + + const promise = this.forwarder.execute(request, { value: key == 'value' ? value : 0 }); + if (key != 'to') { + await expect(promise) + .to.be.revertedWithCustomError(this.forwarder, 'ERC2771ForwarderInvalidSigner') + .withArgs(ethers.verifyTypedData(this.domain, this.types, request, request.signature), request.from); + } else { + await expect(promise) + .to.be.revertedWithCustomError(this.forwarder, 'ERC2771UntrustfulTarget') + .withArgs(request.to, this.forwarder.target); + } }); } - it('reverts with an untrustful to', async function () { - const data = this.forgeData({ to: another }); - await expectRevertCustomError(this.forwarder.execute(data.message), 'ERC2771UntrustfulTarget', [ - data.message.to, - this.forwarder.address, - ]); - }); - - it('reverts with tampered signature', async function () { - const tamperedSig = web3.utils.hexToBytes(this.requestData.signature); - tamperedSig[42] ^= 0xff; - this.requestData.signature = web3.utils.bytesToHex(tamperedSig); - await expectRevertCustomError(this.forwarder.execute(this.requestData), 'ERC2771ForwarderInvalidSigner', [ - ethSigUtil.recoverTypedSignature({ data: this.forgeData(), sig: tamperedSig }), - this.requestData.from, - ]); - }); - it('reverts with valid signature for non-current nonce', async function () { - // Execute first a request - await this.forwarder.execute(this.requestData); - - // And then fail due to an already used nonce - await expectRevertCustomError(this.forwarder.execute(this.requestData), 'ERC2771ForwarderInvalidSigner', [ - ethSigUtil.recoverTypedSignature({ - data: this.forgeData({ ...this.requestData, nonce: this.requestData.nonce + 1 }), - sig: this.requestData.signature, - }), - this.requestData.from, - ]); + const request = await this.forgeRequest(); + + // consume nonce + await this.forwarder.execute(request); + + // nonce has changed + await expect(this.forwarder.execute(request)) + .to.be.revertedWithCustomError(this.forwarder, 'ERC2771ForwarderInvalidSigner') + .withArgs( + ethers.verifyTypedData( + this.domain, + this.types, + { ...request, nonce: request.nonce + 1n }, + request.signature, + ), + request.from, + ); }); it('reverts with valid signature for expired deadline', async function () { - const req = { - ...this.requestData, - deadline: this.timestamp - 1, - }; - req.signature = this.sign(this.alice.getPrivateKey(), req); - await expectRevertCustomError(this.forwarder.execute(req), 'ERC2771ForwarderExpiredRequest', [ - this.timestamp - 1, - ]); + const request = await this.forgeRequest({ deadline: (await time.clock.timestamp()) - 1n }); + + await expect(this.forwarder.execute(request)) + .to.be.revertedWithCustomError(this.forwarder, 'ERC2771ForwarderExpiredRequest') + .withArgs(request.deadline); }); it('reverts with valid signature but mismatched value', async function () { - const value = 100; - const req = { - ...this.requestData, - value, - }; - req.signature = this.sign(this.alice.getPrivateKey(), req); - await expectRevertCustomError(this.forwarder.execute(req), 'ERC2771ForwarderMismatchedValue', [0, value]); + const request = await this.forgeRequest({ value: 100n }); + + await expect(this.forwarder.execute(request)) + .to.be.revertedWithCustomError(this.forwarder, 'ERC2771ForwarderMismatchedValue') + .withArgs(request.value, 0n); }); }); it('bubbles out of gas', async function () { - this.requestData.data = this.receiver.contract.methods.mockFunctionOutOfGas().encodeABI(); - this.requestData.gas = 1_000_000; - this.requestData.signature = this.sign(this.alice.getPrivateKey()); + const request = await this.forgeRequest({ + data: this.receiver.interface.encodeFunctionData('mockFunctionOutOfGas'), + gas: 1_000_000n, + }); - const gasAvailable = 100_000; - await expectRevert.assertion(this.forwarder.execute(this.requestData, { gas: gasAvailable })); + const gasLimit = 100_000n; + await expect(this.forwarder.execute(request, { gasLimit })).to.be.revertedWithoutReason(); - const { transactions } = await web3.eth.getBlock('latest'); - const { gasUsed } = await web3.eth.getTransactionReceipt(transactions[0]); + const { gasUsed } = await ethers.provider + .getBlock('latest') + .then(block => block.getTransaction(0)) + .then(tx => ethers.provider.getTransactionReceipt(tx.hash)); - expect(gasUsed).to.be.equal(gasAvailable); + expect(gasUsed).to.be.equal(gasLimit); }); it('bubbles out of gas forced by the relayer', async function () { + const request = await this.forgeRequest(); + // If there's an incentive behind executing requests, a malicious relayer could grief // the forwarder by executing requests and providing a top-level call gas limit that // is too low to successfully finish the request after the 63/64 rule. @@ -247,294 +219,252 @@ contract('ERC2771Forwarder', function (accounts) { // We set the baseline to the gas limit consumed by a successful request if it was executed // normally. Note this includes the 21000 buffer that also the relayer will be charged to // start a request execution. - const estimate = await this.estimateRequest(this.request); + const estimate = await this.estimateRequest(request); // Because the relayer call consumes gas until the `CALL` opcode, the gas left after failing // the subcall won't enough to finish the top level call (after testing), so we add a // moderated buffer. - const gasAvailable = estimate + 2_000; + const gasLimit = estimate + 2_000n; // The subcall out of gas should be caught by the contract and then bubbled up consuming // the available gas with an `invalid` opcode. - await expectRevert.outOfGas(this.forwarder.execute(this.requestData, { gas: gasAvailable })); + await expect(this.forwarder.execute(request, { gasLimit })).to.be.revertedWithoutReason(); - const { transactions } = await web3.eth.getBlock('latest'); - const { gasUsed } = await web3.eth.getTransactionReceipt(transactions[0]); + const { gasUsed } = await ethers.provider + .getBlock('latest') + .then(block => block.getTransaction(0)) + .then(tx => ethers.provider.getTransactionReceipt(tx.hash)); // We assert that indeed the gas was totally consumed. - expect(gasUsed).to.be.equal(gasAvailable); + expect(gasUsed).to.be.equal(gasLimit); }); }); - context('executeBatch', function () { - const batchValue = requestDatas => requestDatas.reduce((value, request) => value + Number(request.value), 0); + describe('executeBatch', function () { + const requestsValue = requests => sum(...requests.map(request => request.value)); + const requestCount = 3; + const idx = 1; // index that will be tampered with beforeEach(async function () { - this.bob = Wallet.generate(); - this.bob.address = web3.utils.toChecksumAddress(this.bob.getAddressString()); - - this.eve = Wallet.generate(); - this.eve.address = web3.utils.toChecksumAddress(this.eve.getAddressString()); - - this.signers = [this.alice, this.bob, this.eve]; - - this.requestDatas = await Promise.all( - this.signers.map(async ({ address }) => ({ - ...this.requestData, - from: address, - nonce: (await this.forwarder.nonces(address)).toString(), - value: web3.utils.toWei('10', 'gwei'), - })), - ); - - this.requestDatas = this.requestDatas.map((requestData, i) => ({ - ...requestData, - signature: this.sign(this.signers[i].getPrivateKey(), requestData), - })); - - this.msgValue = batchValue(this.requestDatas); - - this.gasUntil = async reqIdx => { - const gas = 0; - const estimations = await Promise.all( - new Array(reqIdx + 1).fill().map((_, idx) => this.estimateRequest(this.requestDatas[idx])), - ); - return estimations.reduce((acc, estimation) => acc + estimation, gas); - }; + this.forgeRequests = override => + Promise.all(this.accounts.slice(0, requestCount).map(signer => this.forgeRequest(override, signer))); + this.requests = await this.forgeRequests({ value: 10n }); + this.value = requestsValue(this.requests); }); - context('with valid requests', function () { - beforeEach(async function () { - for (const request of this.requestDatas) { + describe('with valid requests', function () { + it('sanity', async function () { + for (const request of this.requests) { expect(await this.forwarder.verify(request)).to.be.equal(true); } - - this.receipt = await this.forwarder.executeBatch(this.requestDatas, another, { value: this.msgValue }); }); it('emits events', async function () { - for (const request of this.requestDatas) { - await expectEvent.inTransaction(this.receipt.tx, this.receiver, 'MockFunctionCalled'); - await expectEvent.inTransaction(this.receipt.tx, this.forwarder, 'ExecutedForwardRequest', { - signer: request.from, - nonce: web3.utils.toBN(request.nonce), - success: true, - }); + const receipt = this.forwarder.executeBatch(this.requests, this.another, { value: this.value }); + + for (const request of this.requests) { + await expect(receipt) + .to.emit(this.receiver, 'MockFunctionCalled') + .to.emit(this.forwarder, 'ExecutedForwardRequest') + .withArgs(request.from, request.nonce, true); } }); it('increase nonces', async function () { - for (const request of this.requestDatas) { - expect(await this.forwarder.nonces(request.from)).to.be.bignumber.eq(web3.utils.toBN(request.nonce + 1)); + await this.forwarder.executeBatch(this.requests, this.another, { value: this.value }); + + for (const request of this.requests) { + expect(await this.forwarder.nonces(request.from)).to.be.equal(request.nonce + 1n); } }); }); - context('with tampered requests', function () { - beforeEach(async function () { - this.idx = 1; // Tampered idx - }); - + describe('with tampered requests', function () { it('reverts with mismatched value', async function () { - this.requestDatas[this.idx].value = 100; - this.requestDatas[this.idx].signature = this.sign( - this.signers[this.idx].getPrivateKey(), - this.requestDatas[this.idx], - ); - await expectRevertCustomError( - this.forwarder.executeBatch(this.requestDatas, another, { value: this.msgValue }), - 'ERC2771ForwarderMismatchedValue', - [batchValue(this.requestDatas), this.msgValue], - ); + // tamper value of one of the request + resign + this.requests[idx] = await this.forgeRequest({ value: 100n }, this.accounts[1]); + + await expect(this.forwarder.executeBatch(this.requests, this.another, { value: this.value })) + .to.be.revertedWithCustomError(this.forwarder, 'ERC2771ForwarderMismatchedValue') + .withArgs(requestsValue(this.requests), this.value); }); - context('when the refund receiver is the zero address', function () { + describe('when the refund receiver is the zero address', function () { beforeEach(function () { - this.refundReceiver = constants.ZERO_ADDRESS; + this.refundReceiver = ethers.ZeroAddress; }); for (const [key, value] of Object.entries(tamperedValues)) { it(`reverts with at least one tampered request ${key}`, async function () { - const data = this.forgeData({ ...this.requestDatas[this.idx], [key]: value }); - - this.requestDatas[this.idx] = data.message; - - await expectRevertCustomError( - this.forwarder.executeBatch(this.requestDatas, this.refundReceiver, { value: this.msgValue }), - 'ERC2771ForwarderInvalidSigner', - [ - ethSigUtil.recoverTypedSignature({ data, sig: this.requestDatas[this.idx].signature }), - data.message.from, - ], - ); + this.requests[idx][key] = typeof value == 'function' ? value(this.requests[idx][key]) : value; + + const promise = this.forwarder.executeBatch(this.requests, this.refundReceiver, { value: this.value }); + if (key != 'to') { + await expect(promise) + .to.be.revertedWithCustomError(this.forwarder, 'ERC2771ForwarderInvalidSigner') + .withArgs( + ethers.verifyTypedData(this.domain, this.types, this.requests[idx], this.requests[idx].signature), + this.requests[idx].from, + ); + } else { + await expect(promise) + .to.be.revertedWithCustomError(this.forwarder, 'ERC2771UntrustfulTarget') + .withArgs(this.requests[idx].to, this.forwarder.target); + } }); } - it('reverts with at least one untrustful to', async function () { - const data = this.forgeData({ ...this.requestDatas[this.idx], to: another }); - - this.requestDatas[this.idx] = data.message; - - await expectRevertCustomError( - this.forwarder.executeBatch(this.requestDatas, this.refundReceiver, { value: this.msgValue }), - 'ERC2771UntrustfulTarget', - [this.requestDatas[this.idx].to, this.forwarder.address], - ); - }); - - it('reverts with at least one tampered request signature', async function () { - const tamperedSig = web3.utils.hexToBytes(this.requestDatas[this.idx].signature); - tamperedSig[42] ^= 0xff; - - this.requestDatas[this.idx].signature = web3.utils.bytesToHex(tamperedSig); - - await expectRevertCustomError( - this.forwarder.executeBatch(this.requestDatas, this.refundReceiver, { value: this.msgValue }), - 'ERC2771ForwarderInvalidSigner', - [ - ethSigUtil.recoverTypedSignature({ - data: this.forgeData(this.requestDatas[this.idx]), - sig: this.requestDatas[this.idx].signature, - }), - this.requestDatas[this.idx].from, - ], - ); - }); - it('reverts with at least one valid signature for non-current nonce', async function () { // Execute first a request - await this.forwarder.execute(this.requestDatas[this.idx], { value: this.requestDatas[this.idx].value }); + await this.forwarder.execute(this.requests[idx], { value: this.requests[idx].value }); // And then fail due to an already used nonce - await expectRevertCustomError( - this.forwarder.executeBatch(this.requestDatas, this.refundReceiver, { value: this.msgValue }), - 'ERC2771ForwarderInvalidSigner', - [ - ethSigUtil.recoverTypedSignature({ - data: this.forgeData({ ...this.requestDatas[this.idx], nonce: this.requestDatas[this.idx].nonce + 1 }), - sig: this.requestDatas[this.idx].signature, - }), - this.requestDatas[this.idx].from, - ], - ); + await expect(this.forwarder.executeBatch(this.requests, this.refundReceiver, { value: this.value })) + .to.be.revertedWithCustomError(this.forwarder, 'ERC2771ForwarderInvalidSigner') + .withArgs( + ethers.verifyTypedData( + this.domain, + this.types, + { ...this.requests[idx], nonce: this.requests[idx].nonce + 1n }, + this.requests[idx].signature, + ), + this.requests[idx].from, + ); }); it('reverts with at least one valid signature for expired deadline', async function () { - this.requestDatas[this.idx].deadline = this.timestamp.toNumber() - 1; - this.requestDatas[this.idx].signature = this.sign( - this.signers[this.idx].getPrivateKey(), - this.requestDatas[this.idx], - ); - await expectRevertCustomError( - this.forwarder.executeBatch(this.requestDatas, this.refundReceiver, { value: this.msgValue }), - 'ERC2771ForwarderExpiredRequest', - [this.timestamp.toNumber() - 1], + this.requests[idx] = await this.forgeRequest( + { ...this.requests[idx], deadline: (await time.clock.timestamp()) - 1n }, + this.accounts[1], ); + + await expect(this.forwarder.executeBatch(this.requests, this.refundReceiver, { value: this.amount })) + .to.be.revertedWithCustomError(this.forwarder, 'ERC2771ForwarderExpiredRequest') + .withArgs(this.requests[idx].deadline); }); }); - context('when the refund receiver is a known address', function () { + describe('when the refund receiver is a known address', function () { beforeEach(async function () { - this.refundReceiver = refundReceiver; - this.initialRefundReceiverBalance = web3.utils.toBN(await web3.eth.getBalance(this.refundReceiver)); - this.initialTamperedRequestNonce = await this.forwarder.nonces(this.requestDatas[this.idx].from); + this.initialRefundReceiverBalance = await ethers.provider.getBalance(this.refundReceiver); + this.initialTamperedRequestNonce = await this.forwarder.nonces(this.requests[idx].from); }); for (const [key, value] of Object.entries(tamperedValues)) { it(`ignores a request with tampered ${key} and refunds its value`, async function () { - const data = this.forgeData({ ...this.requestDatas[this.idx], [key]: value }); - - this.requestDatas[this.idx] = data.message; - - const receipt = await this.forwarder.executeBatch(this.requestDatas, this.refundReceiver, { - value: batchValue(this.requestDatas), - }); - expect(receipt.logs.filter(({ event }) => event === 'ExecutedForwardRequest').length).to.be.equal(2); + this.requests[idx][key] = typeof value == 'function' ? value(this.requests[idx][key]) : value; + + const events = await this.forwarder + .executeBatch(this.requests, this.refundReceiver, { value: requestsValue(this.requests) }) + .then(tx => tx.wait()) + .then(receipt => + receipt.logs.filter( + log => log?.fragment?.type == 'event' && log?.fragment?.name == 'ExecutedForwardRequest', + ), + ); + + expect(events).to.have.lengthOf(this.requests.length - 1); }); } it('ignores a request with a valid signature for non-current nonce', async function () { // Execute first a request - await this.forwarder.execute(this.requestDatas[this.idx], { value: this.requestDatas[this.idx].value }); + await this.forwarder.execute(this.requests[idx], { value: this.requests[idx].value }); this.initialTamperedRequestNonce++; // Should be already incremented by the individual `execute` // And then ignore the same request in a batch due to an already used nonce - const receipt = await this.forwarder.executeBatch(this.requestDatas, this.refundReceiver, { - value: this.msgValue, - }); - expect(receipt.logs.filter(({ event }) => event === 'ExecutedForwardRequest').length).to.be.equal(2); + const events = await this.forwarder + .executeBatch(this.requests, this.refundReceiver, { value: this.value }) + .then(tx => tx.wait()) + .then(receipt => + receipt.logs.filter( + log => log?.fragment?.type == 'event' && log?.fragment?.name == 'ExecutedForwardRequest', + ), + ); + + expect(events).to.have.lengthOf(this.requests.length - 1); }); it('ignores a request with a valid signature for expired deadline', async function () { - this.requestDatas[this.idx].deadline = this.timestamp.toNumber() - 1; - this.requestDatas[this.idx].signature = this.sign( - this.signers[this.idx].getPrivateKey(), - this.requestDatas[this.idx], + this.requests[idx] = await this.forgeRequest( + { ...this.requests[idx], deadline: (await time.clock.timestamp()) - 1n }, + this.accounts[1], ); - const receipt = await this.forwarder.executeBatch(this.requestDatas, this.refundReceiver, { - value: this.msgValue, - }); - expect(receipt.logs.filter(({ event }) => event === 'ExecutedForwardRequest').length).to.be.equal(2); + const events = await this.forwarder + .executeBatch(this.requests, this.refundReceiver, { value: this.value }) + .then(tx => tx.wait()) + .then(receipt => + receipt.logs.filter( + log => log?.fragment?.type == 'event' && log?.fragment?.name == 'ExecutedForwardRequest', + ), + ); + + expect(events).to.have.lengthOf(this.requests.length - 1); }); afterEach(async function () { // The invalid request value was refunded - expect(await web3.eth.getBalance(this.refundReceiver)).to.be.bignumber.equal( - this.initialRefundReceiverBalance.add(web3.utils.toBN(this.requestDatas[this.idx].value)), + expect(await ethers.provider.getBalance(this.refundReceiver)).to.be.equal( + this.initialRefundReceiverBalance + this.requests[idx].value, ); // The invalid request from's nonce was not incremented - expect(await this.forwarder.nonces(this.requestDatas[this.idx].from)).to.be.bignumber.eq( - web3.utils.toBN(this.initialTamperedRequestNonce), - ); + expect(await this.forwarder.nonces(this.requests[idx].from)).to.be.equal(this.initialTamperedRequestNonce); }); }); it('bubbles out of gas', async function () { - this.requestDatas[this.idx].data = this.receiver.contract.methods.mockFunctionOutOfGas().encodeABI(); - this.requestDatas[this.idx].gas = 1_000_000; - this.requestDatas[this.idx].signature = this.sign( - this.signers[this.idx].getPrivateKey(), - this.requestDatas[this.idx], - ); + this.requests[idx] = await this.forgeRequest({ + data: this.receiver.interface.encodeFunctionData('mockFunctionOutOfGas'), + gas: 1_000_000n, + }); - const gasAvailable = 300_000; - await expectRevert.assertion( - this.forwarder.executeBatch(this.requestDatas, constants.ZERO_ADDRESS, { - gas: gasAvailable, - value: this.requestDatas.reduce((acc, { value }) => acc + Number(value), 0), + const gasLimit = 300_000n; + await expect( + this.forwarder.executeBatch(this.requests, ethers.ZeroAddress, { + gasLimit, + value: requestsValue(this.requests), }), - ); + ).to.be.revertedWithoutReason(); - const { transactions } = await web3.eth.getBlock('latest'); - const { gasUsed } = await web3.eth.getTransactionReceipt(transactions[0]); + const { gasUsed } = await ethers.provider + .getBlock('latest') + .then(block => block.getTransaction(0)) + .then(tx => ethers.provider.getTransactionReceipt(tx.hash)); - expect(gasUsed).to.be.equal(gasAvailable); + expect(gasUsed).to.be.equal(gasLimit); }); it('bubbles out of gas forced by the relayer', async function () { // Similarly to the single execute, a malicious relayer could grief requests. // We estimate until the selected request as if they were executed normally - const estimate = await this.gasUntil(this.requestDatas, this.idx); + const estimate = await Promise.all(this.requests.slice(0, idx + 1).map(this.estimateRequest)).then(gas => + sum(...gas), + ); // We add a Buffer to account for all the gas that's used before the selected call. // Note is slightly bigger because the selected request is not the index 0 and it affects // the buffer needed. - const gasAvailable = estimate + 10_000; + const gasLimit = estimate + 10_000n; // The subcall out of gas should be caught by the contract and then bubbled up consuming // the available gas with an `invalid` opcode. - await expectRevert.outOfGas( - this.forwarder.executeBatch(this.requestDatas, constants.ZERO_ADDRESS, { gas: gasAvailable }), - ); + await expect( + this.forwarder.executeBatch(this.requests, ethers.ZeroAddress, { + gasLimit, + value: requestsValue(this.requests), + }), + ).to.be.revertedWithoutReason(); - const { transactions } = await web3.eth.getBlock('latest'); - const { gasUsed } = await web3.eth.getTransactionReceipt(transactions[0]); + const { gasUsed } = await ethers.provider + .getBlock('latest') + .then(block => block.getTransaction(0)) + .then(tx => ethers.provider.getTransactionReceipt(tx.hash)); // We assert that indeed the gas was totally consumed. - expect(gasUsed).to.be.equal(gasAvailable); + expect(gasUsed).to.be.equal(gasLimit); }); }); }); diff --git a/test/utils/Context.behavior.js b/test/utils/Context.behavior.js index 08f7558d7..9e986db7a 100644 --- a/test/utils/Context.behavior.js +++ b/test/utils/Context.behavior.js @@ -1,38 +1,46 @@ -const { BN, expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const ContextMock = artifacts.require('ContextMock'); +async function fixture() { + return { contextHelper: await ethers.deployContract('ContextMockCaller', []) }; +} +function shouldBehaveLikeRegularContext() { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); -function shouldBehaveLikeRegularContext(sender) { describe('msgSender', function () { it('returns the transaction sender when called from an EOA', async function () { - const receipt = await this.context.msgSender({ from: sender }); - expectEvent(receipt, 'Sender', { sender }); + await expect(this.context.connect(this.sender).msgSender()) + .to.emit(this.context, 'Sender') + .withArgs(this.sender.address); }); - it('returns the transaction sender when from another contract', async function () { - const { tx } = await this.caller.callSender(this.context.address, { from: sender }); - await expectEvent.inTransaction(tx, ContextMock, 'Sender', { sender: this.caller.address }); + it('returns the transaction sender when called from another contract', async function () { + await expect(this.contextHelper.connect(this.sender).callSender(this.context)) + .to.emit(this.context, 'Sender') + .withArgs(this.contextHelper.target); }); }); describe('msgData', function () { - const integerValue = new BN('42'); - const stringValue = 'OpenZeppelin'; - - let callData; - - beforeEach(async function () { - callData = this.context.contract.methods.msgData(integerValue.toString(), stringValue).encodeABI(); - }); + const args = [42n, 'OpenZeppelin']; it('returns the transaction data when called from an EOA', async function () { - const receipt = await this.context.msgData(integerValue, stringValue); - expectEvent(receipt, 'Data', { data: callData, integerValue, stringValue }); + const callData = this.context.interface.encodeFunctionData('msgData', args); + + await expect(this.context.msgData(...args)) + .to.emit(this.context, 'Data') + .withArgs(callData, ...args); }); it('returns the transaction sender when from another contract', async function () { - const { tx } = await this.caller.callData(this.context.address, integerValue, stringValue); - await expectEvent.inTransaction(tx, ContextMock, 'Data', { data: callData, integerValue, stringValue }); + const callData = this.context.interface.encodeFunctionData('msgData', args); + + await expect(this.contextHelper.callData(this.context, ...args)) + .to.emit(this.context, 'Data') + .withArgs(callData, ...args); }); }); } diff --git a/test/utils/Context.test.js b/test/utils/Context.test.js index f372f7420..b766729e2 100644 --- a/test/utils/Context.test.js +++ b/test/utils/Context.test.js @@ -1,17 +1,18 @@ -require('@openzeppelin/test-helpers'); - -const ContextMock = artifacts.require('ContextMock'); -const ContextMockCaller = artifacts.require('ContextMockCaller'); +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { shouldBehaveLikeRegularContext } = require('./Context.behavior'); -contract('Context', function (accounts) { - const [sender] = accounts; +async function fixture() { + const [sender] = await ethers.getSigners(); + const context = await ethers.deployContract('ContextMock', []); + return { sender, context }; +} +describe('Context', function () { beforeEach(async function () { - this.context = await ContextMock.new(); - this.caller = await ContextMockCaller.new(); + Object.assign(this, await loadFixture(fixture)); }); - shouldBehaveLikeRegularContext(sender); + shouldBehaveLikeRegularContext(); }); From 9702b67ce13d8cd289149226c8c143bb0552b08d Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Thu, 23 Nov 2023 03:35:55 +0000 Subject: [PATCH 114/167] Migrate utils-cryptography to ethers (#4749) Co-authored-by: Hadrien Croubois Co-authored-by: ernestognw --- test/helpers/eip712.js | 5 +- test/helpers/sign.js | 63 ----- test/utils/cryptography/ECDSA.test.js | 249 ++++++++---------- test/utils/cryptography/EIP712.test.js | 1 + .../cryptography/MessageHashUtils.test.js | 75 +++--- .../cryptography/SignatureChecker.test.js | 82 ++---- 6 files changed, 185 insertions(+), 290 deletions(-) delete mode 100644 test/helpers/sign.js diff --git a/test/helpers/eip712.js b/test/helpers/eip712.js index 0dd78b7e0..f09272b28 100644 --- a/test/helpers/eip712.js +++ b/test/helpers/eip712.js @@ -46,8 +46,9 @@ function domainType(domain) { } function hashTypedData(domain, structHash) { - return ethers.keccak256( - Buffer.concat(['0x1901', ethers.TypedDataEncoder.hashDomain(domain), structHash].map(ethers.toBeArray)), + return ethers.solidityPackedKeccak256( + ['bytes', 'bytes32', 'bytes32'], + ['0x1901', ethers.TypedDataEncoder.hashDomain(domain), structHash], ); } diff --git a/test/helpers/sign.js b/test/helpers/sign.js deleted file mode 100644 index d537116bb..000000000 --- a/test/helpers/sign.js +++ /dev/null @@ -1,63 +0,0 @@ -function toEthSignedMessageHash(messageHex) { - const messageBuffer = Buffer.from(messageHex.substring(2), 'hex'); - const prefix = Buffer.from(`\u0019Ethereum Signed Message:\n${messageBuffer.length}`); - return web3.utils.sha3(Buffer.concat([prefix, messageBuffer])); -} - -/** - * Create a signed data with intended validator according to the version 0 of EIP-191 - * @param validatorAddress The address of the validator - * @param dataHex The data to be concatenated with the prefix and signed - */ -function toDataWithIntendedValidatorHash(validatorAddress, dataHex) { - const validatorBuffer = Buffer.from(web3.utils.hexToBytes(validatorAddress)); - const dataBuffer = Buffer.from(web3.utils.hexToBytes(dataHex)); - const preambleBuffer = Buffer.from('\x19'); - const versionBuffer = Buffer.from('\x00'); - const ethMessage = Buffer.concat([preambleBuffer, versionBuffer, validatorBuffer, dataBuffer]); - - return web3.utils.sha3(ethMessage); -} - -/** - * Create a signer between a contract and a signer for a voucher of method, args, and redeemer - * Note that `method` is the web3 method, not the truffle-contract method - * @param contract TruffleContract - * @param signer address - * @param redeemer address - * @param methodName string - * @param methodArgs any[] - */ -const getSignFor = - (contract, signer) => - (redeemer, methodName, methodArgs = []) => { - const parts = [contract.address, redeemer]; - - const REAL_SIGNATURE_SIZE = 2 * 65; // 65 bytes in hexadecimal string length - const PADDED_SIGNATURE_SIZE = 2 * 96; // 96 bytes in hexadecimal string length - const DUMMY_SIGNATURE = `0x${web3.utils.padLeft('', REAL_SIGNATURE_SIZE)}`; - - // if we have a method, add it to the parts that we're signing - if (methodName) { - if (methodArgs.length > 0) { - parts.push( - contract.contract.methods[methodName](...methodArgs.concat([DUMMY_SIGNATURE])) - .encodeABI() - .slice(0, -1 * PADDED_SIGNATURE_SIZE), - ); - } else { - const abi = contract.abi.find(abi => abi.name === methodName); - parts.push(abi.signature); - } - } - - // return the signature of the "Ethereum Signed Message" hash of the hash of `parts` - const messageHex = web3.utils.soliditySha3(...parts); - return web3.eth.sign(messageHex, signer); - }; - -module.exports = { - toEthSignedMessageHash, - toDataWithIntendedValidatorHash, - getSignFor, -}; diff --git a/test/utils/cryptography/ECDSA.test.js b/test/utils/cryptography/ECDSA.test.js index f164ef196..3c0ce76c6 100644 --- a/test/utils/cryptography/ECDSA.test.js +++ b/test/utils/cryptography/ECDSA.test.js @@ -1,104 +1,81 @@ -require('@openzeppelin/test-helpers'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const { toEthSignedMessageHash } = require('../../helpers/sign'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const ECDSA = artifacts.require('$ECDSA'); - -const TEST_MESSAGE = web3.utils.sha3('OpenZeppelin'); -const WRONG_MESSAGE = web3.utils.sha3('Nope'); -const NON_HASH_MESSAGE = '0x' + Buffer.from('abcd').toString('hex'); - -function to2098Format(signature) { - const long = web3.utils.hexToBytes(signature); - if (long.length !== 65) { - throw new Error('invalid signature length (expected long format)'); - } - if (long[32] >> 7 === 1) { - throw new Error("invalid signature 's' value"); - } - const short = long.slice(0, 64); - short[32] |= long[64] % 27 << 7; // set the first bit of the 32nd byte to the v parity bit - return web3.utils.bytesToHex(short); -} +const TEST_MESSAGE = ethers.id('OpenZeppelin'); +const WRONG_MESSAGE = ethers.id('Nope'); +const NON_HASH_MESSAGE = '0xabcd'; -function split(signature) { - const raw = web3.utils.hexToBytes(signature); - switch (raw.length) { - case 64: - return [ - web3.utils.bytesToHex(raw.slice(0, 32)), // r - web3.utils.bytesToHex(raw.slice(32, 64)), // vs - ]; - case 65: - return [ - raw[64], // v - web3.utils.bytesToHex(raw.slice(0, 32)), // r - web3.utils.bytesToHex(raw.slice(32, 64)), // s - ]; - default: - expect.fail('Invalid signature length, cannot split'); - } +function toSignature(signature) { + return ethers.Signature.from(signature); } -contract('ECDSA', function (accounts) { - const [other] = accounts; +async function fixture() { + const [signer] = await ethers.getSigners(); + const mock = await ethers.deployContract('$ECDSA'); + return { signer, mock }; +} +describe('ECDSA', function () { beforeEach(async function () { - this.ecdsa = await ECDSA.new(); + Object.assign(this, await loadFixture(fixture)); }); - context('recover with invalid signature', function () { + describe('recover with invalid signature', function () { it('with short signature', async function () { - await expectRevertCustomError(this.ecdsa.$recover(TEST_MESSAGE, '0x1234'), 'ECDSAInvalidSignatureLength', [2]); + await expect(this.mock.$recover(TEST_MESSAGE, '0x1234')) + .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureLength') + .withArgs(2); }); it('with long signature', async function () { - await expectRevertCustomError( + await expect( // eslint-disable-next-line max-len - this.ecdsa.$recover( + this.mock.$recover( TEST_MESSAGE, '0x01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789', ), - 'ECDSAInvalidSignatureLength', - [85], - ); + ) + .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureLength') + .withArgs(85); }); }); - context('recover with valid signature', function () { - context('using web3.eth.sign', function () { + describe('recover with valid signature', function () { + describe('using .sign', function () { it('returns signer address with correct signature', async function () { // Create the signature - const signature = await web3.eth.sign(TEST_MESSAGE, other); + const signature = await this.signer.signMessage(TEST_MESSAGE); // Recover the signer address from the generated message and signature. - expect(await this.ecdsa.$recover(toEthSignedMessageHash(TEST_MESSAGE), signature)).to.equal(other); + expect(await this.mock.$recover(ethers.hashMessage(TEST_MESSAGE), signature)).to.equal(this.signer.address); }); it('returns signer address with correct signature for arbitrary length message', async function () { // Create the signature - const signature = await web3.eth.sign(NON_HASH_MESSAGE, other); + const signature = await this.signer.signMessage(NON_HASH_MESSAGE); // Recover the signer address from the generated message and signature. - expect(await this.ecdsa.$recover(toEthSignedMessageHash(NON_HASH_MESSAGE), signature)).to.equal(other); + expect(await this.mock.$recover(ethers.hashMessage(NON_HASH_MESSAGE), signature)).to.equal(this.signer.address); }); it('returns a different address', async function () { - const signature = await web3.eth.sign(TEST_MESSAGE, other); - expect(await this.ecdsa.$recover(WRONG_MESSAGE, signature)).to.not.equal(other); + const signature = await this.signer.signMessage(TEST_MESSAGE); + expect(await this.mock.$recover(WRONG_MESSAGE, signature)).to.not.be.equal(this.signer.address); }); it('reverts with invalid signature', async function () { // eslint-disable-next-line max-len const signature = '0x332ce75a821c982f9127538858900d87d3ec1f9f737338ad67cad133fa48feff48e6fa0c18abc62e42820f05943e47af3e9fbe306ce74d64094bdf1691ee53e01c'; - await expectRevertCustomError(this.ecdsa.$recover(TEST_MESSAGE, signature), 'ECDSAInvalidSignature', []); + await expect(this.mock.$recover(TEST_MESSAGE, signature)).to.be.revertedWithCustomError( + this.mock, + 'ECDSAInvalidSignature', + ); }); }); - context('with v=27 signature', function () { + describe('with v=27 signature', function () { // Signature generated outside ganache with method web3.eth.sign(signer, message) const signer = '0x2cc1166f6212628A0deEf2B33BEFB2187D35b86c'; // eslint-disable-next-line max-len @@ -106,124 +83,112 @@ contract('ECDSA', function (accounts) { '0x5d99b6f7f6d1f73d1a26497f2b1c89b24c0993913f86e9a2d02cd69887d9c94f3c880358579d811b21dd1b7fd9bb01c1d81d10e69f0384e675c32b39643be892'; it('works with correct v value', async function () { - const v = '1b'; // 27 = 1b. - const signature = signatureWithoutV + v; - expect(await this.ecdsa.$recover(TEST_MESSAGE, signature)).to.equal(signer); + const v = '0x1b'; // 27 = 1b. + const signature = ethers.concat([signatureWithoutV, v]); + expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.equal(signer); - expect( - await this.ecdsa.methods['$recover(bytes32,uint8,bytes32,bytes32)'](TEST_MESSAGE, ...split(signature)), - ).to.equal(signer); + const { r, s, yParityAndS: vs } = toSignature(signature); + expect(await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s)).to.equal( + signer, + ); - expect( - await this.ecdsa.methods['$recover(bytes32,bytes32,bytes32)']( - TEST_MESSAGE, - ...split(to2098Format(signature)), - ), - ).to.equal(signer); + expect(await this.mock.getFunction('$recover(bytes32,bytes32,bytes32)')(TEST_MESSAGE, r, vs)).to.equal(signer); }); it('rejects incorrect v value', async function () { - const v = '1c'; // 28 = 1c. - const signature = signatureWithoutV + v; - expect(await this.ecdsa.$recover(TEST_MESSAGE, signature)).to.not.equal(signer); + const v = '0x1c'; // 28 = 1c. + const signature = ethers.concat([signatureWithoutV, v]); + expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.not.equal(signer); + const { r, s, yParityAndS: vs } = toSignature(signature); expect( - await this.ecdsa.methods['$recover(bytes32,uint8,bytes32,bytes32)'](TEST_MESSAGE, ...split(signature)), + await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), ).to.not.equal(signer); - expect( - await this.ecdsa.methods['$recover(bytes32,bytes32,bytes32)']( - TEST_MESSAGE, - ...split(to2098Format(signature)), - ), - ).to.not.equal(signer); + expect(await this.mock.getFunction('$recover(bytes32,bytes32,bytes32)')(TEST_MESSAGE, r, vs)).to.not.equal( + signer, + ); }); it('reverts wrong v values', async function () { - for (const v of ['00', '01']) { - const signature = signatureWithoutV + v; - await expectRevertCustomError(this.ecdsa.$recover(TEST_MESSAGE, signature), 'ECDSAInvalidSignature', []); - - await expectRevertCustomError( - this.ecdsa.methods['$recover(bytes32,uint8,bytes32,bytes32)'](TEST_MESSAGE, ...split(signature)), + for (const v of ['0x00', '0x01']) { + const signature = ethers.concat([signatureWithoutV, v]); + await expect(this.mock.$recover(TEST_MESSAGE, signature)).to.be.revertedWithCustomError( + this.mock, 'ECDSAInvalidSignature', - [], ); + + const { r, s } = toSignature(signature); + await expect( + this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), + ).to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignature'); } }); it('rejects short EIP2098 format', async function () { - const v = '1b'; // 27 = 1b. - const signature = signatureWithoutV + v; - await expectRevertCustomError( - this.ecdsa.$recover(TEST_MESSAGE, to2098Format(signature)), - 'ECDSAInvalidSignatureLength', - [64], - ); + const v = '0x1b'; // 27 = 1b. + const signature = ethers.concat([signatureWithoutV, v]); + await expect(this.mock.$recover(TEST_MESSAGE, toSignature(signature).compactSerialized)) + .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureLength') + .withArgs(64); }); }); - context('with v=28 signature', function () { + describe('with v=28 signature', function () { const signer = '0x1E318623aB09Fe6de3C9b8672098464Aeda9100E'; // eslint-disable-next-line max-len const signatureWithoutV = '0x331fe75a821c982f9127538858900d87d3ec1f9f737338ad67cad133fa48feff48e6fa0c18abc62e42820f05943e47af3e9fbe306ce74d64094bdf1691ee53e0'; it('works with correct v value', async function () { - const v = '1c'; // 28 = 1c. - const signature = signatureWithoutV + v; - expect(await this.ecdsa.$recover(TEST_MESSAGE, signature)).to.equal(signer); + const v = '0x1c'; // 28 = 1c. + const signature = ethers.concat([signatureWithoutV, v]); + expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.equal(signer); - expect( - await this.ecdsa.methods['$recover(bytes32,uint8,bytes32,bytes32)'](TEST_MESSAGE, ...split(signature)), - ).to.equal(signer); + const { r, s, yParityAndS: vs } = toSignature(signature); + expect(await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s)).to.equal( + signer, + ); - expect( - await this.ecdsa.methods['$recover(bytes32,bytes32,bytes32)']( - TEST_MESSAGE, - ...split(to2098Format(signature)), - ), - ).to.equal(signer); + expect(await this.mock.getFunction('$recover(bytes32,bytes32,bytes32)')(TEST_MESSAGE, r, vs)).to.equal(signer); }); it('rejects incorrect v value', async function () { - const v = '1b'; // 27 = 1b. - const signature = signatureWithoutV + v; - expect(await this.ecdsa.$recover(TEST_MESSAGE, signature)).to.not.equal(signer); + const v = '0x1b'; // 27 = 1b. + const signature = ethers.concat([signatureWithoutV, v]); + expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.not.equal(signer); + const { r, s, yParityAndS: vs } = toSignature(signature); expect( - await this.ecdsa.methods['$recover(bytes32,uint8,bytes32,bytes32)'](TEST_MESSAGE, ...split(signature)), + await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), ).to.not.equal(signer); - expect( - await this.ecdsa.methods['$recover(bytes32,bytes32,bytes32)']( - TEST_MESSAGE, - ...split(to2098Format(signature)), - ), - ).to.not.equal(signer); + expect(await this.mock.getFunction('$recover(bytes32,bytes32,bytes32)')(TEST_MESSAGE, r, vs)).to.not.equal( + signer, + ); }); it('reverts invalid v values', async function () { - for (const v of ['00', '01']) { - const signature = signatureWithoutV + v; - await expectRevertCustomError(this.ecdsa.$recover(TEST_MESSAGE, signature), 'ECDSAInvalidSignature', []); - - await expectRevertCustomError( - this.ecdsa.methods['$recover(bytes32,uint8,bytes32,bytes32)'](TEST_MESSAGE, ...split(signature)), + for (const v of ['0x00', '0x01']) { + const signature = ethers.concat([signatureWithoutV, v]); + await expect(this.mock.$recover(TEST_MESSAGE, signature)).to.be.revertedWithCustomError( + this.mock, 'ECDSAInvalidSignature', - [], ); + + const { r, s } = toSignature(signature); + await expect( + this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), + ).to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignature'); } }); it('rejects short EIP2098 format', async function () { - const v = '1c'; // 27 = 1b. - const signature = signatureWithoutV + v; - await expectRevertCustomError( - this.ecdsa.$recover(TEST_MESSAGE, to2098Format(signature)), - 'ECDSAInvalidSignatureLength', - [64], - ); + const v = '0x1c'; // 27 = 1b. + const signature = ethers.concat([signatureWithoutV, v]); + await expect(this.mock.$recover(TEST_MESSAGE, toSignature(signature).compactSerialized)) + .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureLength') + .withArgs(64); }); }); @@ -232,14 +197,18 @@ contract('ECDSA', function (accounts) { // eslint-disable-next-line max-len const highSSignature = '0xe742ff452d41413616a5bf43fe15dd88294e983d3d36206c2712f39083d638bde0a0fc89be718fbc1033e1d30d78be1c68081562ed2e97af876f286f3453231d1b'; - const [r, v, s] = split(highSSignature); - await expectRevertCustomError(this.ecdsa.$recover(message, highSSignature), 'ECDSAInvalidSignatureS', [s]); - await expectRevertCustomError( - this.ecdsa.methods['$recover(bytes32,uint8,bytes32,bytes32)'](TEST_MESSAGE, r, v, s), - 'ECDSAInvalidSignatureS', - [s], - ); - expect(() => to2098Format(highSSignature)).to.throw("invalid signature 's' value"); + + const r = ethers.dataSlice(highSSignature, 0, 32); + const s = ethers.dataSlice(highSSignature, 32, 64); + const v = ethers.dataSlice(highSSignature, 64, 65); + + await expect(this.mock.$recover(message, highSSignature)) + .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureS') + .withArgs(s); + await expect(this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s)) + .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureS') + .withArgs(s); + expect(() => toSignature(highSSignature)).to.throw('non-canonical s'); }); }); }); diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js index dfad67906..9d0bdae9a 100644 --- a/test/utils/cryptography/EIP712.test.js +++ b/test/utils/cryptography/EIP712.test.js @@ -1,4 +1,5 @@ const { ethers } = require('hardhat'); +const { expect } = require('chai'); const { getDomain, domainType, domainSeparator, hashTypedData } = require('../../helpers/eip712'); const { getChainId } = require('../../helpers/chainid'); const { mapValues } = require('../../helpers/iterate'); diff --git a/test/utils/cryptography/MessageHashUtils.test.js b/test/utils/cryptography/MessageHashUtils.test.js index b38e945da..f20f5a3ca 100644 --- a/test/utils/cryptography/MessageHashUtils.test.js +++ b/test/utils/cryptography/MessageHashUtils.test.js @@ -1,55 +1,68 @@ -require('@openzeppelin/test-helpers'); -const { toEthSignedMessageHash, toDataWithIntendedValidatorHash } = require('../../helpers/sign'); -const { domainSeparator, hashTypedData } = require('../../helpers/eip712'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const MessageHashUtils = artifacts.require('$MessageHashUtils'); +const { domainSeparator, hashTypedData } = require('../../helpers/eip712'); -contract('MessageHashUtils', function () { - beforeEach(async function () { - this.messageHashUtils = await MessageHashUtils.new(); +async function fixture() { + const mock = await ethers.deployContract('$MessageHashUtils'); + return { mock }; +} - this.message = '0x' + Buffer.from('abcd').toString('hex'); - this.messageHash = web3.utils.sha3(this.message); - this.verifyingAddress = web3.utils.toChecksumAddress(web3.utils.randomHex(20)); +describe('MessageHashUtils', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); - context('toEthSignedMessageHash', function () { + describe('toEthSignedMessageHash', function () { it('prefixes bytes32 data correctly', async function () { - expect(await this.messageHashUtils.methods['$toEthSignedMessageHash(bytes32)'](this.messageHash)).to.equal( - toEthSignedMessageHash(this.messageHash), - ); + const message = ethers.randomBytes(32); + const expectedHash = ethers.hashMessage(message); + + expect(await this.mock.getFunction('$toEthSignedMessageHash(bytes32)')(message)).to.equal(expectedHash); }); it('prefixes dynamic length data correctly', async function () { - expect(await this.messageHashUtils.methods['$toEthSignedMessageHash(bytes)'](this.message)).to.equal( - toEthSignedMessageHash(this.message), - ); + const message = ethers.randomBytes(128); + const expectedHash = ethers.hashMessage(message); + + expect(await this.mock.getFunction('$toEthSignedMessageHash(bytes)')(message)).to.equal(expectedHash); + }); + + it('version match for bytes32', async function () { + const message = ethers.randomBytes(32); + const fixed = await this.mock.getFunction('$toEthSignedMessageHash(bytes32)')(message); + const dynamic = await this.mock.getFunction('$toEthSignedMessageHash(bytes)')(message); + + expect(fixed).to.equal(dynamic); }); }); - context('toDataWithIntendedValidatorHash', function () { + describe('toDataWithIntendedValidatorHash', function () { it('returns the digest correctly', async function () { - expect( - await this.messageHashUtils.$toDataWithIntendedValidatorHash(this.verifyingAddress, this.message), - ).to.equal(toDataWithIntendedValidatorHash(this.verifyingAddress, this.message)); + const verifier = ethers.Wallet.createRandom().address; + const message = ethers.randomBytes(128); + const expectedHash = ethers.solidityPackedKeccak256( + ['string', 'address', 'bytes'], + ['\x19\x00', verifier, message], + ); + + expect(await this.mock.$toDataWithIntendedValidatorHash(verifier, message)).to.equal(expectedHash); }); }); - context('toTypedDataHash', function () { + describe('toTypedDataHash', function () { it('returns the digest correctly', async function () { const domain = { name: 'Test', - version: 1, - chainId: 1, - verifyingContract: this.verifyingAddress, + version: '1', + chainId: 1n, + verifyingContract: ethers.Wallet.createRandom().address, }; - const structhash = web3.utils.randomHex(32); - const expectedDomainSeparator = await domainSeparator(domain); - expect(await this.messageHashUtils.$toTypedDataHash(expectedDomainSeparator, structhash)).to.equal( - hashTypedData(domain, structhash), - ); + const structhash = ethers.randomBytes(32); + const expectedHash = hashTypedData(domain, structhash); + + expect(await this.mock.$toTypedDataHash(domainSeparator(domain), structhash)).to.equal(expectedHash); }); }); }); diff --git a/test/utils/cryptography/SignatureChecker.test.js b/test/utils/cryptography/SignatureChecker.test.js index ba8b100d1..e6a08491a 100644 --- a/test/utils/cryptography/SignatureChecker.test.js +++ b/test/utils/cryptography/SignatureChecker.test.js @@ -1,85 +1,59 @@ -const { toEthSignedMessageHash } = require('../../helpers/sign'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + +const TEST_MESSAGE = ethers.id('OpenZeppelin'); +const TEST_MESSAGE_HASH = ethers.hashMessage(TEST_MESSAGE); -const SignatureChecker = artifacts.require('$SignatureChecker'); -const ERC1271WalletMock = artifacts.require('ERC1271WalletMock'); -const ERC1271MaliciousMock = artifacts.require('ERC1271MaliciousMock'); +const WRONG_MESSAGE = ethers.id('Nope'); +const WRONG_MESSAGE_HASH = ethers.hashMessage(WRONG_MESSAGE); -const TEST_MESSAGE = web3.utils.sha3('OpenZeppelin'); -const WRONG_MESSAGE = web3.utils.sha3('Nope'); +async function fixture() { + const [signer, other] = await ethers.getSigners(); + const mock = await ethers.deployContract('$SignatureChecker'); + const wallet = await ethers.deployContract('ERC1271WalletMock', [signer]); + const malicious = await ethers.deployContract('ERC1271MaliciousMock'); + const signature = await signer.signMessage(TEST_MESSAGE); -contract('SignatureChecker (ERC1271)', function (accounts) { - const [signer, other] = accounts; + return { signer, other, mock, wallet, malicious, signature }; +} +describe('SignatureChecker (ERC1271)', function () { before('deploying', async function () { - this.signaturechecker = await SignatureChecker.new(); - this.wallet = await ERC1271WalletMock.new(signer); - this.malicious = await ERC1271MaliciousMock.new(); - this.signature = await web3.eth.sign(TEST_MESSAGE, signer); + Object.assign(this, await loadFixture(fixture)); }); - context('EOA account', function () { + describe('EOA account', function () { it('with matching signer and signature', async function () { - expect( - await this.signaturechecker.$isValidSignatureNow(signer, toEthSignedMessageHash(TEST_MESSAGE), this.signature), - ).to.equal(true); + expect(await this.mock.$isValidSignatureNow(this.signer, TEST_MESSAGE_HASH, this.signature)).to.be.true; }); it('with invalid signer', async function () { - expect( - await this.signaturechecker.$isValidSignatureNow(other, toEthSignedMessageHash(TEST_MESSAGE), this.signature), - ).to.equal(false); + expect(await this.mock.$isValidSignatureNow(this.other, TEST_MESSAGE_HASH, this.signature)).to.be.false; }); it('with invalid signature', async function () { - expect( - await this.signaturechecker.$isValidSignatureNow(signer, toEthSignedMessageHash(WRONG_MESSAGE), this.signature), - ).to.equal(false); + expect(await this.mock.$isValidSignatureNow(this.signer, WRONG_MESSAGE_HASH, this.signature)).to.be.false; }); }); - context('ERC1271 wallet', function () { - for (const signature of ['isValidERC1271SignatureNow', 'isValidSignatureNow']) { - context(signature, function () { + describe('ERC1271 wallet', function () { + for (const fn of ['isValidERC1271SignatureNow', 'isValidSignatureNow']) { + describe(fn, function () { it('with matching signer and signature', async function () { - expect( - await this.signaturechecker[`$${signature}`]( - this.wallet.address, - toEthSignedMessageHash(TEST_MESSAGE), - this.signature, - ), - ).to.equal(true); + expect(await this.mock.getFunction(`$${fn}`)(this.wallet, TEST_MESSAGE_HASH, this.signature)).to.be.true; }); it('with invalid signer', async function () { - expect( - await this.signaturechecker[`$${signature}`]( - this.signaturechecker.address, - toEthSignedMessageHash(TEST_MESSAGE), - this.signature, - ), - ).to.equal(false); + expect(await this.mock.getFunction(`$${fn}`)(this.mock, TEST_MESSAGE_HASH, this.signature)).to.be.false; }); it('with invalid signature', async function () { - expect( - await this.signaturechecker[`$${signature}`]( - this.wallet.address, - toEthSignedMessageHash(WRONG_MESSAGE), - this.signature, - ), - ).to.equal(false); + expect(await this.mock.getFunction(`$${fn}`)(this.wallet, WRONG_MESSAGE_HASH, this.signature)).to.be.false; }); it('with malicious wallet', async function () { - expect( - await this.signaturechecker[`$${signature}`]( - this.malicious.address, - toEthSignedMessageHash(TEST_MESSAGE), - this.signature, - ), - ).to.equal(false); + expect(await this.mock.getFunction(`$${fn}`)(this.malicious, TEST_MESSAGE_HASH, this.signature)).to.be.false; }); }); } From 6a56b3b08d9debf6ed12d0eab59629d7bd5d3fd2 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Thu, 23 Nov 2023 04:40:12 +0000 Subject: [PATCH 115/167] Migrate EIP712 to ethersjs (#4750) Co-authored-by: Hadrien Croubois Co-authored-by: ernestognw --- scripts/upgradeable/upgradeable.patch | 41 ++++---- test/governance/Governor.test.js | 20 ++-- .../extensions/GovernorWithParams.test.js | 15 ++- test/governance/utils/Votes.behavior.js | 12 +-- test/helpers/eip712-types.js | 44 +++++++++ test/helpers/eip712.js | 23 +---- .../ERC20/extensions/ERC20Permit.test.js | 7 +- .../token/ERC20/extensions/ERC20Votes.test.js | 12 +-- test/utils/cryptography/EIP712.test.js | 98 +++++++++---------- 9 files changed, 147 insertions(+), 125 deletions(-) create mode 100644 test/helpers/eip712-types.js diff --git a/scripts/upgradeable/upgradeable.patch b/scripts/upgradeable/upgradeable.patch index 522f82ca4..c2a5732d9 100644 --- a/scripts/upgradeable/upgradeable.patch +++ b/scripts/upgradeable/upgradeable.patch @@ -59,10 +59,10 @@ index ff596b0c3..000000000 - - diff --git a/README.md b/README.md -index 549891e3f..a6b24078e 100644 +index 9ca41573f..57d6e3b5b 100644 --- a/README.md +++ b/README.md -@@ -23,6 +23,9 @@ +@@ -19,6 +19,9 @@ > [!IMPORTANT] > OpenZeppelin Contracts uses semantic versioning to communicate backwards compatibility of its API and storage layout. For upgradeable contracts, the storage layout of different major versions should be assumed incompatible, for example, it is unsafe to upgrade from 4.9.3 to 5.0.0. Learn more at [Backwards Compatibility](https://docs.openzeppelin.com/contracts/backwards-compatibility). @@ -72,7 +72,7 @@ index 549891e3f..a6b24078e 100644 ## Overview ### Installation -@@ -30,7 +33,7 @@ +@@ -26,7 +29,7 @@ #### Hardhat, Truffle (npm) ``` @@ -81,7 +81,7 @@ index 549891e3f..a6b24078e 100644 ``` #### Foundry (git) -@@ -42,10 +45,10 @@ $ npm install @openzeppelin/contracts +@@ -38,10 +41,10 @@ $ npm install @openzeppelin/contracts > Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch. ``` @@ -94,7 +94,7 @@ index 549891e3f..a6b24078e 100644 ### Usage -@@ -54,10 +57,11 @@ Once installed, you can use the contracts in the library by importing them: +@@ -50,10 +53,11 @@ Once installed, you can use the contracts in the library by importing them: ```solidity pragma solidity ^0.8.20; @@ -110,7 +110,7 @@ index 549891e3f..a6b24078e 100644 } ``` diff --git a/contracts/package.json b/contracts/package.json -index 9017953ca..f51c1d38b 100644 +index be3e741e3..877e942c2 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,5 +1,5 @@ @@ -118,7 +118,7 @@ index 9017953ca..f51c1d38b 100644 - "name": "@openzeppelin/contracts", + "name": "@openzeppelin/contracts-upgradeable", "description": "Secure Smart Contract library for Solidity", - "version": "4.9.2", + "version": "5.0.0", "files": [ @@ -13,7 +13,7 @@ }, @@ -140,7 +140,7 @@ index 9017953ca..f51c1d38b 100644 + } } diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol -index 644f6f531..ab8ba05ff 100644 +index 8e548cdd8..a60ee74fd 100644 --- a/contracts/utils/cryptography/EIP712.sol +++ b/contracts/utils/cryptography/EIP712.sol @@ -4,7 +4,6 @@ @@ -307,7 +307,7 @@ index 644f6f531..ab8ba05ff 100644 } } diff --git a/package.json b/package.json -index 3a1617c09..97e59c2d9 100644 +index c2c3a2675..3301b213d 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ @@ -328,12 +328,12 @@ index 304d1386a..a1cd63bee 100644 +@openzeppelin/contracts-upgradeable/=contracts/ +@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js -index faf01f1a3..b25171a56 100644 +index 75ca00b12..265e6c909 100644 --- a/test/utils/cryptography/EIP712.test.js +++ b/test/utils/cryptography/EIP712.test.js -@@ -47,26 +47,6 @@ contract('EIP712', function (accounts) { +@@ -40,27 +40,6 @@ describe('EIP712', function () { const rebuildDomain = await getDomain(this.eip712); - expect(mapValues(rebuildDomain, String)).to.be.deep.equal(mapValues(this.domain, String)); + expect(rebuildDomain).to.be.deep.equal(this.domain); }); - - if (shortOrLong === 'short') { @@ -341,17 +341,18 @@ index faf01f1a3..b25171a56 100644 - // the upgradeable contract variant is used and the initializer is invoked. - - it('adjusts when behind proxy', async function () { -- const factory = await Clones.new(); -- const cloneReceipt = await factory.$clone(this.eip712.address); -- const cloneAddress = cloneReceipt.logs.find(({ event }) => event === 'return$clone').args.instance; -- const clone = new EIP712Verifier(cloneAddress); +- const factory = await ethers.deployContract('$Clones'); - -- const cloneDomain = { ...this.domain, verifyingContract: clone.address }; +- const clone = await factory +- .$clone(this.eip712) +- .then(tx => tx.wait()) +- .then(receipt => receipt.logs.find(ev => ev.fragment.name == 'return$clone').args.instance) +- .then(address => ethers.getContractAt('$EIP712Verifier', address)); - -- const reportedDomain = await getDomain(clone); -- expect(mapValues(reportedDomain, String)).to.be.deep.equal(mapValues(cloneDomain, String)); +- const expectedDomain = { ...this.domain, verifyingContract: clone.target }; +- expect(await getDomain(clone)).to.be.deep.equal(expectedDomain); - -- const expectedSeparator = await domainSeparator(cloneDomain); +- const expectedSeparator = await domainSeparator(expectedDomain); - expect(await clone.$_domainSeparatorV4()).to.equal(expectedSeparator); - }); - } diff --git a/test/governance/Governor.test.js b/test/governance/Governor.test.js index 45cceba9a..b62160eec 100644 --- a/test/governance/Governor.test.js +++ b/test/governance/Governor.test.js @@ -4,7 +4,11 @@ const ethSigUtil = require('eth-sig-util'); const Wallet = require('ethereumjs-wallet').default; const Enums = require('../helpers/enums'); -const { getDomain, domainType } = require('../helpers/eip712'); +const { + getDomain, + domainType, + types: { Ballot }, +} = require('../helpers/eip712'); const { GovernorHelper, proposalStatesToBitMap } = require('../helpers/governance'); const { clockFromReceipt } = require('../helpers/time'); const { expectRevertCustomError } = require('../helpers/customError'); @@ -209,12 +213,7 @@ contract('Governor', function (accounts) { primaryType: 'Ballot', types: { EIP712Domain: domainType(domain), - Ballot: [ - { name: 'proposalId', type: 'uint256' }, - { name: 'support', type: 'uint8' }, - { name: 'voter', type: 'address' }, - { name: 'nonce', type: 'uint256' }, - ], + Ballot, }, domain, message, @@ -384,12 +383,7 @@ contract('Governor', function (accounts) { primaryType: 'Ballot', types: { EIP712Domain: domainType(domain), - Ballot: [ - { name: 'proposalId', type: 'uint256' }, - { name: 'support', type: 'uint8' }, - { name: 'voter', type: 'address' }, - { name: 'nonce', type: 'uint256' }, - ], + Ballot, }, domain, message, diff --git a/test/governance/extensions/GovernorWithParams.test.js b/test/governance/extensions/GovernorWithParams.test.js index 35da3a0f3..da392b3ea 100644 --- a/test/governance/extensions/GovernorWithParams.test.js +++ b/test/governance/extensions/GovernorWithParams.test.js @@ -4,7 +4,11 @@ const ethSigUtil = require('eth-sig-util'); const Wallet = require('ethereumjs-wallet').default; const Enums = require('../../helpers/enums'); -const { getDomain, domainType } = require('../../helpers/eip712'); +const { + getDomain, + domainType, + types: { ExtendedBallot }, +} = require('../../helpers/eip712'); const { GovernorHelper } = require('../../helpers/governance'); const { expectRevertCustomError } = require('../../helpers/customError'); @@ -130,14 +134,7 @@ contract('GovernorWithParams', function (accounts) { primaryType: 'ExtendedBallot', types: { EIP712Domain: domainType(domain), - ExtendedBallot: [ - { name: 'proposalId', type: 'uint256' }, - { name: 'support', type: 'uint8' }, - { name: 'voter', type: 'address' }, - { name: 'nonce', type: 'uint256' }, - { name: 'reason', type: 'string' }, - { name: 'params', type: 'bytes' }, - ], + ExtendedBallot, }, domain, message, diff --git a/test/governance/utils/Votes.behavior.js b/test/governance/utils/Votes.behavior.js index 5836cc351..0aea208a9 100644 --- a/test/governance/utils/Votes.behavior.js +++ b/test/governance/utils/Votes.behavior.js @@ -7,16 +7,14 @@ const ethSigUtil = require('eth-sig-util'); const Wallet = require('ethereumjs-wallet').default; const { shouldBehaveLikeEIP6372 } = require('./EIP6372.behavior'); -const { getDomain, domainType } = require('../../helpers/eip712'); +const { + getDomain, + domainType, + types: { Delegation }, +} = require('../../helpers/eip712'); const { clockFromReceipt } = require('../../helpers/time'); const { expectRevertCustomError } = require('../../helpers/customError'); -const Delegation = [ - { name: 'delegatee', type: 'address' }, - { name: 'nonce', type: 'uint256' }, - { name: 'expiry', type: 'uint256' }, -]; - const buildAndSignDelegation = (contract, message, pk) => getDomain(contract) .then(domain => ({ diff --git a/test/helpers/eip712-types.js b/test/helpers/eip712-types.js new file mode 100644 index 000000000..8aacf5325 --- /dev/null +++ b/test/helpers/eip712-types.js @@ -0,0 +1,44 @@ +module.exports = { + EIP712Domain: [ + { name: 'name', type: 'string' }, + { name: 'version', type: 'string' }, + { name: 'chainId', type: 'uint256' }, + { name: 'verifyingContract', type: 'address' }, + { name: 'salt', type: 'bytes32' }, + ], + Permit: [ + { name: 'owner', type: 'address' }, + { name: 'spender', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'nonce', type: 'uint256' }, + { name: 'deadline', type: 'uint256' }, + ], + Ballot: [ + { name: 'proposalId', type: 'uint256' }, + { name: 'support', type: 'uint8' }, + { name: 'voter', type: 'address' }, + { name: 'nonce', type: 'uint256' }, + ], + ExtendedBallot: [ + { name: 'proposalId', type: 'uint256' }, + { name: 'support', type: 'uint8' }, + { name: 'voter', type: 'address' }, + { name: 'nonce', type: 'uint256' }, + { name: 'reason', type: 'string' }, + { name: 'params', type: 'bytes' }, + ], + Delegation: [ + { name: 'delegatee', type: 'address' }, + { name: 'nonce', type: 'uint256' }, + { name: 'expiry', type: 'uint256' }, + ], + ForwardRequest: [ + { name: 'from', type: 'address' }, + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'gas', type: 'uint256' }, + { name: 'nonce', type: 'uint256' }, + { name: 'deadline', type: 'uint48' }, + { name: 'data', type: 'bytes' }, + ], +}; diff --git a/test/helpers/eip712.js b/test/helpers/eip712.js index f09272b28..295c1b953 100644 --- a/test/helpers/eip712.js +++ b/test/helpers/eip712.js @@ -1,20 +1,5 @@ const { ethers } = require('ethers'); - -const EIP712Domain = [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, - { name: 'salt', type: 'bytes32' }, -]; - -const Permit = [ - { name: 'owner', type: 'address' }, - { name: 'spender', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'deadline', type: 'uint256' }, -]; +const types = require('./eip712-types'); async function getDomain(contract) { const { fields, name, version, chainId, verifyingContract, salt, extensions } = await contract.eip712Domain(); @@ -32,7 +17,7 @@ async function getDomain(contract) { salt, }; - for (const [i, { name }] of EIP712Domain.entries()) { + for (const [i, { name }] of types.EIP712Domain.entries()) { if (!(fields & (1 << i))) { delete domain[name]; } @@ -42,7 +27,7 @@ async function getDomain(contract) { } function domainType(domain) { - return EIP712Domain.filter(({ name }) => domain[name] !== undefined); + return types.EIP712Domain.filter(({ name }) => domain[name] !== undefined); } function hashTypedData(domain, structHash) { @@ -53,7 +38,7 @@ function hashTypedData(domain, structHash) { } module.exports = { - Permit, + types, getDomain, domainType, domainSeparator: ethers.TypedDataEncoder.hashDomain, diff --git a/test/token/ERC20/extensions/ERC20Permit.test.js b/test/token/ERC20/extensions/ERC20Permit.test.js index 388716d53..db2363cd2 100644 --- a/test/token/ERC20/extensions/ERC20Permit.test.js +++ b/test/token/ERC20/extensions/ERC20Permit.test.js @@ -10,7 +10,12 @@ const Wallet = require('ethereumjs-wallet').default; const ERC20Permit = artifacts.require('$ERC20Permit'); -const { Permit, getDomain, domainType, domainSeparator } = require('../../../helpers/eip712'); +const { + types: { Permit }, + getDomain, + domainType, + domainSeparator, +} = require('../../../helpers/eip712'); const { getChainId } = require('../../../helpers/chainid'); const { expectRevertCustomError } = require('../../../helpers/customError'); diff --git a/test/token/ERC20/extensions/ERC20Votes.test.js b/test/token/ERC20/extensions/ERC20Votes.test.js index faf1a15ad..96d6c4e77 100644 --- a/test/token/ERC20/extensions/ERC20Votes.test.js +++ b/test/token/ERC20/extensions/ERC20Votes.test.js @@ -10,16 +10,14 @@ const ethSigUtil = require('eth-sig-util'); const Wallet = require('ethereumjs-wallet').default; const { batchInBlock } = require('../../../helpers/txpool'); -const { getDomain, domainType } = require('../../../helpers/eip712'); +const { + getDomain, + domainType, + types: { Delegation }, +} = require('../../../helpers/eip712'); const { clock, clockFromReceipt } = require('../../../helpers/time'); const { expectRevertCustomError } = require('../../../helpers/customError'); -const Delegation = [ - { name: 'delegatee', type: 'address' }, - { name: 'nonce', type: 'uint256' }, - { name: 'expiry', type: 'uint256' }, -]; - const MODES = { blocknumber: artifacts.require('$ERC20Votes'), timestamp: artifacts.require('$ERC20VotesTimestampMock'), diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js index 9d0bdae9a..2b88f5f8e 100644 --- a/test/utils/cryptography/EIP712.test.js +++ b/test/utils/cryptography/EIP712.test.js @@ -1,38 +1,39 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { getDomain, domainType, domainSeparator, hashTypedData } = require('../../helpers/eip712'); -const { getChainId } = require('../../helpers/chainid'); -const { mapValues } = require('../../helpers/iterate'); - -const EIP712Verifier = artifacts.require('$EIP712Verifier'); -const Clones = artifacts.require('$Clones'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -contract('EIP712', function (accounts) { - const [mailTo] = accounts; - - const shortName = 'A Name'; - const shortVersion = '1'; +const { getDomain, domainSeparator, hashTypedData } = require('../../helpers/eip712'); +const { getChainId } = require('../../helpers/chainid'); - const longName = 'A'.repeat(40); - const longVersion = 'B'.repeat(40); +const LENGTHS = { + short: ['A Name', '1'], + long: ['A'.repeat(40), 'B'.repeat(40)], +}; + +const fixture = async () => { + const [from, to] = await ethers.getSigners(); + + const lengths = {}; + for (const [shortOrLong, [name, version]] of Object.entries(LENGTHS)) { + lengths[shortOrLong] = { name, version }; + lengths[shortOrLong].eip712 = await ethers.deployContract('$EIP712Verifier', [name, version]); + lengths[shortOrLong].domain = { + name, + version, + chainId: await getChainId(), + verifyingContract: lengths[shortOrLong].eip712.target, + }; + } - const cases = [ - ['short', shortName, shortVersion], - ['long', longName, longVersion], - ]; + return { from, to, lengths }; +}; - for (const [shortOrLong, name, version] of cases) { +describe('EIP712', function () { + for (const [shortOrLong, [name, version]] of Object.entries(LENGTHS)) { describe(`with ${shortOrLong} name and version`, function () { beforeEach('deploying', async function () { - this.eip712 = await EIP712Verifier.new(name, version); - - this.domain = { - name, - version, - chainId: await getChainId(), - verifyingContract: this.eip712.address, - }; - this.domainType = domainType(this.domain); + Object.assign(this, await loadFixture(fixture)); + Object.assign(this, this.lengths[shortOrLong]); }); describe('domain separator', function () { @@ -44,7 +45,7 @@ contract('EIP712', function (accounts) { it("can be rebuilt using EIP-5267's eip712Domain", async function () { const rebuildDomain = await getDomain(this.eip712); - expect(mapValues(rebuildDomain, String)).to.be.deep.equal(mapValues(this.domain, String)); + expect(rebuildDomain).to.be.deep.equal(this.domain); }); if (shortOrLong === 'short') { @@ -52,33 +53,29 @@ contract('EIP712', function (accounts) { // the upgradeable contract variant is used and the initializer is invoked. it('adjusts when behind proxy', async function () { - const factory = await Clones.new(); - const cloneReceipt = await factory.$clone(this.eip712.address); - const cloneAddress = cloneReceipt.logs.find(({ event }) => event === 'return$clone').args.instance; - const clone = new EIP712Verifier(cloneAddress); + const factory = await ethers.deployContract('$Clones'); - const cloneDomain = { ...this.domain, verifyingContract: clone.address }; + const clone = await factory + .$clone(this.eip712) + .then(tx => tx.wait()) + .then(receipt => receipt.logs.find(ev => ev.fragment.name == 'return$clone').args.instance) + .then(address => ethers.getContractAt('$EIP712Verifier', address)); - const reportedDomain = await getDomain(clone); - expect(mapValues(reportedDomain, String)).to.be.deep.equal(mapValues(cloneDomain, String)); + const expectedDomain = { ...this.domain, verifyingContract: clone.target }; + expect(await getDomain(clone)).to.be.deep.equal(expectedDomain); - const expectedSeparator = await domainSeparator(cloneDomain); + const expectedSeparator = await domainSeparator(expectedDomain); expect(await clone.$_domainSeparatorV4()).to.equal(expectedSeparator); }); } }); it('hash digest', async function () { - const structhash = web3.utils.randomHex(32); - expect(await this.eip712.$_hashTypedDataV4(structhash)).to.be.equal(hashTypedData(this.domain, structhash)); + const structhash = ethers.hexlify(ethers.randomBytes(32)); + expect(await this.eip712.$_hashTypedDataV4(structhash)).to.equal(hashTypedData(this.domain, structhash)); }); it('digest', async function () { - const message = { - to: mailTo, - contents: 'very interesting', - }; - const types = { Mail: [ { name: 'to', type: 'address' }, @@ -86,19 +83,22 @@ contract('EIP712', function (accounts) { ], }; - const signer = ethers.Wallet.createRandom(); - const address = await signer.getAddress(); - const signature = await signer.signTypedData(this.domain, types, message); + const message = { + to: this.to.address, + contents: 'very interesting', + }; + + const signature = await this.from.signTypedData(this.domain, types, message); - await this.eip712.verify(signature, address, message.to, message.contents); + await expect(this.eip712.verify(signature, this.from.address, message.to, message.contents)).to.not.be.reverted; }); it('name', async function () { - expect(await this.eip712.$_EIP712Name()).to.be.equal(name); + expect(await this.eip712.$_EIP712Name()).to.equal(name); }); it('version', async function () { - expect(await this.eip712.$_EIP712Version()).to.be.equal(version); + expect(await this.eip712.$_EIP712Version()).to.equal(version); }); }); } From bf75bccaea1b596250d013991057aef5b515bc6b Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Thu, 23 Nov 2023 04:52:44 +0000 Subject: [PATCH 116/167] Migrate address to ethersjs (#4739) Co-authored-by: Hadrien Croubois Co-authored-by: ernestognw --- test/utils/Address.test.js | 326 ++++++++++++++++--------------------- 1 file changed, 136 insertions(+), 190 deletions(-) diff --git a/test/utils/Address.test.js b/test/utils/Address.test.js index 57453abd5..6186d18a7 100644 --- a/test/utils/Address.test.js +++ b/test/utils/Address.test.js @@ -1,333 +1,279 @@ -const { balance, constants, ether, expectRevert, send, expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../helpers/customError'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); -const Address = artifacts.require('$Address'); -const EtherReceiver = artifacts.require('EtherReceiverMock'); -const CallReceiverMock = artifacts.require('CallReceiverMock'); +const coder = ethers.AbiCoder.defaultAbiCoder(); -contract('Address', function (accounts) { - const [recipient, other] = accounts; +async function fixture() { + const [recipient, other] = await ethers.getSigners(); + const mock = await ethers.deployContract('$Address'); + const target = await ethers.deployContract('CallReceiverMock'); + const targetEther = await ethers.deployContract('EtherReceiverMock'); + + return { recipient, other, mock, target, targetEther }; +} + +describe('Address', function () { beforeEach(async function () { - this.mock = await Address.new(); + Object.assign(this, await loadFixture(fixture)); }); describe('sendValue', function () { - beforeEach(async function () { - this.recipientTracker = await balance.tracker(recipient); - }); - - context('when sender contract has no funds', function () { + describe('when sender contract has no funds', function () { it('sends 0 wei', async function () { - await this.mock.$sendValue(other, 0); - - expect(await this.recipientTracker.delta()).to.be.bignumber.equal('0'); + await expect(this.mock.$sendValue(this.other, 0)).to.changeEtherBalance(this.recipient, 0); }); it('reverts when sending non-zero amounts', async function () { - await expectRevertCustomError(this.mock.$sendValue(other, 1), 'AddressInsufficientBalance', [ - this.mock.address, - ]); + await expect(this.mock.$sendValue(this.other, 1)) + .to.be.revertedWithCustomError(this.mock, 'AddressInsufficientBalance') + .withArgs(this.mock.target); }); }); - context('when sender contract has funds', function () { - const funds = ether('1'); - beforeEach(async function () { - await send.ether(other, this.mock.address, funds); - }); + describe('when sender contract has funds', function () { + const funds = ethers.parseEther('1'); - it('sends 0 wei', async function () { - await this.mock.$sendValue(recipient, 0); - expect(await this.recipientTracker.delta()).to.be.bignumber.equal('0'); + beforeEach(async function () { + await this.other.sendTransaction({ to: this.mock, value: funds }); }); - it('sends non-zero amounts', async function () { - await this.mock.$sendValue(recipient, funds.subn(1)); - expect(await this.recipientTracker.delta()).to.be.bignumber.equal(funds.subn(1)); - }); + describe('with EOA recipient', function () { + it('sends 0 wei', async function () { + await expect(this.mock.$sendValue(this.recipient, 0)).to.changeEtherBalance(this.recipient.address, 0); + }); - it('sends the whole balance', async function () { - await this.mock.$sendValue(recipient, funds); - expect(await this.recipientTracker.delta()).to.be.bignumber.equal(funds); - expect(await balance.current(this.mock.address)).to.be.bignumber.equal('0'); - }); + it('sends non-zero amounts', async function () { + await expect(this.mock.$sendValue(this.recipient, funds - 1n)).to.changeEtherBalance( + this.recipient, + funds - 1n, + ); + }); - it('reverts when sending more than the balance', async function () { - await expectRevertCustomError(this.mock.$sendValue(recipient, funds.addn(1)), 'AddressInsufficientBalance', [ - this.mock.address, - ]); - }); + it('sends the whole balance', async function () { + await expect(this.mock.$sendValue(this.recipient, funds)).to.changeEtherBalance(this.recipient, funds); + expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); + }); - context('with contract recipient', function () { - beforeEach(async function () { - this.target = await EtherReceiver.new(); + it('reverts when sending more than the balance', async function () { + await expect(this.mock.$sendValue(this.recipient, funds + 1n)) + .to.be.revertedWithCustomError(this.mock, 'AddressInsufficientBalance') + .withArgs(this.mock.target); }); + }); + describe('with contract recipient', function () { it('sends funds', async function () { - const tracker = await balance.tracker(this.target.address); - - await this.target.setAcceptEther(true); - await this.mock.$sendValue(this.target.address, funds); - - expect(await tracker.delta()).to.be.bignumber.equal(funds); + await this.targetEther.setAcceptEther(true); + await expect(this.mock.$sendValue(this.targetEther, funds)).to.changeEtherBalance(this.targetEther, funds); }); it('reverts on recipient revert', async function () { - await this.target.setAcceptEther(false); - await expectRevertCustomError(this.mock.$sendValue(this.target.address, funds), 'FailedInnerCall', []); + await this.targetEther.setAcceptEther(false); + await expect(this.mock.$sendValue(this.targetEther, funds)).to.be.revertedWithCustomError( + this.mock, + 'FailedInnerCall', + ); }); }); }); }); describe('functionCall', function () { - beforeEach(async function () { - this.target = await CallReceiverMock.new(); - }); - - context('with valid contract receiver', function () { + describe('with valid contract receiver', function () { it('calls the requested function', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunction().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunction'); - const receipt = await this.mock.$functionCall(this.target.address, abiEncodedCall); - - expectEvent(receipt, 'return$functionCall', { - ret0: web3.eth.abi.encodeParameters(['string'], ['0x1234']), - }); - await expectEvent.inTransaction(receipt.tx, CallReceiverMock, 'MockFunctionCalled'); + await expect(this.mock.$functionCall(this.target, call)) + .to.emit(this.target, 'MockFunctionCalled') + .to.emit(this.mock, 'return$functionCall') + .withArgs(coder.encode(['string'], ['0x1234'])); }); it('calls the requested empty return function', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunctionEmptyReturn().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunctionEmptyReturn'); - const receipt = await this.mock.$functionCall(this.target.address, abiEncodedCall); - - await expectEvent.inTransaction(receipt.tx, CallReceiverMock, 'MockFunctionCalled'); + await expect(this.mock.$functionCall(this.target, call)).to.emit(this.target, 'MockFunctionCalled'); }); it('reverts when the called function reverts with no reason', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunctionRevertsNoReason().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunctionRevertsNoReason'); - await expectRevertCustomError( - this.mock.$functionCall(this.target.address, abiEncodedCall), + await expect(this.mock.$functionCall(this.target, call)).to.be.revertedWithCustomError( + this.mock, 'FailedInnerCall', - [], ); }); it('reverts when the called function reverts, bubbling up the revert reason', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunctionRevertsReason().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunctionRevertsReason'); - await expectRevert(this.mock.$functionCall(this.target.address, abiEncodedCall), 'CallReceiverMock: reverting'); + await expect(this.mock.$functionCall(this.target, call)).to.be.revertedWith('CallReceiverMock: reverting'); }); it('reverts when the called function runs out of gas', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunctionOutOfGas().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunctionOutOfGas'); - await expectRevertCustomError( - this.mock.$functionCall(this.target.address, abiEncodedCall, { gas: '120000' }), + await expect(this.mock.$functionCall(this.target, call, { gasLimit: 120_000n })).to.be.revertedWithCustomError( + this.mock, 'FailedInnerCall', - [], ); }); it('reverts when the called function throws', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunctionThrows().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunctionThrows'); - await expectRevert.unspecified(this.mock.$functionCall(this.target.address, abiEncodedCall)); + await expect(this.mock.$functionCall(this.target, call)).to.be.revertedWithPanic(PANIC_CODES.ASSERTION_ERROR); }); it('reverts when function does not exist', async function () { - const abiEncodedCall = web3.eth.abi.encodeFunctionCall( - { - name: 'mockFunctionDoesNotExist', - type: 'function', - inputs: [], - }, - [], - ); + const interface = new ethers.Interface(['function mockFunctionDoesNotExist()']); + const call = interface.encodeFunctionData('mockFunctionDoesNotExist'); - await expectRevertCustomError( - this.mock.$functionCall(this.target.address, abiEncodedCall), + await expect(this.mock.$functionCall(this.target, call)).to.be.revertedWithCustomError( + this.mock, 'FailedInnerCall', - [], ); }); }); - context('with non-contract receiver', function () { + describe('with non-contract receiver', function () { it('reverts when address is not a contract', async function () { - const [recipient] = accounts; - const abiEncodedCall = this.target.contract.methods.mockFunction().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunction'); - await expectRevertCustomError(this.mock.$functionCall(recipient, abiEncodedCall), 'AddressEmptyCode', [ - recipient, - ]); + await expect(this.mock.$functionCall(this.recipient, call)) + .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') + .withArgs(this.recipient.address); }); }); }); describe('functionCallWithValue', function () { - beforeEach(async function () { - this.target = await CallReceiverMock.new(); - }); - - context('with zero value', function () { + describe('with zero value', function () { it('calls the requested function', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunction().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunction'); - const receipt = await this.mock.$functionCallWithValue(this.target.address, abiEncodedCall, 0); - expectEvent(receipt, 'return$functionCallWithValue', { - ret0: web3.eth.abi.encodeParameters(['string'], ['0x1234']), - }); - await expectEvent.inTransaction(receipt.tx, CallReceiverMock, 'MockFunctionCalled'); + await expect(this.mock.$functionCallWithValue(this.target, call, 0)) + .to.emit(this.target, 'MockFunctionCalled') + .to.emit(this.mock, 'return$functionCallWithValue') + .withArgs(coder.encode(['string'], ['0x1234'])); }); }); - context('with non-zero value', function () { - const amount = ether('1.2'); + describe('with non-zero value', function () { + const value = ethers.parseEther('1.2'); it('reverts if insufficient sender balance', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunction().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunction'); - await expectRevertCustomError( - this.mock.$functionCallWithValue(this.target.address, abiEncodedCall, amount), - 'AddressInsufficientBalance', - [this.mock.address], - ); + await expect(this.mock.$functionCallWithValue(this.target, call, value)) + .to.be.revertedWithCustomError(this.mock, 'AddressInsufficientBalance') + .withArgs(this.mock.target); }); it('calls the requested function with existing value', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunction().encodeABI(); + await this.other.sendTransaction({ to: this.mock, value }); - const tracker = await balance.tracker(this.target.address); + const call = this.target.interface.encodeFunctionData('mockFunction'); + const tx = await this.mock.$functionCallWithValue(this.target, call, value); - await send.ether(other, this.mock.address, amount); + await expect(tx).to.changeEtherBalance(this.target, value); - const receipt = await this.mock.$functionCallWithValue(this.target.address, abiEncodedCall, amount); - expectEvent(receipt, 'return$functionCallWithValue', { - ret0: web3.eth.abi.encodeParameters(['string'], ['0x1234']), - }); - await expectEvent.inTransaction(receipt.tx, CallReceiverMock, 'MockFunctionCalled'); - - expect(await tracker.delta()).to.be.bignumber.equal(amount); + await expect(tx) + .to.emit(this.target, 'MockFunctionCalled') + .to.emit(this.mock, 'return$functionCallWithValue') + .withArgs(coder.encode(['string'], ['0x1234'])); }); it('calls the requested function with transaction funds', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunction().encodeABI(); - - const tracker = await balance.tracker(this.target.address); + expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); - expect(await balance.current(this.mock.address)).to.be.bignumber.equal('0'); + const call = this.target.interface.encodeFunctionData('mockFunction'); + const tx = await this.mock.connect(this.other).$functionCallWithValue(this.target, call, value, { value }); - const receipt = await this.mock.$functionCallWithValue(this.target.address, abiEncodedCall, amount, { - from: other, - value: amount, - }); - expectEvent(receipt, 'return$functionCallWithValue', { - ret0: web3.eth.abi.encodeParameters(['string'], ['0x1234']), - }); - await expectEvent.inTransaction(receipt.tx, CallReceiverMock, 'MockFunctionCalled'); - - expect(await tracker.delta()).to.be.bignumber.equal(amount); + await expect(tx).to.changeEtherBalance(this.target, value); + await expect(tx) + .to.emit(this.target, 'MockFunctionCalled') + .to.emit(this.mock, 'return$functionCallWithValue') + .withArgs(coder.encode(['string'], ['0x1234'])); }); it('reverts when calling non-payable functions', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunctionNonPayable().encodeABI(); + await this.other.sendTransaction({ to: this.mock, value }); + + const call = this.target.interface.encodeFunctionData('mockFunctionNonPayable'); - await send.ether(other, this.mock.address, amount); - await expectRevertCustomError( - this.mock.$functionCallWithValue(this.target.address, abiEncodedCall, amount), + await expect(this.mock.$functionCallWithValue(this.target, call, value)).to.be.revertedWithCustomError( + this.mock, 'FailedInnerCall', - [], ); }); }); }); describe('functionStaticCall', function () { - beforeEach(async function () { - this.target = await CallReceiverMock.new(); - }); - it('calls the requested function', async function () { - const abiEncodedCall = this.target.contract.methods.mockStaticFunction().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockStaticFunction'); - expect(await this.mock.$functionStaticCall(this.target.address, abiEncodedCall)).to.be.equal( - web3.eth.abi.encodeParameters(['string'], ['0x1234']), - ); + expect(await this.mock.$functionStaticCall(this.target, call)).to.equal(coder.encode(['string'], ['0x1234'])); }); it('reverts on a non-static function', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunction().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunction'); - await expectRevertCustomError( - this.mock.$functionStaticCall(this.target.address, abiEncodedCall), + await expect(this.mock.$functionStaticCall(this.target, call)).to.be.revertedWithCustomError( + this.mock, 'FailedInnerCall', - [], ); }); it('bubbles up revert reason', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunctionRevertsReason().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunctionRevertsReason'); - await expectRevert( - this.mock.$functionStaticCall(this.target.address, abiEncodedCall), - 'CallReceiverMock: reverting', - ); + await expect(this.mock.$functionStaticCall(this.target, call)).to.be.revertedWith('CallReceiverMock: reverting'); }); it('reverts when address is not a contract', async function () { - const [recipient] = accounts; - const abiEncodedCall = this.target.contract.methods.mockFunction().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunction'); - await expectRevertCustomError(this.mock.$functionStaticCall(recipient, abiEncodedCall), 'AddressEmptyCode', [ - recipient, - ]); + await expect(this.mock.$functionStaticCall(this.recipient, call)) + .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') + .withArgs(this.recipient.address); }); }); describe('functionDelegateCall', function () { - beforeEach(async function () { - this.target = await CallReceiverMock.new(); - }); - it('delegate calls the requested function', async function () { - // pseudorandom values - const slot = '0x93e4c53af435ddf777c3de84bb9a953a777788500e229a468ea1036496ab66a0'; - const value = '0x6a465d1c49869f71fb65562bcbd7e08c8044074927f0297127203f2a9924ff5b'; + const slot = ethers.hexlify(ethers.randomBytes(32)); + const value = ethers.hexlify(ethers.randomBytes(32)); - const abiEncodedCall = this.target.contract.methods.mockFunctionWritesStorage(slot, value).encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunctionWritesStorage', [slot, value]); - expect(await web3.eth.getStorageAt(this.mock.address, slot)).to.be.equal(constants.ZERO_BYTES32); + expect(await ethers.provider.getStorage(this.mock, slot)).to.equal(ethers.ZeroHash); - expectEvent( - await this.mock.$functionDelegateCall(this.target.address, abiEncodedCall), - 'return$functionDelegateCall', - { ret0: web3.eth.abi.encodeParameters(['string'], ['0x1234']) }, - ); + await expect(await this.mock.$functionDelegateCall(this.target, call)) + .to.emit(this.mock, 'return$functionDelegateCall') + .withArgs(coder.encode(['string'], ['0x1234'])); - expect(await web3.eth.getStorageAt(this.mock.address, slot)).to.be.equal(value); + expect(await ethers.provider.getStorage(this.mock, slot)).to.equal(value); }); it('bubbles up revert reason', async function () { - const abiEncodedCall = this.target.contract.methods.mockFunctionRevertsReason().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunctionRevertsReason'); - await expectRevert( - this.mock.$functionDelegateCall(this.target.address, abiEncodedCall), + await expect(this.mock.$functionDelegateCall(this.target, call)).to.be.revertedWith( 'CallReceiverMock: reverting', ); }); it('reverts when address is not a contract', async function () { - const [recipient] = accounts; - const abiEncodedCall = this.target.contract.methods.mockFunction().encodeABI(); + const call = this.target.interface.encodeFunctionData('mockFunction'); - await expectRevertCustomError(this.mock.$functionDelegateCall(recipient, abiEncodedCall), 'AddressEmptyCode', [ - recipient, - ]); + await expect(this.mock.$functionDelegateCall(this.recipient, call)) + .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') + .withArgs(this.recipient.address); }); }); From 7bd2b2aaf68c21277097166a9a51eb72ae239b34 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Thu, 23 Nov 2023 05:18:04 +0000 Subject: [PATCH 117/167] Use ERC-XXX syntax (#4730) Co-authored-by: Hadrien Croubois Co-authored-by: ernestognw --- GUIDELINES.md | 2 +- certora/specs/ERC20FlashMint.spec | 2 +- contracts/access/IAccessControl.sol | 2 +- .../IAccessControlDefaultAdminRules.sol | 2 +- .../extensions/IAccessControlEnumerable.sol | 2 +- contracts/finance/README.adoc | 2 +- contracts/finance/VestingWallet.sol | 4 +-- contracts/governance/IGovernor.sol | 8 ++--- contracts/governance/README.adoc | 6 ++-- .../governance/extensions/GovernorVotes.sol | 6 ++-- contracts/governance/utils/Votes.sol | 2 +- contracts/interfaces/IERC1271.sol | 2 +- contracts/interfaces/IERC1363.sol | 6 ++-- contracts/interfaces/IERC1363Receiver.sol | 4 +-- contracts/interfaces/IERC1363Spender.sol | 4 +-- contracts/interfaces/IERC1820Implementer.sol | 4 +-- contracts/interfaces/IERC1820Registry.sol | 20 ++++++------- .../interfaces/IERC3156FlashBorrower.sol | 2 +- contracts/interfaces/IERC3156FlashLender.sol | 2 +- contracts/interfaces/IERC4626.sol | 2 +- contracts/interfaces/IERC4906.sol | 2 +- contracts/interfaces/IERC777.sol | 4 +-- contracts/interfaces/IERC777Recipient.sol | 4 +-- contracts/interfaces/IERC777Sender.sol | 4 +-- contracts/interfaces/draft-IERC1822.sol | 2 +- contracts/interfaces/draft-IERC6093.sol | 14 ++++----- contracts/metatx/ERC2771Context.sol | 4 +-- contracts/metatx/ERC2771Forwarder.sol | 2 +- .../ERC165/ERC165InterfacesSupported.sol | 2 +- contracts/mocks/docs/ERC4626Fees.sol | 2 +- contracts/proxy/Clones.sol | 2 +- contracts/proxy/ERC1967/ERC1967Proxy.sol | 4 +-- contracts/proxy/ERC1967/ERC1967Utils.sol | 10 +++---- contracts/proxy/README.adoc | 16 +++++----- contracts/proxy/beacon/BeaconProxy.sol | 2 +- contracts/proxy/utils/UUPSUpgradeable.sol | 10 +++---- contracts/token/ERC1155/ERC1155.sol | 8 ++--- contracts/token/ERC1155/IERC1155.sol | 4 +-- contracts/token/ERC1155/IERC1155Receiver.sol | 4 +-- contracts/token/ERC1155/README.adoc | 8 ++--- .../ERC1155/extensions/ERC1155Pausable.sol | 2 +- .../ERC1155/extensions/ERC1155Supply.sol | 2 +- .../ERC1155/extensions/ERC1155URIStorage.sol | 4 +-- .../extensions/IERC1155MetadataURI.sol | 2 +- .../token/ERC1155/utils/ERC1155Holder.sol | 2 +- contracts/token/ERC20/ERC20.sol | 6 ++-- contracts/token/ERC20/IERC20.sol | 2 +- contracts/token/ERC20/README.adoc | 30 +++++++++---------- .../token/ERC20/extensions/ERC20FlashMint.sol | 2 +- .../token/ERC20/extensions/ERC20Pausable.sol | 2 +- .../token/ERC20/extensions/ERC20Permit.sol | 8 ++--- .../token/ERC20/extensions/ERC20Votes.sol | 2 +- .../token/ERC20/extensions/ERC20Wrapper.sol | 4 +-- contracts/token/ERC20/extensions/ERC4626.sol | 14 ++++----- .../token/ERC20/extensions/IERC20Metadata.sol | 2 +- .../token/ERC20/extensions/IERC20Permit.sol | 6 ++-- contracts/token/ERC20/utils/SafeERC20.sol | 4 +-- contracts/token/ERC721/ERC721.sol | 6 ++-- contracts/token/ERC721/IERC721.sol | 6 ++-- contracts/token/ERC721/IERC721Receiver.sol | 4 +-- contracts/token/ERC721/README.adoc | 16 +++++----- .../ERC721/extensions/ERC721Burnable.sol | 4 +-- .../ERC721/extensions/ERC721Consecutive.sol | 8 ++--- .../ERC721/extensions/ERC721Enumerable.sol | 6 ++-- .../ERC721/extensions/ERC721Pausable.sol | 2 +- .../token/ERC721/extensions/ERC721Royalty.sol | 4 +-- .../ERC721/extensions/ERC721URIStorage.sol | 2 +- .../token/ERC721/extensions/ERC721Votes.sol | 2 +- .../token/ERC721/extensions/ERC721Wrapper.sol | 8 ++--- contracts/token/common/ERC2981.sol | 2 +- contracts/token/common/README.adoc | 4 +-- contracts/utils/README.adoc | 2 +- contracts/utils/StorageSlot.sol | 2 +- contracts/utils/cryptography/ECDSA.sol | 2 +- contracts/utils/cryptography/EIP712.sol | 6 ++-- .../utils/cryptography/MessageHashUtils.sol | 10 +++---- .../utils/cryptography/SignatureChecker.sol | 6 ++-- contracts/utils/introspection/ERC165.sol | 2 +- .../utils/introspection/ERC165Checker.sol | 14 ++++----- contracts/utils/introspection/IERC165.sol | 6 ++-- docs/modules/ROOT/nav.adoc | 8 ++--- docs/modules/ROOT/pages/access-control.adoc | 10 +++---- docs/modules/ROOT/pages/erc1155.adoc | 28 ++++++++--------- docs/modules/ROOT/pages/erc20-supply.adoc | 12 ++++---- docs/modules/ROOT/pages/erc20.adoc | 12 ++++---- docs/modules/ROOT/pages/erc4626.adoc | 10 +++---- docs/modules/ROOT/pages/erc721.adoc | 18 +++++------ docs/modules/ROOT/pages/governance.adoc | 14 ++++----- docs/modules/ROOT/pages/tokens.adoc | 8 ++--- docs/modules/ROOT/pages/utilities.adoc | 14 ++++----- scripts/generate/templates/StorageSlot.js | 2 +- test/governance/Governor.test.js | 4 +-- ...IP6372.behavior.js => ERC6372.behavior.js} | 6 ++-- test/governance/utils/Votes.behavior.js | 4 +-- .../token/ERC20/extensions/ERC20Votes.test.js | 2 +- .../ERC721/extensions/ERC721Votes.test.js | 2 +- 96 files changed, 282 insertions(+), 282 deletions(-) rename test/governance/utils/{EIP6372.behavior.js => ERC6372.behavior.js} (81%) diff --git a/GUIDELINES.md b/GUIDELINES.md index 4b7f5e76e..97fa7290c 100644 --- a/GUIDELINES.md +++ b/GUIDELINES.md @@ -115,7 +115,7 @@ In addition to the official Solidity Style Guide we have a number of other conve } ``` - Some standards (e.g. ERC20) use present tense, and in those cases the + Some standards (e.g. ERC-20) use present tense, and in those cases the standard specification is used. * Interface names should have a capital I prefix. diff --git a/certora/specs/ERC20FlashMint.spec b/certora/specs/ERC20FlashMint.spec index 5c87f0ded..4071052ea 100644 --- a/certora/specs/ERC20FlashMint.spec +++ b/certora/specs/ERC20FlashMint.spec @@ -4,7 +4,7 @@ import "methods/IERC3156FlashLender.spec"; import "methods/IERC3156FlashBorrower.spec"; methods { - // non standard ERC3156 functions + // non standard ERC-3156 functions function flashFeeReceiver() external returns (address) envfree; // function summaries below diff --git a/contracts/access/IAccessControl.sol b/contracts/access/IAccessControl.sol index 2ac89ca73..dbcd3957b 100644 --- a/contracts/access/IAccessControl.sol +++ b/contracts/access/IAccessControl.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; /** - * @dev External interface of AccessControl declared to support ERC165 detection. + * @dev External interface of AccessControl declared to support ERC-165 detection. */ interface IAccessControl { /** diff --git a/contracts/access/extensions/IAccessControlDefaultAdminRules.sol b/contracts/access/extensions/IAccessControlDefaultAdminRules.sol index 73531fafa..b74355aad 100644 --- a/contracts/access/extensions/IAccessControlDefaultAdminRules.sol +++ b/contracts/access/extensions/IAccessControlDefaultAdminRules.sol @@ -6,7 +6,7 @@ pragma solidity ^0.8.20; import {IAccessControl} from "../IAccessControl.sol"; /** - * @dev External interface of AccessControlDefaultAdminRules declared to support ERC165 detection. + * @dev External interface of AccessControlDefaultAdminRules declared to support ERC-165 detection. */ interface IAccessControlDefaultAdminRules is IAccessControl { /** diff --git a/contracts/access/extensions/IAccessControlEnumerable.sol b/contracts/access/extensions/IAccessControlEnumerable.sol index a39d05166..114296863 100644 --- a/contracts/access/extensions/IAccessControlEnumerable.sol +++ b/contracts/access/extensions/IAccessControlEnumerable.sol @@ -6,7 +6,7 @@ pragma solidity ^0.8.20; import {IAccessControl} from "../IAccessControl.sol"; /** - * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. + * @dev External interface of AccessControlEnumerable declared to support ERC-165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** diff --git a/contracts/finance/README.adoc b/contracts/finance/README.adoc index ac7e4f015..c855cbb6a 100644 --- a/contracts/finance/README.adoc +++ b/contracts/finance/README.adoc @@ -5,7 +5,7 @@ NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/ This directory includes primitives for financial systems: -- {VestingWallet} handles the vesting of Ether and ERC20 tokens for a given beneficiary. Custody of multiple tokens can +- {VestingWallet} handles the vesting of Ether and ERC-20 tokens for a given beneficiary. Custody of multiple tokens can be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting schedule. diff --git a/contracts/finance/VestingWallet.sol b/contracts/finance/VestingWallet.sol index 5abb7cdad..f472b6606 100644 --- a/contracts/finance/VestingWallet.sol +++ b/contracts/finance/VestingWallet.sol @@ -9,7 +9,7 @@ import {Context} from "../utils/Context.sol"; import {Ownable} from "../access/Ownable.sol"; /** - * @dev A vesting wallet is an ownable contract that can receive native currency and ERC20 tokens, and release these + * @dev A vesting wallet is an ownable contract that can receive native currency and ERC-20 tokens, and release these * assets to the wallet owner, also referred to as "beneficiary", according to a vesting schedule. * * Any assets transferred to this contract will follow the vesting schedule as if they were locked from the beginning. @@ -94,7 +94,7 @@ contract VestingWallet is Context, Ownable { /** * @dev Getter for the amount of releasable `token` tokens. `token` should be the address of an - * IERC20 contract. + * {IERC20} contract. */ function releasable(address token) public view virtual returns (uint256) { return vestedAmount(token, uint64(block.timestamp)) - released(token); diff --git a/contracts/governance/IGovernor.sol b/contracts/governance/IGovernor.sol index 6cde0e86d..85fc281d7 100644 --- a/contracts/governance/IGovernor.sol +++ b/contracts/governance/IGovernor.sol @@ -158,13 +158,13 @@ interface IGovernor is IERC165, IERC6372 { /** * @notice module:core - * @dev Name of the governor instance (used in building the ERC712 domain separator). + * @dev Name of the governor instance (used in building the EIP-712 domain separator). */ function name() external view returns (string memory); /** * @notice module:core - * @dev Version of the governor instance (used in building the ERC712 domain separator). Default: "1" + * @dev Version of the governor instance (used in building the EIP-712 domain separator). Default: "1" */ function version() external view returns (string memory); @@ -254,7 +254,7 @@ interface IGovernor is IERC165, IERC6372 { /** * @notice module:user-config * @dev Delay, between the proposal is created and the vote starts. The unit this duration is expressed in depends - * on the clock (see EIP-6372) this contract uses. + * on the clock (see ERC-6372) this contract uses. * * This can be increased to leave time for users to buy voting power, or delegate it, before the voting of a * proposal starts. @@ -267,7 +267,7 @@ interface IGovernor is IERC165, IERC6372 { /** * @notice module:user-config * @dev Delay between the vote start and vote end. The unit this duration is expressed in depends on the clock - * (see EIP-6372) this contract uses. + * (see ERC-6372) this contract uses. * * NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting * duration compared to the voting delay. diff --git a/contracts/governance/README.adoc b/contracts/governance/README.adoc index 5b38c4d53..323ffcc5c 100644 --- a/contracts/governance/README.adoc +++ b/contracts/governance/README.adoc @@ -44,9 +44,9 @@ Other extensions can customize the behavior or interface in multiple ways. In addition to modules and extensions, the core contract requires a few virtual functions to be implemented to your particular specifications: -* <>: Delay (in EIP-6372 clock) since the proposal is submitted until voting power is fixed and voting starts. This can be used to enforce a delay after a proposal is published for users to buy tokens, or delegate their votes. -* <>: Delay (in EIP-6372 clock) since the proposal starts until voting ends. -* <>: Quorum required for a proposal to be successful. This function includes a `timepoint` argument (see EIP-6372) so the quorum can adapt through time, for example, to follow a token's `totalSupply`. +* <>: Delay (in ERC-6372 clock) since the proposal is submitted until voting power is fixed and voting starts. This can be used to enforce a delay after a proposal is published for users to buy tokens, or delegate their votes. +* <>: Delay (in ERC-6372 clock) since the proposal starts until voting ends. +* <>: Quorum required for a proposal to be successful. This function includes a `timepoint` argument (see ERC-6372) so the quorum can adapt through time, for example, to follow a token's `totalSupply`. NOTE: Functions of the `Governor` contract do not include access control. If you want to restrict access, you should add these checks by overloading the particular functions. Among these, {Governor-_cancel} is internal by default, and you will have to expose it (with the right access control mechanism) yourself if this function is needed. diff --git a/contracts/governance/extensions/GovernorVotes.sol b/contracts/governance/extensions/GovernorVotes.sol index ec32ba478..16cd93435 100644 --- a/contracts/governance/extensions/GovernorVotes.sol +++ b/contracts/governance/extensions/GovernorVotes.sol @@ -28,8 +28,8 @@ abstract contract GovernorVotes is Governor { } /** - * @dev Clock (as specified in EIP-6372) is set to match the token's clock. Fallback to block numbers if the token - * does not implement EIP-6372. + * @dev Clock (as specified in ERC-6372) is set to match the token's clock. Fallback to block numbers if the token + * does not implement ERC-6372. */ function clock() public view virtual override returns (uint48) { try token().clock() returns (uint48 timepoint) { @@ -40,7 +40,7 @@ abstract contract GovernorVotes is Governor { } /** - * @dev Machine-readable description of the clock as specified in EIP-6372. + * @dev Machine-readable description of the clock as specified in ERC-6372. */ // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() public view virtual override returns (string memory) { diff --git a/contracts/governance/utils/Votes.sol b/contracts/governance/utils/Votes.sol index 9f9667653..b4a83a055 100644 --- a/contracts/governance/utils/Votes.sol +++ b/contracts/governance/utils/Votes.sol @@ -60,7 +60,7 @@ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { } /** - * @dev Machine-readable description of the clock as specified in EIP-6372. + * @dev Machine-readable description of the clock as specified in ERC-6372. */ // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() public view virtual returns (string memory) { diff --git a/contracts/interfaces/IERC1271.sol b/contracts/interfaces/IERC1271.sol index a56057ba5..5f5b32633 100644 --- a/contracts/interfaces/IERC1271.sol +++ b/contracts/interfaces/IERC1271.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; /** - * @dev Interface of the ERC1271 standard signature validation method for + * @dev Interface of the ERC-1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. */ interface IERC1271 { diff --git a/contracts/interfaces/IERC1363.sol b/contracts/interfaces/IERC1363.sol index 8b02aba5e..4a655b80c 100644 --- a/contracts/interfaces/IERC1363.sol +++ b/contracts/interfaces/IERC1363.sol @@ -7,10 +7,10 @@ import {IERC20} from "./IERC20.sol"; import {IERC165} from "./IERC165.sol"; /** - * @dev Interface of an ERC1363 compliant contract, as defined in the - * https://eips.ethereum.org/EIPS/eip-1363[EIP]. + * @dev Interface of an ERC-1363 compliant contract, as defined in the + * https://eips.ethereum.org/EIPS/eip-1363[ERC]. * - * Defines a interface for ERC20 tokens that supports executing recipient + * Defines a interface for ERC-20 tokens that supports executing recipient * code after `transfer` or `transferFrom`, or spender code after `approve`. */ interface IERC1363 is IERC165, IERC20 { diff --git a/contracts/interfaces/IERC1363Receiver.sol b/contracts/interfaces/IERC1363Receiver.sol index 64d669d4a..04e5dce8c 100644 --- a/contracts/interfaces/IERC1363Receiver.sol +++ b/contracts/interfaces/IERC1363Receiver.sol @@ -14,8 +14,8 @@ interface IERC1363Receiver { */ /** - * @notice Handle the receipt of ERC1363 tokens - * @dev Any ERC1363 smart contract calls this function on the recipient + * @notice Handle the receipt of ERC-1363 tokens + * @dev Any ERC-1363 smart contract calls this function on the recipient * after a `transfer` or a `transferFrom`. This function MAY throw to revert and reject the * transfer. Return of other than the magic value MUST result in the * transaction being reverted. diff --git a/contracts/interfaces/IERC1363Spender.sol b/contracts/interfaces/IERC1363Spender.sol index f2215418a..069e4ff80 100644 --- a/contracts/interfaces/IERC1363Spender.sol +++ b/contracts/interfaces/IERC1363Spender.sol @@ -14,8 +14,8 @@ interface IERC1363Spender { */ /** - * @notice Handle the approval of ERC1363 tokens - * @dev Any ERC1363 smart contract calls this function on the recipient + * @notice Handle the approval of ERC-1363 tokens + * @dev Any ERC-1363 smart contract calls this function on the recipient * after an `approve`. This function MAY throw to revert and reject the * approval. Return of other than the magic value MUST result in the * transaction being reverted. diff --git a/contracts/interfaces/IERC1820Implementer.sol b/contracts/interfaces/IERC1820Implementer.sol index 38e8a4e9b..9cf941a33 100644 --- a/contracts/interfaces/IERC1820Implementer.sol +++ b/contracts/interfaces/IERC1820Implementer.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.20; /** - * @dev Interface for an ERC1820 implementer, as defined in the - * https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[EIP]. + * @dev Interface for an ERC-1820 implementer, as defined in the + * https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[ERC]. * Used by contracts that will be registered as implementers in the * {IERC1820Registry}. */ diff --git a/contracts/interfaces/IERC1820Registry.sol b/contracts/interfaces/IERC1820Registry.sol index bf0140a12..b8f3d7399 100644 --- a/contracts/interfaces/IERC1820Registry.sol +++ b/contracts/interfaces/IERC1820Registry.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.20; /** - * @dev Interface of the global ERC1820 Registry, as defined in the - * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register + * @dev Interface of the global ERC-1820 Registry, as defined in the + * https://eips.ethereum.org/EIPS/eip-1820[ERC]. Accounts may register * implementers for interfaces in this registry, as well as query support. * * Implementers may be shared by multiple accounts, and can also implement more @@ -15,7 +15,7 @@ pragma solidity ^0.8.20; * * {IERC165} interfaces can also be queried via the registry. * - * For an in-depth explanation and source code analysis, see the EIP text. + * For an in-depth explanation and source code analysis, see the ERC text. */ interface IERC1820Registry { event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); @@ -80,32 +80,32 @@ interface IERC1820Registry { /** * @dev Returns the interface hash for an `interfaceName`, as defined in the * corresponding - * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP]. + * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the ERC]. */ function interfaceHash(string calldata interfaceName) external pure returns (bytes32); /** - * @notice Updates the cache with whether the contract implements an ERC165 interface or not. + * @notice Updates the cache with whether the contract implements an ERC-165 interface or not. * @param account Address of the contract for which to update the cache. - * @param interfaceId ERC165 interface for which to update the cache. + * @param interfaceId ERC-165 interface for which to update the cache. */ function updateERC165Cache(address account, bytes4 interfaceId) external; /** - * @notice Checks whether a contract implements an ERC165 interface or not. + * @notice Checks whether a contract implements an ERC-165 interface or not. * If the result is not cached a direct lookup on the contract address is performed. * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling * {updateERC165Cache} with the contract address. * @param account Address of the contract to check. - * @param interfaceId ERC165 interface to check. + * @param interfaceId ERC-165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); /** - * @notice Checks whether a contract implements an ERC165 interface or not without using or updating the cache. + * @notice Checks whether a contract implements an ERC-165 interface or not without using or updating the cache. * @param account Address of the contract to check. - * @param interfaceId ERC165 interface to check. + * @param interfaceId ERC-165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); diff --git a/contracts/interfaces/IERC3156FlashBorrower.sol b/contracts/interfaces/IERC3156FlashBorrower.sol index 53e17ea63..4fd10e7cf 100644 --- a/contracts/interfaces/IERC3156FlashBorrower.sol +++ b/contracts/interfaces/IERC3156FlashBorrower.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; /** - * @dev Interface of the ERC3156 FlashBorrower, as defined in + * @dev Interface of the ERC-3156 FlashBorrower, as defined in * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. */ interface IERC3156FlashBorrower { diff --git a/contracts/interfaces/IERC3156FlashLender.sol b/contracts/interfaces/IERC3156FlashLender.sol index cfae3c0b7..47208ac31 100644 --- a/contracts/interfaces/IERC3156FlashLender.sol +++ b/contracts/interfaces/IERC3156FlashLender.sol @@ -6,7 +6,7 @@ pragma solidity ^0.8.20; import {IERC3156FlashBorrower} from "./IERC3156FlashBorrower.sol"; /** - * @dev Interface of the ERC3156 FlashLender, as defined in + * @dev Interface of the ERC-3156 FlashLender, as defined in * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. */ interface IERC3156FlashLender { diff --git a/contracts/interfaces/IERC4626.sol b/contracts/interfaces/IERC4626.sol index cfff53b97..9a24507a7 100644 --- a/contracts/interfaces/IERC4626.sol +++ b/contracts/interfaces/IERC4626.sol @@ -7,7 +7,7 @@ import {IERC20} from "../token/ERC20/IERC20.sol"; import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol"; /** - * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in + * @dev Interface of the ERC-4626 "Tokenized Vault Standard", as defined in * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. */ interface IERC4626 is IERC20, IERC20Metadata { diff --git a/contracts/interfaces/IERC4906.sol b/contracts/interfaces/IERC4906.sol index bc008e397..cdcace31f 100644 --- a/contracts/interfaces/IERC4906.sol +++ b/contracts/interfaces/IERC4906.sol @@ -6,7 +6,7 @@ pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; import {IERC721} from "./IERC721.sol"; -/// @title EIP-721 Metadata Update Extension +/// @title ERC-721 Metadata Update Extension interface IERC4906 is IERC165, IERC721 { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could diff --git a/contracts/interfaces/IERC777.sol b/contracts/interfaces/IERC777.sol index 56dfbef51..31f05aa64 100644 --- a/contracts/interfaces/IERC777.sol +++ b/contracts/interfaces/IERC777.sol @@ -4,10 +4,10 @@ pragma solidity ^0.8.20; /** - * @dev Interface of the ERC777Token standard as defined in the EIP. + * @dev Interface of the ERC-777 Token standard as defined in the ERC. * * This contract uses the - * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let + * https://eips.ethereum.org/EIPS/eip-1820[ERC-1820 registry standard] to let * token holders and recipients react to token movements by using setting implementers * for the associated interfaces in said registry. See {IERC1820Registry} and * {IERC1820Implementer}. diff --git a/contracts/interfaces/IERC777Recipient.sol b/contracts/interfaces/IERC777Recipient.sol index 6378e1409..1619e1126 100644 --- a/contracts/interfaces/IERC777Recipient.sol +++ b/contracts/interfaces/IERC777Recipient.sol @@ -4,12 +4,12 @@ pragma solidity ^0.8.20; /** - * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP. + * @dev Interface of the ERC-777 Tokens Recipient standard as defined in the ERC. * * Accounts can be notified of {IERC777} tokens being sent to them by having a * contract implement this interface (contract holders can be their own * implementer) and registering it on the - * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. + * https://eips.ethereum.org/EIPS/eip-1820[ERC-1820 global registry]. * * See {IERC1820Registry} and {IERC1820Implementer}. */ diff --git a/contracts/interfaces/IERC777Sender.sol b/contracts/interfaces/IERC777Sender.sol index 5c0ec0b57..f47a78323 100644 --- a/contracts/interfaces/IERC777Sender.sol +++ b/contracts/interfaces/IERC777Sender.sol @@ -4,12 +4,12 @@ pragma solidity ^0.8.20; /** - * @dev Interface of the ERC777TokensSender standard as defined in the EIP. + * @dev Interface of the ERC-777 Tokens Sender standard as defined in the ERC. * * {IERC777} Token holders can be notified of operations performed on their * tokens by having a contract implement this interface (contract holders can be * their own implementer) and registering it on the - * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. + * https://eips.ethereum.org/EIPS/eip-1820[ERC-1820 global registry]. * * See {IERC1820Registry} and {IERC1820Implementer}. */ diff --git a/contracts/interfaces/draft-IERC1822.sol b/contracts/interfaces/draft-IERC1822.sol index 4d0f0f885..ad047dae6 100644 --- a/contracts/interfaces/draft-IERC1822.sol +++ b/contracts/interfaces/draft-IERC1822.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; /** - * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified + * @dev ERC-1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { diff --git a/contracts/interfaces/draft-IERC6093.sol b/contracts/interfaces/draft-IERC6093.sol index f6990e607..75fd75643 100644 --- a/contracts/interfaces/draft-IERC6093.sol +++ b/contracts/interfaces/draft-IERC6093.sol @@ -3,8 +3,8 @@ pragma solidity ^0.8.20; /** - * @dev Standard ERC20 Errors - * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. + * @dev Standard ERC-20 Errors + * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens. */ interface IERC20Errors { /** @@ -49,12 +49,12 @@ interface IERC20Errors { } /** - * @dev Standard ERC721 Errors - * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. + * @dev Standard ERC-721 Errors + * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. */ interface IERC721Errors { /** - * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. + * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ @@ -107,8 +107,8 @@ interface IERC721Errors { } /** - * @dev Standard ERC1155 Errors - * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. + * @dev Standard ERC-1155 Errors + * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens. */ interface IERC1155Errors { /** diff --git a/contracts/metatx/ERC2771Context.sol b/contracts/metatx/ERC2771Context.sol index ab9546bc8..0724a0b69 100644 --- a/contracts/metatx/ERC2771Context.sol +++ b/contracts/metatx/ERC2771Context.sol @@ -6,10 +6,10 @@ pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** - * @dev Context variant with ERC2771 support. + * @dev Context variant with ERC-2771 support. * * WARNING: Avoid using this pattern in contracts that rely in a specific calldata length as they'll - * be affected by any forwarder whose `msg.data` is suffixed with the `from` address according to the ERC2771 + * be affected by any forwarder whose `msg.data` is suffixed with the `from` address according to the ERC-2771 * specification adding the address size in bytes (20) to the calldata size. An example of an unexpected * behavior could be an unintended fallback (or another function) invocation while trying to invoke the `receive` * function only accessible if `msg.data.length == 0`. diff --git a/contracts/metatx/ERC2771Forwarder.sol b/contracts/metatx/ERC2771Forwarder.sol index 4815c1a1d..221dabb62 100644 --- a/contracts/metatx/ERC2771Forwarder.sol +++ b/contracts/metatx/ERC2771Forwarder.sol @@ -10,7 +10,7 @@ import {Nonces} from "../utils/Nonces.sol"; import {Address} from "../utils/Address.sol"; /** - * @dev A forwarder compatible with ERC2771 contracts. See {ERC2771Context}. + * @dev A forwarder compatible with ERC-2771 contracts. See {ERC2771Context}. * * This forwarder operates on forward requests that include: * diff --git a/contracts/mocks/ERC165/ERC165InterfacesSupported.sol b/contracts/mocks/ERC165/ERC165InterfacesSupported.sol index 4010b2103..dffd6a24e 100644 --- a/contracts/mocks/ERC165/ERC165InterfacesSupported.sol +++ b/contracts/mocks/ERC165/ERC165InterfacesSupported.sol @@ -27,7 +27,7 @@ contract SupportsInterfaceWithLookupMock is IERC165 { /** * @dev A contract implementing SupportsInterfaceWithLookup - * implement ERC165 itself. + * implement ERC-165 itself. */ constructor() { _registerInterface(INTERFACE_ID_ERC165); diff --git a/contracts/mocks/docs/ERC4626Fees.sol b/contracts/mocks/docs/ERC4626Fees.sol index 17bc92d7c..b4baef5b0 100644 --- a/contracts/mocks/docs/ERC4626Fees.sol +++ b/contracts/mocks/docs/ERC4626Fees.sol @@ -7,7 +7,7 @@ import {ERC4626} from "../../token/ERC20/extensions/ERC4626.sol"; import {SafeERC20} from "../../token/ERC20/utils/SafeERC20.sol"; import {Math} from "../../utils/math/Math.sol"; -/// @dev ERC4626 vault with entry/exit fees expressed in https://en.wikipedia.org/wiki/Basis_point[basis point (bp)]. +/// @dev ERC-4626 vault with entry/exit fees expressed in https://en.wikipedia.org/wiki/Basis_point[basis point (bp)]. abstract contract ERC4626Fees is ERC4626 { using Math for uint256; diff --git a/contracts/proxy/Clones.sol b/contracts/proxy/Clones.sol index 95e467d3e..92ed339a7 100644 --- a/contracts/proxy/Clones.sol +++ b/contracts/proxy/Clones.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; /** - * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for + * @dev https://eips.ethereum.org/EIPS/eip-1167[ERC-1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies diff --git a/contracts/proxy/ERC1967/ERC1967Proxy.sol b/contracts/proxy/ERC1967/ERC1967Proxy.sol index 0fa61b5b3..8f6b717a5 100644 --- a/contracts/proxy/ERC1967/ERC1967Proxy.sol +++ b/contracts/proxy/ERC1967/ERC1967Proxy.sol @@ -9,7 +9,7 @@ import {ERC1967Utils} from "./ERC1967Utils.sol"; /** * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an * implementation address that can be changed. This address is stored in storage in the location specified by - * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the + * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967], so that it doesn't conflict with the storage layout of the * implementation behind the proxy. */ contract ERC1967Proxy is Proxy { @@ -30,7 +30,7 @@ contract ERC1967Proxy is Proxy { /** * @dev Returns the current implementation address. * - * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using + * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` */ diff --git a/contracts/proxy/ERC1967/ERC1967Utils.sol b/contracts/proxy/ERC1967/ERC1967Utils.sol index e55bae20c..19354814d 100644 --- a/contracts/proxy/ERC1967/ERC1967Utils.sol +++ b/contracts/proxy/ERC1967/ERC1967Utils.sol @@ -9,7 +9,7 @@ import {StorageSlot} from "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for - * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. + * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots. */ library ERC1967Utils { // We re-declare ERC-1967 events here because they can't be used directly from IERC1967. @@ -64,7 +64,7 @@ library ERC1967Utils { } /** - * @dev Stores a new address in the EIP1967 implementation slot. + * @dev Stores a new address in the ERC-1967 implementation slot. */ function _setImplementation(address newImplementation) private { if (newImplementation.code.length == 0) { @@ -101,7 +101,7 @@ library ERC1967Utils { /** * @dev Returns the current admin. * - * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using + * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ @@ -110,7 +110,7 @@ library ERC1967Utils { } /** - * @dev Stores a new address in the EIP1967 admin slot. + * @dev Stores a new address in the ERC-1967 admin slot. */ function _setAdmin(address newAdmin) private { if (newAdmin == address(0)) { @@ -144,7 +144,7 @@ library ERC1967Utils { } /** - * @dev Stores a new beacon in the EIP1967 beacon slot. + * @dev Stores a new beacon in the ERC-1967 beacon slot. */ function _setBeacon(address newBeacon) private { if (newBeacon.code.length == 0) { diff --git a/contracts/proxy/README.adoc b/contracts/proxy/README.adoc index 3c4a78d19..c6badf0fc 100644 --- a/contracts/proxy/README.adoc +++ b/contracts/proxy/README.adoc @@ -9,12 +9,12 @@ Most of the proxies below are built on an abstract base contract. - {Proxy}: Abstract contract implementing the core delegation functionality. -In order to avoid clashes with the storage variables of the implementation contract behind a proxy, we use https://eips.ethereum.org/EIPS/eip-1967[EIP1967] storage slots. +In order to avoid clashes with the storage variables of the implementation contract behind a proxy, we use https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] storage slots. -- {ERC1967Utils}: Internal functions to get and set the storage slots defined in EIP1967. -- {ERC1967Proxy}: A proxy using EIP1967 storage slots. Not upgradeable by default. +- {ERC1967Utils}: Internal functions to get and set the storage slots defined in ERC-1967. +- {ERC1967Proxy}: A proxy using ERC-1967 storage slots. Not upgradeable by default. -There are two alternative ways to add upgradeability to an ERC1967 proxy. Their differences are explained below in <>. +There are two alternative ways to add upgradeability to an ERC-1967 proxy. Their differences are explained below in <>. - {TransparentUpgradeableProxy}: A proxy with a built-in immutable admin and upgrade interface. - {UUPSUpgradeable}: An upgradeability mechanism to be included in the implementation contract. @@ -26,7 +26,7 @@ A different family of proxies are beacon proxies. This pattern, popularized by D - {BeaconProxy}: A proxy that retrieves its implementation from a beacon contract. - {UpgradeableBeacon}: A beacon contract with a built in admin that can upgrade the {BeaconProxy} pointing to it. -In this pattern, the proxy contract doesn't hold the implementation address in storage like an ERC1967 proxy. Instead, the address is stored in a separate beacon contract. The `upgrade` operations are sent to the beacon instead of to the proxy contract, and all proxies that follow that beacon are automatically upgraded. +In this pattern, the proxy contract doesn't hold the implementation address in storage like an ERC-1967 proxy. Instead, the address is stored in a separate beacon contract. The `upgrade` operations are sent to the beacon instead of to the proxy contract, and all proxies that follow that beacon are automatically upgraded. Outside the realm of upgradeability, proxies can also be useful to make cheap contract clones, such as those created by an on-chain factory contract that creates many instances of the same contract. These instances are designed to be both cheap to deploy, and cheap to call. @@ -35,7 +35,7 @@ Outside the realm of upgradeability, proxies can also be useful to make cheap co [[transparent-vs-uups]] == Transparent vs UUPS Proxies -The original proxies included in OpenZeppelin followed the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[Transparent Proxy Pattern]. While this pattern is still provided, our recommendation is now shifting towards UUPS proxies, which are both lightweight and versatile. The name UUPS comes from https://eips.ethereum.org/EIPS/eip-1822[EIP1822], which first documented the pattern. +The original proxies included in OpenZeppelin followed the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[Transparent Proxy Pattern]. While this pattern is still provided, our recommendation is now shifting towards UUPS proxies, which are both lightweight and versatile. The name UUPS comes from https://eips.ethereum.org/EIPS/eip-1822[ERC-1822], which first documented the pattern. While both of these share the same interface for upgrades, in UUPS proxies the upgrade is handled by the implementation, and can eventually be removed. Transparent proxies, on the other hand, include the upgrade and admin logic in the proxy itself. This means {TransparentUpgradeableProxy} is more expensive to deploy than what is possible with UUPS proxies. @@ -48,13 +48,13 @@ By default, the upgrade functionality included in {UUPSUpgradeable} contains a s - Adding a flag mechanism in the implementation that will disable the upgrade function when triggered. - Upgrading to an implementation that features an upgrade mechanism without the additional security check, and then upgrading again to another implementation without the upgrade mechanism. -The current implementation of this security mechanism uses https://eips.ethereum.org/EIPS/eip-1822[EIP1822] to detect the storage slot used by the implementation. A previous implementation, now deprecated, relied on a rollback check. It is possible to upgrade from a contract using the old mechanism to a new one. The inverse is however not possible, as old implementations (before version 4.5) did not include the `ERC1822` interface. +The current implementation of this security mechanism uses https://eips.ethereum.org/EIPS/eip-1822[ERC-1822] to detect the storage slot used by the implementation. A previous implementation, now deprecated, relied on a rollback check. It is possible to upgrade from a contract using the old mechanism to a new one. The inverse is however not possible, as old implementations (before version 4.5) did not include the ERC-1822 interface. == Core {{Proxy}} -== ERC1967 +== ERC-1967 {{IERC1967}} diff --git a/contracts/proxy/beacon/BeaconProxy.sol b/contracts/proxy/beacon/BeaconProxy.sol index 05e26e5d5..9b3f627b1 100644 --- a/contracts/proxy/beacon/BeaconProxy.sol +++ b/contracts/proxy/beacon/BeaconProxy.sol @@ -12,7 +12,7 @@ import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol"; * * The beacon address can only be set once during construction, and cannot be changed afterwards. It is stored in an * immutable variable to avoid unnecessary storage reads, and also in the beacon storage slot specified by - * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] so that it can be accessed externally. + * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] so that it can be accessed externally. * * CAUTION: Since the beacon address can never be changed, you must ensure that you either control the beacon, or trust * the beacon to not upgrade the implementation maliciously. diff --git a/contracts/proxy/utils/UUPSUpgradeable.sol b/contracts/proxy/utils/UUPSUpgradeable.sol index 8a4e693ae..20eb1f726 100644 --- a/contracts/proxy/utils/UUPSUpgradeable.sol +++ b/contracts/proxy/utils/UUPSUpgradeable.sol @@ -42,9 +42,9 @@ abstract contract UUPSUpgradeable is IERC1822Proxiable { /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is - * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case + * a proxy contract with an implementation (as defined in ERC-1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a - * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to + * function through ERC-1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { @@ -62,7 +62,7 @@ abstract contract UUPSUpgradeable is IERC1822Proxiable { } /** - * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the + * @dev Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate the implementation's compatibility when performing an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks @@ -90,7 +90,7 @@ abstract contract UUPSUpgradeable is IERC1822Proxiable { /** * @dev Reverts if the execution is not performed via delegatecall or the execution - * context is not of a proxy with an ERC1967-compliant implementation pointing to self. + * context is not of a proxy with an ERC-1967 compliant implementation pointing to self. * See {_onlyProxy}. */ function _checkProxy() internal view virtual { @@ -129,7 +129,7 @@ abstract contract UUPSUpgradeable is IERC1822Proxiable { * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call. * * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value - * is expected to be the implementation slot in ERC1967. + * is expected to be the implementation slot in ERC-1967. * * Emits an {IERC1967-Upgraded} event. */ diff --git a/contracts/token/ERC1155/ERC1155.sol b/contracts/token/ERC1155/ERC1155.sol index 316f3291e..2ec3ef7be 100644 --- a/contracts/token/ERC1155/ERC1155.sol +++ b/contracts/token/ERC1155/ERC1155.sol @@ -49,7 +49,7 @@ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IER * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism - * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. + * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the ERC]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. @@ -263,7 +263,7 @@ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IER /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism - * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. + * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the ERC]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the values in the JSON file at said URI will be replaced by @@ -394,7 +394,7 @@ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IER } } catch (bytes memory reason) { if (reason.length == 0) { - // non-ERC1155Receiver implementer + // non-IERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly @@ -428,7 +428,7 @@ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IER } } catch (bytes memory reason) { if (reason.length == 0) { - // non-ERC1155Receiver implementer + // non-IERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly diff --git a/contracts/token/ERC1155/IERC1155.sol b/contracts/token/ERC1155/IERC1155.sol index 461e48b98..62ad4a9bd 100644 --- a/contracts/token/ERC1155/IERC1155.sol +++ b/contracts/token/ERC1155/IERC1155.sol @@ -6,8 +6,8 @@ pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** - * @dev Required interface of an ERC1155 compliant contract, as defined in the - * https://eips.ethereum.org/EIPS/eip-1155[EIP]. + * @dev Required interface of an ERC-1155 compliant contract, as defined in the + * https://eips.ethereum.org/EIPS/eip-1155[ERC]. */ interface IERC1155 is IERC165 { /** diff --git a/contracts/token/ERC1155/IERC1155Receiver.sol b/contracts/token/ERC1155/IERC1155Receiver.sol index 0f6e2bf85..36ad4c752 100644 --- a/contracts/token/ERC1155/IERC1155Receiver.sol +++ b/contracts/token/ERC1155/IERC1155Receiver.sol @@ -11,7 +11,7 @@ import {IERC165} from "../../utils/introspection/IERC165.sol"; */ interface IERC1155Receiver is IERC165 { /** - * @dev Handles the receipt of a single ERC1155 token type. This function is + * @dev Handles the receipt of a single ERC-1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return @@ -34,7 +34,7 @@ interface IERC1155Receiver is IERC165 { ) external returns (bytes4); /** - * @dev Handles the receipt of a multiple ERC1155 token types. This function + * @dev Handles the receipt of a multiple ERC-1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * diff --git a/contracts/token/ERC1155/README.adoc b/contracts/token/ERC1155/README.adoc index 1a56358ef..d911d785d 100644 --- a/contracts/token/ERC1155/README.adoc +++ b/contracts/token/ERC1155/README.adoc @@ -1,11 +1,11 @@ -= ERC 1155 += ERC-1155 [.readme-notice] NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc1155 -This set of interfaces and contracts are all related to the https://eips.ethereum.org/EIPS/eip-1155[ERC1155 Multi Token Standard]. +This set of interfaces and contracts are all related to the https://eips.ethereum.org/EIPS/eip-1155[ERC-1155 Multi Token Standard]. -The EIP consists of three interfaces which fulfill different roles, found here as {IERC1155}, {IERC1155MetadataURI} and {IERC1155Receiver}. +The ERC consists of three interfaces which fulfill different roles, found here as {IERC1155}, {IERC1155MetadataURI} and {IERC1155Receiver}. {ERC1155} implements the mandatory {IERC1155} interface, as well as the optional extension {IERC1155MetadataURI}, by relying on the substitution mechanism to use the same URI for all token types, dramatically reducing gas costs. @@ -14,7 +14,7 @@ Additionally there are multiple custom extensions, including: * designation of addresses that can pause token transfers for all users ({ERC1155Pausable}). * destruction of own tokens ({ERC1155Burnable}). -NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC1155 (such as <>) and expose them as external functions in the way they prefer. +NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC-1155 (such as <>) and expose them as external functions in the way they prefer. == Core diff --git a/contracts/token/ERC1155/extensions/ERC1155Pausable.sol b/contracts/token/ERC1155/extensions/ERC1155Pausable.sol index 529a46523..e99cf2aa9 100644 --- a/contracts/token/ERC1155/extensions/ERC1155Pausable.sol +++ b/contracts/token/ERC1155/extensions/ERC1155Pausable.sol @@ -7,7 +7,7 @@ import {ERC1155} from "../ERC1155.sol"; import {Pausable} from "../../../utils/Pausable.sol"; /** - * @dev ERC1155 token with pausable token transfers, minting and burning. + * @dev ERC-1155 token with pausable token transfers, minting and burning. * * 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 diff --git a/contracts/token/ERC1155/extensions/ERC1155Supply.sol b/contracts/token/ERC1155/extensions/ERC1155Supply.sol index cef11b4c2..4bad08bc0 100644 --- a/contracts/token/ERC1155/extensions/ERC1155Supply.sol +++ b/contracts/token/ERC1155/extensions/ERC1155Supply.sol @@ -6,7 +6,7 @@ pragma solidity ^0.8.20; import {ERC1155} from "../ERC1155.sol"; /** - * @dev Extension of ERC1155 that adds tracking of total supply per id. + * @dev Extension of ERC-1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the diff --git a/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol b/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol index c2a5bdced..e8436e830 100644 --- a/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol +++ b/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol @@ -7,8 +7,8 @@ import {Strings} from "../../../utils/Strings.sol"; import {ERC1155} from "../ERC1155.sol"; /** - * @dev ERC1155 token with storage based token URI management. - * Inspired by the ERC721URIStorage extension + * @dev ERC-1155 token with storage based token URI management. + * Inspired by the {ERC721URIStorage} extension */ abstract contract ERC1155URIStorage is ERC1155 { using Strings for uint256; diff --git a/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol b/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol index e3fb74df0..ea07897b9 100644 --- a/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol +++ b/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol @@ -7,7 +7,7 @@ import {IERC1155} from "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined - * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. + * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[ERC]. */ interface IERC1155MetadataURI is IERC1155 { /** diff --git a/contracts/token/ERC1155/utils/ERC1155Holder.sol b/contracts/token/ERC1155/utils/ERC1155Holder.sol index b108cdbf6..35be58c52 100644 --- a/contracts/token/ERC1155/utils/ERC1155Holder.sol +++ b/contracts/token/ERC1155/utils/ERC1155Holder.sol @@ -7,7 +7,7 @@ import {IERC165, ERC165} from "../../../utils/introspection/ERC165.sol"; import {IERC1155Receiver} from "../IERC1155Receiver.sol"; /** - * @dev Simple implementation of `IERC1155Receiver` that will allow a contract to hold ERC1155 tokens. + * @dev Simple implementation of `IERC1155Receiver` that will allow a contract to hold ERC-1155 tokens. * * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be * stuck. diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index 1fde5279d..cf7332858 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/contracts/token/ERC20/ERC20.sol @@ -23,12 +23,12 @@ import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless - * conventional and does not conflict with the expectations of ERC20 + * conventional and does not conflict with the expectations of ERC-20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just - * by listening to said events. Other implementations of the EIP may not emit + * by listening to said events. Other implementations of the ERC may not emit * these events, as it isn't required by the specification. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { @@ -139,7 +139,7 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not - * required by the EIP. See the note at the beginning of {ERC20}. + * required by the ERC. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. diff --git a/contracts/token/ERC20/IERC20.sol b/contracts/token/ERC20/IERC20.sol index db01cf4c7..d89072164 100644 --- a/contracts/token/ERC20/IERC20.sol +++ b/contracts/token/ERC20/IERC20.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; /** - * @dev Interface of the ERC20 standard as defined in the EIP. + * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** diff --git a/contracts/token/ERC20/README.adoc b/contracts/token/ERC20/README.adoc index 2c508802d..6113b08e6 100644 --- a/contracts/token/ERC20/README.adoc +++ b/contracts/token/ERC20/README.adoc @@ -1,38 +1,38 @@ -= ERC 20 += ERC-20 [.readme-notice] NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc20 -This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-20[ERC20 Token Standard]. +This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-20[ERC-20 Token Standard]. -TIP: For an overview of ERC20 tokens and a walk through on how to create a token contract read our xref:ROOT:erc20.adoc[ERC20 guide]. +TIP: For an overview of ERC-20 tokens and a walk through on how to create a token contract read our xref:ROOT:erc20.adoc[ERC-20 guide]. -There are a few core contracts that implement the behavior specified in the EIP: +There are a few core contracts that implement the behavior specified in the ERC: -* {IERC20}: the interface all ERC20 implementations should conform to. -* {IERC20Metadata}: the extended ERC20 interface including the <>, <> and <> functions. -* {ERC20}: the implementation of the ERC20 interface, including the <>, <> and <> optional standard extension to the base interface. +* {IERC20}: the interface all ERC-20 implementations should conform to. +* {IERC20Metadata}: the extended ERC-20 interface including the <>, <> and <> functions. +* {ERC20}: the implementation of the ERC-20 interface, including the <>, <> and <> optional standard extension to the base interface. Additionally there are multiple custom extensions, including: -* {ERC20Permit}: gasless approval of tokens (standardized as ERC2612). +* {ERC20Permit}: gasless approval of tokens (standardized as ERC-2612). * {ERC20Burnable}: destruction of own tokens. * {ERC20Capped}: enforcement of a cap to the total supply when minting tokens. * {ERC20Pausable}: ability to pause token transfers. -* {ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC3156). +* {ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC-3156). * {ERC20Votes}: support for voting and vote delegation. -* {ERC20Wrapper}: wrapper to create an ERC20 backed by another ERC20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}. -* {ERC4626}: tokenized vault that manages shares (represented as ERC20) that are backed by assets (another ERC20). +* {ERC20Wrapper}: wrapper to create an ERC-20 backed by another ERC-20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}. +* {ERC4626}: tokenized vault that manages shares (represented as ERC-20) that are backed by assets (another ERC-20). -Finally, there are some utilities to interact with ERC20 contracts in various ways: +Finally, there are some utilities to interact with ERC-20 contracts in various ways: * {SafeERC20}: a wrapper around the interface that eliminates the need to handle boolean return values. -Other utilities that support ERC20 assets can be found in codebase: +Other utilities that support ERC-20 assets can be found in codebase: -* ERC20 tokens can be timelocked (held tokens for a beneficiary until a specified time) or vested (released following a given schedule) using a {VestingWallet}. +* ERC-20 tokens can be timelocked (held tokens for a beneficiary until a specified time) or vested (released following a given schedule) using a {VestingWallet}. -NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC20 (such as <>) and expose them as external functions in the way they prefer. +NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC-20 (such as <>) and expose them as external functions in the way they prefer. == Core diff --git a/contracts/token/ERC20/extensions/ERC20FlashMint.sol b/contracts/token/ERC20/extensions/ERC20FlashMint.sol index 0e8931278..5fa33ef24 100644 --- a/contracts/token/ERC20/extensions/ERC20FlashMint.sol +++ b/contracts/token/ERC20/extensions/ERC20FlashMint.sol @@ -8,7 +8,7 @@ import {IERC3156FlashLender} from "../../../interfaces/IERC3156FlashLender.sol"; import {ERC20} from "../ERC20.sol"; /** - * @dev Implementation of the ERC3156 Flash loans extension, as defined in + * @dev Implementation of the ERC-3156 Flash loans extension, as defined in * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. * * Adds the {flashLoan} method, which provides flash loan support at the token diff --git a/contracts/token/ERC20/extensions/ERC20Pausable.sol b/contracts/token/ERC20/extensions/ERC20Pausable.sol index 8fe832b99..9b56f0535 100644 --- a/contracts/token/ERC20/extensions/ERC20Pausable.sol +++ b/contracts/token/ERC20/extensions/ERC20Pausable.sol @@ -7,7 +7,7 @@ import {ERC20} from "../ERC20.sol"; import {Pausable} from "../../../utils/Pausable.sol"; /** - * @dev ERC20 token with pausable token transfers, minting and burning. + * @dev ERC-20 token with pausable token transfers, minting and burning. * * 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 diff --git a/contracts/token/ERC20/extensions/ERC20Permit.sol b/contracts/token/ERC20/extensions/ERC20Permit.sol index 36667adf1..22b19dc0b 100644 --- a/contracts/token/ERC20/extensions/ERC20Permit.sol +++ b/contracts/token/ERC20/extensions/ERC20Permit.sol @@ -10,10 +10,10 @@ import {EIP712} from "../../../utils/cryptography/EIP712.sol"; import {Nonces} from "../../../utils/Nonces.sol"; /** - * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in - * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. + * @dev Implementation of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in + * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. * - * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by + * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ @@ -34,7 +34,7 @@ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * - * It's a good idea to use the same `name` that is defined as the ERC20 token name. + * It's a good idea to use the same `name` that is defined as the ERC-20 token name. */ constructor(string memory name) EIP712(name, "1") {} diff --git a/contracts/token/ERC20/extensions/ERC20Votes.sol b/contracts/token/ERC20/extensions/ERC20Votes.sol index 6aa6ed05e..8533ca9b6 100644 --- a/contracts/token/ERC20/extensions/ERC20Votes.sol +++ b/contracts/token/ERC20/extensions/ERC20Votes.sol @@ -8,7 +8,7 @@ import {Votes} from "../../../governance/utils/Votes.sol"; import {Checkpoints} from "../../../utils/structs/Checkpoints.sol"; /** - * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's, + * @dev Extension of ERC-20 to support Compound-like voting and delegation. This version is more generic than Compound's, * and supports token supply up to 2^208^ - 1, while COMP is limited to 2^96^ - 1. * * NOTE: This contract does not provide interface compatibility with Compound's COMP token. diff --git a/contracts/token/ERC20/extensions/ERC20Wrapper.sol b/contracts/token/ERC20/extensions/ERC20Wrapper.sol index 61448803b..6645ddc05 100644 --- a/contracts/token/ERC20/extensions/ERC20Wrapper.sol +++ b/contracts/token/ERC20/extensions/ERC20Wrapper.sol @@ -7,11 +7,11 @@ import {IERC20, IERC20Metadata, ERC20} from "../ERC20.sol"; import {SafeERC20} from "../utils/SafeERC20.sol"; /** - * @dev Extension of the ERC20 token contract to support token wrapping. + * @dev Extension of the ERC-20 token contract to support token wrapping. * * Users can deposit and withdraw "underlying tokens" and receive a matching number of "wrapped tokens". This is useful * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the - * wrapping of an existing "basic" ERC20 into a governance token. + * wrapping of an existing "basic" ERC-20 into a governance token. */ abstract contract ERC20Wrapper is ERC20 { IERC20 private immutable _underlying; diff --git a/contracts/token/ERC20/extensions/ERC4626.sol b/contracts/token/ERC20/extensions/ERC4626.sol index dccf6900a..76c14fc75 100644 --- a/contracts/token/ERC20/extensions/ERC4626.sol +++ b/contracts/token/ERC20/extensions/ERC4626.sol @@ -9,12 +9,12 @@ import {IERC4626} from "../../../interfaces/IERC4626.sol"; import {Math} from "../../../utils/math/Math.sol"; /** - * @dev Implementation of the ERC4626 "Tokenized Vault Standard" as defined in - * https://eips.ethereum.org/EIPS/eip-4626[EIP-4626]. + * @dev Implementation of the ERC-4626 "Tokenized Vault Standard" as defined in + * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. * - * This extension allows the minting and burning of "shares" (represented using the ERC20 inheritance) in exchange for + * This extension allows the minting and burning of "shares" (represented using the ERC-20 inheritance) in exchange for * underlying "assets" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends - * the ERC20 standard. Any additional extensions included along it would affect the "shares" token represented by this + * the ERC-20 standard. Any additional extensions included along it would affect the "shares" token represented by this * contract and not the "assets" token which is an independent contract. * * [CAUTION] @@ -72,7 +72,7 @@ abstract contract ERC4626 is ERC20, IERC4626 { error ERC4626ExceededMaxRedeem(address owner, uint256 shares, uint256 max); /** - * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC20 or ERC777). + * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC-20 or ERC-777). */ constructor(IERC20 asset_) { (bool success, uint8 assetDecimals) = _tryGetAssetDecimals(asset_); @@ -241,7 +241,7 @@ abstract contract ERC4626 is ERC20, IERC4626 { * @dev Deposit/mint common workflow. */ function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual { - // If _asset is ERC777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the + // If _asset is ERC-777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer, // calls the vault, which is assumed not malicious. // @@ -268,7 +268,7 @@ abstract contract ERC4626 is ERC20, IERC4626 { _spendAllowance(owner, caller, shares); } - // If _asset is ERC777, `transfer` can trigger a reentrancy AFTER the transfer happens through the + // If _asset is ERC-777, `transfer` can trigger a reentrancy AFTER the transfer happens through the // `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer, // calls the vault, which is assumed not malicious. // diff --git a/contracts/token/ERC20/extensions/IERC20Metadata.sol b/contracts/token/ERC20/extensions/IERC20Metadata.sol index 1a38cba3e..e8c020b1f 100644 --- a/contracts/token/ERC20/extensions/IERC20Metadata.sol +++ b/contracts/token/ERC20/extensions/IERC20Metadata.sol @@ -6,7 +6,7 @@ pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** - * @dev Interface for the optional metadata functions from the ERC20 standard. + * @dev Interface for the optional metadata functions from the ERC-20 standard. */ interface IERC20Metadata is IERC20 { /** diff --git a/contracts/token/ERC20/extensions/IERC20Permit.sol b/contracts/token/ERC20/extensions/IERC20Permit.sol index 5af48101a..a8ad26ede 100644 --- a/contracts/token/ERC20/extensions/IERC20Permit.sol +++ b/contracts/token/ERC20/extensions/IERC20Permit.sol @@ -4,10 +4,10 @@ pragma solidity ^0.8.20; /** - * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in - * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. + * @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in + * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. * - * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by + * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * diff --git a/contracts/token/ERC20/utils/SafeERC20.sol b/contracts/token/ERC20/utils/SafeERC20.sol index bb65709b4..67fabf4cc 100644 --- a/contracts/token/ERC20/utils/SafeERC20.sol +++ b/contracts/token/ERC20/utils/SafeERC20.sol @@ -9,7 +9,7 @@ import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 - * @dev Wrappers around ERC20 operations that throw on failure (when the token + * @dev Wrappers around ERC-20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. @@ -20,7 +20,7 @@ library SafeERC20 { using Address for address; /** - * @dev An operation with an ERC20 token failed. + * @dev An operation with an ERC-20 token failed. */ error SafeERC20FailedOperation(address token); diff --git a/contracts/token/ERC721/ERC721.sol b/contracts/token/ERC721/ERC721.sol index 98a80e52c..1b38f0681 100644 --- a/contracts/token/ERC721/ERC721.sol +++ b/contracts/token/ERC721/ERC721.sol @@ -12,7 +12,7 @@ import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol"; /** - * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including + * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC-721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ @@ -165,7 +165,7 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist * * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the - * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances + * core ERC-721 logic MUST be matched with the use of {_increaseBalance} to keep balances * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`. */ @@ -357,7 +357,7 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients - * are aware of the ERC721 standard to prevent tokens from being forever locked. + * are aware of the ERC-721 standard to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * diff --git a/contracts/token/ERC721/IERC721.sol b/contracts/token/ERC721/IERC721.sol index 12f323634..d6ab6a47d 100644 --- a/contracts/token/ERC721/IERC721.sol +++ b/contracts/token/ERC721/IERC721.sol @@ -6,7 +6,7 @@ pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** - * @dev Required interface of an ERC721 compliant contract. + * @dev Required interface of an ERC-721 compliant contract. */ interface IERC721 is IERC165 { /** @@ -56,7 +56,7 @@ interface IERC721 is IERC165 { /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients - * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * are aware of the ERC-721 protocol to prevent tokens from being forever locked. * * Requirements: * @@ -75,7 +75,7 @@ interface IERC721 is IERC165 { /** * @dev Transfers `tokenId` token from `from` to `to`. * - * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 + * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * diff --git a/contracts/token/ERC721/IERC721Receiver.sol b/contracts/token/ERC721/IERC721Receiver.sol index f9dc1332b..a53d07774 100644 --- a/contracts/token/ERC721/IERC721Receiver.sol +++ b/contracts/token/ERC721/IERC721Receiver.sol @@ -4,9 +4,9 @@ pragma solidity ^0.8.20; /** - * @title ERC721 token receiver interface + * @title ERC-721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers - * from ERC721 asset contracts. + * from ERC-721 asset contracts. */ interface IERC721Receiver { /** diff --git a/contracts/token/ERC721/README.adoc b/contracts/token/ERC721/README.adoc index 40ae919d9..0f87916f6 100644 --- a/contracts/token/ERC721/README.adoc +++ b/contracts/token/ERC721/README.adoc @@ -1,13 +1,13 @@ -= ERC 721 += ERC-721 [.readme-notice] NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc721 -This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-721[ERC721 Non-Fungible Token Standard]. +This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-721[ERC-721 Non-Fungible Token Standard]. -TIP: For a walk through on how to create an ERC721 token read our xref:ROOT:erc721.adoc[ERC721 guide]. +TIP: For a walk through on how to create an ERC-721 token read our xref:ROOT:erc721.adoc[ERC-721 guide]. -The EIP specifies four interfaces: +The ERC specifies four interfaces: * {IERC721}: Core functionality required in all compliant implementation. * {IERC721Metadata}: Optional extension that adds name, symbol, and token URI, almost always included. @@ -22,15 +22,15 @@ OpenZeppelin Contracts provides implementations of all four interfaces: Additionally there are a few of other extensions: -* {ERC721Consecutive}: An implementation of https://eips.ethereum.org/EIPS/eip-2309[ERC2309] for minting batchs of tokens during construction, in accordance with ERC721. +* {ERC721Consecutive}: An implementation of https://eips.ethereum.org/EIPS/eip-2309[ERC-2309] for minting batchs of tokens during construction, in accordance with ERC-721. * {ERC721URIStorage}: A more flexible but more expensive way of storing metadata. * {ERC721Votes}: Support for voting and vote delegation. -* {ERC721Royalty}: A way to signal royalty information following ERC2981. +* {ERC721Royalty}: A way to signal royalty information following ERC-2981. * {ERC721Pausable}: A primitive to pause contract operation. * {ERC721Burnable}: A way for token holders to burn their own tokens. -* {ERC721Wrapper}: Wrapper to create an ERC721 backed by another ERC721, with deposit and withdraw methods. Useful in conjunction with {ERC721Votes}. +* {ERC721Wrapper}: Wrapper to create an ERC-721 backed by another ERC-721, with deposit and withdraw methods. Useful in conjunction with {ERC721Votes}. -NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC721 (such as <>) and expose them as external functions in the way they prefer. +NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC-721 (such as <>) and expose them as external functions in the way they prefer. == Core diff --git a/contracts/token/ERC721/extensions/ERC721Burnable.sol b/contracts/token/ERC721/extensions/ERC721Burnable.sol index 2a150afb8..65cfc744c 100644 --- a/contracts/token/ERC721/extensions/ERC721Burnable.sol +++ b/contracts/token/ERC721/extensions/ERC721Burnable.sol @@ -7,8 +7,8 @@ import {ERC721} from "../ERC721.sol"; import {Context} from "../../../utils/Context.sol"; /** - * @title ERC721 Burnable Token - * @dev ERC721 Token that can be burned (destroyed). + * @title ERC-721 Burnable Token + * @dev ERC-721 Token that can be burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** diff --git a/contracts/token/ERC721/extensions/ERC721Consecutive.sol b/contracts/token/ERC721/extensions/ERC721Consecutive.sol index 0d6cbc7e4..8508a79f4 100644 --- a/contracts/token/ERC721/extensions/ERC721Consecutive.sol +++ b/contracts/token/ERC721/extensions/ERC721Consecutive.sol @@ -9,8 +9,8 @@ import {BitMaps} from "../../../utils/structs/BitMaps.sol"; import {Checkpoints} from "../../../utils/structs/Checkpoints.sol"; /** - * @dev Implementation of the ERC2309 "Consecutive Transfer Extension" as defined in - * https://eips.ethereum.org/EIPS/eip-2309[EIP-2309]. + * @dev Implementation of the ERC-2309 "Consecutive Transfer Extension" as defined in + * https://eips.ethereum.org/EIPS/eip-2309[ERC-2309]. * * This extension allows the minting of large batches of tokens, during contract construction only. For upgradeable * contracts this implies that batch minting is only available during proxy deployment, and not in subsequent upgrades. @@ -37,7 +37,7 @@ abstract contract ERC721Consecutive is IERC2309, ERC721 { /** * @dev Batch mint is restricted to the constructor. * Any batch mint not emitting the {IERC721-Transfer} event outside of the constructor - * is non-ERC721 compliant. + * is non ERC-721 compliant. */ error ERC721ForbiddenBatchMint(); @@ -94,7 +94,7 @@ abstract contract ERC721Consecutive is IERC2309, ERC721 { * - `batchSize` must not be greater than {_maxBatchSize}. * - The function is called in the constructor of the contract (directly or indirectly). * - * CAUTION: Does not emit a `Transfer` event. This is ERC721 compliant as long as it is done inside of the + * CAUTION: Does not emit a `Transfer` event. This is ERC-721 compliant as long as it is done inside of the * constructor, which is enforced by this function. * * CAUTION: Does not invoke `onERC721Received` on the receiver. diff --git a/contracts/token/ERC721/extensions/ERC721Enumerable.sol b/contracts/token/ERC721/extensions/ERC721Enumerable.sol index cbf3e03f7..012e0ffc3 100644 --- a/contracts/token/ERC721/extensions/ERC721Enumerable.sol +++ b/contracts/token/ERC721/extensions/ERC721Enumerable.sol @@ -8,11 +8,11 @@ import {IERC721Enumerable} from "./IERC721Enumerable.sol"; import {IERC165} from "../../../utils/introspection/ERC165.sol"; /** - * @dev This implements an optional extension of {ERC721} defined in the EIP that adds enumerability + * @dev This implements an optional extension of {ERC721} defined in the ERC that adds enumerability * of all the token ids in the contract as well as all token ids owned by each account. * - * CAUTION: `ERC721` extensions that implement custom `balanceOf` logic, such as `ERC721Consecutive`, - * interfere with enumerability and should not be used together with `ERC721Enumerable`. + * CAUTION: {ERC721} extensions that implement custom `balanceOf` logic, such as {ERC721Consecutive}, + * interfere with enumerability and should not be used together with {ERC721Enumerable}. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { mapping(address owner => mapping(uint256 index => uint256)) private _ownedTokens; diff --git a/contracts/token/ERC721/extensions/ERC721Pausable.sol b/contracts/token/ERC721/extensions/ERC721Pausable.sol index 0b34fd9c1..81619c7f5 100644 --- a/contracts/token/ERC721/extensions/ERC721Pausable.sol +++ b/contracts/token/ERC721/extensions/ERC721Pausable.sol @@ -7,7 +7,7 @@ import {ERC721} from "../ERC721.sol"; import {Pausable} from "../../../utils/Pausable.sol"; /** - * @dev ERC721 token with pausable token transfers, minting and burning. + * @dev ERC-721 token with pausable token transfers, minting and burning. * * 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 diff --git a/contracts/token/ERC721/extensions/ERC721Royalty.sol b/contracts/token/ERC721/extensions/ERC721Royalty.sol index be98ec7c5..1e0b25af4 100644 --- a/contracts/token/ERC721/extensions/ERC721Royalty.sol +++ b/contracts/token/ERC721/extensions/ERC721Royalty.sol @@ -7,14 +7,14 @@ import {ERC721} from "../ERC721.sol"; import {ERC2981} from "../../common/ERC2981.sol"; /** - * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment + * @dev Extension of ERC-721 with the ERC-2981 NFT Royalty Standard, a standardized way to retrieve royalty payment * information. * * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually * for specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See - * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to + * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the ERC. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. */ abstract contract ERC721Royalty is ERC2981, ERC721 { diff --git a/contracts/token/ERC721/extensions/ERC721URIStorage.sol b/contracts/token/ERC721/extensions/ERC721URIStorage.sol index 2584cb58b..562f815c0 100644 --- a/contracts/token/ERC721/extensions/ERC721URIStorage.sol +++ b/contracts/token/ERC721/extensions/ERC721URIStorage.sol @@ -9,7 +9,7 @@ import {IERC4906} from "../../../interfaces/IERC4906.sol"; import {IERC165} from "../../../interfaces/IERC165.sol"; /** - * @dev ERC721 token with storage based token URI management. + * @dev ERC-721 token with storage based token URI management. */ abstract contract ERC721URIStorage is IERC4906, ERC721 { using Strings for uint256; diff --git a/contracts/token/ERC721/extensions/ERC721Votes.sol b/contracts/token/ERC721/extensions/ERC721Votes.sol index 562871514..4962cb00c 100644 --- a/contracts/token/ERC721/extensions/ERC721Votes.sol +++ b/contracts/token/ERC721/extensions/ERC721Votes.sol @@ -7,7 +7,7 @@ import {ERC721} from "../ERC721.sol"; import {Votes} from "../../../governance/utils/Votes.sol"; /** - * @dev Extension of ERC721 to support voting and delegation as implemented by {Votes}, where each individual NFT counts + * @dev Extension of ERC-721 to support voting and delegation as implemented by {Votes}, where each individual NFT counts * as 1 vote unit. * * Tokens do not count as votes until they are delegated, because votes must be tracked which incurs an additional cost diff --git a/contracts/token/ERC721/extensions/ERC721Wrapper.sol b/contracts/token/ERC721/extensions/ERC721Wrapper.sol index e091bdd9f..0a8acacb8 100644 --- a/contracts/token/ERC721/extensions/ERC721Wrapper.sol +++ b/contracts/token/ERC721/extensions/ERC721Wrapper.sol @@ -7,17 +7,17 @@ import {IERC721, ERC721} from "../ERC721.sol"; import {IERC721Receiver} from "../IERC721Receiver.sol"; /** - * @dev Extension of the ERC721 token contract to support token wrapping. + * @dev Extension of the ERC-721 token contract to support token wrapping. * * Users can deposit and withdraw an "underlying token" and receive a "wrapped token" with a matching tokenId. This is * useful in conjunction with other modules. For example, combining this wrapping mechanism with {ERC721Votes} will allow - * the wrapping of an existing "basic" ERC721 into a governance token. + * the wrapping of an existing "basic" ERC-721 into a governance token. */ abstract contract ERC721Wrapper is ERC721, IERC721Receiver { IERC721 private immutable _underlying; /** - * @dev The received ERC721 token couldn't be wrapped. + * @dev The received ERC-721 token couldn't be wrapped. */ error ERC721UnsupportedToken(address token); @@ -63,7 +63,7 @@ abstract contract ERC721Wrapper is ERC721, IERC721Receiver { } /** - * @dev Overrides {IERC721Receiver-onERC721Received} to allow minting on direct ERC721 transfers to + * @dev Overrides {IERC721Receiver-onERC721Received} to allow minting on direct ERC-721 transfers to * this contract. * * In case there's data attached, it validates that the operator is this contract, so only trusted data diff --git a/contracts/token/common/ERC2981.sol b/contracts/token/common/ERC2981.sol index fce02514d..b61c09d28 100644 --- a/contracts/token/common/ERC2981.sol +++ b/contracts/token/common/ERC2981.sol @@ -16,7 +16,7 @@ import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See - * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to + * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the ERC. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. */ abstract contract ERC2981 is IERC2981, ERC165 { diff --git a/contracts/token/common/README.adoc b/contracts/token/common/README.adoc index af6167464..a70d90ddd 100644 --- a/contracts/token/common/README.adoc +++ b/contracts/token/common/README.adoc @@ -2,8 +2,8 @@ Functionality that is common to multiple token standards. -* {ERC2981}: NFT Royalties compatible with both ERC721 and ERC1155. -** For ERC721 consider {ERC721Royalty} which clears the royalty information from storage on burn. +* {ERC2981}: NFT Royalties compatible with both ERC-721 and ERC-1155. +** For ERC-721 consider {ERC721Royalty} which clears the royalty information from storage on burn. == Contracts diff --git a/contracts/utils/README.adoc b/contracts/utils/README.adoc index d88b00199..d0e70463a 100644 --- a/contracts/utils/README.adoc +++ b/contracts/utils/README.adoc @@ -49,7 +49,7 @@ Because Solidity does not support generic types, {EnumerableMap} and {Enumerable This set of interfaces and contracts deal with https://en.wikipedia.org/wiki/Type_introspection[type introspection] of contracts, that is, examining which functions can be called on them. This is usually referred to as a contract's _interface_. -Ethereum contracts have no native concept of an interface, so applications must usually simply trust they are not making an incorrect call. For trusted setups this is a non-issue, but often unknown and untrusted third-party addresses need to be interacted with. There may even not be any direct calls to them! (e.g. `ERC20` tokens may be sent to a contract that lacks a way to transfer them out of it, locking them forever). In these cases, a contract _declaring_ its interface can be very helpful in preventing errors. +Ethereum contracts have no native concept of an interface, so applications must usually simply trust they are not making an incorrect call. For trusted setups this is a non-issue, but often unknown and untrusted third-party addresses need to be interacted with. There may even not be any direct calls to them! (e.g. ERC-20 tokens may be sent to a contract that lacks a way to transfer them out of it, locking them forever). In these cases, a contract _declaring_ its interface can be very helpful in preventing errors. {{IERC165}} diff --git a/contracts/utils/StorageSlot.sol b/contracts/utils/StorageSlot.sol index 08418327a..4e02bfe74 100644 --- a/contracts/utils/StorageSlot.sol +++ b/contracts/utils/StorageSlot.sol @@ -12,7 +12,7 @@ pragma solidity ^0.8.20; * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * - * Example usage to set ERC1967 implementation slot: + * Example usage to set ERC-1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; diff --git a/contracts/utils/cryptography/ECDSA.sol b/contracts/utils/cryptography/ECDSA.sol index 04b3e5e06..864c8ee87 100644 --- a/contracts/utils/cryptography/ECDSA.sol +++ b/contracts/utils/cryptography/ECDSA.sol @@ -95,7 +95,7 @@ library ECDSA { /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * - * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] + * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures] */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { unchecked { diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol index 8e548cdd8..77c4c8990 100644 --- a/contracts/utils/cryptography/EIP712.sol +++ b/contracts/utils/cryptography/EIP712.sol @@ -8,14 +8,14 @@ import {ShortStrings, ShortString} from "../ShortStrings.sol"; import {IERC5267} from "../../interfaces/IERC5267.sol"; /** - * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. + * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data. * * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. * - * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding + * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * @@ -55,7 +55,7 @@ abstract contract EIP712 is IERC5267 { * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in - * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: + * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. diff --git a/contracts/utils/cryptography/MessageHashUtils.sol b/contracts/utils/cryptography/MessageHashUtils.sol index 8836693e7..45c2421ad 100644 --- a/contracts/utils/cryptography/MessageHashUtils.sol +++ b/contracts/utils/cryptography/MessageHashUtils.sol @@ -9,12 +9,12 @@ import {Strings} from "../Strings.sol"; * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the - * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] + * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */ library MessageHashUtils { /** - * @dev Returns the keccak256 digest of an EIP-191 signed data with version + * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing a bytes32 `messageHash` with @@ -37,7 +37,7 @@ library MessageHashUtils { } /** - * @dev Returns the keccak256 digest of an EIP-191 signed data with version + * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing an arbitrary `message` with @@ -52,7 +52,7 @@ library MessageHashUtils { } /** - * @dev Returns the keccak256 digest of an EIP-191 signed data with version + * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x00` (data with intended validator). * * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended @@ -65,7 +65,7 @@ library MessageHashUtils { } /** - * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). + * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the diff --git a/contracts/utils/cryptography/SignatureChecker.sol b/contracts/utils/cryptography/SignatureChecker.sol index 59a2c6d90..7eb0fea90 100644 --- a/contracts/utils/cryptography/SignatureChecker.sol +++ b/contracts/utils/cryptography/SignatureChecker.sol @@ -8,13 +8,13 @@ import {IERC1271} from "../../interfaces/IERC1271.sol"; /** * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA - * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like + * signatures from externally owned accounts (EOAs) as well as ERC-1271 signatures from smart contract wallets like * Argent and Safe Wallet (previously Gnosis Safe). */ library SignatureChecker { /** * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the - * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. + * signature is validated against that smart contract using ERC-1271, otherwise it's validated using `ECDSA.recover`. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). @@ -28,7 +28,7 @@ library SignatureChecker { /** * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated - * against the signer smart contract using ERC1271. + * against the signer smart contract using ERC-1271. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). diff --git a/contracts/utils/introspection/ERC165.sol b/contracts/utils/introspection/ERC165.sol index 1e77b60d7..664b39fc1 100644 --- a/contracts/utils/introspection/ERC165.sol +++ b/contracts/utils/introspection/ERC165.sol @@ -8,7 +8,7 @@ import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * - * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check + * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity diff --git a/contracts/utils/introspection/ERC165Checker.sol b/contracts/utils/introspection/ERC165Checker.sol index 7b5224144..da729caf8 100644 --- a/contracts/utils/introspection/ERC165Checker.sol +++ b/contracts/utils/introspection/ERC165Checker.sol @@ -13,14 +13,14 @@ import {IERC165} from "./IERC165.sol"; * what to do in these cases. */ library ERC165Checker { - // As per the EIP-165 spec, no interface should ever match 0xffffffff + // As per the ERC-165 spec, no interface should ever match 0xffffffff bytes4 private constant INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface. */ function supportsERC165(address account) internal view returns (bool) { - // Any contract that implements ERC165 must explicitly indicate support of + // Any contract that implements ERC-165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) && @@ -34,7 +34,7 @@ library ERC165Checker { * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { - // query support of both ERC165 as per the spec and support of _interfaceId + // query support of both ERC-165 as per the spec and support of _interfaceId return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId); } @@ -53,7 +53,7 @@ library ERC165Checker { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); - // query support of ERC165 itself + // query support of ERC-165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { @@ -74,7 +74,7 @@ library ERC165Checker { * See {IERC165-supportsInterface}. */ function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { - // query support of ERC165 itself + // query support of ERC-165 itself if (!supportsERC165(account)) { return false; } @@ -91,12 +91,12 @@ library ERC165Checker { } /** - * @notice Query if a contract implements an interface, does not check ERC165 support + * @notice Query if a contract implements an interface, does not check ERC-165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise - * @dev Assumes that account contains a contract that supports ERC165, otherwise + * @dev Assumes that account contains a contract that supports ERC-165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * diff --git a/contracts/utils/introspection/IERC165.sol b/contracts/utils/introspection/IERC165.sol index c09f31fe1..bfbdf5dda 100644 --- a/contracts/utils/introspection/IERC165.sol +++ b/contracts/utils/introspection/IERC165.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.20; /** - * @dev Interface of the ERC165 standard, as defined in the - * https://eips.ethereum.org/EIPS/eip-165[EIP]. + * @dev Interface of the ERC-165 standard, as defined in the + * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). @@ -16,7 +16,7 @@ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding - * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] + * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 918c60a95..15af8b40e 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -8,11 +8,11 @@ * xref:access-control.adoc[Access Control] * xref:tokens.adoc[Tokens] -** xref:erc20.adoc[ERC20] +** xref:erc20.adoc[ERC-20] *** xref:erc20-supply.adoc[Creating Supply] -** xref:erc721.adoc[ERC721] -** xref:erc1155.adoc[ERC1155] -** xref:erc4626.adoc[ERC4626] +** xref:erc721.adoc[ERC-721] +** xref:erc1155.adoc[ERC-1155] +** xref:erc4626.adoc[ERC-4626] * xref:governance.adoc[Governance] diff --git a/docs/modules/ROOT/pages/access-control.adoc b/docs/modules/ROOT/pages/access-control.adoc index baf5652f8..c31f4cf43 100644 --- a/docs/modules/ROOT/pages/access-control.adoc +++ b/docs/modules/ROOT/pages/access-control.adoc @@ -43,7 +43,7 @@ Most software uses access control systems that are role-based: some users are re OpenZeppelin Contracts provides xref:api:access.adoc#AccessControl[`AccessControl`] for implementing role-based access control. Its usage is straightforward: for each role that you want to define, you will create a new _role identifier_ that is used to grant, revoke, and check if an account has that role. -Here's a simple example of using `AccessControl` in an xref:erc20.adoc[`ERC20` token] to define a 'minter' role, which allows accounts that have it create new tokens: +Here's a simple example of using `AccessControl` in an xref:erc20.adoc[ERC-20 token] to define a 'minter' role, which allows accounts that have it create new tokens: [source,solidity] ---- @@ -54,7 +54,7 @@ NOTE: Make sure you fully understand how xref:api:access.adoc#AccessControl[`Acc While clear and explicit, this isn't anything we wouldn't have been able to achieve with `Ownable`. Indeed, where `AccessControl` shines is in scenarios where granular permissions are required, which can be implemented by defining _multiple_ roles. -Let's augment our ERC20 token example by also defining a 'burner' role, which lets accounts destroy tokens, and by using the `onlyRole` modifier: +Let's augment our ERC-20 token example by also defining a 'burner' role, which lets accounts destroy tokens, and by using the `onlyRole` modifier: [source,solidity] ---- @@ -66,7 +66,7 @@ So clean! By splitting concerns this way, more granular levels of permission may [[granting-and-revoking]] === Granting and Revoking Roles -The ERC20 token example above uses `_grantRole`, an `internal` function that is useful when programmatically assigning roles (such as during construction). But what if we later want to grant the 'minter' role to additional accounts? +The ERC-20 token example above uses `_grantRole`, an `internal` function that is useful when programmatically assigning roles (such as during construction). But what if we later want to grant the 'minter' role to additional accounts? By default, **accounts with a role cannot grant it or revoke it from other accounts**: all having a role does is making the `hasRole` check pass. To grant and revoke roles dynamically, you will need help from the _role's admin_. @@ -76,7 +76,7 @@ This mechanism can be used to create complex permissioning structures resembling Since it is the admin for all roles by default, and in fact it is also its own admin, this role carries significant risk. To mitigate this risk we provide xref:api:access.adoc#AccessControlDefaultAdminRules[`AccessControlDefaultAdminRules`], a recommended extension of `AccessControl` that adds a number of enforced security measures for this role: the admin is restricted to a single account, with a 2-step transfer procedure with a delay in between steps. -Let's take a look at the ERC20 token example, this time taking advantage of the default admin role: +Let's take a look at the ERC-20 token example, this time taking advantage of the default admin role: [source,solidity] ---- @@ -165,7 +165,7 @@ OpenZeppelin Contracts provides xref:api:access.adoc#AccessManager[`AccessManage In order to restrict access to some functions of your contract, you should inherit from the xref:api:access.adoc#AccessManaged[`AccessManaged`] contract provided along with the manager. This provides the `restricted` modifier that can be used to protect any externally facing function. Note that you will have to specify the address of the AccessManager instance (xref:api:access.adoc#AccessManaged-constructor-address-[`initialAuthority`]) in the constructor so the `restricted` modifier knows which manager to use for checking permissions. -Here's a simple example of an xref:tokens.adoc#ERC20[`ERC20` token] that defines a `mint` function that is restricted by an xref:api:access.adoc#AccessManager[`AccessManager`]: +Here's a simple example of an xref:tokens.adoc#ERC20[ERC-20 token] that defines a `mint` function that is restricted by an xref:api:access.adoc#AccessManager[`AccessManager`]: ```solidity include::api:example$access-control/AccessManagedERC20MintBase.sol[] diff --git a/docs/modules/ROOT/pages/erc1155.adoc b/docs/modules/ROOT/pages/erc1155.adoc index 5a4c91670..0d771048e 100644 --- a/docs/modules/ROOT/pages/erc1155.adoc +++ b/docs/modules/ROOT/pages/erc1155.adoc @@ -1,17 +1,17 @@ -= ERC1155 += ERC-1155 -ERC1155 is a novel token standard that aims to take the best from previous standards to create a xref:tokens.adoc#different-kinds-of-tokens[*fungibility-agnostic*] and *gas-efficient* xref:tokens.adoc#but_first_coffee_a_primer_on_token_contracts[token contract]. +ERC-1155 is a novel token standard that aims to take the best from previous standards to create a xref:tokens.adoc#different-kinds-of-tokens[*fungibility-agnostic*] and *gas-efficient* xref:tokens.adoc#but_first_coffee_a_primer_on_token_contracts[token contract]. -TIP: ERC1155 draws ideas from all of xref:erc20.adoc[ERC20], xref:erc721.adoc[ERC721], and https://eips.ethereum.org/EIPS/eip-777[ERC777]. If you're unfamiliar with those standards, head to their guides before moving on. +TIP: ERC-1155 draws ideas from all of xref:erc20.adoc[ERC-20], xref:erc721.adoc[ERC-721], and https://eips.ethereum.org/EIPS/eip-777[ERC-777]. If you're unfamiliar with those standards, head to their guides before moving on. [[multi-token-standard]] == Multi Token Standard -The distinctive feature of ERC1155 is that it uses a single smart contract to represent multiple tokens at once. This is why its xref:api:token/ERC1155.adoc#IERC1155-balanceOf-address-uint256-[`balanceOf`] function differs from ERC20's and ERC777's: it has an additional `id` argument for the identifier of the token that you want to query the balance of. +The distinctive feature of ERC-1155 is that it uses a single smart contract to represent multiple tokens at once. This is why its xref:api:token/ERC1155.adoc#IERC1155-balanceOf-address-uint256-[`balanceOf`] function differs from ERC-20's and ERC-777's: it has an additional `id` argument for the identifier of the token that you want to query the balance of. -This is similar to how ERC721 does things, but in that standard a token `id` has no concept of balance: each token is non-fungible and exists or doesn't. The ERC721 xref:api:token/ERC721.adoc#IERC721-balanceOf-address-[`balanceOf`] function refers to _how many different tokens_ an account has, not how many of each. On the other hand, in ERC1155 accounts have a distinct balance for each token `id`, and non-fungible tokens are implemented by simply minting a single one of them. +This is similar to how ERC-721 does things, but in that standard a token `id` has no concept of balance: each token is non-fungible and exists or doesn't. The ERC-721 xref:api:token/ERC721.adoc#IERC721-balanceOf-address-[`balanceOf`] function refers to _how many different tokens_ an account has, not how many of each. On the other hand, in ERC-1155 accounts have a distinct balance for each token `id`, and non-fungible tokens are implemented by simply minting a single one of them. -This approach leads to massive gas savings for projects that require multiple tokens. Instead of deploying a new contract for each token type, a single ERC1155 token contract can hold the entire system state, reducing deployment costs and complexity. +This approach leads to massive gas savings for projects that require multiple tokens. Instead of deploying a new contract for each token type, a single ERC-1155 token contract can hold the entire system state, reducing deployment costs and complexity. [[batch-operations]] == Batch Operations @@ -20,13 +20,13 @@ Because all state is held in a single contract, it is possible to operate over m In the spirit of the standard, we've also included batch operations in the non-standard functions, such as xref:api:token/ERC1155.adoc#ERC1155-_mintBatch-address-uint256---uint256---bytes-[`_mintBatch`]. -== Constructing an ERC1155 Token Contract +== Constructing an ERC-1155 Token Contract -We'll use ERC1155 to track multiple items in our game, which will each have their own unique attributes. We mint all items to the deployer of the contract, which we can later transfer to players. Players are free to keep their tokens or trade them with other people as they see fit, as they would any other asset on the blockchain! +We'll use ERC-1155 to track multiple items in our game, which will each have their own unique attributes. We mint all items to the deployer of the contract, which we can later transfer to players. Players are free to keep their tokens or trade them with other people as they see fit, as they would any other asset on the blockchain! For simplicity, we will mint all items in the constructor, but you could add minting functionality to the contract to mint on demand to players. -TIP: For an overview of minting mechanisms, check out xref:erc20-supply.adoc[Creating ERC20 Supply]. +TIP: For an overview of minting mechanisms, check out xref:erc20-supply.adoc[Creating ERC-20 Supply]. Here's what a contract for tokenized items might look like: @@ -59,7 +59,7 @@ Note that for our Game Items, Gold is a fungible token whilst Thor's Hammer is a The xref:api:token/ERC1155.adoc#ERC1155[`ERC1155`] contract includes the optional extension xref:api:token/ERC1155.adoc#IERC1155MetadataURI[`IERC1155MetadataURI`]. That's where the xref:api:token/ERC1155.adoc#IERC1155MetadataURI-uri-uint256-[`uri`] function comes from: we use it to retrieve the metadata uri. -Also note that, unlike ERC20, ERC1155 lacks a `decimals` field, since each token is distinct and cannot be partitioned. +Also note that, unlike ERC-20, ERC-1155 lacks a `decimals` field, since each token is distinct and cannot be partitioned. Once deployed, we will be able to query the deployer’s balance: [source,javascript] @@ -114,7 +114,7 @@ For more information about the metadata JSON Schema, check out the https://githu NOTE: You'll notice that the item's information is included in the metadata, but that information isn't on-chain! So a game developer could change the underlying metadata, changing the rules of the game! -TIP: If you'd like to put all item information on-chain, you can extend ERC721 to do so (though it will be rather costly) by providing a xref:utilities.adoc#base64[`Base64`] Data URI with the JSON schema encoded. You could also leverage IPFS to store the URI information, but these techniques are out of the scope of this overview guide +TIP: If you'd like to put all item information on-chain, you can extend ERC-721 to do so (though it will be rather costly) by providing a xref:utilities.adoc#base64[`Base64`] Data URI with the JSON schema encoded. You could also leverage IPFS to store the URI information, but these techniques are out of the scope of this overview guide [[sending-to-contracts]] == Sending Tokens to Contracts @@ -123,12 +123,12 @@ A key difference when using xref:api:token/ERC1155.adoc#IERC1155-safeTransferFro [source,text] ---- -ERC1155: transfer to non ERC1155Receiver implementer +ERC-1155: transfer to non ERC-1155 Receiver implementer ---- -This is a good thing! It means that the recipient contract has not registered itself as aware of the ERC1155 protocol, so transfers to it are disabled to *prevent tokens from being locked forever*. As an example, https://etherscan.io/token/0xa74476443119A942dE498590Fe1f2454d7D4aC0d?a=0xa74476443119A942dE498590Fe1f2454d7D4aC0d[the Golem contract currently holds over 350k `GNT` tokens], worth multiple tens of thousands of dollars, and lacks methods to get them out of there. This has happened to virtually every ERC20-backed project, usually due to user error. +This is a good thing! It means that the recipient contract has not registered itself as aware of the ERC-1155 protocol, so transfers to it are disabled to *prevent tokens from being locked forever*. As an example, https://etherscan.io/token/0xa74476443119A942dE498590Fe1f2454d7D4aC0d?a=0xa74476443119A942dE498590Fe1f2454d7D4aC0d[the Golem contract currently holds over 350k `GNT` tokens], worth multiple tens of thousands of dollars, and lacks methods to get them out of there. This has happened to virtually every ERC20-backed project, usually due to user error. -In order for our contract to receive ERC1155 tokens we can inherit from the convenience contract xref:api:token/ERC1155.adoc#ERC1155Holder[`ERC1155Holder`] which handles the registering for us. Though we need to remember to implement functionality to allow tokens to be transferred out of our contract: +In order for our contract to receive ERC-1155 tokens we can inherit from the convenience contract xref:api:token/ERC1155.adoc#ERC1155Holder[`ERC1155Holder`] which handles the registering for us. Though we need to remember to implement functionality to allow tokens to be transferred out of our contract: [source,solidity] ---- diff --git a/docs/modules/ROOT/pages/erc20-supply.adoc b/docs/modules/ROOT/pages/erc20-supply.adoc index bf6e24058..ae21e4a8a 100644 --- a/docs/modules/ROOT/pages/erc20-supply.adoc +++ b/docs/modules/ROOT/pages/erc20-supply.adoc @@ -1,10 +1,10 @@ -= Creating ERC20 Supply += Creating ERC-20 Supply -In this guide, you will learn how to create an ERC20 token with a custom supply mechanism. We will showcase two idiomatic ways to use OpenZeppelin Contracts for this purpose that you will be able to apply to your smart contract development practice. +In this guide, you will learn how to create an ERC-20 token with a custom supply mechanism. We will showcase two idiomatic ways to use OpenZeppelin Contracts for this purpose that you will be able to apply to your smart contract development practice. -The standard interface implemented by tokens built on Ethereum is called ERC20, and Contracts includes a widely used implementation of it: the aptly named xref:api:token/ERC20.adoc[`ERC20`] contract. This contract, like the standard itself, is quite simple and bare-bones. In fact, if you try to deploy an instance of `ERC20` as-is it will be quite literally useless... it will have no supply! What use is a token with no supply? +The standard interface implemented by tokens built on Ethereum is called ERC-20, and Contracts includes a widely used implementation of it: the aptly named xref:api:token/ERC20.adoc[`ERC20`] contract. This contract, like the standard itself, is quite simple and bare-bones. In fact, if you try to deploy an instance of `ERC20` as-is it will be quite literally useless... it will have no supply! What use is a token with no supply? -The way that supply is created is not defined in the ERC20 document. Every token is free to experiment with its own mechanisms, ranging from the most decentralized to the most centralized, from the most naive to the most researched, and more. +The way that supply is created is not defined in the ERC-20 document. Every token is free to experiment with its own mechanisms, ranging from the most decentralized to the most centralized, from the most naive to the most researched, and more. [[fixed-supply]] == Fixed Supply @@ -37,7 +37,7 @@ Encapsulating state like this makes it safer to extend contracts. For instance, [[rewarding-miners]] == Rewarding Miners -The internal xref:api:token/ERC20.adoc#ERC20-_mint-address-uint256-[`_mint`] function is the key building block that allows us to write ERC20 extensions that implement a supply mechanism. +The internal xref:api:token/ERC20.adoc#ERC20-_mint-address-uint256-[`_mint`] function is the key building block that allows us to write ERC-20 extensions that implement a supply mechanism. The mechanism we will implement is a token reward for the miners that produce Ethereum blocks. In Solidity, we can access the address of the current block's miner in the global variable `block.coinbase`. We will mint a token reward to this address whenever someone calls the function `mintMinerReward()` on our token. The mechanism may sound silly, but you never know what kind of dynamic this might result in, and it's worth analyzing and experimenting with! @@ -68,4 +68,4 @@ include::api:example$ERC20WithAutoMinerReward.sol[] [[wrapping-up]] == Wrapping Up -We've seen how to implement a ERC20 supply mechanism: internally through `_mint`. Hopefully this has helped you understand how to use OpenZeppelin Contracts and some of the design principles behind it, and you can apply them to your own smart contracts. +We've seen how to implement a ERC-20 supply mechanism: internally through `_mint`. Hopefully this has helped you understand how to use OpenZeppelin Contracts and some of the design principles behind it, and you can apply them to your own smart contracts. diff --git a/docs/modules/ROOT/pages/erc20.adoc b/docs/modules/ROOT/pages/erc20.adoc index 2b85070a6..620b85a26 100644 --- a/docs/modules/ROOT/pages/erc20.adoc +++ b/docs/modules/ROOT/pages/erc20.adoc @@ -1,13 +1,13 @@ -= ERC20 += ERC-20 -An ERC20 token contract keeps track of xref:tokens.adoc#different-kinds-of-tokens[_fungible_ tokens]: any one token is exactly equal to any other token; no tokens have special rights or behavior associated with them. This makes ERC20 tokens useful for things like a *medium of exchange currency*, *voting rights*, *staking*, and more. +An ERC-20 token contract keeps track of xref:tokens.adoc#different-kinds-of-tokens[_fungible_ tokens]: any one token is exactly equal to any other token; no tokens have special rights or behavior associated with them. This makes ERC-20 tokens useful for things like a *medium of exchange currency*, *voting rights*, *staking*, and more. OpenZeppelin Contracts provides many ERC20-related contracts. On the xref:api:token/ERC20.adoc[`API reference`] you'll find detailed information on their properties and usage. [[constructing-an-erc20-token-contract]] -== Constructing an ERC20 Token Contract +== Constructing an ERC-20 Token Contract -Using Contracts, we can easily create our own ERC20 token contract, which will be used to track _Gold_ (GLD), an internal currency in a hypothetical game. +Using Contracts, we can easily create our own ERC-20 token contract, which will be used to track _Gold_ (GLD), an internal currency in a hypothetical game. Here's what our GLD token might look like. @@ -28,7 +28,7 @@ contract GLDToken is ERC20 { Our contracts are often used via https://solidity.readthedocs.io/en/latest/contracts.html#inheritance[inheritance], and here we're reusing xref:api:token/ERC20.adoc#erc20[`ERC20`] for both the basic standard implementation and the xref:api:token/ERC20.adoc#ERC20-name--[`name`], xref:api:token/ERC20.adoc#ERC20-symbol--[`symbol`], and xref:api:token/ERC20.adoc#ERC20-decimals--[`decimals`] optional extensions. Additionally, we're creating an `initialSupply` of tokens, which will be assigned to the address that deploys the contract. -TIP: For a more complete discussion of ERC20 supply mechanisms, see xref:erc20-supply.adoc[Creating ERC20 Supply]. +TIP: For a more complete discussion of ERC-20 supply mechanisms, see xref:erc20-supply.adoc[Creating ERC-20 Supply]. That's it! Once deployed, we will be able to query the deployer's balance: @@ -60,7 +60,7 @@ How can this be achieved? It's actually very simple: a token contract can use la It is important to understand that `decimals` is _only used for display purposes_. All arithmetic inside the contract is still performed on integers, and it is the different user interfaces (wallets, exchanges, etc.) that must adjust the displayed values according to `decimals`. The total token supply and balance of each account are not specified in `GLD`: you need to divide by `10 ** decimals` to get the actual `GLD` amount. -You'll probably want to use a `decimals` value of `18`, just like Ether and most ERC20 token contracts in use, unless you have a very special reason not to. When minting tokens or transferring them around, you will be actually sending the number `num GLD * (10 ** decimals)`. +You'll probably want to use a `decimals` value of `18`, just like Ether and most ERC-20 token contracts in use, unless you have a very special reason not to. When minting tokens or transferring them around, you will be actually sending the number `num GLD * (10 ** decimals)`. NOTE: By default, `ERC20` uses a value of `18` for `decimals`. To use a different value, you will need to override the `decimals()` function in your contract. diff --git a/docs/modules/ROOT/pages/erc4626.adoc b/docs/modules/ROOT/pages/erc4626.adoc index c42426add..03f3c216c 100644 --- a/docs/modules/ROOT/pages/erc4626.adoc +++ b/docs/modules/ROOT/pages/erc4626.adoc @@ -1,16 +1,16 @@ -= ERC4626 += ERC-4626 :stem: latexmath -https://eips.ethereum.org/EIPS/eip-4626[ERC4626] is an extension of xref:erc20.adoc[ERC20] that proposes a standard interface for token vaults. This standard interface can be used by widely different contracts (including lending markets, aggregators, and intrinsically interest bearing tokens), which brings a number of subtleties. Navigating these potential issues is essential to implementing a compliant and composable token vault. +https://eips.ethereum.org/EIPS/eip-4626[ERC-4626] is an extension of xref:erc20.adoc[ERC-20] that proposes a standard interface for token vaults. This standard interface can be used by widely different contracts (including lending markets, aggregators, and intrinsically interest bearing tokens), which brings a number of subtleties. Navigating these potential issues is essential to implementing a compliant and composable token vault. -We provide a base implementation of ERC4626 that includes a simple vault. This contract is designed in a way that allows developers to easily re-configure the vault's behavior, with minimal overrides, while staying compliant. In this guide, we will discuss some security considerations that affect ERC4626. We will also discuss common customizations of the vault. +We provide a base implementation of ERC-4626 that includes a simple vault. This contract is designed in a way that allows developers to easily re-configure the vault's behavior, with minimal overrides, while staying compliant. In this guide, we will discuss some security considerations that affect ERC-4626. We will also discuss common customizations of the vault. [[inflation-attack]] == Security concern: Inflation attack === Visualizing the vault -In exchange for the assets deposited into an ERC4626 vault, a user receives shares. These shares can later be burned to redeem the corresponding underlying assets. The number of shares a user gets depends on the amount of assets they put in and on the exchange rate of the vault. This exchange rate is defined by the current liquidity held by the vault. +In exchange for the assets deposited into an ERC-4626 vault, a user receives shares. These shares can later be burned to redeem the corresponding underlying assets. The number of shares a user gets depends on the amount of assets they put in and on the exchange rate of the vault. This exchange rate is defined by the current liquidity held by the vault. - If a vault has 100 tokens to back 200 shares, then each share is worth 0.5 assets. - If a vault has 200 tokens to back 100 shares, then each share is worth 2.0 assets. @@ -195,7 +195,7 @@ stem:[\delta = 6], stem:[a_0 = 1], stem:[a_1 = 10^5] [[fees]] == Custom behavior: Adding fees to the vault -In an ERC4626 vaults, fees can be captured during the deposit/mint and/or during the withdraw/redeem steps. In both cases it is essential to remain compliant with the ERC4626 requirements with regard to the preview functions. +In an ERC-4626 vaults, fees can be captured during the deposit/mint and/or during the withdraw/redeem steps. In both cases it is essential to remain compliant with the ERC-4626 requirements with regard to the preview functions. For example, if calling `deposit(100, receiver)`, the caller should deposit exactly 100 underlying tokens, including fees, and the receiver should receive a number of shares that matches the value returned by `previewDeposit(100)`. Similarly, `previewMint` should account for the fees that the user will have to pay on top of share's cost. diff --git a/docs/modules/ROOT/pages/erc721.adoc b/docs/modules/ROOT/pages/erc721.adoc index 7481c6b62..269a78c6d 100644 --- a/docs/modules/ROOT/pages/erc721.adoc +++ b/docs/modules/ROOT/pages/erc721.adoc @@ -1,12 +1,12 @@ -= ERC721 += ERC-721 -We've discussed how you can make a _fungible_ token using xref:erc20.adoc[ERC20], but what if not all tokens are alike? This comes up in situations like *real estate*, *voting rights*, or *collectibles*, where some items are valued more than others, due to their usefulness, rarity, etc. ERC721 is a standard for representing ownership of xref:tokens.adoc#different-kinds-of-tokens[_non-fungible_ tokens], that is, where each token is unique. +We've discussed how you can make a _fungible_ token using xref:erc20.adoc[ERC-20], but what if not all tokens are alike? This comes up in situations like *real estate*, *voting rights*, or *collectibles*, where some items are valued more than others, due to their usefulness, rarity, etc. ERC-721 is a standard for representing ownership of xref:tokens.adoc#different-kinds-of-tokens[_non-fungible_ tokens], that is, where each token is unique. -ERC721 is a more complex standard than ERC20, with multiple optional extensions, and is split across a number of contracts. The OpenZeppelin Contracts provide flexibility regarding how these are combined, along with custom useful extensions. Check out the xref:api:token/ERC721.adoc[API Reference] to learn more about these. +ERC-721 is a more complex standard than ERC-20, with multiple optional extensions, and is split across a number of contracts. The OpenZeppelin Contracts provide flexibility regarding how these are combined, along with custom useful extensions. Check out the xref:api:token/ERC721.adoc[API Reference] to learn more about these. -== Constructing an ERC721 Token Contract +== Constructing an ERC-721 Token Contract -We'll use ERC721 to track items in our game, which will each have their own unique attributes. Whenever one is to be awarded to a player, it will be minted and sent to them. Players are free to keep their token or trade it with other people as they see fit, as they would any other asset on the blockchain! Please note any account can call `awardItem` to mint items. To restrict what accounts can mint items we can add xref:access-control.adoc[Access Control]. +We'll use ERC-721 to track items in our game, which will each have their own unique attributes. Whenever one is to be awarded to a player, it will be minted and sent to them. Players are free to keep their token or trade it with other people as they see fit, as they would any other asset on the blockchain! Please note any account can call `awardItem` to mint items. To restrict what accounts can mint items we can add xref:access-control.adoc[Access Control]. Here's what a contract for tokenized items might look like: @@ -36,9 +36,9 @@ contract GameItem is ERC721URIStorage { } ---- -The xref:api:token/ERC721.adoc#ERC721URIStorage[`ERC721URIStorage`] contract is an implementation of ERC721 that includes the metadata standard extensions (xref:api:token/ERC721.adoc#IERC721Metadata[`IERC721Metadata`]) as well as a mechanism for per-token metadata. That's where the xref:api:token/ERC721.adoc#ERC721-_setTokenURI-uint256-string-[`_setTokenURI`] method comes from: we use it to store an item's metadata. +The xref:api:token/ERC721.adoc#ERC721URIStorage[`ERC721URIStorage`] contract is an implementation of ERC-721 that includes the metadata standard extensions (xref:api:token/ERC721.adoc#IERC721Metadata[`IERC721Metadata`]) as well as a mechanism for per-token metadata. That's where the xref:api:token/ERC721.adoc#ERC721-_setTokenURI-uint256-string-[`_setTokenURI`] method comes from: we use it to store an item's metadata. -Also note that, unlike ERC20, ERC721 lacks a `decimals` field, since each token is distinct and cannot be partitioned. +Also note that, unlike ERC-20, ERC-721 lacks a `decimals` field, since each token is distinct and cannot be partitioned. New items can be created: @@ -72,8 +72,8 @@ This `tokenURI` should resolve to a JSON document that might look something like } ---- -For more information about the `tokenURI` metadata JSON Schema, check out the https://eips.ethereum.org/EIPS/eip-721[ERC721 specification]. +For more information about the `tokenURI` metadata JSON Schema, check out the https://eips.ethereum.org/EIPS/eip-721[ERC-721 specification]. NOTE: You'll notice that the item's information is included in the metadata, but that information isn't on-chain! So a game developer could change the underlying metadata, changing the rules of the game! -TIP: If you'd like to put all item information on-chain, you can extend ERC721 to do so (though it will be rather costly) by providing a xref:utilities.adoc#base64[`Base64`] Data URI with the JSON schema encoded. You could also leverage IPFS to store the tokenURI information, but these techniques are out of the scope of this overview guide. +TIP: If you'd like to put all item information on-chain, you can extend ERC-721 to do so (though it will be rather costly) by providing a xref:utilities.adoc#base64[`Base64`] Data URI with the JSON schema encoded. You could also leverage IPFS to store the tokenURI information, but these techniques are out of the scope of this overview guide. diff --git a/docs/modules/ROOT/pages/governance.adoc b/docs/modules/ROOT/pages/governance.adoc index b8db64230..18c335ff4 100644 --- a/docs/modules/ROOT/pages/governance.adoc +++ b/docs/modules/ROOT/pages/governance.adoc @@ -16,7 +16,7 @@ OpenZeppelin’s Governor system was designed with a concern for compatibility w === ERC20Votes & ERC20VotesComp -The ERC20 extension to keep track of votes and vote delegation is one such case. The shorter one is the more generic version because it can support token supplies greater than 2^96, while the “Comp” variant is limited in that regard, but exactly fits the interface of the COMP token that is used by GovernorAlpha and Bravo. Both contract variants share the same events, so they are fully compatible when looking at events only. +The ERC-20 extension to keep track of votes and vote delegation is one such case. The shorter one is the more generic version because it can support token supplies greater than 2^96, while the “Comp” variant is limited in that regard, but exactly fits the interface of the COMP token that is used by GovernorAlpha and Bravo. Both contract variants share the same events, so they are fully compatible when looking at events only. === Governor & GovernorStorage @@ -40,7 +40,7 @@ In the rest of this guide, we will focus on a fresh deploy of the vanilla OpenZe === Token -The voting power of each account in our governance setup will be determined by an ERC20 token. The token has to implement the ERC20Votes extension. This extension will keep track of historical balances so that voting power is retrieved from past snapshots rather than current balance, which is an important protection that prevents double voting. +The voting power of each account in our governance setup will be determined by an ERC-20 token. The token has to implement the ERC20Votes extension. This extension will keep track of historical balances so that voting power is retrieved from past snapshots rather than current balance, which is an important protection that prevents double voting. ```solidity include::api:example$governance/MyToken.sol[] @@ -52,7 +52,7 @@ If your project already has a live token that does not include ERC20Votes and is include::api:example$governance/MyTokenWrapped.sol[] ``` -NOTE: The only other source of voting power available in OpenZeppelin Contracts currently is xref:api:token/ERC721.adoc#ERC721Votes[`ERC721Votes`]. ERC721 tokens that don't provide this functionality can be wrapped into a voting tokens using a combination of xref:api:token/ERC721.adoc#ERC721Votes[`ERC721Votes`] and xref:api:token/ERC721Wrapper.adoc#ERC721Wrapper[`ERC721Wrapper`]. +NOTE: The only other source of voting power available in OpenZeppelin Contracts currently is xref:api:token/ERC721.adoc#ERC721Votes[`ERC721Votes`]. ERC-721 tokens that don't provide this functionality can be wrapped into a voting tokens using a combination of xref:api:token/ERC721.adoc#ERC721Votes[`ERC721Votes`] and xref:api:token/ERC721Wrapper.adoc#ERC721Wrapper[`ERC721Wrapper`]. NOTE: The internal clock used by the token to store voting balances will dictate the operating mode of the Governor contract attached to it. By default, block numbers are used. Since v4.9, developers can override the xref:api:interfaces.adoc#IERC6372[IERC6372] clock to use timestamps instead of block numbers. @@ -60,7 +60,7 @@ NOTE: The internal clock used by the token to store voting balances will dictate Initially, we will build a Governor without a timelock. The core logic is given by the Governor contract, but we still need to choose: 1) how voting power is determined, 2) how many votes are needed for quorum, 3) what options people have when casting a vote and how those votes are counted, and 4) what type of token should be used to vote. Each of these aspects is customizable by writing your own module, or more easily choosing one from OpenZeppelin Contracts. -For 1) we will use the GovernorVotes module, which hooks to an IVotes instance to determine the voting power of an account based on the token balance they hold when a proposal becomes active. This module requires as a constructor parameter the address of the token. This module also discovers the clock mode (ERC6372) used by the token and applies it to the Governor. +For 1) we will use the GovernorVotes module, which hooks to an IVotes instance to determine the voting power of an account based on the token balance they hold when a proposal becomes active. This module requires as a constructor parameter the address of the token. This module also discovers the clock mode (ERC-6372) used by the token and applies it to the Governor. For 2) we will use GovernorVotesQuorumFraction which works together with ERC20Votes to define quorum as a percentage of the total supply at the block a proposal’s voting power is retrieved. This requires a constructor parameter to set the percentage. Most Governors nowadays use 4%, so we will initialize the module with parameter 4 (this indicates the percentage, resulting in 4%). @@ -100,7 +100,7 @@ A proposal is a sequence of actions that the Governor contract will perform if i === Create a Proposal -Let’s say we want to create a proposal to give a team a grant, in the form of ERC20 tokens from the governance treasury. This proposal will consist of a single action where the target is the ERC20 token, calldata is the encoded function call `transfer(, )`, and with 0 ETH attached. +Let’s say we want to create a proposal to give a team a grant, in the form of ERC-20 tokens from the governance treasury. This proposal will consist of a single action where the target is the ERC-20 token, calldata is the encoded function call `transfer(, )`, and with 0 ETH attached. Generally a proposal will be created with the help of an interface such as Tally or Defender. Here we will show how to create the proposal using Ethers.js. @@ -172,7 +172,7 @@ await governor.execute( ); ``` -Executing the proposal will transfer the ERC20 tokens to the chosen recipient. To wrap up: we set up a system where a treasury is controlled by the collective decision of the token holders of a project, and all actions are executed via proposals enforced by on-chain votes. +Executing the proposal will transfer the ERC-20 tokens to the chosen recipient. To wrap up: we set up a system where a treasury is controlled by the collective decision of the token holders of a project, and all actions are executed via proposals enforced by on-chain votes. == Timestamp based governance @@ -235,6 +235,6 @@ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, Governor === Disclaimer -Timestamp based voting is a recent feature that was formalized in EIP-6372 and EIP-5805, and introduced in v4.9. At the time this feature is released, governance tooling such as https://www.tally.xyz[Tally] does not support it yet. While support for timestamps should come soon, users can expect invalid reporting of deadlines & durations. This invalid reporting by offchain tools does not affect the onchain security and functionality of the governance contract. +Timestamp based voting is a recent feature that was formalized in ERC-6372 and ERC-5805, and introduced in v4.9. At the time this feature is released, governance tooling such as https://www.tally.xyz[Tally] does not support it yet. While support for timestamps should come soon, users can expect invalid reporting of deadlines & durations. This invalid reporting by offchain tools does not affect the onchain security and functionality of the governance contract. Governors with timestamp support (v4.9 and above) are compatible with old tokens (before v4.9) and will operate in "block number" mode (which is the mode all old tokens operate on). On the other hand, old Governor instances (before v4.9) are not compatible with new tokens operating using timestamps. If you update your token code to use timestamps, make sure to also update your Governor code. diff --git a/docs/modules/ROOT/pages/tokens.adoc b/docs/modules/ROOT/pages/tokens.adoc index 10626f548..217c5e047 100644 --- a/docs/modules/ROOT/pages/tokens.adoc +++ b/docs/modules/ROOT/pages/tokens.adoc @@ -24,8 +24,8 @@ In a nutshell, when dealing with non-fungibles (like your house) you care about Even though the concept of a token is simple, they have a variety of complexities in the implementation. Because everything in Ethereum is just a smart contract, and there are no rules about what smart contracts have to do, the community has developed a variety of *standards* (called EIPs or ERCs) for documenting how a contract can interoperate with other contracts. -You've probably heard of the ERC20 or ERC721 token standards, and that's why you're here. Head to our specialized guides to learn more about these: +You've probably heard of the ERC-20 or ERC-721 token standards, and that's why you're here. Head to our specialized guides to learn more about these: - * xref:erc20.adoc[ERC20]: the most widespread token standard for fungible assets, albeit somewhat limited by its simplicity. - * xref:erc721.adoc[ERC721]: the de-facto solution for non-fungible tokens, often used for collectibles and games. - * xref:erc1155.adoc[ERC1155]: a novel standard for multi-tokens, allowing for a single contract to represent multiple fungible and non-fungible tokens, along with batched operations for increased gas efficiency. + * xref:erc20.adoc[ERC-20]: the most widespread token standard for fungible assets, albeit somewhat limited by its simplicity. + * xref:erc721.adoc[ERC-721]: the de-facto solution for non-fungible tokens, often used for collectibles and games. + * xref:erc1155.adoc[ERC-1155]: a novel standard for multi-tokens, allowing for a single contract to represent multiple fungible and non-fungible tokens, along with batched operations for increased gas efficiency. diff --git a/docs/modules/ROOT/pages/utilities.adoc b/docs/modules/ROOT/pages/utilities.adoc index c194a4705..f940d0d22 100644 --- a/docs/modules/ROOT/pages/utilities.adoc +++ b/docs/modules/ROOT/pages/utilities.adoc @@ -36,10 +36,10 @@ xref:api:utils.adoc#MerkleProof[`MerkleProof`] provides: [[introspection]] == Introspection -In Solidity, it's frequently helpful to know whether or not a contract supports an interface you'd like to use. ERC165 is a standard that helps do runtime interface detection. Contracts provide helpers both for implementing ERC165 in your contracts and querying other contracts: +In Solidity, it's frequently helpful to know whether or not a contract supports an interface you'd like to use. ERC-165 is a standard that helps do runtime interface detection. Contracts provide helpers both for implementing ERC-165 in your contracts and querying other contracts: -* xref:api:utils.adoc#IERC165[`IERC165`] — this is the ERC165 interface that defines xref:api:utils.adoc#IERC165-supportsInterface-bytes4-[`supportsInterface`]. When implementing ERC165, you'll conform to this interface. -* xref:api:utils.adoc#ERC165[`ERC165`] — inherit this contract if you'd like to support interface detection using a lookup table in contract storage. You can register interfaces using xref:api:utils.adoc#ERC165-_registerInterface-bytes4-[`_registerInterface(bytes4)`]: check out example usage as part of the ERC721 implementation. +* xref:api:utils.adoc#IERC165[`IERC165`] — this is the ERC-165 interface that defines xref:api:utils.adoc#IERC165-supportsInterface-bytes4-[`supportsInterface`]. When implementing ERC-165, you'll conform to this interface. +* xref:api:utils.adoc#ERC165[`ERC165`] — inherit this contract if you'd like to support interface detection using a lookup table in contract storage. You can register interfaces using xref:api:utils.adoc#ERC165-_registerInterface-bytes4-[`_registerInterface(bytes4)`]: check out example usage as part of the ERC-721 implementation. * xref:api:utils.adoc#ERC165Checker[`ERC165Checker`] — ERC165Checker simplifies the process of checking whether or not a contract supports an interface you care about. * include with `using ERC165Checker for address;` * xref:api:utils.adoc#ERC165Checker-_supportsInterface-address-bytes4-[`myAddress._supportsInterface(bytes4)`] @@ -53,7 +53,7 @@ contract MyContract { bytes4 private InterfaceId_ERC721 = 0x80ac58cd; /** - * @dev transfer an ERC721 token from this contract to someone else + * @dev transfer an ERC-721 token from this contract to someone else */ function transferERC721( address token, @@ -118,9 +118,9 @@ The `Enumerable*` structures are similar to mappings in that they store and remo xref:api:utils.adoc#Base64[`Base64`] util allows you to transform `bytes32` data into its Base64 `string` representation. -This is especially useful for building URL-safe tokenURIs for both xref:api:token/ERC721.adoc#IERC721Metadata-tokenURI-uint256-[`ERC721`] or xref:api:token/ERC1155.adoc#IERC1155MetadataURI-uri-uint256-[`ERC1155`]. This library provides a clever way to serve URL-safe https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs/[Data URI] compliant strings to serve on-chain data structures. +This is especially useful for building URL-safe tokenURIs for both xref:api:token/ERC721.adoc#IERC721Metadata-tokenURI-uint256-[`ERC-721`] or xref:api:token/ERC1155.adoc#IERC1155MetadataURI-uri-uint256-[`ERC-1155`]. This library provides a clever way to serve URL-safe https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs/[Data URI] compliant strings to serve on-chain data structures. -Here is an example to send JSON Metadata through a Base64 Data URI using an ERC721: +Here is an example to send JSON Metadata through a Base64 Data URI using an ERC-721: [source, solidity] ---- @@ -147,7 +147,7 @@ contract My721Token is ERC721 { bytes memory dataURI = abi.encodePacked( '{', '"name": "My721Token #', tokenId.toString(), '"', - // Replace with extra ERC721 Metadata properties + // Replace with extra ERC-721 Metadata properties '}' ); diff --git a/scripts/generate/templates/StorageSlot.js b/scripts/generate/templates/StorageSlot.js index 1c90b5e75..3d2a62a92 100644 --- a/scripts/generate/templates/StorageSlot.js +++ b/scripts/generate/templates/StorageSlot.js @@ -21,7 +21,7 @@ pragma solidity ^0.8.20; * * The functions in this library return Slot structs that contain a \`value\` member that can be used to read or write. * - * Example usage to set ERC1967 implementation slot: + * Example usage to set ERC-1967 implementation slot: * \`\`\`solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; diff --git a/test/governance/Governor.test.js b/test/governance/Governor.test.js index b62160eec..71e80d737 100644 --- a/test/governance/Governor.test.js +++ b/test/governance/Governor.test.js @@ -14,7 +14,7 @@ const { clockFromReceipt } = require('../helpers/time'); const { expectRevertCustomError } = require('../helpers/customError'); const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior'); -const { shouldBehaveLikeEIP6372 } = require('./utils/EIP6372.behavior'); +const { shouldBehaveLikeERC6372 } = require('./utils/ERC6372.behavior'); const { ZERO_BYTES32 } = require('@openzeppelin/test-helpers/src/constants'); const Governor = artifacts.require('$GovernorMock'); @@ -84,7 +84,7 @@ contract('Governor', function (accounts) { }); shouldSupportInterfaces(['ERC165', 'ERC1155Receiver', 'Governor']); - shouldBehaveLikeEIP6372(mode); + shouldBehaveLikeERC6372(mode); it('deployment check', async function () { expect(await this.mock.name()).to.be.equal(name); diff --git a/test/governance/utils/EIP6372.behavior.js b/test/governance/utils/ERC6372.behavior.js similarity index 81% rename from test/governance/utils/EIP6372.behavior.js rename to test/governance/utils/ERC6372.behavior.js index 022ec3568..5e8633f01 100644 --- a/test/governance/utils/EIP6372.behavior.js +++ b/test/governance/utils/ERC6372.behavior.js @@ -1,7 +1,7 @@ const { clock } = require('../../helpers/time'); -function shouldBehaveLikeEIP6372(mode = 'blocknumber') { - describe('should implement EIP6372', function () { +function shouldBehaveLikeERC6372(mode = 'blocknumber') { + describe('should implement ERC6372', function () { beforeEach(async function () { this.mock = this.mock ?? this.token ?? this.votes; }); @@ -19,5 +19,5 @@ function shouldBehaveLikeEIP6372(mode = 'blocknumber') { } module.exports = { - shouldBehaveLikeEIP6372, + shouldBehaveLikeERC6372, }; diff --git a/test/governance/utils/Votes.behavior.js b/test/governance/utils/Votes.behavior.js index 0aea208a9..68445f0fb 100644 --- a/test/governance/utils/Votes.behavior.js +++ b/test/governance/utils/Votes.behavior.js @@ -6,7 +6,7 @@ const { fromRpcSig } = require('ethereumjs-util'); const ethSigUtil = require('eth-sig-util'); const Wallet = require('ethereumjs-wallet').default; -const { shouldBehaveLikeEIP6372 } = require('./EIP6372.behavior'); +const { shouldBehaveLikeERC6372 } = require('./ERC6372.behavior'); const { getDomain, domainType, @@ -26,7 +26,7 @@ const buildAndSignDelegation = (contract, message, pk) => .then(data => fromRpcSig(ethSigUtil.signTypedMessage(pk, { data }))); function shouldBehaveLikeVotes(accounts, tokens, { mode = 'blocknumber', fungible = true }) { - shouldBehaveLikeEIP6372(mode); + shouldBehaveLikeERC6372(mode); const getWeight = token => web3.utils.toBN(fungible ? token : 1); diff --git a/test/token/ERC20/extensions/ERC20Votes.test.js b/test/token/ERC20/extensions/ERC20Votes.test.js index 96d6c4e77..a0da162a4 100644 --- a/test/token/ERC20/extensions/ERC20Votes.test.js +++ b/test/token/ERC20/extensions/ERC20Votes.test.js @@ -38,7 +38,7 @@ contract('ERC20Votes', function (accounts) { this.votes = this.token; }); - // includes EIP6372 behavior check + // includes ERC6372 behavior check shouldBehaveLikeVotes(accounts, [1, 17, 42], { mode, fungible: true }); it('initial nonce is 0', async function () { diff --git a/test/token/ERC721/extensions/ERC721Votes.test.js b/test/token/ERC721/extensions/ERC721Votes.test.js index 45020baf9..ba9a2a8cb 100644 --- a/test/token/ERC721/extensions/ERC721Votes.test.js +++ b/test/token/ERC721/extensions/ERC721Votes.test.js @@ -26,7 +26,7 @@ contract('ERC721Votes', function (accounts) { this.votes = await artifact.new(name, symbol, name, version); }); - // includes EIP6372 behavior check + // includes ERC6372 behavior check shouldBehaveLikeVotes(accounts, tokens, { mode, fungible: false }); describe('balanceOf', function () { From 0950532d9a89ac652dbbb2aed56678bdfd624c21 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Thu, 23 Nov 2023 05:38:20 +0000 Subject: [PATCH 118/167] Migrate utils-structs tests to ethersjs (#4748) Co-authored-by: Hadrien Croubois Co-authored-by: ernestognw --- package-lock.json | 7 - package.json | 1 - test/helpers/random.js | 14 ++ test/utils/structs/BitMap.test.js | 76 +++--- test/utils/structs/Checkpoints.test.js | 128 +++++----- test/utils/structs/DoubleEndedQueue.test.js | 100 ++++---- test/utils/structs/EnumerableMap.behavior.js | 147 +++++------- test/utils/structs/EnumerableMap.test.js | 234 +++++++++---------- test/utils/structs/EnumerableSet.behavior.js | 97 ++++---- test/utils/structs/EnumerableSet.test.js | 125 ++++++---- 10 files changed, 455 insertions(+), 474 deletions(-) create mode 100644 test/helpers/random.js diff --git a/package-lock.json b/package-lock.json index 9242999c3..3c3272ea3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,6 @@ "hardhat-gas-reporter": "^1.0.9", "hardhat-ignore-warnings": "^0.2.0", "lodash.startcase": "^4.4.0", - "lodash.zip": "^4.2.0", "micromatch": "^4.0.2", "p-limit": "^3.1.0", "prettier": "^3.0.0", @@ -10546,12 +10545,6 @@ "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", "dev": true }, - "node_modules/lodash.zip": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", - "integrity": "sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==", - "dev": true - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", diff --git a/package.json b/package.json index c2c3a2675..50ba8f478 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,6 @@ "hardhat-gas-reporter": "^1.0.9", "hardhat-ignore-warnings": "^0.2.0", "lodash.startcase": "^4.4.0", - "lodash.zip": "^4.2.0", "micromatch": "^4.0.2", "p-limit": "^3.1.0", "prettier": "^3.0.0", diff --git a/test/helpers/random.js b/test/helpers/random.js new file mode 100644 index 000000000..883667fa0 --- /dev/null +++ b/test/helpers/random.js @@ -0,0 +1,14 @@ +const { ethers } = require('hardhat'); + +const randomArray = (generator, arrayLength = 3) => Array(arrayLength).fill().map(generator); + +const generators = { + address: () => ethers.Wallet.createRandom().address, + bytes32: () => ethers.hexlify(ethers.randomBytes(32)), + uint256: () => ethers.toBigInt(ethers.randomBytes(32)), +}; + +module.exports = { + randomArray, + generators, +}; diff --git a/test/utils/structs/BitMap.test.js b/test/utils/structs/BitMap.test.js index 8a1470c5c..133f1f734 100644 --- a/test/utils/structs/BitMap.test.js +++ b/test/utils/structs/BitMap.test.js @@ -1,15 +1,19 @@ -const { BN } = require('@openzeppelin/test-helpers'); const { expect } = require('chai'); +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const BitMap = artifacts.require('$BitMaps'); +async function fixture() { + const bitmap = await ethers.deployContract('$BitMaps'); + return { bitmap }; +} -contract('BitMap', function () { - const keyA = new BN('7891'); - const keyB = new BN('451'); - const keyC = new BN('9592328'); +describe('BitMap', function () { + const keyA = 7891n; + const keyB = 451n; + const keyC = 9592328n; beforeEach(async function () { - this.bitmap = await BitMap.new(); + Object.assign(this, await loadFixture(fixture)); }); it('starts empty', async function () { @@ -35,18 +39,18 @@ contract('BitMap', function () { }); it('set several consecutive keys', async function () { - await this.bitmap.$setTo(0, keyA.addn(0), true); - await this.bitmap.$setTo(0, keyA.addn(1), true); - await this.bitmap.$setTo(0, keyA.addn(2), true); - await this.bitmap.$setTo(0, keyA.addn(3), true); - await this.bitmap.$setTo(0, keyA.addn(4), true); - await this.bitmap.$setTo(0, keyA.addn(2), false); - await this.bitmap.$setTo(0, keyA.addn(4), false); - expect(await this.bitmap.$get(0, keyA.addn(0))).to.equal(true); - expect(await this.bitmap.$get(0, keyA.addn(1))).to.equal(true); - expect(await this.bitmap.$get(0, keyA.addn(2))).to.equal(false); - expect(await this.bitmap.$get(0, keyA.addn(3))).to.equal(true); - expect(await this.bitmap.$get(0, keyA.addn(4))).to.equal(false); + await this.bitmap.$setTo(0, keyA + 0n, true); + await this.bitmap.$setTo(0, keyA + 1n, true); + await this.bitmap.$setTo(0, keyA + 2n, true); + await this.bitmap.$setTo(0, keyA + 3n, true); + await this.bitmap.$setTo(0, keyA + 4n, true); + await this.bitmap.$setTo(0, keyA + 2n, false); + await this.bitmap.$setTo(0, keyA + 4n, false); + expect(await this.bitmap.$get(0, keyA + 0n)).to.equal(true); + expect(await this.bitmap.$get(0, keyA + 1n)).to.equal(true); + expect(await this.bitmap.$get(0, keyA + 2n)).to.equal(false); + expect(await this.bitmap.$get(0, keyA + 3n)).to.equal(true); + expect(await this.bitmap.$get(0, keyA + 4n)).to.equal(false); }); }); @@ -67,14 +71,14 @@ contract('BitMap', function () { }); it('adds several consecutive keys', async function () { - await this.bitmap.$set(0, keyA.addn(0)); - await this.bitmap.$set(0, keyA.addn(1)); - await this.bitmap.$set(0, keyA.addn(3)); - expect(await this.bitmap.$get(0, keyA.addn(0))).to.equal(true); - expect(await this.bitmap.$get(0, keyA.addn(1))).to.equal(true); - expect(await this.bitmap.$get(0, keyA.addn(2))).to.equal(false); - expect(await this.bitmap.$get(0, keyA.addn(3))).to.equal(true); - expect(await this.bitmap.$get(0, keyA.addn(4))).to.equal(false); + await this.bitmap.$set(0, keyA + 0n); + await this.bitmap.$set(0, keyA + 1n); + await this.bitmap.$set(0, keyA + 3n); + expect(await this.bitmap.$get(0, keyA + 0n)).to.equal(true); + expect(await this.bitmap.$get(0, keyA + 1n)).to.equal(true); + expect(await this.bitmap.$get(0, keyA + 2n)).to.equal(false); + expect(await this.bitmap.$get(0, keyA + 3n)).to.equal(true); + expect(await this.bitmap.$get(0, keyA + 4n)).to.equal(false); }); }); @@ -89,15 +93,15 @@ contract('BitMap', function () { }); it('removes consecutive added keys', async function () { - await this.bitmap.$set(0, keyA.addn(0)); - await this.bitmap.$set(0, keyA.addn(1)); - await this.bitmap.$set(0, keyA.addn(3)); - await this.bitmap.$unset(0, keyA.addn(1)); - expect(await this.bitmap.$get(0, keyA.addn(0))).to.equal(true); - expect(await this.bitmap.$get(0, keyA.addn(1))).to.equal(false); - expect(await this.bitmap.$get(0, keyA.addn(2))).to.equal(false); - expect(await this.bitmap.$get(0, keyA.addn(3))).to.equal(true); - expect(await this.bitmap.$get(0, keyA.addn(4))).to.equal(false); + await this.bitmap.$set(0, keyA + 0n); + await this.bitmap.$set(0, keyA + 1n); + await this.bitmap.$set(0, keyA + 3n); + await this.bitmap.$unset(0, keyA + 1n); + expect(await this.bitmap.$get(0, keyA + 0n)).to.equal(true); + expect(await this.bitmap.$get(0, keyA + 1n)).to.equal(false); + expect(await this.bitmap.$get(0, keyA + 2n)).to.equal(false); + expect(await this.bitmap.$get(0, keyA + 3n)).to.equal(true); + expect(await this.bitmap.$get(0, keyA + 4n)).to.equal(false); }); it('adds and removes multiple keys', async function () { diff --git a/test/utils/structs/Checkpoints.test.js b/test/utils/structs/Checkpoints.test.js index 936ac565a..c5b9e65a0 100644 --- a/test/utils/structs/Checkpoints.test.js +++ b/test/utils/structs/Checkpoints.test.js @@ -1,71 +1,65 @@ -require('@openzeppelin/test-helpers'); - const { expect } = require('chai'); +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { VALUE_SIZES } = require('../../../scripts/generate/templates/Checkpoints.opts.js'); -const { expectRevertCustomError } = require('../../helpers/customError.js'); -const { expectRevert } = require('@openzeppelin/test-helpers'); - -const $Checkpoints = artifacts.require('$Checkpoints'); - -// The library name may be 'Checkpoints' or 'CheckpointsUpgradeable' -const libraryName = $Checkpoints._json.contractName.replace(/^\$/, ''); -const first = array => (array.length ? array[0] : undefined); const last = array => (array.length ? array[array.length - 1] : undefined); -contract('Checkpoints', function () { - beforeEach(async function () { - this.mock = await $Checkpoints.new(); - }); - +describe('Checkpoints', function () { for (const length of VALUE_SIZES) { describe(`Trace${length}`, function () { - beforeEach(async function () { - this.methods = { - at: (...args) => this.mock.methods[`$at_${libraryName}_Trace${length}(uint256,uint32)`](0, ...args), - latest: (...args) => this.mock.methods[`$latest_${libraryName}_Trace${length}(uint256)`](0, ...args), - latestCheckpoint: (...args) => - this.mock.methods[`$latestCheckpoint_${libraryName}_Trace${length}(uint256)`](0, ...args), - length: (...args) => this.mock.methods[`$length_${libraryName}_Trace${length}(uint256)`](0, ...args), - push: (...args) => this.mock.methods[`$push(uint256,uint${256 - length},uint${length})`](0, ...args), - lowerLookup: (...args) => this.mock.methods[`$lowerLookup(uint256,uint${256 - length})`](0, ...args), - upperLookup: (...args) => this.mock.methods[`$upperLookup(uint256,uint${256 - length})`](0, ...args), + const fixture = async () => { + const mock = await ethers.deployContract('$Checkpoints'); + const methods = { + at: (...args) => mock.getFunction(`$at_Checkpoints_Trace${length}`)(0, ...args), + latest: (...args) => mock.getFunction(`$latest_Checkpoints_Trace${length}`)(0, ...args), + latestCheckpoint: (...args) => mock.getFunction(`$latestCheckpoint_Checkpoints_Trace${length}`)(0, ...args), + length: (...args) => mock.getFunction(`$length_Checkpoints_Trace${length}`)(0, ...args), + push: (...args) => mock.getFunction(`$push(uint256,uint${256 - length},uint${length})`)(0, ...args), + lowerLookup: (...args) => mock.getFunction(`$lowerLookup(uint256,uint${256 - length})`)(0, ...args), + upperLookup: (...args) => mock.getFunction(`$upperLookup(uint256,uint${256 - length})`)(0, ...args), upperLookupRecent: (...args) => - this.mock.methods[`$upperLookupRecent(uint256,uint${256 - length})`](0, ...args), + mock.getFunction(`$upperLookupRecent(uint256,uint${256 - length})`)(0, ...args), }; + + return { mock, methods }; + }; + + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); describe('without checkpoints', function () { it('at zero reverts', async function () { // Reverts with array out of bound access, which is unspecified - await expectRevert.unspecified(this.methods.at(0)); + await expect(this.methods.at(0)).to.be.reverted; }); it('returns zero as latest value', async function () { - expect(await this.methods.latest()).to.be.bignumber.equal('0'); + expect(await this.methods.latest()).to.equal(0n); const ckpt = await this.methods.latestCheckpoint(); - expect(ckpt[0]).to.be.equal(false); - expect(ckpt[1]).to.be.bignumber.equal('0'); - expect(ckpt[2]).to.be.bignumber.equal('0'); + expect(ckpt[0]).to.be.false; + expect(ckpt[1]).to.equal(0n); + expect(ckpt[2]).to.equal(0n); }); it('lookup returns 0', async function () { - expect(await this.methods.lowerLookup(0)).to.be.bignumber.equal('0'); - expect(await this.methods.upperLookup(0)).to.be.bignumber.equal('0'); - expect(await this.methods.upperLookupRecent(0)).to.be.bignumber.equal('0'); + expect(await this.methods.lowerLookup(0)).to.equal(0n); + expect(await this.methods.upperLookup(0)).to.equal(0n); + expect(await this.methods.upperLookupRecent(0)).to.equal(0n); }); }); describe('with checkpoints', function () { beforeEach('pushing checkpoints', async function () { this.checkpoints = [ - { key: '2', value: '17' }, - { key: '3', value: '42' }, - { key: '5', value: '101' }, - { key: '7', value: '23' }, - { key: '11', value: '99' }, + { key: 2n, value: 17n }, + { key: 3n, value: 42n }, + { key: 5n, value: 101n }, + { key: 7n, value: 23n }, + { key: 11n, value: 99n }, ]; for (const { key, value } of this.checkpoints) { await this.methods.push(key, value); @@ -75,70 +69,66 @@ contract('Checkpoints', function () { it('at keys', async function () { for (const [index, { key, value }] of this.checkpoints.entries()) { const at = await this.methods.at(index); - expect(at._value).to.be.bignumber.equal(value); - expect(at._key).to.be.bignumber.equal(key); + expect(at._value).to.equal(value); + expect(at._key).to.equal(key); } }); it('length', async function () { - expect(await this.methods.length()).to.be.bignumber.equal(this.checkpoints.length.toString()); + expect(await this.methods.length()).to.equal(this.checkpoints.length); }); it('returns latest value', async function () { - expect(await this.methods.latest()).to.be.bignumber.equal(last(this.checkpoints).value); - - const ckpt = await this.methods.latestCheckpoint(); - expect(ckpt[0]).to.be.equal(true); - expect(ckpt[1]).to.be.bignumber.equal(last(this.checkpoints).key); - expect(ckpt[2]).to.be.bignumber.equal(last(this.checkpoints).value); + const latest = this.checkpoints.at(-1); + expect(await this.methods.latest()).to.equal(latest.value); + expect(await this.methods.latestCheckpoint()).to.have.ordered.members([true, latest.key, latest.value]); }); it('cannot push values in the past', async function () { - await expectRevertCustomError( - this.methods.push(last(this.checkpoints).key - 1, '0'), + await expect(this.methods.push(this.checkpoints.at(-1).key - 1n, 0n)).to.be.revertedWithCustomError( + this.mock, 'CheckpointUnorderedInsertion', - [], ); }); it('can update last value', async function () { - const newValue = '42'; + const newValue = 42n; // check length before the update - expect(await this.methods.length()).to.be.bignumber.equal(this.checkpoints.length.toString()); + expect(await this.methods.length()).to.equal(this.checkpoints.length); // update last key - await this.methods.push(last(this.checkpoints).key, newValue); - expect(await this.methods.latest()).to.be.bignumber.equal(newValue); + await this.methods.push(this.checkpoints.at(-1).key, newValue); + expect(await this.methods.latest()).to.equal(newValue); // check that length did not change - expect(await this.methods.length()).to.be.bignumber.equal(this.checkpoints.length.toString()); + expect(await this.methods.length()).to.equal(this.checkpoints.length); }); it('lower lookup', async function () { for (let i = 0; i < 14; ++i) { - const value = first(this.checkpoints.filter(x => i <= x.key))?.value || '0'; + const value = this.checkpoints.find(x => i <= x.key)?.value || 0n; - expect(await this.methods.lowerLookup(i)).to.be.bignumber.equal(value); + expect(await this.methods.lowerLookup(i)).to.equal(value); } }); it('upper lookup & upperLookupRecent', async function () { for (let i = 0; i < 14; ++i) { - const value = last(this.checkpoints.filter(x => i >= x.key))?.value || '0'; + const value = last(this.checkpoints.filter(x => i >= x.key))?.value || 0n; - expect(await this.methods.upperLookup(i)).to.be.bignumber.equal(value); - expect(await this.methods.upperLookupRecent(i)).to.be.bignumber.equal(value); + expect(await this.methods.upperLookup(i)).to.equal(value); + expect(await this.methods.upperLookupRecent(i)).to.equal(value); } }); it('upperLookupRecent with more than 5 checkpoints', async function () { const moreCheckpoints = [ - { key: '12', value: '22' }, - { key: '13', value: '131' }, - { key: '17', value: '45' }, - { key: '19', value: '31452' }, - { key: '21', value: '0' }, + { key: 12n, value: 22n }, + { key: 13n, value: 131n }, + { key: 17n, value: 45n }, + { key: 19n, value: 31452n }, + { key: 21n, value: 0n }, ]; const allCheckpoints = [].concat(this.checkpoints, moreCheckpoints); @@ -147,9 +137,9 @@ contract('Checkpoints', function () { } for (let i = 0; i < 25; ++i) { - const value = last(allCheckpoints.filter(x => i >= x.key))?.value || '0'; - expect(await this.methods.upperLookup(i)).to.be.bignumber.equal(value); - expect(await this.methods.upperLookupRecent(i)).to.be.bignumber.equal(value); + const value = last(allCheckpoints.filter(x => i >= x.key))?.value || 0n; + expect(await this.methods.upperLookup(i)).to.equal(value); + expect(await this.methods.upperLookupRecent(i)).to.equal(value); } }); }); diff --git a/test/utils/structs/DoubleEndedQueue.test.js b/test/utils/structs/DoubleEndedQueue.test.js index cbf37d76b..92d9f530c 100644 --- a/test/utils/structs/DoubleEndedQueue.test.js +++ b/test/utils/structs/DoubleEndedQueue.test.js @@ -1,99 +1,105 @@ -const { expectEvent } = require('@openzeppelin/test-helpers'); -const { expectRevertCustomError } = require('../../helpers/customError'); - -const DoubleEndedQueue = artifacts.require('$DoubleEndedQueue'); - -/** Rebuild the content of the deque as a JS array. */ -const getContent = deque => - deque.$length(0).then(bn => - Promise.all( - Array(bn.toNumber()) - .fill() - .map((_, i) => deque.$at(0, i)), - ), - ); - -contract('DoubleEndedQueue', function () { - const bytesA = '0xdeadbeef'.padEnd(66, '0'); - const bytesB = '0x0123456789'.padEnd(66, '0'); - const bytesC = '0x42424242'.padEnd(66, '0'); - const bytesD = '0x171717'.padEnd(66, '0'); +const { expect } = require('chai'); +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + +async function fixture() { + const mock = await ethers.deployContract('$DoubleEndedQueue'); + + /** Rebuild the content of the deque as a JS array. */ + const getContent = () => + mock.$length(0).then(length => + Promise.all( + Array(Number(length)) + .fill() + .map((_, i) => mock.$at(0, i)), + ), + ); + + return { mock, getContent }; +} + +describe('DoubleEndedQueue', function () { + const coder = ethers.AbiCoder.defaultAbiCoder(); + const bytesA = coder.encode(['uint256'], [0xdeadbeef]); + const bytesB = coder.encode(['uint256'], [0x0123456789]); + const bytesC = coder.encode(['uint256'], [0x42424242]); + const bytesD = coder.encode(['uint256'], [0x171717]); beforeEach(async function () { - this.deque = await DoubleEndedQueue.new(); + Object.assign(this, await loadFixture(fixture)); }); describe('when empty', function () { it('getters', async function () { - expect(await this.deque.$empty(0)).to.be.equal(true); - expect(await getContent(this.deque)).to.have.ordered.members([]); + expect(await this.mock.$empty(0)).to.be.true; + expect(await this.getContent()).to.have.ordered.members([]); }); it('reverts on accesses', async function () { - await expectRevertCustomError(this.deque.$popBack(0), 'QueueEmpty', []); - await expectRevertCustomError(this.deque.$popFront(0), 'QueueEmpty', []); - await expectRevertCustomError(this.deque.$back(0), 'QueueEmpty', []); - await expectRevertCustomError(this.deque.$front(0), 'QueueEmpty', []); + await expect(this.mock.$popBack(0)).to.be.revertedWithCustomError(this.mock, 'QueueEmpty'); + await expect(this.mock.$popFront(0)).to.be.revertedWithCustomError(this.mock, 'QueueEmpty'); + await expect(this.mock.$back(0)).to.be.revertedWithCustomError(this.mock, 'QueueEmpty'); + await expect(this.mock.$front(0)).to.be.revertedWithCustomError(this.mock, 'QueueEmpty'); }); }); describe('when not empty', function () { beforeEach(async function () { - await this.deque.$pushBack(0, bytesB); - await this.deque.$pushFront(0, bytesA); - await this.deque.$pushBack(0, bytesC); + await this.mock.$pushBack(0, bytesB); + await this.mock.$pushFront(0, bytesA); + await this.mock.$pushBack(0, bytesC); this.content = [bytesA, bytesB, bytesC]; }); it('getters', async function () { - expect(await this.deque.$empty(0)).to.be.equal(false); - expect(await this.deque.$length(0)).to.be.bignumber.equal(this.content.length.toString()); - expect(await this.deque.$front(0)).to.be.equal(this.content[0]); - expect(await this.deque.$back(0)).to.be.equal(this.content[this.content.length - 1]); - expect(await getContent(this.deque)).to.have.ordered.members(this.content); + expect(await this.mock.$empty(0)).to.be.false; + expect(await this.mock.$length(0)).to.equal(this.content.length); + expect(await this.mock.$front(0)).to.equal(this.content[0]); + expect(await this.mock.$back(0)).to.equal(this.content[this.content.length - 1]); + expect(await this.getContent()).to.have.ordered.members(this.content); }); it('out of bounds access', async function () { - await expectRevertCustomError(this.deque.$at(0, this.content.length), 'QueueOutOfBounds', []); + await expect(this.mock.$at(0, this.content.length)).to.be.revertedWithCustomError(this.mock, 'QueueOutOfBounds'); }); describe('push', function () { it('front', async function () { - await this.deque.$pushFront(0, bytesD); + await this.mock.$pushFront(0, bytesD); this.content.unshift(bytesD); // add element at the beginning - expect(await getContent(this.deque)).to.have.ordered.members(this.content); + expect(await this.getContent()).to.have.ordered.members(this.content); }); it('back', async function () { - await this.deque.$pushBack(0, bytesD); + await this.mock.$pushBack(0, bytesD); this.content.push(bytesD); // add element at the end - expect(await getContent(this.deque)).to.have.ordered.members(this.content); + expect(await this.getContent()).to.have.ordered.members(this.content); }); }); describe('pop', function () { it('front', async function () { const value = this.content.shift(); // remove first element - expectEvent(await this.deque.$popFront(0), 'return$popFront', { value }); + await expect(this.mock.$popFront(0)).to.emit(this.mock, 'return$popFront').withArgs(value); - expect(await getContent(this.deque)).to.have.ordered.members(this.content); + expect(await this.getContent()).to.have.ordered.members(this.content); }); it('back', async function () { const value = this.content.pop(); // remove last element - expectEvent(await this.deque.$popBack(0), 'return$popBack', { value }); + await expect(this.mock.$popBack(0)).to.emit(this.mock, 'return$popBack').withArgs(value); - expect(await getContent(this.deque)).to.have.ordered.members(this.content); + expect(await this.getContent()).to.have.ordered.members(this.content); }); }); it('clear', async function () { - await this.deque.$clear(0); + await this.mock.$clear(0); - expect(await this.deque.$empty(0)).to.be.equal(true); - expect(await getContent(this.deque)).to.have.ordered.members([]); + expect(await this.mock.$empty(0)).to.be.true; + expect(await this.getContent()).to.have.ordered.members([]); }); }); }); diff --git a/test/utils/structs/EnumerableMap.behavior.js b/test/utils/structs/EnumerableMap.behavior.js index 67b19e39a..fb967b34c 100644 --- a/test/utils/structs/EnumerableMap.behavior.js +++ b/test/utils/structs/EnumerableMap.behavior.js @@ -1,173 +1,146 @@ -const { expectEvent } = require('@openzeppelin/test-helpers'); const { expect } = require('chai'); +const { ethers } = require('hardhat'); -const zip = require('lodash.zip'); -const { expectRevertCustomError } = require('../../helpers/customError'); +const zip = (array1, array2) => array1.map((item, index) => [item, array2[index]]); -function shouldBehaveLikeMap(keys, values, zeroValue, methods, events) { - const [keyA, keyB, keyC] = keys; - const [valueA, valueB, valueC] = values; - - async function expectMembersMatch(map, keys, values) { +function shouldBehaveLikeMap(zeroValue, keyType, events) { + async function expectMembersMatch(methods, keys, values) { expect(keys.length).to.equal(values.length); + expect(await methods.length()).to.equal(keys.length); + expect([...(await methods.keys())]).to.have.members(keys); + + for (const [key, value] of zip(keys, values)) { + expect(await methods.contains(key)).to.be.true; + expect(await methods.get(key)).to.equal(value); + } - await Promise.all(keys.map(async key => expect(await methods.contains(map, key)).to.equal(true))); - - expect(await methods.length(map)).to.bignumber.equal(keys.length.toString()); - - expect((await Promise.all(keys.map(key => methods.get(map, key)))).map(k => k.toString())).to.have.same.members( - values.map(value => value.toString()), - ); - - // To compare key-value pairs, we zip keys and values, and convert BNs to - // strings to workaround Chai limitations when dealing with nested arrays - expect( - await Promise.all( - [...Array(keys.length).keys()].map(async index => { - const entry = await methods.at(map, index); - return [entry[0].toString(), entry[1].toString()]; - }), - ), - ).to.have.same.deep.members( - zip( - keys.map(k => k.toString()), - values.map(v => v.toString()), - ), - ); - - // This also checks that both arrays have the same length - expect((await methods.keys(map)).map(k => k.toString())).to.have.same.members(keys.map(key => key.toString())); + expect(await Promise.all(keys.map((_, index) => methods.at(index)))).to.have.deep.members(zip(keys, values)); } it('starts empty', async function () { - expect(await methods.contains(this.map, keyA)).to.equal(false); + expect(await this.methods.contains(this.keyA)).to.be.false; - await expectMembersMatch(this.map, [], []); + await expectMembersMatch(this.methods, [], []); }); describe('set', function () { it('adds a key', async function () { - const receipt = await methods.set(this.map, keyA, valueA); - expectEvent(receipt, events.setReturn, { ret0: true }); + await expect(this.methods.set(this.keyA, this.valueA)).to.emit(this.mock, events.setReturn).withArgs(true); - await expectMembersMatch(this.map, [keyA], [valueA]); + await expectMembersMatch(this.methods, [this.keyA], [this.valueA]); }); it('adds several keys', async function () { - await methods.set(this.map, keyA, valueA); - await methods.set(this.map, keyB, valueB); + await this.methods.set(this.keyA, this.valueA); + await this.methods.set(this.keyB, this.valueB); - await expectMembersMatch(this.map, [keyA, keyB], [valueA, valueB]); - expect(await methods.contains(this.map, keyC)).to.equal(false); + await expectMembersMatch(this.methods, [this.keyA, this.keyB], [this.valueA, this.valueB]); + expect(await this.methods.contains(this.keyC)).to.be.false; }); it('returns false when adding keys already in the set', async function () { - await methods.set(this.map, keyA, valueA); + await this.methods.set(this.keyA, this.valueA); - const receipt = await methods.set(this.map, keyA, valueA); - expectEvent(receipt, events.setReturn, { ret0: false }); + await expect(this.methods.set(this.keyA, this.valueA)).to.emit(this.mock, events.setReturn).withArgs(false); - await expectMembersMatch(this.map, [keyA], [valueA]); + await expectMembersMatch(this.methods, [this.keyA], [this.valueA]); }); it('updates values for keys already in the set', async function () { - await methods.set(this.map, keyA, valueA); - await methods.set(this.map, keyA, valueB); + await this.methods.set(this.keyA, this.valueA); + await this.methods.set(this.keyA, this.valueB); - await expectMembersMatch(this.map, [keyA], [valueB]); + await expectMembersMatch(this.methods, [this.keyA], [this.valueB]); }); }); describe('remove', function () { it('removes added keys', async function () { - await methods.set(this.map, keyA, valueA); + await this.methods.set(this.keyA, this.valueA); - const receipt = await methods.remove(this.map, keyA); - expectEvent(receipt, events.removeReturn, { ret0: true }); + await expect(this.methods.remove(this.keyA)).to.emit(this.mock, events.removeReturn).withArgs(true); - expect(await methods.contains(this.map, keyA)).to.equal(false); - await expectMembersMatch(this.map, [], []); + expect(await this.methods.contains(this.keyA)).to.be.false; + await expectMembersMatch(this.methods, [], []); }); it('returns false when removing keys not in the set', async function () { - const receipt = await methods.remove(this.map, keyA); - expectEvent(receipt, events.removeReturn, { ret0: false }); + await expect(await this.methods.remove(this.keyA)) + .to.emit(this.mock, events.removeReturn) + .withArgs(false); - expect(await methods.contains(this.map, keyA)).to.equal(false); + expect(await this.methods.contains(this.keyA)).to.be.false; }); it('adds and removes multiple keys', async function () { // [] - await methods.set(this.map, keyA, valueA); - await methods.set(this.map, keyC, valueC); + await this.methods.set(this.keyA, this.valueA); + await this.methods.set(this.keyC, this.valueC); // [A, C] - await methods.remove(this.map, keyA); - await methods.remove(this.map, keyB); + await this.methods.remove(this.keyA); + await this.methods.remove(this.keyB); // [C] - await methods.set(this.map, keyB, valueB); + await this.methods.set(this.keyB, this.valueB); // [C, B] - await methods.set(this.map, keyA, valueA); - await methods.remove(this.map, keyC); + await this.methods.set(this.keyA, this.valueA); + await this.methods.remove(this.keyC); // [A, B] - await methods.set(this.map, keyA, valueA); - await methods.set(this.map, keyB, valueB); + await this.methods.set(this.keyA, this.valueA); + await this.methods.set(this.keyB, this.valueB); // [A, B] - await methods.set(this.map, keyC, valueC); - await methods.remove(this.map, keyA); + await this.methods.set(this.keyC, this.valueC); + await this.methods.remove(this.keyA); // [B, C] - await methods.set(this.map, keyA, valueA); - await methods.remove(this.map, keyB); + await this.methods.set(this.keyA, this.valueA); + await this.methods.remove(this.keyB); // [A, C] - await expectMembersMatch(this.map, [keyA, keyC], [valueA, valueC]); + await expectMembersMatch(this.methods, [this.keyA, this.keyC], [this.valueA, this.valueC]); - expect(await methods.contains(this.map, keyA)).to.equal(true); - expect(await methods.contains(this.map, keyB)).to.equal(false); - expect(await methods.contains(this.map, keyC)).to.equal(true); + expect(await this.methods.contains(this.keyA)).to.be.true; + expect(await this.methods.contains(this.keyB)).to.be.false; + expect(await this.methods.contains(this.keyC)).to.be.true; }); }); describe('read', function () { beforeEach(async function () { - await methods.set(this.map, keyA, valueA); + await this.methods.set(this.keyA, this.valueA); }); describe('get', function () { it('existing value', async function () { - expect(await methods.get(this.map, keyA).then(r => r.toString())).to.be.equal(valueA.toString()); + expect(await this.methods.get(this.keyA)).to.be.equal(this.valueA); }); + it('missing value', async function () { - const key = web3.utils.toHex(keyB); - await expectRevertCustomError(methods.get(this.map, keyB), 'EnumerableMapNonexistentKey', [ - key.length == 66 ? key : web3.utils.padLeft(key, 64, '0'), - ]); + await expect(this.methods.get(this.keyB)) + .to.be.revertedWithCustomError(this.mock, 'EnumerableMapNonexistentKey') + .withArgs(ethers.AbiCoder.defaultAbiCoder().encode([keyType], [this.keyB])); }); }); describe('tryGet', function () { it('existing value', async function () { - const result = await methods.tryGet(this.map, keyA); - expect(result['0']).to.be.equal(true); - expect(result['1'].toString()).to.be.equal(valueA.toString()); + expect(await this.methods.tryGet(this.keyA)).to.have.ordered.members([true, this.valueA]); }); + it('missing value', async function () { - const result = await methods.tryGet(this.map, keyB); - expect(result['0']).to.be.equal(false); - expect(result['1'].toString()).to.be.equal(zeroValue.toString()); + expect(await this.methods.tryGet(this.keyB)).to.have.ordered.members([false, zeroValue]); }); }); }); diff --git a/test/utils/structs/EnumerableMap.test.js b/test/utils/structs/EnumerableMap.test.js index 545e12a4f..accdb52fa 100644 --- a/test/utils/structs/EnumerableMap.test.js +++ b/test/utils/structs/EnumerableMap.test.js @@ -1,149 +1,145 @@ -const { BN, constants } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { mapValues } = require('../../helpers/iterate'); - -const EnumerableMap = artifacts.require('$EnumerableMap'); +const { randomArray, generators } = require('../../helpers/random'); const { shouldBehaveLikeMap } = require('./EnumerableMap.behavior'); -const getMethods = ms => { +const getMethods = (mock, fnSigs) => { return mapValues( - ms, - m => - (self, ...args) => - self.methods[m](0, ...args), + fnSigs, + fnSig => + (...args) => + mock.getFunction(fnSig)(0, ...args), ); }; -// Get the name of the library. In the transpiled code it will be EnumerableMapUpgradeable. -const library = EnumerableMap._json.contractName.replace(/^\$/, ''); +describe('EnumerableMap', function () { + // UintToAddressMap + describe('UintToAddressMap', function () { + const fixture = async () => { + const mock = await ethers.deployContract('$EnumerableMap'); -contract('EnumerableMap', function (accounts) { - const [accountA, accountB, accountC] = accounts; + const [keyA, keyB, keyC] = randomArray(generators.uint256); + const [valueA, valueB, valueC] = randomArray(generators.address); - const keyA = new BN('7891'); - const keyB = new BN('451'); - const keyC = new BN('9592328'); + const methods = getMethods(mock, { + set: '$set(uint256,uint256,address)', + get: '$get_EnumerableMap_UintToAddressMap(uint256,uint256)', + tryGet: '$tryGet_EnumerableMap_UintToAddressMap(uint256,uint256)', + remove: '$remove_EnumerableMap_UintToAddressMap(uint256,uint256)', + length: '$length_EnumerableMap_UintToAddressMap(uint256)', + at: '$at_EnumerableMap_UintToAddressMap(uint256,uint256)', + contains: '$contains_EnumerableMap_UintToAddressMap(uint256,uint256)', + keys: '$keys_EnumerableMap_UintToAddressMap(uint256)', + }); - const bytesA = '0xdeadbeef'.padEnd(66, '0'); - const bytesB = '0x0123456789'.padEnd(66, '0'); - const bytesC = '0x42424242'.padEnd(66, '0'); + return { mock, keyA, keyB, keyC, valueA, valueB, valueC, methods }; + }; - beforeEach(async function () { - this.map = await EnumerableMap.new(); - }); + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); - // AddressToUintMap - describe('AddressToUintMap', function () { - shouldBehaveLikeMap( - [accountA, accountB, accountC], - [keyA, keyB, keyC], - new BN('0'), - getMethods({ - set: '$set(uint256,address,uint256)', - get: '$get(uint256,address)', - tryGet: '$tryGet(uint256,address)', - remove: '$remove(uint256,address)', - length: `$length_${library}_AddressToUintMap(uint256)`, - at: `$at_${library}_AddressToUintMap(uint256,uint256)`, - contains: '$contains(uint256,address)', - keys: `$keys_${library}_AddressToUintMap(uint256)`, - }), - { - setReturn: `return$set_${library}_AddressToUintMap_address_uint256`, - removeReturn: `return$remove_${library}_AddressToUintMap_address`, - }, - ); - }); - - // UintToAddressMap - describe('UintToAddressMap', function () { - shouldBehaveLikeMap( - [keyA, keyB, keyC], - [accountA, accountB, accountC], - constants.ZERO_ADDRESS, - getMethods({ - set: '$set(uint256,uint256,address)', - get: `$get_${library}_UintToAddressMap(uint256,uint256)`, - tryGet: `$tryGet_${library}_UintToAddressMap(uint256,uint256)`, - remove: `$remove_${library}_UintToAddressMap(uint256,uint256)`, - length: `$length_${library}_UintToAddressMap(uint256)`, - at: `$at_${library}_UintToAddressMap(uint256,uint256)`, - contains: `$contains_${library}_UintToAddressMap(uint256,uint256)`, - keys: `$keys_${library}_UintToAddressMap(uint256)`, - }), - { - setReturn: `return$set_${library}_UintToAddressMap_uint256_address`, - removeReturn: `return$remove_${library}_UintToAddressMap_uint256`, - }, - ); + shouldBehaveLikeMap(ethers.ZeroAddress, 'uint256', { + setReturn: 'return$set_EnumerableMap_UintToAddressMap_uint256_address', + removeReturn: 'return$remove_EnumerableMap_UintToAddressMap_uint256', + }); }); // Bytes32ToBytes32Map describe('Bytes32ToBytes32Map', function () { - shouldBehaveLikeMap( - [keyA, keyB, keyC].map(k => '0x' + k.toString(16).padEnd(64, '0')), - [bytesA, bytesB, bytesC], - constants.ZERO_BYTES32, - getMethods({ + const fixture = async () => { + const mock = await ethers.deployContract('$EnumerableMap'); + + const [keyA, keyB, keyC] = randomArray(generators.bytes32); + const [valueA, valueB, valueC] = randomArray(generators.bytes32); + + const methods = getMethods(mock, { set: '$set(uint256,bytes32,bytes32)', - get: `$get_${library}_Bytes32ToBytes32Map(uint256,bytes32)`, - tryGet: `$tryGet_${library}_Bytes32ToBytes32Map(uint256,bytes32)`, - remove: `$remove_${library}_Bytes32ToBytes32Map(uint256,bytes32)`, - length: `$length_${library}_Bytes32ToBytes32Map(uint256)`, - at: `$at_${library}_Bytes32ToBytes32Map(uint256,uint256)`, - contains: `$contains_${library}_Bytes32ToBytes32Map(uint256,bytes32)`, - keys: `$keys_${library}_Bytes32ToBytes32Map(uint256)`, - }), - { - setReturn: `return$set_${library}_Bytes32ToBytes32Map_bytes32_bytes32`, - removeReturn: `return$remove_${library}_Bytes32ToBytes32Map_bytes32`, - }, - ); + get: '$get_EnumerableMap_Bytes32ToBytes32Map(uint256,bytes32)', + tryGet: '$tryGet_EnumerableMap_Bytes32ToBytes32Map(uint256,bytes32)', + remove: '$remove_EnumerableMap_Bytes32ToBytes32Map(uint256,bytes32)', + length: '$length_EnumerableMap_Bytes32ToBytes32Map(uint256)', + at: '$at_EnumerableMap_Bytes32ToBytes32Map(uint256,uint256)', + contains: '$contains_EnumerableMap_Bytes32ToBytes32Map(uint256,bytes32)', + keys: '$keys_EnumerableMap_Bytes32ToBytes32Map(uint256)', + }); + + return { mock, keyA, keyB, keyC, valueA, valueB, valueC, methods }; + }; + + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); + + shouldBehaveLikeMap(ethers.ZeroHash, 'bytes32', { + setReturn: 'return$set_EnumerableMap_Bytes32ToBytes32Map_bytes32_bytes32', + removeReturn: 'return$remove_EnumerableMap_Bytes32ToBytes32Map_bytes32', + }); }); // UintToUintMap describe('UintToUintMap', function () { - shouldBehaveLikeMap( - [keyA, keyB, keyC], - [keyA, keyB, keyC].map(k => k.add(new BN('1332'))), - new BN('0'), - getMethods({ + const fixture = async () => { + const mock = await ethers.deployContract('$EnumerableMap'); + + const [keyA, keyB, keyC] = randomArray(generators.uint256); + const [valueA, valueB, valueC] = randomArray(generators.uint256); + + const methods = getMethods(mock, { set: '$set(uint256,uint256,uint256)', - get: `$get_${library}_UintToUintMap(uint256,uint256)`, - tryGet: `$tryGet_${library}_UintToUintMap(uint256,uint256)`, - remove: `$remove_${library}_UintToUintMap(uint256,uint256)`, - length: `$length_${library}_UintToUintMap(uint256)`, - at: `$at_${library}_UintToUintMap(uint256,uint256)`, - contains: `$contains_${library}_UintToUintMap(uint256,uint256)`, - keys: `$keys_${library}_UintToUintMap(uint256)`, - }), - { - setReturn: `return$set_${library}_UintToUintMap_uint256_uint256`, - removeReturn: `return$remove_${library}_UintToUintMap_uint256`, - }, - ); + get: '$get_EnumerableMap_UintToUintMap(uint256,uint256)', + tryGet: '$tryGet_EnumerableMap_UintToUintMap(uint256,uint256)', + remove: '$remove_EnumerableMap_UintToUintMap(uint256,uint256)', + length: '$length_EnumerableMap_UintToUintMap(uint256)', + at: '$at_EnumerableMap_UintToUintMap(uint256,uint256)', + contains: '$contains_EnumerableMap_UintToUintMap(uint256,uint256)', + keys: '$keys_EnumerableMap_UintToUintMap(uint256)', + }); + + return { mock, keyA, keyB, keyC, valueA, valueB, valueC, methods }; + }; + + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); + + shouldBehaveLikeMap(0n, 'uint256', { + setReturn: 'return$set_EnumerableMap_UintToUintMap_uint256_uint256', + removeReturn: 'return$remove_EnumerableMap_UintToUintMap_uint256', + }); }); // Bytes32ToUintMap describe('Bytes32ToUintMap', function () { - shouldBehaveLikeMap( - [bytesA, bytesB, bytesC], - [keyA, keyB, keyC], - new BN('0'), - getMethods({ + const fixture = async () => { + const mock = await ethers.deployContract('$EnumerableMap'); + + const [keyA, keyB, keyC] = randomArray(generators.bytes32); + const [valueA, valueB, valueC] = randomArray(generators.uint256); + + const methods = getMethods(mock, { set: '$set(uint256,bytes32,uint256)', - get: `$get_${library}_Bytes32ToUintMap(uint256,bytes32)`, - tryGet: `$tryGet_${library}_Bytes32ToUintMap(uint256,bytes32)`, - remove: `$remove_${library}_Bytes32ToUintMap(uint256,bytes32)`, - length: `$length_${library}_Bytes32ToUintMap(uint256)`, - at: `$at_${library}_Bytes32ToUintMap(uint256,uint256)`, - contains: `$contains_${library}_Bytes32ToUintMap(uint256,bytes32)`, - keys: `$keys_${library}_Bytes32ToUintMap(uint256)`, - }), - { - setReturn: `return$set_${library}_Bytes32ToUintMap_bytes32_uint256`, - removeReturn: `return$remove_${library}_Bytes32ToUintMap_bytes32`, - }, - ); + get: '$get_EnumerableMap_Bytes32ToUintMap(uint256,bytes32)', + tryGet: '$tryGet_EnumerableMap_Bytes32ToUintMap(uint256,bytes32)', + remove: '$remove_EnumerableMap_Bytes32ToUintMap(uint256,bytes32)', + length: '$length_EnumerableMap_Bytes32ToUintMap(uint256)', + at: '$at_EnumerableMap_Bytes32ToUintMap(uint256,uint256)', + contains: '$contains_EnumerableMap_Bytes32ToUintMap(uint256,bytes32)', + keys: '$keys_EnumerableMap_Bytes32ToUintMap(uint256)', + }); + + return { mock, keyA, keyB, keyC, valueA, valueB, valueC, methods }; + }; + + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); + + shouldBehaveLikeMap(0n, 'bytes32', { + setReturn: 'return$set_EnumerableMap_Bytes32ToUintMap_bytes32_uint256', + removeReturn: 'return$remove_EnumerableMap_Bytes32ToUintMap_bytes32', + }); }); }); diff --git a/test/utils/structs/EnumerableSet.behavior.js b/test/utils/structs/EnumerableSet.behavior.js index f80eb8169..5b9e067e8 100644 --- a/test/utils/structs/EnumerableSet.behavior.js +++ b/test/utils/structs/EnumerableSet.behavior.js @@ -1,125 +1,106 @@ -const { expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); const { expect } = require('chai'); -function shouldBehaveLikeSet(values, methods, events) { - const [valueA, valueB, valueC] = values; +function shouldBehaveLikeSet(events) { + async function expectMembersMatch(methods, values) { + expect(await methods.length()).to.equal(values.length); + for (const value of values) expect(await methods.contains(value)).to.be.true; - async function expectMembersMatch(set, values) { - const contains = await Promise.all(values.map(value => methods.contains(set, value))); - expect(contains.every(Boolean)).to.be.equal(true); - - const length = await methods.length(set); - expect(length).to.bignumber.equal(values.length.toString()); - - // To compare values we convert to strings to workaround Chai - // limitations when dealing with nested arrays (required for BNs) - const indexedValues = await Promise.all( - Array(values.length) - .fill() - .map((_, index) => methods.at(set, index)), - ); - expect(indexedValues.map(v => v.toString())).to.have.same.members(values.map(v => v.toString())); - - const returnedValues = await methods.values(set); - expect(returnedValues.map(v => v.toString())).to.have.same.members(values.map(v => v.toString())); + expect(await Promise.all(values.map((_, index) => methods.at(index)))).to.have.deep.members(values); + expect([...(await methods.values())]).to.have.deep.members(values); } it('starts empty', async function () { - expect(await methods.contains(this.set, valueA)).to.equal(false); + expect(await this.methods.contains(this.valueA)).to.be.false; - await expectMembersMatch(this.set, []); + await expectMembersMatch(this.methods, []); }); describe('add', function () { it('adds a value', async function () { - const receipt = await methods.add(this.set, valueA); - expectEvent(receipt, events.addReturn, { ret0: true }); + await expect(this.methods.add(this.valueA)).to.emit(this.mock, events.addReturn).withArgs(true); - await expectMembersMatch(this.set, [valueA]); + await expectMembersMatch(this.methods, [this.valueA]); }); it('adds several values', async function () { - await methods.add(this.set, valueA); - await methods.add(this.set, valueB); + await this.methods.add(this.valueA); + await this.methods.add(this.valueB); - await expectMembersMatch(this.set, [valueA, valueB]); - expect(await methods.contains(this.set, valueC)).to.equal(false); + await expectMembersMatch(this.methods, [this.valueA, this.valueB]); + expect(await this.methods.contains(this.valueC)).to.be.false; }); it('returns false when adding values already in the set', async function () { - await methods.add(this.set, valueA); + await this.methods.add(this.valueA); - const receipt = await methods.add(this.set, valueA); - expectEvent(receipt, events.addReturn, { ret0: false }); + await expect(this.methods.add(this.valueA)).to.emit(this.mock, events.addReturn).withArgs(false); - await expectMembersMatch(this.set, [valueA]); + await expectMembersMatch(this.methods, [this.valueA]); }); }); describe('at', function () { it('reverts when retrieving non-existent elements', async function () { - await expectRevert.unspecified(methods.at(this.set, 0)); + await expect(this.methods.at(0)).to.be.reverted; }); }); describe('remove', function () { it('removes added values', async function () { - await methods.add(this.set, valueA); + await this.methods.add(this.valueA); - const receipt = await methods.remove(this.set, valueA); - expectEvent(receipt, events.removeReturn, { ret0: true }); + await expect(this.methods.remove(this.valueA)).to.emit(this.mock, events.removeReturn).withArgs(true); - expect(await methods.contains(this.set, valueA)).to.equal(false); - await expectMembersMatch(this.set, []); + expect(await this.methods.contains(this.valueA)).to.be.false; + await expectMembersMatch(this.methods, []); }); it('returns false when removing values not in the set', async function () { - const receipt = await methods.remove(this.set, valueA); - expectEvent(receipt, events.removeReturn, { ret0: false }); + await expect(this.methods.remove(this.valueA)).to.emit(this.mock, events.removeReturn).withArgs(false); - expect(await methods.contains(this.set, valueA)).to.equal(false); + expect(await this.methods.contains(this.valueA)).to.be.false; }); it('adds and removes multiple values', async function () { // [] - await methods.add(this.set, valueA); - await methods.add(this.set, valueC); + await this.methods.add(this.valueA); + await this.methods.add(this.valueC); // [A, C] - await methods.remove(this.set, valueA); - await methods.remove(this.set, valueB); + await this.methods.remove(this.valueA); + await this.methods.remove(this.valueB); // [C] - await methods.add(this.set, valueB); + await this.methods.add(this.valueB); // [C, B] - await methods.add(this.set, valueA); - await methods.remove(this.set, valueC); + await this.methods.add(this.valueA); + await this.methods.remove(this.valueC); // [A, B] - await methods.add(this.set, valueA); - await methods.add(this.set, valueB); + await this.methods.add(this.valueA); + await this.methods.add(this.valueB); // [A, B] - await methods.add(this.set, valueC); - await methods.remove(this.set, valueA); + await this.methods.add(this.valueC); + await this.methods.remove(this.valueA); // [B, C] - await methods.add(this.set, valueA); - await methods.remove(this.set, valueB); + await this.methods.add(this.valueA); + await this.methods.remove(this.valueB); // [A, C] - await expectMembersMatch(this.set, [valueA, valueC]); + await expectMembersMatch(this.methods, [this.valueA, this.valueC]); - expect(await methods.contains(this.set, valueB)).to.equal(false); + expect(await this.methods.contains(this.valueB)).to.be.false; }); }); } diff --git a/test/utils/structs/EnumerableSet.test.js b/test/utils/structs/EnumerableSet.test.js index a1840257b..726ea0ee3 100644 --- a/test/utils/structs/EnumerableSet.test.js +++ b/test/utils/structs/EnumerableSet.test.js @@ -1,79 +1,104 @@ -const EnumerableSet = artifacts.require('$EnumerableSet'); +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { mapValues } = require('../../helpers/iterate'); +const { randomArray, generators } = require('../../helpers/random'); const { shouldBehaveLikeSet } = require('./EnumerableSet.behavior'); -const getMethods = ms => { +const getMethods = (mock, fnSigs) => { return mapValues( - ms, - m => - (self, ...args) => - self.methods[m](0, ...args), + fnSigs, + fnSig => + (...args) => + mock.getFunction(fnSig)(0, ...args), ); }; -// Get the name of the library. In the transpiled code it will be EnumerableSetUpgradeable. -const library = EnumerableSet._json.contractName.replace(/^\$/, ''); - -contract('EnumerableSet', function (accounts) { - beforeEach(async function () { - this.set = await EnumerableSet.new(); - }); - +describe('EnumerableSet', function () { // Bytes32Set describe('EnumerableBytes32Set', function () { - shouldBehaveLikeSet( - ['0xdeadbeef', '0x0123456789', '0x42424242'].map(e => e.padEnd(66, '0')), - getMethods({ + const fixture = async () => { + const mock = await ethers.deployContract('$EnumerableSet'); + + const [valueA, valueB, valueC] = randomArray(generators.bytes32); + + const methods = getMethods(mock, { add: '$add(uint256,bytes32)', remove: '$remove(uint256,bytes32)', contains: '$contains(uint256,bytes32)', - length: `$length_${library}_Bytes32Set(uint256)`, - at: `$at_${library}_Bytes32Set(uint256,uint256)`, - values: `$values_${library}_Bytes32Set(uint256)`, - }), - { - addReturn: `return$add_${library}_Bytes32Set_bytes32`, - removeReturn: `return$remove_${library}_Bytes32Set_bytes32`, - }, - ); + length: `$length_EnumerableSet_Bytes32Set(uint256)`, + at: `$at_EnumerableSet_Bytes32Set(uint256,uint256)`, + values: `$values_EnumerableSet_Bytes32Set(uint256)`, + }); + + return { mock, valueA, valueB, valueC, methods }; + }; + + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); + + shouldBehaveLikeSet({ + addReturn: `return$add_EnumerableSet_Bytes32Set_bytes32`, + removeReturn: `return$remove_EnumerableSet_Bytes32Set_bytes32`, + }); }); // AddressSet describe('EnumerableAddressSet', function () { - shouldBehaveLikeSet( - accounts, - getMethods({ + const fixture = async () => { + const mock = await ethers.deployContract('$EnumerableSet'); + + const [valueA, valueB, valueC] = randomArray(generators.address); + + const methods = getMethods(mock, { add: '$add(uint256,address)', remove: '$remove(uint256,address)', contains: '$contains(uint256,address)', - length: `$length_${library}_AddressSet(uint256)`, - at: `$at_${library}_AddressSet(uint256,uint256)`, - values: `$values_${library}_AddressSet(uint256)`, - }), - { - addReturn: `return$add_${library}_AddressSet_address`, - removeReturn: `return$remove_${library}_AddressSet_address`, - }, - ); + length: `$length_EnumerableSet_AddressSet(uint256)`, + at: `$at_EnumerableSet_AddressSet(uint256,uint256)`, + values: `$values_EnumerableSet_AddressSet(uint256)`, + }); + + return { mock, valueA, valueB, valueC, methods }; + }; + + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); + + shouldBehaveLikeSet({ + addReturn: `return$add_EnumerableSet_AddressSet_address`, + removeReturn: `return$remove_EnumerableSet_AddressSet_address`, + }); }); // UintSet describe('EnumerableUintSet', function () { - shouldBehaveLikeSet( - [1234, 5678, 9101112].map(e => web3.utils.toBN(e)), - getMethods({ + const fixture = async () => { + const mock = await ethers.deployContract('$EnumerableSet'); + + const [valueA, valueB, valueC] = randomArray(generators.uint256); + + const methods = getMethods(mock, { add: '$add(uint256,uint256)', remove: '$remove(uint256,uint256)', contains: '$contains(uint256,uint256)', - length: `$length_${library}_UintSet(uint256)`, - at: `$at_${library}_UintSet(uint256,uint256)`, - values: `$values_${library}_UintSet(uint256)`, - }), - { - addReturn: `return$add_${library}_UintSet_uint256`, - removeReturn: `return$remove_${library}_UintSet_uint256`, - }, - ); + length: `$length_EnumerableSet_UintSet(uint256)`, + at: `$at_EnumerableSet_UintSet(uint256,uint256)`, + values: `$values_EnumerableSet_UintSet(uint256)`, + }); + + return { mock, valueA, valueB, valueC, methods }; + }; + + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); + + shouldBehaveLikeSet({ + addReturn: `return$add_EnumerableSet_UintSet_uint256`, + removeReturn: `return$remove_EnumerableSet_UintSet_uint256`, + }); }); }); From e5fb718d4071b4be5e8dc980a3733616605c570a Mon Sep 17 00:00:00 2001 From: carter-ya Date: Thu, 23 Nov 2023 23:31:14 +0800 Subject: [PATCH 119/167] Optimized gas costs in `ceilDiv` (#4553) --- .changeset/angry-dodos-grow.md | 5 +++++ contracts/utils/math/Math.sol | 10 ++++++++-- test/utils/math/Math.t.sol | 9 +++++---- 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 .changeset/angry-dodos-grow.md diff --git a/.changeset/angry-dodos-grow.md b/.changeset/angry-dodos-grow.md new file mode 100644 index 000000000..ab2b60104 --- /dev/null +++ b/.changeset/angry-dodos-grow.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': minor +--- + +`Math`: Optimized gas cost of `ceilDiv` by using `unchecked`. diff --git a/contracts/utils/math/Math.sol b/contracts/utils/math/Math.sol index 968152452..86316cb29 100644 --- a/contracts/utils/math/Math.sol +++ b/contracts/utils/math/Math.sol @@ -110,8 +110,14 @@ library Math { return a / b; } - // (a + b - 1) / b can overflow on addition, so we distribute. - return a == 0 ? 0 : (a - 1) / b + 1; + // The following calculation ensures accurate ceiling division without overflow. + // Since a is non-zero, (a - 1) / b will not overflow. + // The largest possible result occurs when (a - 1) / b is type(uint256).max, + // but the largest value we can obtain is type(uint256).max - 1, which happens + // when a = type(uint256).max and b = 1. + unchecked { + return a == 0 ? 0 : (a - 1) / b + 1; + } } /** diff --git a/test/utils/math/Math.t.sol b/test/utils/math/Math.t.sol index 0b497a858..a75783379 100644 --- a/test/utils/math/Math.t.sol +++ b/test/utils/math/Math.t.sol @@ -16,10 +16,11 @@ contract MathTest is Test { if (result == 0) { assertEq(a, 0); } else { - uint256 maxdiv = UINT256_MAX / b; - bool overflow = maxdiv * b < a; - assertTrue(a > b * (result - 1)); - assertTrue(overflow ? result == maxdiv + 1 : a <= b * result); + uint256 expect = a / b; + if (expect * b < a) { + expect += 1; + } + assertEq(result, expect); } } From 330c39b66218de5fa4f0f62d4824ae3c710bb40f Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Thu, 23 Nov 2023 20:45:45 +0000 Subject: [PATCH 120/167] Implement revert tests for VestingWallet (#4733) Co-authored-by: ernestognw Co-authored-by: Hadrien Croubois --- test/finance/VestingWallet.behavior.js | 10 ++++ test/finance/VestingWallet.test.js | 78 +++++++++++++++++--------- 2 files changed, 60 insertions(+), 28 deletions(-) diff --git a/test/finance/VestingWallet.behavior.js b/test/finance/VestingWallet.behavior.js index c1e0f8013..d4863bc52 100644 --- a/test/finance/VestingWallet.behavior.js +++ b/test/finance/VestingWallet.behavior.js @@ -34,6 +34,16 @@ function shouldBehaveLikeVesting() { released = vested; } }); + + it('should revert on transaction failure', async function () { + const { args, error } = await this.setupFailure(); + + for (const timestamp of this.schedule) { + await time.forward.timestamp(timestamp); + + await expect(this.mock.release(...args)).to.be.revertedWithCustomError(...error); + } + }); } module.exports = { diff --git a/test/finance/VestingWallet.test.js b/test/finance/VestingWallet.test.js index e3739dd90..fa60faea7 100644 --- a/test/finance/VestingWallet.test.js +++ b/test/finance/VestingWallet.test.js @@ -13,7 +13,54 @@ async function fixture() { const [sender, beneficiary] = await ethers.getSigners(); const mock = await ethers.deployContract('VestingWallet', [beneficiary, start, duration]); - return { mock, amount, duration, start, sender, beneficiary }; + + const token = await ethers.deployContract('$ERC20', ['Name', 'Symbol']); + await token.$_mint(mock, amount); + await sender.sendTransaction({ to: mock, value: amount }); + + const pausableToken = await ethers.deployContract('$ERC20Pausable', ['Name', 'Symbol']); + const beneficiaryMock = await ethers.deployContract('EtherReceiverMock'); + + const env = { + eth: { + checkRelease: async (tx, amount) => { + await expect(tx).to.emit(mock, 'EtherReleased').withArgs(amount); + await expect(tx).to.changeEtherBalances([mock, beneficiary], [-amount, amount]); + }, + setupFailure: async () => { + await beneficiaryMock.setAcceptEther(false); + await mock.connect(beneficiary).transferOwnership(beneficiaryMock); + return { args: [], error: [mock, 'FailedInnerCall'] }; + }, + releasedEvent: 'EtherReleased', + argsVerify: [], + args: [], + }, + token: { + checkRelease: async (tx, amount) => { + await expect(tx).to.emit(token, 'Transfer').withArgs(mock.target, beneficiary.address, amount); + await expect(tx).to.changeTokenBalances(token, [mock, beneficiary], [-amount, amount]); + }, + setupFailure: async () => { + await pausableToken.$_pause(); + return { + args: [ethers.Typed.address(pausableToken)], + error: [pausableToken, 'EnforcedPause'], + }; + }, + releasedEvent: 'ERC20Released', + argsVerify: [token.target], + args: [ethers.Typed.address(token.target)], + }, + }; + + const schedule = Array(64) + .fill() + .map((_, i) => (BigInt(i) * duration) / 60n + start); + + const vestingFn = timestamp => min(amount, (amount * (timestamp - start)) / duration); + + return { mock, duration, start, beneficiary, schedule, vestingFn, env }; } describe('VestingWallet', function () { @@ -35,23 +82,9 @@ describe('VestingWallet', function () { }); describe('vesting schedule', function () { - beforeEach(function () { - this.schedule = Array(64) - .fill() - .map((_, i) => (BigInt(i) * this.duration) / 60n + this.start); - this.vestingFn = timestamp => min(this.amount, (this.amount * (timestamp - this.start)) / this.duration); - }); - describe('Eth vesting', function () { beforeEach(async function () { - await this.sender.sendTransaction({ to: this.mock, value: this.amount }); - - this.getBalance = signer => ethers.provider.getBalance(signer); - this.checkRelease = (tx, amount) => expect(tx).to.changeEtherBalances([this.beneficiary], [amount]); - - this.releasedEvent = 'EtherReleased'; - this.args = []; - this.argsVerify = []; + Object.assign(this, this.env.eth); }); shouldBehaveLikeVesting(); @@ -59,18 +92,7 @@ describe('VestingWallet', function () { describe('ERC20 vesting', function () { beforeEach(async function () { - this.token = await ethers.deployContract('$ERC20', ['Name', 'Symbol']); - await this.token.$_mint(this.mock, this.amount); - - this.getBalance = account => this.token.balanceOf(account); - this.checkRelease = async (tx, amount) => { - await expect(tx).to.emit(this.token, 'Transfer').withArgs(this.mock.target, this.beneficiary.address, amount); - await expect(tx).to.changeTokenBalances(this.token, [this.mock, this.beneficiary], [-amount, amount]); - }; - - this.releasedEvent = 'ERC20Released'; - this.args = [ethers.Typed.address(this.token.target)]; - this.argsVerify = [this.token.target]; + Object.assign(this, this.env.token); }); shouldBehaveLikeVesting(); From 78d5708340b5ad1aed18c1e97e6d089b7c6f07fd Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Fri, 24 Nov 2023 01:32:30 +0000 Subject: [PATCH 121/167] Migrate utils to ethersjs v6 (#4736) Co-authored-by: Hadrien Croubois Co-authored-by: ernestognw --- ...{MulticallTest.sol => MulticallHelper.sol} | 2 +- contracts/mocks/StorageSlotMock.sol | 24 +- test/helpers/random.js | 1 + test/utils/Arrays.test.js | 211 ++++++++------- test/utils/Base64.test.js | 42 ++- test/utils/Create2.test.js | 122 +++++---- test/utils/Multicall.test.js | 95 +++---- test/utils/Nonces.test.js | 70 ++--- test/utils/Pausable.test.js | 68 ++--- test/utils/ReentrancyGuard.test.js | 37 +-- test/utils/ShortStrings.test.js | 63 +++-- test/utils/StorageSlot.test.js | 242 ++++-------------- test/utils/Strings.test.js | 112 ++++---- 13 files changed, 492 insertions(+), 597 deletions(-) rename contracts/mocks/{MulticallTest.sol => MulticallHelper.sol} (96%) diff --git a/contracts/mocks/MulticallTest.sol b/contracts/mocks/MulticallHelper.sol similarity index 96% rename from contracts/mocks/MulticallTest.sol rename to contracts/mocks/MulticallHelper.sol index 74be7d8b4..d70f3bf4e 100644 --- a/contracts/mocks/MulticallTest.sol +++ b/contracts/mocks/MulticallHelper.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; import {ERC20MulticallMock} from "./token/ERC20MulticallMock.sol"; -contract MulticallTest { +contract MulticallHelper { function checkReturnValues( ERC20MulticallMock multicallToken, address[] calldata recipients, diff --git a/contracts/mocks/StorageSlotMock.sol b/contracts/mocks/StorageSlotMock.sol index dbdad7a2a..36f0f5af0 100644 --- a/contracts/mocks/StorageSlotMock.sol +++ b/contracts/mocks/StorageSlotMock.sol @@ -7,41 +7,41 @@ import {StorageSlot} from "../utils/StorageSlot.sol"; contract StorageSlotMock { using StorageSlot for *; - function setBoolean(bytes32 slot, bool value) public { + function setBooleanSlot(bytes32 slot, bool value) public { slot.getBooleanSlot().value = value; } - function setAddress(bytes32 slot, address value) public { + function setAddressSlot(bytes32 slot, address value) public { slot.getAddressSlot().value = value; } - function setBytes32(bytes32 slot, bytes32 value) public { + function setBytes32Slot(bytes32 slot, bytes32 value) public { slot.getBytes32Slot().value = value; } - function setUint256(bytes32 slot, uint256 value) public { + function setUint256Slot(bytes32 slot, uint256 value) public { slot.getUint256Slot().value = value; } - function getBoolean(bytes32 slot) public view returns (bool) { + function getBooleanSlot(bytes32 slot) public view returns (bool) { return slot.getBooleanSlot().value; } - function getAddress(bytes32 slot) public view returns (address) { + function getAddressSlot(bytes32 slot) public view returns (address) { return slot.getAddressSlot().value; } - function getBytes32(bytes32 slot) public view returns (bytes32) { + function getBytes32Slot(bytes32 slot) public view returns (bytes32) { return slot.getBytes32Slot().value; } - function getUint256(bytes32 slot) public view returns (uint256) { + function getUint256Slot(bytes32 slot) public view returns (uint256) { return slot.getUint256Slot().value; } mapping(uint256 key => string) public stringMap; - function setString(bytes32 slot, string calldata value) public { + function setStringSlot(bytes32 slot, string calldata value) public { slot.getStringSlot().value = value; } @@ -49,7 +49,7 @@ contract StorageSlotMock { stringMap[key].getStringSlot().value = value; } - function getString(bytes32 slot) public view returns (string memory) { + function getStringSlot(bytes32 slot) public view returns (string memory) { return slot.getStringSlot().value; } @@ -59,7 +59,7 @@ contract StorageSlotMock { mapping(uint256 key => bytes) public bytesMap; - function setBytes(bytes32 slot, bytes calldata value) public { + function setBytesSlot(bytes32 slot, bytes calldata value) public { slot.getBytesSlot().value = value; } @@ -67,7 +67,7 @@ contract StorageSlotMock { bytesMap[key].getBytesSlot().value = value; } - function getBytes(bytes32 slot) public view returns (bytes memory) { + function getBytesSlot(bytes32 slot) public view returns (bytes memory) { return slot.getBytesSlot().value; } diff --git a/test/helpers/random.js b/test/helpers/random.js index 883667fa0..c1d02f261 100644 --- a/test/helpers/random.js +++ b/test/helpers/random.js @@ -6,6 +6,7 @@ const generators = { address: () => ethers.Wallet.createRandom().address, bytes32: () => ethers.hexlify(ethers.randomBytes(32)), uint256: () => ethers.toBigInt(ethers.randomBytes(32)), + hexBytes: length => ethers.hexlify(ethers.randomBytes(length)), }; module.exports = { diff --git a/test/utils/Arrays.test.js b/test/utils/Arrays.test.js index d939d59bd..375b9422f 100644 --- a/test/utils/Arrays.test.js +++ b/test/utils/Arrays.test.js @@ -1,121 +1,120 @@ -require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const AddressArraysMock = artifacts.require('AddressArraysMock'); -const Bytes32ArraysMock = artifacts.require('Bytes32ArraysMock'); -const Uint256ArraysMock = artifacts.require('Uint256ArraysMock'); - -contract('Arrays', function () { - describe('findUpperBound', function () { - context('Even number of elements', function () { - const EVEN_ELEMENTS_ARRAY = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]; - - beforeEach(async function () { - this.arrays = await Uint256ArraysMock.new(EVEN_ELEMENTS_ARRAY); - }); - - it('returns correct index for the basic case', async function () { - expect(await this.arrays.findUpperBound(16)).to.be.bignumber.equal('5'); - }); - - it('returns 0 for the first element', async function () { - expect(await this.arrays.findUpperBound(11)).to.be.bignumber.equal('0'); - }); - - it('returns index of the last element', async function () { - expect(await this.arrays.findUpperBound(20)).to.be.bignumber.equal('9'); - }); - - it('returns first index after last element if searched value is over the upper boundary', async function () { - expect(await this.arrays.findUpperBound(32)).to.be.bignumber.equal('10'); - }); - - it('returns 0 for the element under the lower boundary', async function () { - expect(await this.arrays.findUpperBound(2)).to.be.bignumber.equal('0'); - }); - }); - - context('Odd number of elements', function () { - const ODD_ELEMENTS_ARRAY = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]; - - beforeEach(async function () { - this.arrays = await Uint256ArraysMock.new(ODD_ELEMENTS_ARRAY); - }); - - it('returns correct index for the basic case', async function () { - expect(await this.arrays.findUpperBound(16)).to.be.bignumber.equal('5'); - }); - - it('returns 0 for the first element', async function () { - expect(await this.arrays.findUpperBound(11)).to.be.bignumber.equal('0'); - }); - - it('returns index of the last element', async function () { - expect(await this.arrays.findUpperBound(21)).to.be.bignumber.equal('10'); - }); - - it('returns first index after last element if searched value is over the upper boundary', async function () { - expect(await this.arrays.findUpperBound(32)).to.be.bignumber.equal('11'); - }); +const { randomArray, generators } = require('../helpers/random'); - it('returns 0 for the element under the lower boundary', async function () { - expect(await this.arrays.findUpperBound(2)).to.be.bignumber.equal('0'); - }); - }); +// See https://en.cppreference.com/w/cpp/algorithm/ranges/lower_bound +const lowerBound = (array, value) => { + const i = array.findIndex(element => value <= element); + return i == -1 ? array.length : i; +}; - context('Array with gap', function () { - const WITH_GAP_ARRAY = [11, 12, 13, 14, 15, 20, 21, 22, 23, 24]; +// See https://en.cppreference.com/w/cpp/algorithm/upper_bound +// const upperBound = (array, value) => { +// const i = array.findIndex(element => value < element); +// return i == -1 ? array.length : i; +// }; - beforeEach(async function () { - this.arrays = await Uint256ArraysMock.new(WITH_GAP_ARRAY); - }); +const hasDuplicates = array => array.some((v, i) => array.indexOf(v) != i); - it('returns index of first element in next filled range', async function () { - expect(await this.arrays.findUpperBound(17)).to.be.bignumber.equal('5'); - }); - }); - - context('Empty array', function () { - beforeEach(async function () { - this.arrays = await Uint256ArraysMock.new([]); - }); - - it('always returns 0 for empty array', async function () { - expect(await this.arrays.findUpperBound(10)).to.be.bignumber.equal('0'); +describe('Arrays', function () { + describe('findUpperBound', function () { + for (const [title, { array, tests }] of Object.entries({ + 'Even number of elements': { + array: [11n, 12n, 13n, 14n, 15n, 16n, 17n, 18n, 19n, 20n], + tests: { + 'basic case': 16n, + 'first element': 11n, + 'last element': 20n, + 'searched value is over the upper boundary': 32n, + 'searched value is under the lower boundary': 2n, + }, + }, + 'Odd number of elements': { + array: [11n, 12n, 13n, 14n, 15n, 16n, 17n, 18n, 19n, 20n, 21n], + tests: { + 'basic case': 16n, + 'first element': 11n, + 'last element': 21n, + 'searched value is over the upper boundary': 32n, + 'searched value is under the lower boundary': 2n, + }, + }, + 'Array with gap': { + array: [11n, 12n, 13n, 14n, 15n, 20n, 21n, 22n, 23n, 24n], + tests: { + 'search value in gap': 17n, + }, + }, + 'Array with duplicated elements': { + array: [0n, 10n, 10n, 10n, 10n, 10n, 10n, 10n, 20n], + tests: { + 'search value is duplicated': 10n, + }, + }, + 'Array with duplicated first element': { + array: [10n, 10n, 10n, 10n, 10n, 10n, 10n, 20n], + tests: { + 'search value is duplicated first element': 10n, + }, + }, + 'Array with duplicated last element': { + array: [0n, 10n, 10n, 10n, 10n, 10n, 10n, 10n], + tests: { + 'search value is duplicated last element': 10n, + }, + }, + 'Empty array': { + array: [], + tests: { + 'always returns 0 for empty array': 10n, + }, + }, + })) { + describe(title, function () { + const fixture = async () => { + return { mock: await ethers.deployContract('Uint256ArraysMock', [array]) }; + }; + + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); + + for (const [name, input] of Object.entries(tests)) { + it(name, async function () { + // findUpperBound does not support duplicated + if (hasDuplicates(array)) this.skip(); + expect(await this.mock.findUpperBound(input)).to.be.equal(lowerBound(array, input)); + }); + } }); - }); + } }); describe('unsafeAccess', function () { - for (const { type, artifact, elements } of [ - { - type: 'address', - artifact: AddressArraysMock, - elements: Array(10) - .fill() - .map(() => web3.utils.randomHex(20)), - }, - { - type: 'bytes32', - artifact: Bytes32ArraysMock, - elements: Array(10) - .fill() - .map(() => web3.utils.randomHex(32)), - }, - { - type: 'uint256', - artifact: Uint256ArraysMock, - elements: Array(10) - .fill() - .map(() => web3.utils.randomHex(32)), - }, - ]) { - it(type, async function () { - const contract = await artifact.new(elements); + const contractCases = { + address: { artifact: 'AddressArraysMock', elements: randomArray(generators.address, 10) }, + bytes32: { artifact: 'Bytes32ArraysMock', elements: randomArray(generators.bytes32, 10) }, + uint256: { artifact: 'Uint256ArraysMock', elements: randomArray(generators.uint256, 10) }, + }; + + const fixture = async () => { + const contracts = {}; + for (const [name, { artifact, elements }] of Object.entries(contractCases)) { + contracts[name] = await ethers.deployContract(artifact, [elements]); + } + return { contracts }; + }; + + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); + for (const [name, { elements }] of Object.entries(contractCases)) { + it(name, async function () { for (const i in elements) { - expect(await contract.unsafeAccess(i)).to.be.bignumber.equal(elements[i]); + expect(await this.contracts[name].unsafeAccess(i)).to.be.equal(elements[i]); } }); } diff --git a/test/utils/Base64.test.js b/test/utils/Base64.test.js index dfff0b0d0..4707db0c3 100644 --- a/test/utils/Base64.test.js +++ b/test/utils/Base64.test.js @@ -1,33 +1,29 @@ +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const Base64 = artifacts.require('$Base64'); +async function fixture() { + const mock = await ethers.deployContract('$Base64'); + return { mock }; +} -contract('Strings', function () { +describe('Strings', function () { beforeEach(async function () { - this.base64 = await Base64.new(); + Object.assign(this, await loadFixture(fixture)); }); describe('from bytes - base64', function () { - it('converts to base64 encoded string with double padding', async function () { - const TEST_MESSAGE = 'test'; - const input = web3.utils.asciiToHex(TEST_MESSAGE); - expect(await this.base64.$encode(input)).to.equal('dGVzdA=='); - }); + for (const { title, input, expected } of [ + { title: 'converts to base64 encoded string with double padding', input: 'test', expected: 'dGVzdA==' }, + { title: 'converts to base64 encoded string with single padding', input: 'test1', expected: 'dGVzdDE=' }, + { title: 'converts to base64 encoded string without padding', input: 'test12', expected: 'dGVzdDEy' }, + { title: 'empty bytes', input: '0x', expected: '' }, + ]) + it(title, async function () { + const raw = ethers.isBytesLike(input) ? input : ethers.toUtf8Bytes(input); - it('converts to base64 encoded string with single padding', async function () { - const TEST_MESSAGE = 'test1'; - const input = web3.utils.asciiToHex(TEST_MESSAGE); - expect(await this.base64.$encode(input)).to.equal('dGVzdDE='); - }); - - it('converts to base64 encoded string without padding', async function () { - const TEST_MESSAGE = 'test12'; - const input = web3.utils.asciiToHex(TEST_MESSAGE); - expect(await this.base64.$encode(input)).to.equal('dGVzdDEy'); - }); - - it('empty bytes', async function () { - expect(await this.base64.$encode([])).to.equal(''); - }); + expect(await this.mock.$encode(raw)).to.equal(ethers.encodeBase64(raw)); + expect(await this.mock.$encode(raw)).to.equal(expected); + }); }); }); diff --git a/test/utils/Create2.test.js b/test/utils/Create2.test.js index a4ad99237..df807e757 100644 --- a/test/utils/Create2.test.js +++ b/test/utils/Create2.test.js @@ -1,35 +1,42 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { balance, ether, expectEvent, expectRevert, send } = require('@openzeppelin/test-helpers'); -const { expectRevertCustomError } = require('../helpers/customError'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const Create2 = artifacts.require('$Create2'); -const VestingWallet = artifacts.require('VestingWallet'); -// This should be a contract that: -// - has no constructor arguments -// - has no immutable variable populated during construction -const ConstructorLessContract = Create2; +async function fixture() { + const [deployer, other] = await ethers.getSigners(); -contract('Create2', function (accounts) { - const [deployerAccount, other] = accounts; + const factory = await ethers.deployContract('$Create2'); - const salt = 'salt message'; - const saltHex = web3.utils.soliditySha3(salt); + // Bytecode for deploying a contract that includes a constructor. + // We use a vesting wallet, with 3 constructor arguments. + const constructorByteCode = await ethers + .getContractFactory('VestingWallet') + .then(({ bytecode, interface }) => ethers.concat([bytecode, interface.encodeDeploy([other.address, 0n, 0n])])); + + // Bytecode for deploying a contract that has no constructor log. + // Here we use the Create2 helper factory. + const constructorLessBytecode = await ethers + .getContractFactory('$Create2') + .then(({ bytecode, interface }) => ethers.concat([bytecode, interface.encodeDeploy([])])); - const encodedParams = web3.eth.abi.encodeParameters(['address', 'uint64', 'uint64'], [other, 0, 0]).slice(2); + return { deployer, other, factory, constructorByteCode, constructorLessBytecode }; +} - const constructorByteCode = `${VestingWallet.bytecode}${encodedParams}`; +describe('Create2', function () { + const salt = 'salt message'; + const saltHex = ethers.id(salt); beforeEach(async function () { - this.factory = await Create2.new(); + Object.assign(this, await loadFixture(fixture)); }); + describe('computeAddress', function () { it('computes the correct contract address', async function () { - const onChainComputed = await this.factory.$computeAddress(saltHex, web3.utils.keccak256(constructorByteCode)); + const onChainComputed = await this.factory.$computeAddress(saltHex, ethers.keccak256(this.constructorByteCode)); const offChainComputed = ethers.getCreate2Address( - this.factory.address, + this.factory.target, saltHex, - ethers.keccak256(constructorByteCode), + ethers.keccak256(this.constructorByteCode), ); expect(onChainComputed).to.equal(offChainComputed); }); @@ -37,13 +44,13 @@ contract('Create2', function (accounts) { it('computes the correct contract address with deployer', async function () { const onChainComputed = await this.factory.$computeAddress( saltHex, - web3.utils.keccak256(constructorByteCode), - deployerAccount, + ethers.keccak256(this.constructorByteCode), + ethers.Typed.address(this.deployer), ); const offChainComputed = ethers.getCreate2Address( - deployerAccount, + this.deployer.address, saltHex, - ethers.keccak256(constructorByteCode), + ethers.keccak256(this.constructorByteCode), ); expect(onChainComputed).to.equal(offChainComputed); }); @@ -52,71 +59,76 @@ contract('Create2', function (accounts) { describe('deploy', function () { it('deploys a contract without constructor', async function () { const offChainComputed = ethers.getCreate2Address( - this.factory.address, + this.factory.target, saltHex, - ethers.keccak256(ConstructorLessContract.bytecode), + ethers.keccak256(this.constructorLessBytecode), ); - expectEvent(await this.factory.$deploy(0, saltHex, ConstructorLessContract.bytecode), 'return$deploy', { - addr: offChainComputed, - }); + await expect(this.factory.$deploy(0n, saltHex, this.constructorLessBytecode)) + .to.emit(this.factory, 'return$deploy') + .withArgs(offChainComputed); - expect(ConstructorLessContract.bytecode).to.include((await web3.eth.getCode(offChainComputed)).slice(2)); + expect(this.constructorLessBytecode).to.include((await web3.eth.getCode(offChainComputed)).slice(2)); }); it('deploys a contract with constructor arguments', async function () { const offChainComputed = ethers.getCreate2Address( - this.factory.address, + this.factory.target, saltHex, - ethers.keccak256(constructorByteCode), + ethers.keccak256(this.constructorByteCode), ); - expectEvent(await this.factory.$deploy(0, saltHex, constructorByteCode), 'return$deploy', { - addr: offChainComputed, - }); + await expect(this.factory.$deploy(0n, saltHex, this.constructorByteCode)) + .to.emit(this.factory, 'return$deploy') + .withArgs(offChainComputed); - const instance = await VestingWallet.at(offChainComputed); + const instance = await ethers.getContractAt('VestingWallet', offChainComputed); - expect(await instance.owner()).to.be.equal(other); + expect(await instance.owner()).to.equal(this.other.address); }); it('deploys a contract with funds deposited in the factory', async function () { - const deposit = ether('2'); - await send.ether(deployerAccount, this.factory.address, deposit); - expect(await balance.current(this.factory.address)).to.be.bignumber.equal(deposit); + const value = 10n; + + await this.deployer.sendTransaction({ to: this.factory, value }); const offChainComputed = ethers.getCreate2Address( - this.factory.address, + this.factory.target, saltHex, - ethers.keccak256(constructorByteCode), + ethers.keccak256(this.constructorByteCode), ); - expectEvent(await this.factory.$deploy(deposit, saltHex, constructorByteCode), 'return$deploy', { - addr: offChainComputed, - }); + expect(await ethers.provider.getBalance(this.factory)).to.equal(value); + expect(await ethers.provider.getBalance(offChainComputed)).to.equal(0n); - expect(await balance.current(offChainComputed)).to.be.bignumber.equal(deposit); + await expect(this.factory.$deploy(value, saltHex, this.constructorByteCode)) + .to.emit(this.factory, 'return$deploy') + .withArgs(offChainComputed); + + expect(await ethers.provider.getBalance(this.factory)).to.equal(0n); + expect(await ethers.provider.getBalance(offChainComputed)).to.equal(value); }); it('fails deploying a contract in an existent address', async function () { - expectEvent(await this.factory.$deploy(0, saltHex, constructorByteCode), 'return$deploy'); + await expect(this.factory.$deploy(0n, saltHex, this.constructorByteCode)).to.emit(this.factory, 'return$deploy'); - // TODO: Make sure it actually throws "Create2FailedDeployment". - // For some unknown reason, the revert reason sometimes return: - // `revert with unrecognized return data or custom error` - await expectRevert.unspecified(this.factory.$deploy(0, saltHex, constructorByteCode)); + await expect(this.factory.$deploy(0n, saltHex, this.constructorByteCode)).to.be.revertedWithCustomError( + this.factory, + 'Create2FailedDeployment', + ); }); it('fails deploying a contract if the bytecode length is zero', async function () { - await expectRevertCustomError(this.factory.$deploy(0, saltHex, '0x'), 'Create2EmptyBytecode', []); + await expect(this.factory.$deploy(0n, saltHex, '0x')).to.be.revertedWithCustomError( + this.factory, + 'Create2EmptyBytecode', + ); }); it('fails deploying a contract if factory contract does not have sufficient balance', async function () { - await expectRevertCustomError( - this.factory.$deploy(1, saltHex, constructorByteCode), - 'Create2InsufficientBalance', - [0, 1], - ); + await expect(this.factory.$deploy(1n, saltHex, this.constructorByteCode)) + .to.be.revertedWithCustomError(this.factory, 'Create2InsufficientBalance') + .withArgs(0n, 1n); }); }); }); diff --git a/test/utils/Multicall.test.js b/test/utils/Multicall.test.js index 65443cd0a..7ec7e20ce 100644 --- a/test/utils/Multicall.test.js +++ b/test/utils/Multicall.test.js @@ -1,69 +1,72 @@ -const { BN } = require('@openzeppelin/test-helpers'); -const { expectRevertCustomError } = require('../helpers/customError'); +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const ERC20MulticallMock = artifacts.require('$ERC20MulticallMock'); +async function fixture() { + const [holder, alice, bruce] = await ethers.getSigners(); -contract('Multicall', function (accounts) { - const [deployer, alice, bob] = accounts; - const amount = 12000; + const amount = 12_000n; + const helper = await ethers.deployContract('MulticallHelper'); + const mock = await ethers.deployContract('$ERC20MulticallMock', ['name', 'symbol']); + await mock.$_mint(holder, amount); + return { holder, alice, bruce, amount, mock, helper }; +} + +describe('Multicall', function () { beforeEach(async function () { - this.multicallToken = await ERC20MulticallMock.new('name', 'symbol'); - await this.multicallToken.$_mint(deployer, amount); + Object.assign(this, await loadFixture(fixture)); }); it('batches function calls', async function () { - expect(await this.multicallToken.balanceOf(alice)).to.be.bignumber.equal(new BN('0')); - expect(await this.multicallToken.balanceOf(bob)).to.be.bignumber.equal(new BN('0')); + expect(await this.mock.balanceOf(this.alice)).to.equal(0n); + expect(await this.mock.balanceOf(this.bruce)).to.equal(0n); - await this.multicallToken.multicall( - [ - this.multicallToken.contract.methods.transfer(alice, amount / 2).encodeABI(), - this.multicallToken.contract.methods.transfer(bob, amount / 3).encodeABI(), - ], - { from: deployer }, - ); + await expect( + this.mock.multicall([ + this.mock.interface.encodeFunctionData('transfer', [this.alice.address, this.amount / 2n]), + this.mock.interface.encodeFunctionData('transfer', [this.bruce.address, this.amount / 3n]), + ]), + ) + .to.emit(this.mock, 'Transfer') + .withArgs(this.holder.address, this.alice.address, this.amount / 2n) + .to.emit(this.mock, 'Transfer') + .withArgs(this.holder.address, this.bruce.address, this.amount / 3n); - expect(await this.multicallToken.balanceOf(alice)).to.be.bignumber.equal(new BN(amount / 2)); - expect(await this.multicallToken.balanceOf(bob)).to.be.bignumber.equal(new BN(amount / 3)); + expect(await this.mock.balanceOf(this.alice)).to.equal(this.amount / 2n); + expect(await this.mock.balanceOf(this.bruce)).to.equal(this.amount / 3n); }); it('returns an array with the result of each call', async function () { - const MulticallTest = artifacts.require('MulticallTest'); - const multicallTest = await MulticallTest.new({ from: deployer }); - await this.multicallToken.transfer(multicallTest.address, amount, { from: deployer }); - expect(await this.multicallToken.balanceOf(multicallTest.address)).to.be.bignumber.equal(new BN(amount)); - - const recipients = [alice, bob]; - const amounts = [amount / 2, amount / 3].map(n => new BN(n)); + await this.mock.transfer(this.helper, this.amount); + expect(await this.mock.balanceOf(this.helper)).to.equal(this.amount); - await multicallTest.checkReturnValues(this.multicallToken.address, recipients, amounts); + await this.helper.checkReturnValues(this.mock, [this.alice, this.bruce], [this.amount / 2n, this.amount / 3n]); }); it('reverts previous calls', async function () { - expect(await this.multicallToken.balanceOf(alice)).to.be.bignumber.equal(new BN('0')); + expect(await this.mock.balanceOf(this.alice)).to.equal(0n); - const call = this.multicallToken.multicall( - [ - this.multicallToken.contract.methods.transfer(alice, amount).encodeABI(), - this.multicallToken.contract.methods.transfer(bob, amount).encodeABI(), - ], - { from: deployer }, - ); + await expect( + this.mock.multicall([ + this.mock.interface.encodeFunctionData('transfer', [this.alice.address, this.amount]), + this.mock.interface.encodeFunctionData('transfer', [this.bruce.address, this.amount]), + ]), + ) + .to.be.revertedWithCustomError(this.mock, 'ERC20InsufficientBalance') + .withArgs(this.holder.address, 0, this.amount); - await expectRevertCustomError(call, 'ERC20InsufficientBalance', [deployer, 0, amount]); - expect(await this.multicallToken.balanceOf(alice)).to.be.bignumber.equal(new BN('0')); + expect(await this.mock.balanceOf(this.alice)).to.equal(0n); }); it('bubbles up revert reasons', async function () { - const call = this.multicallToken.multicall( - [ - this.multicallToken.contract.methods.transfer(alice, amount).encodeABI(), - this.multicallToken.contract.methods.transfer(bob, amount).encodeABI(), - ], - { from: deployer }, - ); - - await expectRevertCustomError(call, 'ERC20InsufficientBalance', [deployer, 0, amount]); + await expect( + this.mock.multicall([ + this.mock.interface.encodeFunctionData('transfer', [this.alice.address, this.amount]), + this.mock.interface.encodeFunctionData('transfer', [this.bruce.address, this.amount]), + ]), + ) + .to.be.revertedWithCustomError(this.mock, 'ERC20InsufficientBalance') + .withArgs(this.holder.address, 0, this.amount); }); }); diff --git a/test/utils/Nonces.test.js b/test/utils/Nonces.test.js index 67a3087e3..18d20defb 100644 --- a/test/utils/Nonces.test.js +++ b/test/utils/Nonces.test.js @@ -1,71 +1,75 @@ -const expectEvent = require('@openzeppelin/test-helpers/src/expectEvent'); -const { expectRevertCustomError } = require('../helpers/customError'); +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -require('@openzeppelin/test-helpers'); +async function fixture() { + const [sender, other] = await ethers.getSigners(); -const Nonces = artifacts.require('$Nonces'); + const mock = await ethers.deployContract('$Nonces'); -contract('Nonces', function (accounts) { - const [sender, other] = accounts; + return { sender, other, mock }; +} +describe('Nonces', function () { beforeEach(async function () { - this.nonces = await Nonces.new(); + Object.assign(this, await loadFixture(fixture)); }); it('gets a nonce', async function () { - expect(await this.nonces.nonces(sender)).to.be.bignumber.equal('0'); + expect(await this.mock.nonces(this.sender)).to.equal(0n); }); describe('_useNonce', function () { it('increments a nonce', async function () { - expect(await this.nonces.nonces(sender)).to.be.bignumber.equal('0'); + expect(await this.mock.nonces(this.sender)).to.equal(0n); - const { receipt } = await this.nonces.$_useNonce(sender); - expectEvent(receipt, 'return$_useNonce', ['0']); + await expect(await this.mock.$_useNonce(this.sender)) + .to.emit(this.mock, 'return$_useNonce') + .withArgs(0n); - expect(await this.nonces.nonces(sender)).to.be.bignumber.equal('1'); + expect(await this.mock.nonces(this.sender)).to.equal(1n); }); it("increments only sender's nonce", async function () { - expect(await this.nonces.nonces(sender)).to.be.bignumber.equal('0'); - expect(await this.nonces.nonces(other)).to.be.bignumber.equal('0'); + expect(await this.mock.nonces(this.sender)).to.equal(0n); + expect(await this.mock.nonces(this.other)).to.equal(0n); - await this.nonces.$_useNonce(sender); + await this.mock.$_useNonce(this.sender); - expect(await this.nonces.nonces(sender)).to.be.bignumber.equal('1'); - expect(await this.nonces.nonces(other)).to.be.bignumber.equal('0'); + expect(await this.mock.nonces(this.sender)).to.equal(1n); + expect(await this.mock.nonces(this.other)).to.equal(0n); }); }); describe('_useCheckedNonce', function () { it('increments a nonce', async function () { - const currentNonce = await this.nonces.nonces(sender); - expect(currentNonce).to.be.bignumber.equal('0'); + const currentNonce = await this.mock.nonces(this.sender); - await this.nonces.$_useCheckedNonce(sender, currentNonce); + expect(currentNonce).to.equal(0n); - expect(await this.nonces.nonces(sender)).to.be.bignumber.equal('1'); + await this.mock.$_useCheckedNonce(this.sender, currentNonce); + + expect(await this.mock.nonces(this.sender)).to.equal(1n); }); it("increments only sender's nonce", async function () { - const currentNonce = await this.nonces.nonces(sender); + const currentNonce = await this.mock.nonces(this.sender); - expect(currentNonce).to.be.bignumber.equal('0'); - expect(await this.nonces.nonces(other)).to.be.bignumber.equal('0'); + expect(currentNonce).to.equal(0n); + expect(await this.mock.nonces(this.other)).to.equal(0n); - await this.nonces.$_useCheckedNonce(sender, currentNonce); + await this.mock.$_useCheckedNonce(this.sender, currentNonce); - expect(await this.nonces.nonces(sender)).to.be.bignumber.equal('1'); - expect(await this.nonces.nonces(other)).to.be.bignumber.equal('0'); + expect(await this.mock.nonces(this.sender)).to.equal(1n); + expect(await this.mock.nonces(this.other)).to.equal(0n); }); it('reverts when nonce is not the expected', async function () { - const currentNonce = await this.nonces.nonces(sender); - await expectRevertCustomError( - this.nonces.$_useCheckedNonce(sender, currentNonce.addn(1)), - 'InvalidAccountNonce', - [sender, currentNonce], - ); + const currentNonce = await this.mock.nonces(this.sender); + + await expect(this.mock.$_useCheckedNonce(this.sender, currentNonce + 1n)) + .to.be.revertedWithCustomError(this.mock, 'InvalidAccountNonce') + .withArgs(this.sender.address, currentNonce); }); }); }); diff --git a/test/utils/Pausable.test.js b/test/utils/Pausable.test.js index e60a62c74..de46bc46b 100644 --- a/test/utils/Pausable.test.js +++ b/test/utils/Pausable.test.js @@ -1,83 +1,87 @@ -const { expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { expectRevertCustomError } = require('../helpers/customError'); +async function fixture() { + const [pauser] = await ethers.getSigners(); -const PausableMock = artifacts.require('PausableMock'); + const mock = await ethers.deployContract('PausableMock'); -contract('Pausable', function (accounts) { - const [pauser] = accounts; + return { pauser, mock }; +} +describe('Pausable', function () { beforeEach(async function () { - this.pausable = await PausableMock.new(); + Object.assign(this, await loadFixture(fixture)); }); - context('when unpaused', function () { + describe('when unpaused', function () { beforeEach(async function () { - expect(await this.pausable.paused()).to.equal(false); + expect(await this.mock.paused()).to.be.false; }); it('can perform normal process in non-pause', async function () { - expect(await this.pausable.count()).to.be.bignumber.equal('0'); + expect(await this.mock.count()).to.equal(0n); - await this.pausable.normalProcess(); - expect(await this.pausable.count()).to.be.bignumber.equal('1'); + await this.mock.normalProcess(); + expect(await this.mock.count()).to.equal(1n); }); it('cannot take drastic measure in non-pause', async function () { - await expectRevertCustomError(this.pausable.drasticMeasure(), 'ExpectedPause', []); - expect(await this.pausable.drasticMeasureTaken()).to.equal(false); + await expect(this.mock.drasticMeasure()).to.be.revertedWithCustomError(this.mock, 'ExpectedPause'); + + expect(await this.mock.drasticMeasureTaken()).to.be.false; }); - context('when paused', function () { + describe('when paused', function () { beforeEach(async function () { - this.receipt = await this.pausable.pause({ from: pauser }); + this.tx = await this.mock.pause(); }); - it('emits a Paused event', function () { - expectEvent(this.receipt, 'Paused', { account: pauser }); + it('emits a Paused event', async function () { + await expect(this.tx).to.emit(this.mock, 'Paused').withArgs(this.pauser.address); }); it('cannot perform normal process in pause', async function () { - await expectRevertCustomError(this.pausable.normalProcess(), 'EnforcedPause', []); + await expect(this.mock.normalProcess()).to.be.revertedWithCustomError(this.mock, 'EnforcedPause'); }); it('can take a drastic measure in a pause', async function () { - await this.pausable.drasticMeasure(); - expect(await this.pausable.drasticMeasureTaken()).to.equal(true); + await this.mock.drasticMeasure(); + expect(await this.mock.drasticMeasureTaken()).to.be.true; }); it('reverts when re-pausing', async function () { - await expectRevertCustomError(this.pausable.pause(), 'EnforcedPause', []); + await expect(this.mock.pause()).to.be.revertedWithCustomError(this.mock, 'EnforcedPause'); }); describe('unpausing', function () { it('is unpausable by the pauser', async function () { - await this.pausable.unpause(); - expect(await this.pausable.paused()).to.equal(false); + await this.mock.unpause(); + expect(await this.mock.paused()).to.be.false; }); - context('when unpaused', function () { + describe('when unpaused', function () { beforeEach(async function () { - this.receipt = await this.pausable.unpause({ from: pauser }); + this.tx = await this.mock.unpause(); }); - it('emits an Unpaused event', function () { - expectEvent(this.receipt, 'Unpaused', { account: pauser }); + it('emits an Unpaused event', async function () { + await expect(this.tx).to.emit(this.mock, 'Unpaused').withArgs(this.pauser.address); }); it('should resume allowing normal process', async function () { - expect(await this.pausable.count()).to.be.bignumber.equal('0'); - await this.pausable.normalProcess(); - expect(await this.pausable.count()).to.be.bignumber.equal('1'); + expect(await this.mock.count()).to.equal(0n); + await this.mock.normalProcess(); + expect(await this.mock.count()).to.equal(1n); }); it('should prevent drastic measure', async function () { - await expectRevertCustomError(this.pausable.drasticMeasure(), 'ExpectedPause', []); + await expect(this.mock.drasticMeasure()).to.be.revertedWithCustomError(this.mock, 'ExpectedPause'); }); it('reverts when re-unpausing', async function () { - await expectRevertCustomError(this.pausable.unpause(), 'ExpectedPause', []); + await expect(this.mock.unpause()).to.be.revertedWithCustomError(this.mock, 'ExpectedPause'); }); }); }); diff --git a/test/utils/ReentrancyGuard.test.js b/test/utils/ReentrancyGuard.test.js index 15355c098..871967e2f 100644 --- a/test/utils/ReentrancyGuard.test.js +++ b/test/utils/ReentrancyGuard.test.js @@ -1,44 +1,47 @@ -const { expectRevert } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { expectRevertCustomError } = require('../helpers/customError'); +async function fixture() { + const mock = await ethers.deployContract('ReentrancyMock'); + return { mock }; +} -const ReentrancyMock = artifacts.require('ReentrancyMock'); -const ReentrancyAttack = artifacts.require('ReentrancyAttack'); - -contract('ReentrancyGuard', function () { +describe('ReentrancyGuard', function () { beforeEach(async function () { - this.reentrancyMock = await ReentrancyMock.new(); - expect(await this.reentrancyMock.counter()).to.be.bignumber.equal('0'); + Object.assign(this, await loadFixture(fixture)); }); it('nonReentrant function can be called', async function () { - expect(await this.reentrancyMock.counter()).to.be.bignumber.equal('0'); - await this.reentrancyMock.callback(); - expect(await this.reentrancyMock.counter()).to.be.bignumber.equal('1'); + expect(await this.mock.counter()).to.equal(0n); + await this.mock.callback(); + expect(await this.mock.counter()).to.equal(1n); }); it('does not allow remote callback', async function () { - const attacker = await ReentrancyAttack.new(); - await expectRevert(this.reentrancyMock.countAndCall(attacker.address), 'ReentrancyAttack: failed call', []); + const attacker = await ethers.deployContract('ReentrancyAttack'); + await expect(this.mock.countAndCall(attacker)).to.be.revertedWith('ReentrancyAttack: failed call'); }); it('_reentrancyGuardEntered should be true when guarded', async function () { - await this.reentrancyMock.guardedCheckEntered(); + await this.mock.guardedCheckEntered(); }); it('_reentrancyGuardEntered should be false when unguarded', async function () { - await this.reentrancyMock.unguardedCheckNotEntered(); + await this.mock.unguardedCheckNotEntered(); }); // The following are more side-effects than intended behavior: // I put them here as documentation, and to monitor any changes // in the side-effects. it('does not allow local recursion', async function () { - await expectRevertCustomError(this.reentrancyMock.countLocalRecursive(10), 'ReentrancyGuardReentrantCall', []); + await expect(this.mock.countLocalRecursive(10n)).to.be.revertedWithCustomError( + this.mock, + 'ReentrancyGuardReentrantCall', + ); }); it('does not allow indirect local recursion', async function () { - await expectRevert(this.reentrancyMock.countThisRecursive(10), 'ReentrancyMock: failed call', []); + await expect(this.mock.countThisRecursive(10n)).to.be.revertedWith('ReentrancyMock: failed call'); }); }); diff --git a/test/utils/ShortStrings.test.js b/test/utils/ShortStrings.test.js index 189281d38..cb1a06aa5 100644 --- a/test/utils/ShortStrings.test.js +++ b/test/utils/ShortStrings.test.js @@ -1,19 +1,27 @@ +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../helpers/customError'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const ShortStrings = artifacts.require('$ShortStrings'); +const FALLBACK_SENTINEL = ethers.zeroPadValue('0xFF', 32); -function length(sstr) { - return parseInt(sstr.slice(64), 16); -} +const length = sstr => parseInt(sstr.slice(64), 16); +const decode = sstr => ethers.toUtf8String(sstr).slice(0, length(sstr)); +const encode = str => + str.length < 32 + ? ethers.concat([ + ethers.encodeBytes32String(str).slice(0, -2), + ethers.zeroPadValue(ethers.toBeArray(str.length), 1), + ]) + : FALLBACK_SENTINEL; -function decode(sstr) { - return web3.utils.toUtf8(sstr).slice(0, length(sstr)); +async function fixture() { + const mock = await ethers.deployContract('$ShortStrings'); + return { mock }; } -contract('ShortStrings', function () { - before(async function () { - this.mock = await ShortStrings.new(); +describe('ShortStrings', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); for (const str of [0, 1, 16, 31, 32, 64, 1024].map(length => 'a'.repeat(length))) { @@ -21,34 +29,35 @@ contract('ShortStrings', function () { it('encode / decode', async function () { if (str.length < 32) { const encoded = await this.mock.$toShortString(str); - expect(decode(encoded)).to.be.equal(str); - - const length = await this.mock.$byteLength(encoded); - expect(length.toNumber()).to.be.equal(str.length); + expect(encoded).to.equal(encode(str)); + expect(decode(encoded)).to.equal(str); - const decoded = await this.mock.$toString(encoded); - expect(decoded).to.be.equal(str); + expect(await this.mock.$byteLength(encoded)).to.equal(str.length); + expect(await this.mock.$toString(encoded)).to.equal(str); } else { - await expectRevertCustomError(this.mock.$toShortString(str), 'StringTooLong', [str]); + await expect(this.mock.$toShortString(str)) + .to.be.revertedWithCustomError(this.mock, 'StringTooLong') + .withArgs(str); } }); it('set / get with fallback', async function () { - const { logs } = await this.mock.$toShortStringWithFallback(str, 0); - const { ret0 } = logs.find(({ event }) => event == 'return$toShortStringWithFallback').args; + const short = await this.mock + .$toShortStringWithFallback(str, 0) + .then(tx => tx.wait()) + .then(receipt => receipt.logs.find(ev => ev.fragment.name == 'return$toShortStringWithFallback').args[0]); - const promise = this.mock.$toString(ret0); + expect(short).to.equal(encode(str)); + + const promise = this.mock.$toString(short); if (str.length < 32) { - expect(await promise).to.be.equal(str); + expect(await promise).to.equal(str); } else { - await expectRevertCustomError(promise, 'InvalidShortString', []); + await expect(promise).to.be.revertedWithCustomError(this.mock, 'InvalidShortString'); } - const length = await this.mock.$byteLengthWithFallback(ret0, 0); - expect(length.toNumber()).to.be.equal(str.length); - - const recovered = await this.mock.$toStringWithFallback(ret0, 0); - expect(recovered).to.be.equal(str); + expect(await this.mock.$byteLengthWithFallback(short, 0)).to.equal(str.length); + expect(await this.mock.$toStringWithFallback(short, 0)).to.equal(str); }); }); } diff --git a/test/utils/StorageSlot.test.js b/test/utils/StorageSlot.test.js index 846512ed2..ab237b700 100644 --- a/test/utils/StorageSlot.test.js +++ b/test/utils/StorageSlot.test.js @@ -1,210 +1,74 @@ -const { constants, BN } = require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { generators } = require('../helpers/random'); -const StorageSlotMock = artifacts.require('StorageSlotMock'); +const slot = ethers.id('some.storage.slot'); +const otherSlot = ethers.id('some.other.storage.slot'); -const slot = web3.utils.keccak256('some.storage.slot'); -const otherSlot = web3.utils.keccak256('some.other.storage.slot'); +async function fixture() { + const [account] = await ethers.getSigners(); + const mock = await ethers.deployContract('StorageSlotMock'); + return { mock, account }; +} -contract('StorageSlot', function (accounts) { +describe('StorageSlot', function () { beforeEach(async function () { - this.store = await StorageSlotMock.new(); + Object.assign(this, await loadFixture(fixture)); }); - describe('boolean storage slot', function () { - beforeEach(async function () { - this.value = true; - }); - - it('set', async function () { - await this.store.setBoolean(slot, this.value); - }); - - describe('get', function () { - beforeEach(async function () { - await this.store.setBoolean(slot, this.value); + for (const { type, value, zero } of [ + { type: 'Boolean', value: true, zero: false }, + { type: 'Address', value: generators.address(), zero: ethers.ZeroAddress }, + { type: 'Bytes32', value: generators.bytes32(), zero: ethers.ZeroHash }, + { type: 'String', value: 'lorem ipsum', zero: '' }, + { type: 'Bytes', value: generators.hexBytes(128), zero: '0x' }, + ]) { + describe(`${type} storage slot`, function () { + it('set', async function () { + await this.mock.getFunction(`set${type}Slot`)(slot, value); }); - it('from right slot', async function () { - expect(await this.store.getBoolean(slot)).to.be.equal(this.value); - }); + describe('get', function () { + beforeEach(async function () { + await this.mock.getFunction(`set${type}Slot`)(slot, value); + }); - it('from other slot', async function () { - expect(await this.store.getBoolean(otherSlot)).to.be.equal(false); - }); - }); - }); - - describe('address storage slot', function () { - beforeEach(async function () { - this.value = accounts[1]; - }); + it('from right slot', async function () { + expect(await this.mock.getFunction(`get${type}Slot`)(slot)).to.equal(value); + }); - it('set', async function () { - await this.store.setAddress(slot, this.value); - }); - - describe('get', function () { - beforeEach(async function () { - await this.store.setAddress(slot, this.value); - }); - - it('from right slot', async function () { - expect(await this.store.getAddress(slot)).to.be.equal(this.value); - }); - - it('from other slot', async function () { - expect(await this.store.getAddress(otherSlot)).to.be.equal(constants.ZERO_ADDRESS); + it('from other slot', async function () { + expect(await this.mock.getFunction(`get${type}Slot`)(otherSlot)).to.equal(zero); + }); }); }); - }); - - describe('bytes32 storage slot', function () { - beforeEach(async function () { - this.value = web3.utils.keccak256('some byte32 value'); - }); - - it('set', async function () { - await this.store.setBytes32(slot, this.value); - }); - - describe('get', function () { - beforeEach(async function () { - await this.store.setBytes32(slot, this.value); - }); + } - it('from right slot', async function () { - expect(await this.store.getBytes32(slot)).to.be.equal(this.value); + for (const { type, value, zero } of [ + { type: 'String', value: 'lorem ipsum', zero: '' }, + { type: 'Bytes', value: generators.hexBytes(128), zero: '0x' }, + ]) { + describe(`${type} storage pointer`, function () { + it('set', async function () { + await this.mock.getFunction(`set${type}Storage`)(slot, value); }); - it('from other slot', async function () { - expect(await this.store.getBytes32(otherSlot)).to.be.equal(constants.ZERO_BYTES32); - }); - }); - }); + describe('get', function () { + beforeEach(async function () { + await this.mock.getFunction(`set${type}Storage`)(slot, value); + }); - describe('uint256 storage slot', function () { - beforeEach(async function () { - this.value = new BN(1742); - }); - - it('set', async function () { - await this.store.setUint256(slot, this.value); - }); - - describe('get', function () { - beforeEach(async function () { - await this.store.setUint256(slot, this.value); - }); + it('from right slot', async function () { + expect(await this.mock.getFunction(`${type.toLowerCase()}Map`)(slot)).to.equal(value); + expect(await this.mock.getFunction(`get${type}Storage`)(slot)).to.equal(value); + }); - it('from right slot', async function () { - expect(await this.store.getUint256(slot)).to.be.bignumber.equal(this.value); + it('from other slot', async function () { + expect(await this.mock.getFunction(`${type.toLowerCase()}Map`)(otherSlot)).to.equal(zero); + expect(await this.mock.getFunction(`get${type}Storage`)(otherSlot)).to.equal(zero); + }); }); - - it('from other slot', async function () { - expect(await this.store.getUint256(otherSlot)).to.be.bignumber.equal('0'); - }); - }); - }); - - describe('string storage slot', function () { - beforeEach(async function () { - this.value = 'lorem ipsum'; }); - - it('set', async function () { - await this.store.setString(slot, this.value); - }); - - describe('get', function () { - beforeEach(async function () { - await this.store.setString(slot, this.value); - }); - - it('from right slot', async function () { - expect(await this.store.getString(slot)).to.be.equal(this.value); - }); - - it('from other slot', async function () { - expect(await this.store.getString(otherSlot)).to.be.equal(''); - }); - }); - }); - - describe('string storage pointer', function () { - beforeEach(async function () { - this.value = 'lorem ipsum'; - }); - - it('set', async function () { - await this.store.setStringStorage(slot, this.value); - }); - - describe('get', function () { - beforeEach(async function () { - await this.store.setStringStorage(slot, this.value); - }); - - it('from right slot', async function () { - expect(await this.store.stringMap(slot)).to.be.equal(this.value); - expect(await this.store.getStringStorage(slot)).to.be.equal(this.value); - }); - - it('from other slot', async function () { - expect(await this.store.stringMap(otherSlot)).to.be.equal(''); - expect(await this.store.getStringStorage(otherSlot)).to.be.equal(''); - }); - }); - }); - - describe('bytes storage slot', function () { - beforeEach(async function () { - this.value = web3.utils.randomHex(128); - }); - - it('set', async function () { - await this.store.setBytes(slot, this.value); - }); - - describe('get', function () { - beforeEach(async function () { - await this.store.setBytes(slot, this.value); - }); - - it('from right slot', async function () { - expect(await this.store.getBytes(slot)).to.be.equal(this.value); - }); - - it('from other slot', async function () { - expect(await this.store.getBytes(otherSlot)).to.be.equal(null); - }); - }); - }); - - describe('bytes storage pointer', function () { - beforeEach(async function () { - this.value = web3.utils.randomHex(128); - }); - - it('set', async function () { - await this.store.setBytesStorage(slot, this.value); - }); - - describe('get', function () { - beforeEach(async function () { - await this.store.setBytesStorage(slot, this.value); - }); - - it('from right slot', async function () { - expect(await this.store.bytesMap(slot)).to.be.equal(this.value); - expect(await this.store.getBytesStorage(slot)).to.be.equal(this.value); - }); - - it('from other slot', async function () { - expect(await this.store.bytesMap(otherSlot)).to.be.equal(null); - expect(await this.store.getBytesStorage(otherSlot)).to.be.equal(null); - }); - }); - }); + } }); diff --git a/test/utils/Strings.test.js b/test/utils/Strings.test.js index 2435fc71c..643172bcb 100644 --- a/test/utils/Strings.test.js +++ b/test/utils/Strings.test.js @@ -1,69 +1,71 @@ -const { BN, constants } = require('@openzeppelin/test-helpers'); -const { expectRevertCustomError } = require('../helpers/customError'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const Strings = artifacts.require('$Strings'); +async function fixture() { + const mock = await ethers.deployContract('$Strings'); + return { mock }; +} -contract('Strings', function () { +describe('Strings', function () { before(async function () { - this.strings = await Strings.new(); + Object.assign(this, await loadFixture(fixture)); }); describe('toString', function () { const values = [ - '0', - '7', - '10', - '99', - '100', - '101', - '123', - '4132', - '12345', - '1234567', - '1234567890', - '123456789012345', - '12345678901234567890', - '123456789012345678901234567890', - '1234567890123456789012345678901234567890', - '12345678901234567890123456789012345678901234567890', - '123456789012345678901234567890123456789012345678901234567890', - '1234567890123456789012345678901234567890123456789012345678901234567890', + 0n, + 7n, + 10n, + 99n, + 100n, + 101n, + 123n, + 4132n, + 12345n, + 1234567n, + 1234567890n, + 123456789012345n, + 12345678901234567890n, + 123456789012345678901234567890n, + 1234567890123456789012345678901234567890n, + 12345678901234567890123456789012345678901234567890n, + 123456789012345678901234567890123456789012345678901234567890n, + 1234567890123456789012345678901234567890123456789012345678901234567890n, ]; describe('uint256', function () { it('converts MAX_UINT256', async function () { - const value = constants.MAX_UINT256; - expect(await this.strings.methods['$toString(uint256)'](value)).to.equal(value.toString(10)); + const value = ethers.MaxUint256; + expect(await this.mock.$toString(value)).to.equal(value.toString(10)); }); for (const value of values) { it(`converts ${value}`, async function () { - expect(await this.strings.methods['$toString(uint256)'](value)).to.equal(value); + expect(await this.mock.$toString(value)).to.equal(value); }); } }); describe('int256', function () { it('converts MAX_INT256', async function () { - const value = constants.MAX_INT256; - expect(await this.strings.methods['$toStringSigned(int256)'](value)).to.equal(value.toString(10)); + const value = ethers.MaxInt256; + expect(await this.mock.$toStringSigned(value)).to.equal(value.toString(10)); }); it('converts MIN_INT256', async function () { - const value = constants.MIN_INT256; - expect(await this.strings.methods['$toStringSigned(int256)'](value)).to.equal(value.toString(10)); + const value = ethers.MinInt256; + expect(await this.mock.$toStringSigned(value)).to.equal(value.toString(10)); }); for (const value of values) { it(`convert ${value}`, async function () { - expect(await this.strings.methods['$toStringSigned(int256)'](value)).to.equal(value); + expect(await this.mock.$toStringSigned(value)).to.equal(value); }); it(`convert negative ${value}`, async function () { - const negated = new BN(value).neg(); - expect(await this.strings.methods['$toStringSigned(int256)'](negated)).to.equal(negated.toString(10)); + const negated = -value; + expect(await this.mock.$toStringSigned(negated)).to.equal(negated.toString(10)); }); } }); @@ -71,39 +73,37 @@ contract('Strings', function () { describe('toHexString', function () { it('converts 0', async function () { - expect(await this.strings.methods['$toHexString(uint256)'](0)).to.equal('0x00'); + expect(await this.mock.getFunction('$toHexString(uint256)')(0n)).to.equal('0x00'); }); it('converts a positive number', async function () { - expect(await this.strings.methods['$toHexString(uint256)'](0x4132)).to.equal('0x4132'); + expect(await this.mock.getFunction('$toHexString(uint256)')(0x4132n)).to.equal('0x4132'); }); it('converts MAX_UINT256', async function () { - expect(await this.strings.methods['$toHexString(uint256)'](constants.MAX_UINT256)).to.equal( - web3.utils.toHex(constants.MAX_UINT256), + expect(await this.mock.getFunction('$toHexString(uint256)')(ethers.MaxUint256)).to.equal( + `0x${ethers.MaxUint256.toString(16)}`, ); }); }); describe('toHexString fixed', function () { it('converts a positive number (long)', async function () { - expect(await this.strings.methods['$toHexString(uint256,uint256)'](0x4132, 32)).to.equal( + expect(await this.mock.getFunction('$toHexString(uint256,uint256)')(0x4132n, 32n)).to.equal( '0x0000000000000000000000000000000000000000000000000000000000004132', ); }); it('converts a positive number (short)', async function () { - const length = 1; - await expectRevertCustomError( - this.strings.methods['$toHexString(uint256,uint256)'](0x4132, length), - `StringsInsufficientHexLength`, - [0x4132, length], - ); + const length = 1n; + await expect(this.mock.getFunction('$toHexString(uint256,uint256)')(0x4132n, length)) + .to.be.revertedWithCustomError(this.mock, `StringsInsufficientHexLength`) + .withArgs(0x4132, length); }); it('converts MAX_UINT256', async function () { - expect(await this.strings.methods['$toHexString(uint256,uint256)'](constants.MAX_UINT256, 32)).to.equal( - web3.utils.toHex(constants.MAX_UINT256), + expect(await this.mock.getFunction('$toHexString(uint256,uint256)')(ethers.MaxUint256, 32n)).to.equal( + `0x${ethers.MaxUint256.toString(16)}`, ); }); }); @@ -111,43 +111,43 @@ contract('Strings', function () { describe('toHexString address', function () { it('converts a random address', async function () { const addr = '0xa9036907dccae6a1e0033479b12e837e5cf5a02f'; - expect(await this.strings.methods['$toHexString(address)'](addr)).to.equal(addr); + expect(await this.mock.getFunction('$toHexString(address)')(addr)).to.equal(addr); }); it('converts an address with leading zeros', async function () { const addr = '0x0000e0ca771e21bd00057f54a68c30d400000000'; - expect(await this.strings.methods['$toHexString(address)'](addr)).to.equal(addr); + expect(await this.mock.getFunction('$toHexString(address)')(addr)).to.equal(addr); }); }); describe('equal', function () { it('compares two empty strings', async function () { - expect(await this.strings.methods['$equal(string,string)']('', '')).to.equal(true); + expect(await this.mock.$equal('', '')).to.be.true; }); it('compares two equal strings', async function () { - expect(await this.strings.methods['$equal(string,string)']('a', 'a')).to.equal(true); + expect(await this.mock.$equal('a', 'a')).to.be.true; }); it('compares two different strings', async function () { - expect(await this.strings.methods['$equal(string,string)']('a', 'b')).to.equal(false); + expect(await this.mock.$equal('a', 'b')).to.be.false; }); it('compares two different strings of different lengths', async function () { - expect(await this.strings.methods['$equal(string,string)']('a', 'aa')).to.equal(false); - expect(await this.strings.methods['$equal(string,string)']('aa', 'a')).to.equal(false); + expect(await this.mock.$equal('a', 'aa')).to.be.false; + expect(await this.mock.$equal('aa', 'a')).to.be.false; }); it('compares two different large strings', async function () { const str1 = 'a'.repeat(201); const str2 = 'a'.repeat(200) + 'b'; - expect(await this.strings.methods['$equal(string,string)'](str1, str2)).to.equal(false); + expect(await this.mock.$equal(str1, str2)).to.be.false; }); it('compares two equal large strings', async function () { const str1 = 'a'.repeat(201); const str2 = 'a'.repeat(201); - expect(await this.strings.methods['$equal(string,string)'](str1, str2)).to.equal(true); + expect(await this.mock.$equal(str1, str2)).to.be.true; }); }); }); From 0b1b5f89ef342b73e23e2fb6783d7a377478181f Mon Sep 17 00:00:00 2001 From: luca <80516439+xdaluca@users.noreply.github.com> Date: Fri, 24 Nov 2023 09:21:27 -0800 Subject: [PATCH 122/167] Create FUNDING.json (#4751) --- FUNDING.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 FUNDING.json diff --git a/FUNDING.json b/FUNDING.json new file mode 100644 index 000000000..c67286216 --- /dev/null +++ b/FUNDING.json @@ -0,0 +1,7 @@ +{ + "drips": { + "ethereum": { + "ownedBy": "0xAeb37910f93486C85A1F8F994b67E8187554d664" + } + } +} From 769071d47366addc20e160bce53a6dd480d5f89d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Mon, 27 Nov 2023 09:39:42 -0600 Subject: [PATCH 123/167] Add note in ERC20Wrapper about rebasing tokens (#4755) Co-authored-by: Hadrien Croubois --- contracts/token/ERC20/extensions/ERC20Wrapper.sol | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contracts/token/ERC20/extensions/ERC20Wrapper.sol b/contracts/token/ERC20/extensions/ERC20Wrapper.sol index 6645ddc05..eecd6ab7a 100644 --- a/contracts/token/ERC20/extensions/ERC20Wrapper.sol +++ b/contracts/token/ERC20/extensions/ERC20Wrapper.sol @@ -12,6 +12,11 @@ import {SafeERC20} from "../utils/SafeERC20.sol"; * Users can deposit and withdraw "underlying tokens" and receive a matching number of "wrapped tokens". This is useful * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the * wrapping of an existing "basic" ERC-20 into a governance token. + * + * WARNING: Any mechanism in which the underlying token changes the {balanceOf} of an account without an explicit transfer + * may desynchronize this contract's supply and its underlying balance. Please exercise caution when wrapping tokens that + * may undercollateralize the wrapper (i.e. wrapper's total supply is higher than its underlying balance). See {_recover} + * for recovering value accrued to the wrapper. */ abstract contract ERC20Wrapper is ERC20 { IERC20 private immutable _underlying; @@ -75,8 +80,8 @@ abstract contract ERC20Wrapper is ERC20 { } /** - * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake. Internal - * function that can be exposed with access control if desired. + * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake or acquired from + * rebasing mechanisms. Internal function that can be exposed with access control if desired. */ function _recover(address account) internal virtual returns (uint256) { uint256 value = _underlying.balanceOf(address(this)) - totalSupply(); From e0ac73cd6e2f3513f3d683e9d272024268c4cfc5 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Tue, 28 Nov 2023 23:41:10 +0000 Subject: [PATCH 124/167] Refactor enumerableMap generate and tests (#4760) --- scripts/generate/templates/EnumerableMap.js | 8 +- .../generate/templates/EnumerableMap.opts.js | 18 ++ test/utils/structs/EnumerableMap.behavior.js | 14 +- test/utils/structs/EnumerableMap.test.js | 188 +++++++----------- 4 files changed, 93 insertions(+), 135 deletions(-) create mode 100644 scripts/generate/templates/EnumerableMap.opts.js diff --git a/scripts/generate/templates/EnumerableMap.js b/scripts/generate/templates/EnumerableMap.js index 7dbe6ca7f..d55305c80 100644 --- a/scripts/generate/templates/EnumerableMap.js +++ b/scripts/generate/templates/EnumerableMap.js @@ -1,12 +1,6 @@ const format = require('../format-lines'); const { fromBytes32, toBytes32 } = require('./conversion'); - -const TYPES = [ - { name: 'UintToUintMap', keyType: 'uint256', valueType: 'uint256' }, - { name: 'UintToAddressMap', keyType: 'uint256', valueType: 'address' }, - { name: 'AddressToUintMap', keyType: 'address', valueType: 'uint256' }, - { name: 'Bytes32ToUintMap', keyType: 'bytes32', valueType: 'uint256' }, -]; +const { TYPES } = require('./EnumerableMap.opts'); /* eslint-disable max-len */ const header = `\ diff --git a/scripts/generate/templates/EnumerableMap.opts.js b/scripts/generate/templates/EnumerableMap.opts.js new file mode 100644 index 000000000..699fa7b14 --- /dev/null +++ b/scripts/generate/templates/EnumerableMap.opts.js @@ -0,0 +1,18 @@ +const mapType = str => (str == 'uint256' ? 'Uint' : `${str.charAt(0).toUpperCase()}${str.slice(1)}`); +const formatType = (keyType, valueType) => ({ + name: `${mapType(keyType)}To${mapType(valueType)}Map`, + keyType, + valueType, +}); + +const TYPES = [ + ['uint256', 'uint256'], + ['uint256', 'address'], + ['address', 'uint256'], + ['bytes32', 'uint256'], +].map(args => formatType(...args)); + +module.exports = { + TYPES, + formatType, +}; diff --git a/test/utils/structs/EnumerableMap.behavior.js b/test/utils/structs/EnumerableMap.behavior.js index fb967b34c..9c675c62d 100644 --- a/test/utils/structs/EnumerableMap.behavior.js +++ b/test/utils/structs/EnumerableMap.behavior.js @@ -3,7 +3,7 @@ const { ethers } = require('hardhat'); const zip = (array1, array2) => array1.map((item, index) => [item, array2[index]]); -function shouldBehaveLikeMap(zeroValue, keyType, events) { +function shouldBehaveLikeMap() { async function expectMembersMatch(methods, keys, values) { expect(keys.length).to.equal(values.length); expect(await methods.length()).to.equal(keys.length); @@ -25,7 +25,7 @@ function shouldBehaveLikeMap(zeroValue, keyType, events) { describe('set', function () { it('adds a key', async function () { - await expect(this.methods.set(this.keyA, this.valueA)).to.emit(this.mock, events.setReturn).withArgs(true); + await expect(this.methods.set(this.keyA, this.valueA)).to.emit(this.mock, this.events.setReturn).withArgs(true); await expectMembersMatch(this.methods, [this.keyA], [this.valueA]); }); @@ -41,7 +41,7 @@ function shouldBehaveLikeMap(zeroValue, keyType, events) { it('returns false when adding keys already in the set', async function () { await this.methods.set(this.keyA, this.valueA); - await expect(this.methods.set(this.keyA, this.valueA)).to.emit(this.mock, events.setReturn).withArgs(false); + await expect(this.methods.set(this.keyA, this.valueA)).to.emit(this.mock, this.events.setReturn).withArgs(false); await expectMembersMatch(this.methods, [this.keyA], [this.valueA]); }); @@ -58,7 +58,7 @@ function shouldBehaveLikeMap(zeroValue, keyType, events) { it('removes added keys', async function () { await this.methods.set(this.keyA, this.valueA); - await expect(this.methods.remove(this.keyA)).to.emit(this.mock, events.removeReturn).withArgs(true); + await expect(this.methods.remove(this.keyA)).to.emit(this.mock, this.events.removeReturn).withArgs(true); expect(await this.methods.contains(this.keyA)).to.be.false; await expectMembersMatch(this.methods, [], []); @@ -66,7 +66,7 @@ function shouldBehaveLikeMap(zeroValue, keyType, events) { it('returns false when removing keys not in the set', async function () { await expect(await this.methods.remove(this.keyA)) - .to.emit(this.mock, events.removeReturn) + .to.emit(this.mock, this.events.removeReturn) .withArgs(false); expect(await this.methods.contains(this.keyA)).to.be.false; @@ -130,7 +130,7 @@ function shouldBehaveLikeMap(zeroValue, keyType, events) { it('missing value', async function () { await expect(this.methods.get(this.keyB)) .to.be.revertedWithCustomError(this.mock, 'EnumerableMapNonexistentKey') - .withArgs(ethers.AbiCoder.defaultAbiCoder().encode([keyType], [this.keyB])); + .withArgs(ethers.AbiCoder.defaultAbiCoder().encode([this.keyType], [this.keyB])); }); }); @@ -140,7 +140,7 @@ function shouldBehaveLikeMap(zeroValue, keyType, events) { }); it('missing value', async function () { - expect(await this.methods.tryGet(this.keyB)).to.have.ordered.members([false, zeroValue]); + expect(await this.methods.tryGet(this.keyB)).to.have.ordered.members([false, this.zeroValue]); }); }); }); diff --git a/test/utils/structs/EnumerableMap.test.js b/test/utils/structs/EnumerableMap.test.js index accdb52fa..183a8c812 100644 --- a/test/utils/structs/EnumerableMap.test.js +++ b/test/utils/structs/EnumerableMap.test.js @@ -2,6 +2,7 @@ const { ethers } = require('hardhat'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { mapValues } = require('../../helpers/iterate'); const { randomArray, generators } = require('../../helpers/random'); +const { TYPES, formatType } = require('../../../scripts/generate/templates/EnumerableMap.opts'); const { shouldBehaveLikeMap } = require('./EnumerableMap.behavior'); @@ -14,132 +15,77 @@ const getMethods = (mock, fnSigs) => { ); }; -describe('EnumerableMap', function () { - // UintToAddressMap - describe('UintToAddressMap', function () { - const fixture = async () => { - const mock = await ethers.deployContract('$EnumerableMap'); - - const [keyA, keyB, keyC] = randomArray(generators.uint256); - const [valueA, valueB, valueC] = randomArray(generators.address); - - const methods = getMethods(mock, { - set: '$set(uint256,uint256,address)', - get: '$get_EnumerableMap_UintToAddressMap(uint256,uint256)', - tryGet: '$tryGet_EnumerableMap_UintToAddressMap(uint256,uint256)', - remove: '$remove_EnumerableMap_UintToAddressMap(uint256,uint256)', - length: '$length_EnumerableMap_UintToAddressMap(uint256)', - at: '$at_EnumerableMap_UintToAddressMap(uint256,uint256)', - contains: '$contains_EnumerableMap_UintToAddressMap(uint256,uint256)', - keys: '$keys_EnumerableMap_UintToAddressMap(uint256)', - }); - - return { mock, keyA, keyB, keyC, valueA, valueB, valueC, methods }; - }; - - beforeEach(async function () { - Object.assign(this, await loadFixture(fixture)); - }); - - shouldBehaveLikeMap(ethers.ZeroAddress, 'uint256', { - setReturn: 'return$set_EnumerableMap_UintToAddressMap_uint256_address', - removeReturn: 'return$remove_EnumerableMap_UintToAddressMap_uint256', - }); - }); - - // Bytes32ToBytes32Map - describe('Bytes32ToBytes32Map', function () { - const fixture = async () => { - const mock = await ethers.deployContract('$EnumerableMap'); - - const [keyA, keyB, keyC] = randomArray(generators.bytes32); - const [valueA, valueB, valueC] = randomArray(generators.bytes32); - - const methods = getMethods(mock, { - set: '$set(uint256,bytes32,bytes32)', - get: '$get_EnumerableMap_Bytes32ToBytes32Map(uint256,bytes32)', - tryGet: '$tryGet_EnumerableMap_Bytes32ToBytes32Map(uint256,bytes32)', - remove: '$remove_EnumerableMap_Bytes32ToBytes32Map(uint256,bytes32)', - length: '$length_EnumerableMap_Bytes32ToBytes32Map(uint256)', - at: '$at_EnumerableMap_Bytes32ToBytes32Map(uint256,uint256)', - contains: '$contains_EnumerableMap_Bytes32ToBytes32Map(uint256,bytes32)', - keys: '$keys_EnumerableMap_Bytes32ToBytes32Map(uint256)', - }); - - return { mock, keyA, keyB, keyC, valueA, valueB, valueC, methods }; - }; - - beforeEach(async function () { - Object.assign(this, await loadFixture(fixture)); - }); - - shouldBehaveLikeMap(ethers.ZeroHash, 'bytes32', { - setReturn: 'return$set_EnumerableMap_Bytes32ToBytes32Map_bytes32_bytes32', - removeReturn: 'return$remove_EnumerableMap_Bytes32ToBytes32Map_bytes32', - }); - }); - - // UintToUintMap - describe('UintToUintMap', function () { - const fixture = async () => { - const mock = await ethers.deployContract('$EnumerableMap'); - - const [keyA, keyB, keyC] = randomArray(generators.uint256); - const [valueA, valueB, valueC] = randomArray(generators.uint256); - - const methods = getMethods(mock, { - set: '$set(uint256,uint256,uint256)', - get: '$get_EnumerableMap_UintToUintMap(uint256,uint256)', - tryGet: '$tryGet_EnumerableMap_UintToUintMap(uint256,uint256)', - remove: '$remove_EnumerableMap_UintToUintMap(uint256,uint256)', - length: '$length_EnumerableMap_UintToUintMap(uint256)', - at: '$at_EnumerableMap_UintToUintMap(uint256,uint256)', - contains: '$contains_EnumerableMap_UintToUintMap(uint256,uint256)', - keys: '$keys_EnumerableMap_UintToUintMap(uint256)', - }); - - return { mock, keyA, keyB, keyC, valueA, valueB, valueC, methods }; - }; +const testTypes = [formatType('bytes32', 'bytes32'), ...TYPES]; + +async function fixture() { + const mock = await ethers.deployContract('$EnumerableMap'); + + const zeroValue = { + uint256: 0n, + address: ethers.ZeroAddress, + bytes32: ethers.ZeroHash, + }; + + const env = Object.fromEntries( + testTypes.map(({ name, keyType, valueType }) => [ + name, + { + keyType, + keys: randomArray(generators[keyType]), + values: randomArray(generators[valueType]), + + methods: getMethods( + mock, + testTypes.filter(t => keyType == t.keyType).length == 1 + ? { + set: `$set(uint256,${keyType},${valueType})`, + get: `$get(uint256,${keyType})`, + tryGet: `$tryGet(uint256,${keyType})`, + remove: `$remove(uint256,${keyType})`, + length: `$length_EnumerableMap_${name}(uint256)`, + at: `$at_EnumerableMap_${name}(uint256,uint256)`, + contains: `$contains(uint256,${keyType})`, + keys: `$keys_EnumerableMap_${name}(uint256)`, + } + : { + set: `$set(uint256,${keyType},${valueType})`, + get: `$get_EnumerableMap_${name}(uint256,${keyType})`, + tryGet: `$tryGet_EnumerableMap_${name}(uint256,${keyType})`, + remove: `$remove_EnumerableMap_${name}(uint256,${keyType})`, + length: `$length_EnumerableMap_${name}(uint256)`, + at: `$at_EnumerableMap_${name}(uint256,uint256)`, + contains: `$contains_EnumerableMap_${name}(uint256,${keyType})`, + keys: `$keys_EnumerableMap_${name}(uint256)`, + }, + ), + + zeroValue: zeroValue[valueType], + events: { + setReturn: `return$set_EnumerableMap_${name}_${keyType}_${valueType}`, + removeReturn: `return$remove_EnumerableMap_${name}_${keyType}`, + }, + }, + ]), + ); - beforeEach(async function () { - Object.assign(this, await loadFixture(fixture)); - }); + return { mock, env }; +} - shouldBehaveLikeMap(0n, 'uint256', { - setReturn: 'return$set_EnumerableMap_UintToUintMap_uint256_uint256', - removeReturn: 'return$remove_EnumerableMap_UintToUintMap_uint256', - }); +describe('EnumerableMap', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); - // Bytes32ToUintMap - describe('Bytes32ToUintMap', function () { - const fixture = async () => { - const mock = await ethers.deployContract('$EnumerableMap'); - - const [keyA, keyB, keyC] = randomArray(generators.bytes32); - const [valueA, valueB, valueC] = randomArray(generators.uint256); - - const methods = getMethods(mock, { - set: '$set(uint256,bytes32,uint256)', - get: '$get_EnumerableMap_Bytes32ToUintMap(uint256,bytes32)', - tryGet: '$tryGet_EnumerableMap_Bytes32ToUintMap(uint256,bytes32)', - remove: '$remove_EnumerableMap_Bytes32ToUintMap(uint256,bytes32)', - length: '$length_EnumerableMap_Bytes32ToUintMap(uint256)', - at: '$at_EnumerableMap_Bytes32ToUintMap(uint256,uint256)', - contains: '$contains_EnumerableMap_Bytes32ToUintMap(uint256,bytes32)', - keys: '$keys_EnumerableMap_Bytes32ToUintMap(uint256)', + // UintToAddressMap + for (const { name } of testTypes) { + describe(name, function () { + beforeEach(async function () { + Object.assign(this, this.env[name]); + [this.keyA, this.keyB, this.keyC] = this.keys; + [this.valueA, this.valueB, this.valueC] = this.values; }); - return { mock, keyA, keyB, keyC, valueA, valueB, valueC, methods }; - }; - - beforeEach(async function () { - Object.assign(this, await loadFixture(fixture)); - }); - - shouldBehaveLikeMap(0n, 'bytes32', { - setReturn: 'return$set_EnumerableMap_Bytes32ToUintMap_bytes32_uint256', - removeReturn: 'return$remove_EnumerableMap_Bytes32ToUintMap_bytes32', + shouldBehaveLikeMap(); }); - }); + } }); From e3478edfe789c4ad0292366c96f1c28661d88ab7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 17:47:45 -0600 Subject: [PATCH 125/167] Update dependency @changesets/pre to v2 (#4765) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 53 +++++++++++++++++++++++++++++++++++++++++------ package.json | 2 +- 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c3272ea3..3458599f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "devDependencies": { "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.0", - "@changesets/pre": "^1.0.14", + "@changesets/pre": "^2.0.0", "@changesets/read": "^0.5.9", "@nomicfoundation/hardhat-chai-matchers": "^2.0.2", "@nomicfoundation/hardhat-ethers": "^3.0.4", @@ -259,6 +259,19 @@ "changeset": "bin.js" } }, + "node_modules/@changesets/cli/node_modules/@changesets/pre": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-1.0.14.tgz", + "integrity": "sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/errors": "^0.1.4", + "@changesets/types": "^5.2.1", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1" + } + }, "node_modules/@changesets/cli/node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -336,6 +349,19 @@ "@manypkg/get-packages": "^1.1.3" } }, + "node_modules/@changesets/get-release-plan/node_modules/@changesets/pre": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-1.0.14.tgz", + "integrity": "sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/errors": "^0.1.4", + "@changesets/types": "^5.2.1", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1" + } + }, "node_modules/@changesets/get-version-range-type": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.3.2.tgz", @@ -377,18 +403,33 @@ } }, "node_modules/@changesets/pre": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-1.0.14.tgz", - "integrity": "sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.0.tgz", + "integrity": "sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==", "dev": true, "dependencies": { "@babel/runtime": "^7.20.1", - "@changesets/errors": "^0.1.4", - "@changesets/types": "^5.2.1", + "@changesets/errors": "^0.2.0", + "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3", "fs-extra": "^7.0.1" } }, + "node_modules/@changesets/pre/node_modules/@changesets/errors": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", + "integrity": "sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==", + "dev": true, + "dependencies": { + "extendable-error": "^0.1.5" + } + }, + "node_modules/@changesets/pre/node_modules/@changesets/types": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-6.0.0.tgz", + "integrity": "sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==", + "dev": true + }, "node_modules/@changesets/read": { "version": "0.5.9", "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.5.9.tgz", diff --git a/package.json b/package.json index 50ba8f478..cf74d6a34 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "devDependencies": { "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.0", - "@changesets/pre": "^1.0.14", + "@changesets/pre": "^2.0.0", "@changesets/read": "^0.5.9", "@nomicfoundation/hardhat-chai-matchers": "^2.0.2", "@nomicfoundation/hardhat-ethers": "^3.0.4", From 74e396a967bad7dc1032ebab50fabf0d53a67796 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 17:49:38 -0600 Subject: [PATCH 126/167] Update dependency @changesets/changelog-github to ^0.5.0 (#4763) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 24 +++++++++++++++--------- package.json | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3458599f2..3c192be99 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.0.0", "license": "MIT", "devDependencies": { - "@changesets/changelog-github": "^0.4.8", + "@changesets/changelog-github": "^0.5.0", "@changesets/cli": "^2.26.0", "@changesets/pre": "^2.0.0", "@changesets/read": "^0.5.9", @@ -205,16 +205,22 @@ } }, "node_modules/@changesets/changelog-github": { - "version": "0.4.8", - "resolved": "https://registry.npmjs.org/@changesets/changelog-github/-/changelog-github-0.4.8.tgz", - "integrity": "sha512-jR1DHibkMAb5v/8ym77E4AMNWZKB5NPzw5a5Wtqm1JepAuIF+hrKp2u04NKM14oBZhHglkCfrla9uq8ORnK/dw==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@changesets/changelog-github/-/changelog-github-0.5.0.tgz", + "integrity": "sha512-zoeq2LJJVcPJcIotHRJEEA2qCqX0AQIeFE+L21L8sRLPVqDhSXY8ZWAt2sohtBpFZkBwu+LUwMSKRr2lMy3LJA==", "dev": true, "dependencies": { - "@changesets/get-github-info": "^0.5.2", - "@changesets/types": "^5.2.1", + "@changesets/get-github-info": "^0.6.0", + "@changesets/types": "^6.0.0", "dotenv": "^8.1.0" } }, + "node_modules/@changesets/changelog-github/node_modules/@changesets/types": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-6.0.0.tgz", + "integrity": "sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==", + "dev": true + }, "node_modules/@changesets/cli": { "version": "2.26.2", "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.26.2.tgz", @@ -325,9 +331,9 @@ } }, "node_modules/@changesets/get-github-info": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@changesets/get-github-info/-/get-github-info-0.5.2.tgz", - "integrity": "sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@changesets/get-github-info/-/get-github-info-0.6.0.tgz", + "integrity": "sha512-v/TSnFVXI8vzX9/w3DU2Ol+UlTZcu3m0kXTjTT4KlAdwSvwutcByYwyYn9hwerPWfPkT2JfpoX0KgvCEi8Q/SA==", "dev": true, "dependencies": { "dataloader": "^1.4.0", diff --git a/package.json b/package.json index cf74d6a34..37cf126ce 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "homepage": "https://openzeppelin.com/contracts/", "devDependencies": { - "@changesets/changelog-github": "^0.4.8", + "@changesets/changelog-github": "^0.5.0", "@changesets/cli": "^2.26.0", "@changesets/pre": "^2.0.0", "@changesets/read": "^0.5.9", From c411700572b69c802eeb85fca3519825a5144dd3 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Tue, 28 Nov 2023 23:51:58 +0000 Subject: [PATCH 127/167] Refactor EnumerableSet generation and tests (#4762) --- scripts/generate/templates/EnumerableSet.js | 7 +- .../generate/templates/EnumerableSet.opts.js | 10 ++ test/utils/structs/EnumerableSet.behavior.js | 18 ++- test/utils/structs/EnumerableSet.test.js | 116 ++++++------------ 4 files changed, 59 insertions(+), 92 deletions(-) create mode 100644 scripts/generate/templates/EnumerableSet.opts.js diff --git a/scripts/generate/templates/EnumerableSet.js b/scripts/generate/templates/EnumerableSet.js index cb9bffb2c..e25242cbb 100644 --- a/scripts/generate/templates/EnumerableSet.js +++ b/scripts/generate/templates/EnumerableSet.js @@ -1,11 +1,6 @@ const format = require('../format-lines'); const { fromBytes32, toBytes32 } = require('./conversion'); - -const TYPES = [ - { name: 'Bytes32Set', type: 'bytes32' }, - { name: 'AddressSet', type: 'address' }, - { name: 'UintSet', type: 'uint256' }, -]; +const { TYPES } = require('./EnumerableSet.opts'); /* eslint-disable max-len */ const header = `\ diff --git a/scripts/generate/templates/EnumerableSet.opts.js b/scripts/generate/templates/EnumerableSet.opts.js new file mode 100644 index 000000000..fb53724fe --- /dev/null +++ b/scripts/generate/templates/EnumerableSet.opts.js @@ -0,0 +1,10 @@ +const mapType = str => (str == 'uint256' ? 'Uint' : `${str.charAt(0).toUpperCase()}${str.slice(1)}`); + +const formatType = type => ({ + name: `${mapType(type)}Set`, + type, +}); + +const TYPES = ['bytes32', 'address', 'uint256'].map(formatType); + +module.exports = { TYPES, formatType }; diff --git a/test/utils/structs/EnumerableSet.behavior.js b/test/utils/structs/EnumerableSet.behavior.js index 5b9e067e8..d3d4f26d5 100644 --- a/test/utils/structs/EnumerableSet.behavior.js +++ b/test/utils/structs/EnumerableSet.behavior.js @@ -1,6 +1,7 @@ const { expect } = require('chai'); +const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); -function shouldBehaveLikeSet(events) { +function shouldBehaveLikeSet() { async function expectMembersMatch(methods, values) { expect(await methods.length()).to.equal(values.length); for (const value of values) expect(await methods.contains(value)).to.be.true; @@ -17,7 +18,7 @@ function shouldBehaveLikeSet(events) { describe('add', function () { it('adds a value', async function () { - await expect(this.methods.add(this.valueA)).to.emit(this.mock, events.addReturn).withArgs(true); + await expect(this.methods.add(this.valueA)).to.emit(this.mock, this.events.addReturn).withArgs(true); await expectMembersMatch(this.methods, [this.valueA]); }); @@ -33,7 +34,7 @@ function shouldBehaveLikeSet(events) { it('returns false when adding values already in the set', async function () { await this.methods.add(this.valueA); - await expect(this.methods.add(this.valueA)).to.emit(this.mock, events.addReturn).withArgs(false); + await expect(this.methods.add(this.valueA)).to.emit(this.mock, this.events.addReturn).withArgs(false); await expectMembersMatch(this.methods, [this.valueA]); }); @@ -41,7 +42,12 @@ function shouldBehaveLikeSet(events) { describe('at', function () { it('reverts when retrieving non-existent elements', async function () { - await expect(this.methods.at(0)).to.be.reverted; + await expect(this.methods.at(0)).to.be.revertedWithPanic(PANIC_CODES.ARRAY_ACCESS_OUT_OF_BOUNDS); + }); + + it('retrieves existing element', async function () { + await this.methods.add(this.valueA); + expect(await this.methods.at(0)).to.equal(this.valueA); }); }); @@ -49,14 +55,14 @@ function shouldBehaveLikeSet(events) { it('removes added values', async function () { await this.methods.add(this.valueA); - await expect(this.methods.remove(this.valueA)).to.emit(this.mock, events.removeReturn).withArgs(true); + await expect(this.methods.remove(this.valueA)).to.emit(this.mock, this.events.removeReturn).withArgs(true); expect(await this.methods.contains(this.valueA)).to.be.false; await expectMembersMatch(this.methods, []); }); it('returns false when removing values not in the set', async function () { - await expect(this.methods.remove(this.valueA)).to.emit(this.mock, events.removeReturn).withArgs(false); + await expect(this.methods.remove(this.valueA)).to.emit(this.mock, this.events.removeReturn).withArgs(false); expect(await this.methods.contains(this.valueA)).to.be.false; }); diff --git a/test/utils/structs/EnumerableSet.test.js b/test/utils/structs/EnumerableSet.test.js index 726ea0ee3..4345dfe7d 100644 --- a/test/utils/structs/EnumerableSet.test.js +++ b/test/utils/structs/EnumerableSet.test.js @@ -2,6 +2,7 @@ const { ethers } = require('hardhat'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { mapValues } = require('../../helpers/iterate'); const { randomArray, generators } = require('../../helpers/random'); +const { TYPES } = require('../../../scripts/generate/templates/EnumerableSet.opts'); const { shouldBehaveLikeSet } = require('./EnumerableSet.behavior'); @@ -14,91 +15,46 @@ const getMethods = (mock, fnSigs) => { ); }; -describe('EnumerableSet', function () { - // Bytes32Set - describe('EnumerableBytes32Set', function () { - const fixture = async () => { - const mock = await ethers.deployContract('$EnumerableSet'); - - const [valueA, valueB, valueC] = randomArray(generators.bytes32); - - const methods = getMethods(mock, { - add: '$add(uint256,bytes32)', - remove: '$remove(uint256,bytes32)', - contains: '$contains(uint256,bytes32)', - length: `$length_EnumerableSet_Bytes32Set(uint256)`, - at: `$at_EnumerableSet_Bytes32Set(uint256,uint256)`, - values: `$values_EnumerableSet_Bytes32Set(uint256)`, - }); - - return { mock, valueA, valueB, valueC, methods }; - }; - - beforeEach(async function () { - Object.assign(this, await loadFixture(fixture)); - }); - - shouldBehaveLikeSet({ - addReturn: `return$add_EnumerableSet_Bytes32Set_bytes32`, - removeReturn: `return$remove_EnumerableSet_Bytes32Set_bytes32`, - }); - }); - - // AddressSet - describe('EnumerableAddressSet', function () { - const fixture = async () => { - const mock = await ethers.deployContract('$EnumerableSet'); - - const [valueA, valueB, valueC] = randomArray(generators.address); - - const methods = getMethods(mock, { - add: '$add(uint256,address)', - remove: '$remove(uint256,address)', - contains: '$contains(uint256,address)', - length: `$length_EnumerableSet_AddressSet(uint256)`, - at: `$at_EnumerableSet_AddressSet(uint256,uint256)`, - values: `$values_EnumerableSet_AddressSet(uint256)`, - }); - - return { mock, valueA, valueB, valueC, methods }; - }; +async function fixture() { + const mock = await ethers.deployContract('$EnumerableSet'); + + const env = Object.fromEntries( + TYPES.map(({ name, type }) => [ + type, + { + values: randomArray(generators[type]), + methods: getMethods(mock, { + add: `$add(uint256,${type})`, + remove: `$remove(uint256,${type})`, + contains: `$contains(uint256,${type})`, + length: `$length_EnumerableSet_${name}(uint256)`, + at: `$at_EnumerableSet_${name}(uint256,uint256)`, + values: `$values_EnumerableSet_${name}(uint256)`, + }), + events: { + addReturn: `return$add_EnumerableSet_${name}_${type}`, + removeReturn: `return$remove_EnumerableSet_${name}_${type}`, + }, + }, + ]), + ); - beforeEach(async function () { - Object.assign(this, await loadFixture(fixture)); - }); + return { mock, env }; +} - shouldBehaveLikeSet({ - addReturn: `return$add_EnumerableSet_AddressSet_address`, - removeReturn: `return$remove_EnumerableSet_AddressSet_address`, - }); +describe('EnumerableSet', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); - // UintSet - describe('EnumerableUintSet', function () { - const fixture = async () => { - const mock = await ethers.deployContract('$EnumerableSet'); - - const [valueA, valueB, valueC] = randomArray(generators.uint256); - - const methods = getMethods(mock, { - add: '$add(uint256,uint256)', - remove: '$remove(uint256,uint256)', - contains: '$contains(uint256,uint256)', - length: `$length_EnumerableSet_UintSet(uint256)`, - at: `$at_EnumerableSet_UintSet(uint256,uint256)`, - values: `$values_EnumerableSet_UintSet(uint256)`, + for (const { type } of TYPES) { + describe(type, function () { + beforeEach(function () { + Object.assign(this, this.env[type]); + [this.valueA, this.valueB, this.valueC] = this.values; }); - return { mock, valueA, valueB, valueC, methods }; - }; - - beforeEach(async function () { - Object.assign(this, await loadFixture(fixture)); + shouldBehaveLikeSet(); }); - - shouldBehaveLikeSet({ - addReturn: `return$add_EnumerableSet_UintSet_uint256`, - removeReturn: `return$remove_EnumerableSet_UintSet_uint256`, - }); - }); + } }); From a32077bbac15af9fc9d7d74ffca33c7e331abf60 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 00:03:42 +0000 Subject: [PATCH 128/167] Update dependency @changesets/read to ^0.6.0 (#4764) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 97 +++++++++++++++++++++++++++++++++++++++++++---- package.json | 2 +- 2 files changed, 90 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c192be99..922723c43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@changesets/changelog-github": "^0.5.0", "@changesets/cli": "^2.26.0", "@changesets/pre": "^2.0.0", - "@changesets/read": "^0.5.9", + "@changesets/read": "^0.6.0", "@nomicfoundation/hardhat-chai-matchers": "^2.0.2", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", @@ -278,6 +278,22 @@ "fs-extra": "^7.0.1" } }, + "node_modules/@changesets/cli/node_modules/@changesets/read": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.5.9.tgz", + "integrity": "sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/git": "^2.0.0", + "@changesets/logger": "^0.0.5", + "@changesets/parse": "^0.3.16", + "@changesets/types": "^5.2.1", + "chalk": "^2.1.0", + "fs-extra": "^7.0.1", + "p-filter": "^2.1.0" + } + }, "node_modules/@changesets/cli/node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -368,6 +384,22 @@ "fs-extra": "^7.0.1" } }, + "node_modules/@changesets/get-release-plan/node_modules/@changesets/read": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.5.9.tgz", + "integrity": "sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/git": "^2.0.0", + "@changesets/logger": "^0.0.5", + "@changesets/parse": "^0.3.16", + "@changesets/types": "^5.2.1", + "chalk": "^2.1.0", + "fs-extra": "^7.0.1", + "p-filter": "^2.1.0" + } + }, "node_modules/@changesets/get-version-range-type": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.3.2.tgz", @@ -437,21 +469,70 @@ "dev": true }, "node_modules/@changesets/read": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.5.9.tgz", - "integrity": "sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.0.tgz", + "integrity": "sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==", "dev": true, "dependencies": { "@babel/runtime": "^7.20.1", - "@changesets/git": "^2.0.0", - "@changesets/logger": "^0.0.5", - "@changesets/parse": "^0.3.16", - "@changesets/types": "^5.2.1", + "@changesets/git": "^3.0.0", + "@changesets/logger": "^0.1.0", + "@changesets/parse": "^0.4.0", + "@changesets/types": "^6.0.0", "chalk": "^2.1.0", "fs-extra": "^7.0.1", "p-filter": "^2.1.0" } }, + "node_modules/@changesets/read/node_modules/@changesets/errors": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", + "integrity": "sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==", + "dev": true, + "dependencies": { + "extendable-error": "^0.1.5" + } + }, + "node_modules/@changesets/read/node_modules/@changesets/git": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@changesets/git/-/git-3.0.0.tgz", + "integrity": "sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/errors": "^0.2.0", + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3", + "is-subdir": "^1.1.1", + "micromatch": "^4.0.2", + "spawndamnit": "^2.0.0" + } + }, + "node_modules/@changesets/read/node_modules/@changesets/logger": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.1.0.tgz", + "integrity": "sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==", + "dev": true, + "dependencies": { + "chalk": "^2.1.0" + } + }, + "node_modules/@changesets/read/node_modules/@changesets/parse": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@changesets/parse/-/parse-0.4.0.tgz", + "integrity": "sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==", + "dev": true, + "dependencies": { + "@changesets/types": "^6.0.0", + "js-yaml": "^3.13.1" + } + }, + "node_modules/@changesets/read/node_modules/@changesets/types": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-6.0.0.tgz", + "integrity": "sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==", + "dev": true + }, "node_modules/@changesets/types": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/@changesets/types/-/types-5.2.1.tgz", diff --git a/package.json b/package.json index 37cf126ce..7eb460388 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "@changesets/changelog-github": "^0.5.0", "@changesets/cli": "^2.26.0", "@changesets/pre": "^2.0.0", - "@changesets/read": "^0.5.9", + "@changesets/read": "^0.6.0", "@nomicfoundation/hardhat-chai-matchers": "^2.0.2", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", From c35057978f9d13fee96c0ee34d251c00286d3e47 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Wed, 29 Nov 2023 19:57:16 +0000 Subject: [PATCH 129/167] Migrate ERC20 and ERC20Wrapper tests to ethersjs (#4743) Co-authored-by: Hadrien Croubois --- test/token/ERC20/ERC20.behavior.js | 326 +++++++----------- test/token/ERC20/ERC20.test.js | 195 ++++++----- .../ERC20/extensions/ERC20Wrapper.test.js | 267 +++++++------- 3 files changed, 363 insertions(+), 425 deletions(-) diff --git a/test/token/ERC20/ERC20.behavior.js b/test/token/ERC20/ERC20.behavior.js index b6f8617b2..522df3fcf 100644 --- a/test/token/ERC20/ERC20.behavior.js +++ b/test/token/ERC20/ERC20.behavior.js @@ -1,335 +1,271 @@ -const { BN, constants, expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { ZERO_ADDRESS, MAX_UINT256 } = constants; -const { expectRevertCustomError } = require('../../helpers/customError'); - -function shouldBehaveLikeERC20(initialSupply, accounts, opts = {}) { - const [initialHolder, recipient, anotherAccount] = accounts; +function shouldBehaveLikeERC20(initialSupply, opts = {}) { const { forcedApproval } = opts; - describe('total supply', function () { - it('returns the total token value', async function () { - expect(await this.token.totalSupply()).to.be.bignumber.equal(initialSupply); - }); + it('total supply: returns the total token value', async function () { + expect(await this.token.totalSupply()).to.equal(initialSupply); }); describe('balanceOf', function () { - describe('when the requested account has no tokens', function () { - it('returns zero', async function () { - expect(await this.token.balanceOf(anotherAccount)).to.be.bignumber.equal('0'); - }); + it('returns zero when the requested account has no tokens', async function () { + expect(await this.token.balanceOf(this.anotherAccount)).to.equal(0n); }); - describe('when the requested account has some tokens', function () { - it('returns the total token value', async function () { - expect(await this.token.balanceOf(initialHolder)).to.be.bignumber.equal(initialSupply); - }); + it('returns the total token value when the requested account has some tokens', async function () { + expect(await this.token.balanceOf(this.initialHolder)).to.equal(initialSupply); }); }); describe('transfer', function () { - shouldBehaveLikeERC20Transfer(initialHolder, recipient, initialSupply, function (from, to, value) { - return this.token.transfer(to, value, { from }); + beforeEach(function () { + this.transfer = (from, to, value) => this.token.connect(from).transfer(to, value); }); + + shouldBehaveLikeERC20Transfer(initialSupply); }); describe('transfer from', function () { - const spender = recipient; - describe('when the token owner is not the zero address', function () { - const tokenOwner = initialHolder; - describe('when the recipient is not the zero address', function () { - const to = anotherAccount; - describe('when the spender has enough allowance', function () { beforeEach(async function () { - await this.token.approve(spender, initialSupply, { from: initialHolder }); + await this.token.connect(this.initialHolder).approve(this.recipient, initialSupply); }); describe('when the token owner has enough balance', function () { const value = initialSupply; - it('transfers the requested value', async function () { - await this.token.transferFrom(tokenOwner, to, value, { from: spender }); - - expect(await this.token.balanceOf(tokenOwner)).to.be.bignumber.equal('0'); + beforeEach(async function () { + this.tx = await this.token + .connect(this.recipient) + .transferFrom(this.initialHolder, this.anotherAccount, value); + }); - expect(await this.token.balanceOf(to)).to.be.bignumber.equal(value); + it('transfers the requested value', async function () { + await expect(this.tx).to.changeTokenBalances( + this.token, + [this.initialHolder, this.anotherAccount], + [-value, value], + ); }); it('decreases the spender allowance', async function () { - await this.token.transferFrom(tokenOwner, to, value, { from: spender }); - - expect(await this.token.allowance(tokenOwner, spender)).to.be.bignumber.equal('0'); + expect(await this.token.allowance(this.initialHolder, this.recipient)).to.equal(0n); }); it('emits a transfer event', async function () { - expectEvent(await this.token.transferFrom(tokenOwner, to, value, { from: spender }), 'Transfer', { - from: tokenOwner, - to: to, - value: value, - }); + await expect(this.tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.initialHolder.address, this.anotherAccount.address, value); }); if (forcedApproval) { it('emits an approval event', async function () { - expectEvent(await this.token.transferFrom(tokenOwner, to, value, { from: spender }), 'Approval', { - owner: tokenOwner, - spender: spender, - value: await this.token.allowance(tokenOwner, spender), - }); + await expect(this.tx) + .to.emit(this.token, 'Approval') + .withArgs( + this.initialHolder.address, + this.recipient.address, + await this.token.allowance(this.initialHolder, this.recipient), + ); }); } else { it('does not emit an approval event', async function () { - expectEvent.notEmitted( - await this.token.transferFrom(tokenOwner, to, value, { from: spender }), - 'Approval', - ); + await expect(this.tx).to.not.emit(this.token, 'Approval'); }); } }); - describe('when the token owner does not have enough balance', function () { + it('reverts when the token owner does not have enough balance', async function () { const value = initialSupply; - - beforeEach('reducing balance', async function () { - await this.token.transfer(to, 1, { from: tokenOwner }); - }); - - it('reverts', async function () { - await expectRevertCustomError( - this.token.transferFrom(tokenOwner, to, value, { from: spender }), - 'ERC20InsufficientBalance', - [tokenOwner, value - 1, value], - ); - }); + await this.token.connect(this.initialHolder).transfer(this.anotherAccount, 1n); + await expect( + this.token.connect(this.recipient).transferFrom(this.initialHolder, this.anotherAccount, value), + ) + .to.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') + .withArgs(this.initialHolder.address, value - 1n, value); }); }); describe('when the spender does not have enough allowance', function () { - const allowance = initialSupply.subn(1); + const allowance = initialSupply - 1n; beforeEach(async function () { - await this.token.approve(spender, allowance, { from: tokenOwner }); + await this.token.connect(this.initialHolder).approve(this.recipient, allowance); }); - describe('when the token owner has enough balance', function () { + it('reverts when the token owner has enough balance', async function () { const value = initialSupply; - - it('reverts', async function () { - await expectRevertCustomError( - this.token.transferFrom(tokenOwner, to, value, { from: spender }), - 'ERC20InsufficientAllowance', - [spender, allowance, value], - ); - }); + await expect( + this.token.connect(this.recipient).transferFrom(this.initialHolder, this.anotherAccount, value), + ) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientAllowance') + .withArgs(this.recipient.address, allowance, value); }); - describe('when the token owner does not have enough balance', function () { + it('reverts when the token owner does not have enough balance', async function () { const value = allowance; - - beforeEach('reducing balance', async function () { - await this.token.transfer(to, 2, { from: tokenOwner }); - }); - - it('reverts', async function () { - await expectRevertCustomError( - this.token.transferFrom(tokenOwner, to, value, { from: spender }), - 'ERC20InsufficientBalance', - [tokenOwner, value - 1, value], - ); - }); + await this.token.connect(this.initialHolder).transfer(this.anotherAccount, 2); + await expect( + this.token.connect(this.recipient).transferFrom(this.initialHolder, this.anotherAccount, value), + ) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') + .withArgs(this.initialHolder.address, value - 1n, value); }); }); describe('when the spender has unlimited allowance', function () { beforeEach(async function () { - await this.token.approve(spender, MAX_UINT256, { from: initialHolder }); + await this.token.connect(this.initialHolder).approve(this.recipient, ethers.MaxUint256); + this.tx = await this.token + .connect(this.recipient) + .transferFrom(this.initialHolder, this.anotherAccount, 1n); }); it('does not decrease the spender allowance', async function () { - await this.token.transferFrom(tokenOwner, to, 1, { from: spender }); - - expect(await this.token.allowance(tokenOwner, spender)).to.be.bignumber.equal(MAX_UINT256); + expect(await this.token.allowance(this.initialHolder, this.recipient)).to.equal(ethers.MaxUint256); }); it('does not emit an approval event', async function () { - expectEvent.notEmitted(await this.token.transferFrom(tokenOwner, to, 1, { from: spender }), 'Approval'); + await expect(this.tx).to.not.emit(this.token, 'Approval'); }); }); }); - describe('when the recipient is the zero address', function () { + it('reverts when the recipient is the zero address', async function () { const value = initialSupply; - const to = ZERO_ADDRESS; - - beforeEach(async function () { - await this.token.approve(spender, value, { from: tokenOwner }); - }); - - it('reverts', async function () { - await expectRevertCustomError( - this.token.transferFrom(tokenOwner, to, value, { from: spender }), - 'ERC20InvalidReceiver', - [ZERO_ADDRESS], - ); - }); + await this.token.connect(this.initialHolder).approve(this.recipient, value); + await expect(this.token.connect(this.recipient).transferFrom(this.initialHolder, ethers.ZeroAddress, value)) + .to.be.revertedWithCustomError(this.token, 'ERC20InvalidReceiver') + .withArgs(ethers.ZeroAddress); }); }); - describe('when the token owner is the zero address', function () { - const value = 0; - const tokenOwner = ZERO_ADDRESS; - const to = recipient; - - it('reverts', async function () { - await expectRevertCustomError( - this.token.transferFrom(tokenOwner, to, value, { from: spender }), - 'ERC20InvalidApprover', - [ZERO_ADDRESS], - ); - }); + it('reverts when the token owner is the zero address', async function () { + const value = 0n; + await expect(this.token.connect(this.recipient).transferFrom(ethers.ZeroAddress, this.recipient, value)) + .to.be.revertedWithCustomError(this.token, 'ERC20InvalidApprover') + .withArgs(ethers.ZeroAddress); }); }); describe('approve', function () { - shouldBehaveLikeERC20Approve(initialHolder, recipient, initialSupply, function (owner, spender, value) { - return this.token.approve(spender, value, { from: owner }); + beforeEach(function () { + this.approve = (owner, spender, value) => this.token.connect(owner).approve(spender, value); }); + + shouldBehaveLikeERC20Approve(initialSupply); }); } -function shouldBehaveLikeERC20Transfer(from, to, balance, transfer) { +function shouldBehaveLikeERC20Transfer(balance) { describe('when the recipient is not the zero address', function () { - describe('when the sender does not have enough balance', function () { - const value = balance.addn(1); - - it('reverts', async function () { - await expectRevertCustomError(transfer.call(this, from, to, value), 'ERC20InsufficientBalance', [ - from, - balance, - value, - ]); - }); + it('reverts when the sender does not have enough balance', async function () { + const value = balance + 1n; + await expect(this.transfer(this.initialHolder, this.recipient, value)) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') + .withArgs(this.initialHolder.address, balance, value); }); describe('when the sender transfers all balance', function () { const value = balance; - it('transfers the requested value', async function () { - await transfer.call(this, from, to, value); - - expect(await this.token.balanceOf(from)).to.be.bignumber.equal('0'); + beforeEach(async function () { + this.tx = await this.transfer(this.initialHolder, this.recipient, value); + }); - expect(await this.token.balanceOf(to)).to.be.bignumber.equal(value); + it('transfers the requested value', async function () { + await expect(this.tx).to.changeTokenBalances(this.token, [this.initialHolder, this.recipient], [-value, value]); }); it('emits a transfer event', async function () { - expectEvent(await transfer.call(this, from, to, value), 'Transfer', { from, to, value: value }); + await expect(this.tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.initialHolder.address, this.recipient.address, value); }); }); describe('when the sender transfers zero tokens', function () { - const value = new BN('0'); - - it('transfers the requested value', async function () { - await transfer.call(this, from, to, value); + const value = 0n; - expect(await this.token.balanceOf(from)).to.be.bignumber.equal(balance); + beforeEach(async function () { + this.tx = await this.transfer(this.initialHolder, this.recipient, value); + }); - expect(await this.token.balanceOf(to)).to.be.bignumber.equal('0'); + it('transfers the requested value', async function () { + await expect(this.tx).to.changeTokenBalances(this.token, [this.initialHolder, this.recipient], [0n, 0n]); }); it('emits a transfer event', async function () { - expectEvent(await transfer.call(this, from, to, value), 'Transfer', { from, to, value: value }); + await expect(this.tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.initialHolder.address, this.recipient.address, value); }); }); }); - describe('when the recipient is the zero address', function () { - it('reverts', async function () { - await expectRevertCustomError(transfer.call(this, from, ZERO_ADDRESS, balance), 'ERC20InvalidReceiver', [ - ZERO_ADDRESS, - ]); - }); + it('reverts when the recipient is the zero address', async function () { + await expect(this.transfer(this.initialHolder, ethers.ZeroAddress, balance)) + .to.be.revertedWithCustomError(this.token, 'ERC20InvalidReceiver') + .withArgs(ethers.ZeroAddress); }); } -function shouldBehaveLikeERC20Approve(owner, spender, supply, approve) { +function shouldBehaveLikeERC20Approve(supply) { describe('when the spender is not the zero address', function () { describe('when the sender has enough balance', function () { const value = supply; it('emits an approval event', async function () { - expectEvent(await approve.call(this, owner, spender, value), 'Approval', { - owner: owner, - spender: spender, - value: value, - }); + await expect(this.approve(this.initialHolder, this.recipient, value)) + .to.emit(this.token, 'Approval') + .withArgs(this.initialHolder.address, this.recipient.address, value); }); - describe('when there was no approved value before', function () { - it('approves the requested value', async function () { - await approve.call(this, owner, spender, value); + it('approves the requested value when there was no approved value before', async function () { + await this.approve(this.initialHolder, this.recipient, value); - expect(await this.token.allowance(owner, spender)).to.be.bignumber.equal(value); - }); + expect(await this.token.allowance(this.initialHolder, this.recipient)).to.equal(value); }); - describe('when the spender had an approved value', function () { - beforeEach(async function () { - await approve.call(this, owner, spender, new BN(1)); - }); - - it('approves the requested value and replaces the previous one', async function () { - await approve.call(this, owner, spender, value); + it('approves the requested value and replaces the previous one when the spender had an approved value', async function () { + await this.approve(this.initialHolder, this.recipient, 1n); + await this.approve(this.initialHolder, this.recipient, value); - expect(await this.token.allowance(owner, spender)).to.be.bignumber.equal(value); - }); + expect(await this.token.allowance(this.initialHolder, this.recipient)).to.equal(value); }); }); describe('when the sender does not have enough balance', function () { - const value = supply.addn(1); + const value = supply + 1n; it('emits an approval event', async function () { - expectEvent(await approve.call(this, owner, spender, value), 'Approval', { - owner: owner, - spender: spender, - value: value, - }); + await expect(this.approve(this.initialHolder, this.recipient, value)) + .to.emit(this.token, 'Approval') + .withArgs(this.initialHolder.address, this.recipient.address, value); }); - describe('when there was no approved value before', function () { - it('approves the requested value', async function () { - await approve.call(this, owner, spender, value); + it('approves the requested value when there was no approved value before', async function () { + await this.approve(this.initialHolder, this.recipient, value); - expect(await this.token.allowance(owner, spender)).to.be.bignumber.equal(value); - }); + expect(await this.token.allowance(this.initialHolder, this.recipient)).to.equal(value); }); - describe('when the spender had an approved value', function () { - beforeEach(async function () { - await approve.call(this, owner, spender, new BN(1)); - }); + it('approves the requested value and replaces the previous one when the spender had an approved value', async function () { + await this.approve(this.initialHolder, this.recipient, 1n); + await this.approve(this.initialHolder, this.recipient, value); - it('approves the requested value and replaces the previous one', async function () { - await approve.call(this, owner, spender, value); - - expect(await this.token.allowance(owner, spender)).to.be.bignumber.equal(value); - }); + expect(await this.token.allowance(this.initialHolder, this.recipient)).to.equal(value); }); }); }); - describe('when the spender is the zero address', function () { - it('reverts', async function () { - await expectRevertCustomError(approve.call(this, owner, ZERO_ADDRESS, supply), `ERC20InvalidSpender`, [ - ZERO_ADDRESS, - ]); - }); + it('reverts when the spender is the zero address', async function () { + await expect(this.approve(this.initialHolder, ethers.ZeroAddress, supply)) + .to.be.revertedWithCustomError(this.token, `ERC20InvalidSpender`) + .withArgs(ethers.ZeroAddress); }); } diff --git a/test/token/ERC20/ERC20.test.js b/test/token/ERC20/ERC20.test.js index 2191fd8cb..97037a697 100644 --- a/test/token/ERC20/ERC20.test.js +++ b/test/token/ERC20/ERC20.test.js @@ -1,34 +1,37 @@ -const { BN, constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { ZERO_ADDRESS } = constants; +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); const { shouldBehaveLikeERC20, shouldBehaveLikeERC20Transfer, shouldBehaveLikeERC20Approve, } = require('./ERC20.behavior'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const TOKENS = [ - { Token: artifacts.require('$ERC20') }, - { Token: artifacts.require('$ERC20ApprovalMock'), forcedApproval: true }, -]; +const TOKENS = [{ Token: '$ERC20' }, { Token: '$ERC20ApprovalMock', forcedApproval: true }]; -contract('ERC20', function (accounts) { - const [initialHolder, recipient] = accounts; - - const name = 'My Token'; - const symbol = 'MTKN'; - const initialSupply = new BN(100); +const name = 'My Token'; +const symbol = 'MTKN'; +const initialSupply = 100n; +describe('ERC20', function () { for (const { Token, forcedApproval } of TOKENS) { - describe(`using ${Token._json.contractName}`, function () { + describe(Token, function () { + const fixture = async () => { + const [initialHolder, recipient, anotherAccount] = await ethers.getSigners(); + + const token = await ethers.deployContract(Token, [name, symbol]); + await token.$_mint(initialHolder, initialSupply); + + return { initialHolder, recipient, anotherAccount, token }; + }; + beforeEach(async function () { - this.token = await Token.new(name, symbol); - await this.token.$_mint(initialHolder, initialSupply); + Object.assign(this, await loadFixture(fixture)); }); - shouldBehaveLikeERC20(initialSupply, accounts, { forcedApproval }); + shouldBehaveLikeERC20(initialSupply, { forcedApproval }); it('has a name', async function () { expect(await this.token.name()).to.equal(name); @@ -39,162 +42,164 @@ contract('ERC20', function (accounts) { }); it('has 18 decimals', async function () { - expect(await this.token.decimals()).to.be.bignumber.equal('18'); + expect(await this.token.decimals()).to.equal(18n); }); describe('_mint', function () { - const value = new BN(50); + const value = 50n; it('rejects a null account', async function () { - await expectRevertCustomError(this.token.$_mint(ZERO_ADDRESS, value), 'ERC20InvalidReceiver', [ZERO_ADDRESS]); + await expect(this.token.$_mint(ethers.ZeroAddress, value)) + .to.be.revertedWithCustomError(this.token, 'ERC20InvalidReceiver') + .withArgs(ethers.ZeroAddress); }); it('rejects overflow', async function () { - const maxUint256 = new BN('2').pow(new BN(256)).subn(1); - await expectRevert( - this.token.$_mint(recipient, maxUint256), - 'reverted with panic code 0x11 (Arithmetic operation underflowed or overflowed outside of an unchecked block)', + await expect(this.token.$_mint(this.recipient, ethers.MaxUint256)).to.be.revertedWithPanic( + PANIC_CODES.ARITHMETIC_UNDER_OR_OVERFLOW, ); }); describe('for a non zero account', function () { beforeEach('minting', async function () { - this.receipt = await this.token.$_mint(recipient, value); + this.tx = await this.token.$_mint(this.recipient, value); }); it('increments totalSupply', async function () { - const expectedSupply = initialSupply.add(value); - expect(await this.token.totalSupply()).to.be.bignumber.equal(expectedSupply); + await expect(await this.token.totalSupply()).to.equal(initialSupply + value); }); it('increments recipient balance', async function () { - expect(await this.token.balanceOf(recipient)).to.be.bignumber.equal(value); + await expect(this.tx).to.changeTokenBalance(this.token, this.recipient, value); }); it('emits Transfer event', async function () { - const event = expectEvent(this.receipt, 'Transfer', { from: ZERO_ADDRESS, to: recipient }); - - expect(event.args.value).to.be.bignumber.equal(value); + await expect(this.tx) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.recipient.address, value); }); }); }); describe('_burn', function () { it('rejects a null account', async function () { - await expectRevertCustomError(this.token.$_burn(ZERO_ADDRESS, new BN(1)), 'ERC20InvalidSender', [ - ZERO_ADDRESS, - ]); + await expect(this.token.$_burn(ethers.ZeroAddress, 1n)) + .to.be.revertedWithCustomError(this.token, 'ERC20InvalidSender') + .withArgs(ethers.ZeroAddress); }); describe('for a non zero account', function () { it('rejects burning more than balance', async function () { - await expectRevertCustomError( - this.token.$_burn(initialHolder, initialSupply.addn(1)), - 'ERC20InsufficientBalance', - [initialHolder, initialSupply, initialSupply.addn(1)], - ); + await expect(this.token.$_burn(this.initialHolder, initialSupply + 1n)) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') + .withArgs(this.initialHolder.address, initialSupply, initialSupply + 1n); }); const describeBurn = function (description, value) { describe(description, function () { beforeEach('burning', async function () { - this.receipt = await this.token.$_burn(initialHolder, value); + this.tx = await this.token.$_burn(this.initialHolder, value); }); it('decrements totalSupply', async function () { - const expectedSupply = initialSupply.sub(value); - expect(await this.token.totalSupply()).to.be.bignumber.equal(expectedSupply); + expect(await this.token.totalSupply()).to.equal(initialSupply - value); }); it('decrements initialHolder balance', async function () { - const expectedBalance = initialSupply.sub(value); - expect(await this.token.balanceOf(initialHolder)).to.be.bignumber.equal(expectedBalance); + await expect(this.tx).to.changeTokenBalance(this.token, this.initialHolder, -value); }); it('emits Transfer event', async function () { - const event = expectEvent(this.receipt, 'Transfer', { from: initialHolder, to: ZERO_ADDRESS }); - - expect(event.args.value).to.be.bignumber.equal(value); + await expect(this.tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.initialHolder.address, ethers.ZeroAddress, value); }); }); }; describeBurn('for entire balance', initialSupply); - describeBurn('for less value than balance', initialSupply.subn(1)); + describeBurn('for less value than balance', initialSupply - 1n); }); }); describe('_update', function () { - const value = new BN(1); + const value = 1n; + + beforeEach(async function () { + this.totalSupply = await this.token.totalSupply(); + }); it('from is the zero address', async function () { - const balanceBefore = await this.token.balanceOf(initialHolder); - const totalSupply = await this.token.totalSupply(); + const tx = await this.token.$_update(ethers.ZeroAddress, this.initialHolder, value); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.initialHolder.address, value); - expectEvent(await this.token.$_update(ZERO_ADDRESS, initialHolder, value), 'Transfer', { - from: ZERO_ADDRESS, - to: initialHolder, - value: value, - }); - expect(await this.token.totalSupply()).to.be.bignumber.equal(totalSupply.add(value)); - expect(await this.token.balanceOf(initialHolder)).to.be.bignumber.equal(balanceBefore.add(value)); + expect(await this.token.totalSupply()).to.equal(this.totalSupply + value); + await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, value); }); it('to is the zero address', async function () { - const balanceBefore = await this.token.balanceOf(initialHolder); - const totalSupply = await this.token.totalSupply(); + const tx = await this.token.$_update(this.initialHolder, ethers.ZeroAddress, value); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.initialHolder.address, ethers.ZeroAddress, value); - expectEvent(await this.token.$_update(initialHolder, ZERO_ADDRESS, value), 'Transfer', { - from: initialHolder, - to: ZERO_ADDRESS, - value: value, - }); - expect(await this.token.totalSupply()).to.be.bignumber.equal(totalSupply.sub(value)); - expect(await this.token.balanceOf(initialHolder)).to.be.bignumber.equal(balanceBefore.sub(value)); + expect(await this.token.totalSupply()).to.equal(this.totalSupply - value); + await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, -value); }); - it('from and to are the zero address', async function () { - const totalSupply = await this.token.totalSupply(); + describe('from and to are the same address', function () { + it('zero address', async function () { + const tx = await this.token.$_update(ethers.ZeroAddress, ethers.ZeroAddress, value); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, ethers.ZeroAddress, value); - await this.token.$_update(ZERO_ADDRESS, ZERO_ADDRESS, value); + expect(await this.token.totalSupply()).to.equal(this.totalSupply); + await expect(tx).to.changeTokenBalance(this.token, ethers.ZeroAddress, 0n); + }); - expect(await this.token.totalSupply()).to.be.bignumber.equal(totalSupply); - expectEvent(await this.token.$_update(ZERO_ADDRESS, ZERO_ADDRESS, value), 'Transfer', { - from: ZERO_ADDRESS, - to: ZERO_ADDRESS, - value: value, + describe('non zero address', function () { + it('reverts without balance', async function () { + await expect(this.token.$_update(this.recipient, this.recipient, value)) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') + .withArgs(this.recipient.address, 0n, value); + }); + + it('executes with balance', async function () { + const tx = await this.token.$_update(this.initialHolder, this.initialHolder, value); + await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, 0n); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.initialHolder.address, this.initialHolder.address, value); + }); }); }); }); describe('_transfer', function () { - shouldBehaveLikeERC20Transfer(initialHolder, recipient, initialSupply, function (from, to, value) { - return this.token.$_transfer(from, to, value); + beforeEach(function () { + this.transfer = this.token.$_transfer; }); - describe('when the sender is the zero address', function () { - it('reverts', async function () { - await expectRevertCustomError( - this.token.$_transfer(ZERO_ADDRESS, recipient, initialSupply), - 'ERC20InvalidSender', - [ZERO_ADDRESS], - ); - }); + shouldBehaveLikeERC20Transfer(initialSupply); + + it('reverts when the sender is the zero address', async function () { + await expect(this.token.$_transfer(ethers.ZeroAddress, this.recipient, initialSupply)) + .to.be.revertedWithCustomError(this.token, 'ERC20InvalidSender') + .withArgs(ethers.ZeroAddress); }); }); describe('_approve', function () { - shouldBehaveLikeERC20Approve(initialHolder, recipient, initialSupply, function (owner, spender, value) { - return this.token.$_approve(owner, spender, value); + beforeEach(function () { + this.approve = this.token.$_approve; }); - describe('when the owner is the zero address', function () { - it('reverts', async function () { - await expectRevertCustomError( - this.token.$_approve(ZERO_ADDRESS, recipient, initialSupply), - 'ERC20InvalidApprover', - [ZERO_ADDRESS], - ); - }); + shouldBehaveLikeERC20Approve(initialSupply); + + it('reverts when the owner is the zero address', async function () { + await expect(this.token.$_approve(ethers.ZeroAddress, this.recipient, initialSupply)) + .to.be.revertedWithCustomError(this.token, 'ERC20InvalidApprover') + .withArgs(ethers.ZeroAddress); }); }); }); diff --git a/test/token/ERC20/extensions/ERC20Wrapper.test.js b/test/token/ERC20/extensions/ERC20Wrapper.test.js index c54a9e007..b61573edd 100644 --- a/test/token/ERC20/extensions/ERC20Wrapper.test.js +++ b/test/token/ERC20/extensions/ERC20Wrapper.test.js @@ -1,31 +1,34 @@ -const { BN, constants, expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { ZERO_ADDRESS, MAX_UINT256 } = constants; +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { shouldBehaveLikeERC20 } = require('../ERC20.behavior'); -const { expectRevertCustomError } = require('../../../helpers/customError'); -const NotAnERC20 = artifacts.require('CallReceiverMock'); -const ERC20Decimals = artifacts.require('$ERC20DecimalsMock'); -const ERC20Wrapper = artifacts.require('$ERC20Wrapper'); +const name = 'My Token'; +const symbol = 'MTKN'; +const initialSupply = 100n; -contract('ERC20Wrapper', function (accounts) { - const [initialHolder, receiver] = accounts; +async function fixture() { + const [initialHolder, recipient, anotherAccount] = await ethers.getSigners(); + const underlying = await ethers.deployContract('$ERC20DecimalsMock', [name, symbol, 9]); + await underlying.$_mint(initialHolder, initialSupply); + + const token = await ethers.deployContract('$ERC20Wrapper', [`Wrapped ${name}`, `W${symbol}`, underlying]); + + return { initialHolder, recipient, anotherAccount, underlying, token }; +} + +describe('ERC20Wrapper', function () { const name = 'My Token'; const symbol = 'MTKN'; - const initialSupply = new BN(100); - beforeEach(async function () { - this.underlying = await ERC20Decimals.new(name, symbol, 9); - await this.underlying.$_mint(initialHolder, initialSupply); - - this.token = await ERC20Wrapper.new(`Wrapped ${name}`, `W${symbol}`, this.underlying.address); + Object.assign(this, await loadFixture(fixture)); }); - afterEach(async function () { - expect(await this.underlying.balanceOf(this.token.address)).to.be.bignumber.equal(await this.token.totalSupply()); + afterEach('Underlying balance', async function () { + expect(await this.underlying.balanceOf(this.token)).to.be.equal(await this.token.totalSupply()); }); it('has a name', async function () { @@ -37,175 +40,169 @@ contract('ERC20Wrapper', function (accounts) { }); it('has the same decimals as the underlying token', async function () { - expect(await this.token.decimals()).to.be.bignumber.equal('9'); + expect(await this.token.decimals()).to.be.equal(9n); }); it('decimals default back to 18 if token has no metadata', async function () { - const noDecimals = await NotAnERC20.new(); - const otherToken = await ERC20Wrapper.new(`Wrapped ${name}`, `W${symbol}`, noDecimals.address); - expect(await otherToken.decimals()).to.be.bignumber.equal('18'); + const noDecimals = await ethers.deployContract('CallReceiverMock'); + const token = await ethers.deployContract('$ERC20Wrapper', [`Wrapped ${name}`, `W${symbol}`, noDecimals]); + expect(await token.decimals()).to.be.equal(18n); }); it('has underlying', async function () { - expect(await this.token.underlying()).to.be.bignumber.equal(this.underlying.address); + expect(await this.token.underlying()).to.be.equal(this.underlying.target); }); describe('deposit', function () { - it('valid', async function () { - await this.underlying.approve(this.token.address, initialSupply, { from: initialHolder }); - const { tx } = await this.token.depositFor(initialHolder, initialSupply, { from: initialHolder }); - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: initialHolder, - to: this.token.address, - value: initialSupply, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: ZERO_ADDRESS, - to: initialHolder, - value: initialSupply, - }); + it('executes with approval', async function () { + await this.underlying.connect(this.initialHolder).approve(this.token, initialSupply); + const tx = await this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply); + await expect(tx) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.initialHolder.address, this.token.target, initialSupply) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.initialHolder.address, initialSupply); + + await expect(tx).to.changeTokenBalances( + this.underlying, + [this.initialHolder, this.token], + [-initialSupply, initialSupply], + ); + await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, initialSupply); }); - it('missing approval', async function () { - await expectRevertCustomError( - this.token.depositFor(initialHolder, initialSupply, { from: initialHolder }), - 'ERC20InsufficientAllowance', - [this.token.address, 0, initialSupply], - ); + it('reverts when missing approval', async function () { + await expect(this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply)) + .to.be.revertedWithCustomError(this.underlying, 'ERC20InsufficientAllowance') + .withArgs(this.token.target, 0, initialSupply); }); - it('missing balance', async function () { - await this.underlying.approve(this.token.address, MAX_UINT256, { from: initialHolder }); - await expectRevertCustomError( - this.token.depositFor(initialHolder, MAX_UINT256, { from: initialHolder }), - 'ERC20InsufficientBalance', - [initialHolder, initialSupply, MAX_UINT256], - ); + it('reverts when inssuficient balance', async function () { + await this.underlying.connect(this.initialHolder).approve(this.token, ethers.MaxUint256); + await expect(this.token.connect(this.initialHolder).depositFor(this.initialHolder, ethers.MaxUint256)) + .to.be.revertedWithCustomError(this.underlying, 'ERC20InsufficientBalance') + .withArgs(this.initialHolder.address, initialSupply, ethers.MaxUint256); }); - it('to other account', async function () { - await this.underlying.approve(this.token.address, initialSupply, { from: initialHolder }); - const { tx } = await this.token.depositFor(receiver, initialSupply, { from: initialHolder }); - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: initialHolder, - to: this.token.address, - value: initialSupply, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: ZERO_ADDRESS, - to: receiver, - value: initialSupply, - }); + it('deposits to other account', async function () { + await this.underlying.connect(this.initialHolder).approve(this.token, initialSupply); + const tx = await this.token.connect(this.initialHolder).depositFor(this.recipient, initialSupply); + await expect(tx) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.initialHolder.address, this.token.target, initialSupply) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.recipient.address, initialSupply); + + await expect(tx).to.changeTokenBalances( + this.underlying, + [this.initialHolder, this.token], + [-initialSupply, initialSupply], + ); + await expect(tx).to.changeTokenBalances(this.token, [this.initialHolder, this.recipient], [0, initialSupply]); }); it('reverts minting to the wrapper contract', async function () { - await this.underlying.approve(this.token.address, MAX_UINT256, { from: initialHolder }); - await expectRevertCustomError( - this.token.depositFor(this.token.address, MAX_UINT256, { from: initialHolder }), - 'ERC20InvalidReceiver', - [this.token.address], - ); + await this.underlying.connect(this.initialHolder).approve(this.token, ethers.MaxUint256); + await expect(this.token.connect(this.initialHolder).depositFor(this.token, ethers.MaxUint256)) + .to.be.revertedWithCustomError(this.token, 'ERC20InvalidReceiver') + .withArgs(this.token.target); }); }); describe('withdraw', function () { beforeEach(async function () { - await this.underlying.approve(this.token.address, initialSupply, { from: initialHolder }); - await this.token.depositFor(initialHolder, initialSupply, { from: initialHolder }); + await this.underlying.connect(this.initialHolder).approve(this.token, initialSupply); + await this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply); }); - it('missing balance', async function () { - await expectRevertCustomError( - this.token.withdrawTo(initialHolder, MAX_UINT256, { from: initialHolder }), - 'ERC20InsufficientBalance', - [initialHolder, initialSupply, MAX_UINT256], - ); + it('reverts when inssuficient balance', async function () { + await expect(this.token.connect(this.initialHolder).withdrawTo(this.initialHolder, ethers.MaxInt256)) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') + .withArgs(this.initialHolder.address, initialSupply, ethers.MaxInt256); }); - it('valid', async function () { - const value = new BN(42); - - const { tx } = await this.token.withdrawTo(initialHolder, value, { from: initialHolder }); - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: this.token.address, - to: initialHolder, - value: value, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: initialHolder, - to: ZERO_ADDRESS, - value: value, - }); + it('executes when operation is valid', async function () { + const value = 42n; + + const tx = await this.token.connect(this.initialHolder).withdrawTo(this.initialHolder, value); + await expect(tx) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.token.target, this.initialHolder.address, value) + .to.emit(this.token, 'Transfer') + .withArgs(this.initialHolder.address, ethers.ZeroAddress, value); + + await expect(tx).to.changeTokenBalances(this.underlying, [this.token, this.initialHolder], [-value, value]); + await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, -value); }); it('entire balance', async function () { - const { tx } = await this.token.withdrawTo(initialHolder, initialSupply, { from: initialHolder }); - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: this.token.address, - to: initialHolder, - value: initialSupply, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: initialHolder, - to: ZERO_ADDRESS, - value: initialSupply, - }); + const tx = await this.token.connect(this.initialHolder).withdrawTo(this.initialHolder, initialSupply); + await expect(tx) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.token.target, this.initialHolder.address, initialSupply) + .to.emit(this.token, 'Transfer') + .withArgs(this.initialHolder.address, ethers.ZeroAddress, initialSupply); + + await expect(tx).to.changeTokenBalances( + this.underlying, + [this.token, this.initialHolder], + [-initialSupply, initialSupply], + ); + await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, -initialSupply); }); it('to other account', async function () { - const { tx } = await this.token.withdrawTo(receiver, initialSupply, { from: initialHolder }); - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: this.token.address, - to: receiver, - value: initialSupply, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: initialHolder, - to: ZERO_ADDRESS, - value: initialSupply, - }); + const tx = await this.token.connect(this.initialHolder).withdrawTo(this.recipient, initialSupply); + await expect(tx) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.token.target, this.recipient.address, initialSupply) + .to.emit(this.token, 'Transfer') + .withArgs(this.initialHolder.address, ethers.ZeroAddress, initialSupply); + + await expect(tx).to.changeTokenBalances( + this.underlying, + [this.token, this.initialHolder, this.recipient], + [-initialSupply, 0, initialSupply], + ); + await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, -initialSupply); }); it('reverts withdrawing to the wrapper contract', async function () { - expectRevertCustomError( - this.token.withdrawTo(this.token.address, initialSupply, { from: initialHolder }), - 'ERC20InvalidReceiver', - [this.token.address], - ); + await expect(this.token.connect(this.initialHolder).withdrawTo(this.token, initialSupply)) + .to.be.revertedWithCustomError(this.token, 'ERC20InvalidReceiver') + .withArgs(this.token.target); }); }); describe('recover', function () { it('nothing to recover', async function () { - await this.underlying.approve(this.token.address, initialSupply, { from: initialHolder }); - await this.token.depositFor(initialHolder, initialSupply, { from: initialHolder }); - - const { tx } = await this.token.$_recover(receiver); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: ZERO_ADDRESS, - to: receiver, - value: '0', - }); + await this.underlying.connect(this.initialHolder).approve(this.token, initialSupply); + await this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply); + + const tx = await this.token.$_recover(this.recipient); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.recipient.address, 0n); + + await expect(tx).to.changeTokenBalance(this.token, this.recipient, 0); }); it('something to recover', async function () { - await this.underlying.transfer(this.token.address, initialSupply, { from: initialHolder }); - - const { tx } = await this.token.$_recover(receiver); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: ZERO_ADDRESS, - to: receiver, - value: initialSupply, - }); + await this.underlying.connect(this.initialHolder).transfer(this.token, initialSupply); + + const tx = await this.token.$_recover(this.recipient); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.recipient.address, initialSupply); + + await expect(tx).to.changeTokenBalance(this.token, this.recipient, initialSupply); }); }); describe('erc20 behaviour', function () { beforeEach(async function () { - await this.underlying.approve(this.token.address, initialSupply, { from: initialHolder }); - await this.token.depositFor(initialHolder, initialSupply, { from: initialHolder }); + await this.underlying.connect(this.initialHolder).approve(this.token, initialSupply); + await this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply); }); - shouldBehaveLikeERC20(initialSupply, accounts); + shouldBehaveLikeERC20(initialSupply); }); }); From ae69142379cd5f20b79c1f864d89f8fe955898da Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Wed, 29 Nov 2023 21:51:08 +0000 Subject: [PATCH 130/167] Migrate proxy folder to ethersjs (#4746) Co-authored-by: Hadrien Croubois Co-authored-by: ernestognw --- test/helpers/erc1967.js | 39 +- test/proxy/Clones.behaviour.js | 77 ++-- test/proxy/Clones.test.js | 99 ++-- test/proxy/ERC1967/ERC1967Proxy.test.js | 25 +- test/proxy/ERC1967/ERC1967Utils.test.js | 138 +++--- test/proxy/Proxy.behaviour.js | 112 ++--- test/proxy/beacon/BeaconProxy.test.js | 190 ++++---- test/proxy/beacon/UpgradeableBeacon.test.js | 63 +-- test/proxy/transparent/ProxyAdmin.test.js | 88 ++-- .../TransparentUpgradeableProxy.behaviour.js | 421 ++++++++---------- .../TransparentUpgradeableProxy.test.js | 40 +- test/proxy/utils/Initializable.test.js | 196 ++++---- test/proxy/utils/UUPSUpgradeable.test.js | 157 +++---- 13 files changed, 787 insertions(+), 858 deletions(-) diff --git a/test/helpers/erc1967.js b/test/helpers/erc1967.js index 50542c89a..88a87d661 100644 --- a/test/helpers/erc1967.js +++ b/test/helpers/erc1967.js @@ -5,37 +5,32 @@ const ImplementationLabel = 'eip1967.proxy.implementation'; const AdminLabel = 'eip1967.proxy.admin'; const BeaconLabel = 'eip1967.proxy.beacon'; -function labelToSlot(label) { - return ethers.toBeHex(BigInt(ethers.keccak256(ethers.toUtf8Bytes(label))) - 1n); -} +const erc1967slot = label => ethers.toBeHex(ethers.toBigInt(ethers.id(label)) - 1n); +const erc7201slot = label => ethers.toBeHex(ethers.toBigInt(ethers.keccak256(erc1967slot(label))) & ~0xffn); -function getSlot(address, slot) { - return getStorageAt( - ethers.isAddress(address) ? address : address.address, - ethers.isBytesLike(slot) ? slot : labelToSlot(slot), +const getSlot = (address, slot) => + (ethers.isAddressable(address) ? address.getAddress() : Promise.resolve(address)).then(address => + getStorageAt(address, ethers.isBytesLike(slot) ? slot : erc1967slot(slot)), ); -} -function setSlot(address, slot, value) { - return setStorageAt( - ethers.isAddress(address) ? address : address.address, - ethers.isBytesLike(slot) ? slot : labelToSlot(slot), - value, - ); -} +const setSlot = (address, slot, value) => + Promise.all([ + ethers.isAddressable(address) ? address.getAddress() : Promise.resolve(address), + ethers.isAddressable(value) ? value.getAddress() : Promise.resolve(value), + ]).then(([address, value]) => setStorageAt(address, ethers.isBytesLike(slot) ? slot : erc1967slot(slot), value)); -async function getAddressInSlot(address, slot) { - const slotValue = await getSlot(address, slot); - return ethers.getAddress(slotValue.substring(slotValue.length - 40)); -} +const getAddressInSlot = (address, slot) => + getSlot(address, slot).then(slotValue => ethers.AbiCoder.defaultAbiCoder().decode(['address'], slotValue)[0]); module.exports = { ImplementationLabel, AdminLabel, BeaconLabel, - ImplementationSlot: labelToSlot(ImplementationLabel), - AdminSlot: labelToSlot(AdminLabel), - BeaconSlot: labelToSlot(BeaconLabel), + ImplementationSlot: erc1967slot(ImplementationLabel), + AdminSlot: erc1967slot(AdminLabel), + BeaconSlot: erc1967slot(BeaconLabel), + erc1967slot, + erc7201slot, setSlot, getSlot, getAddressInSlot, diff --git a/test/proxy/Clones.behaviour.js b/test/proxy/Clones.behaviour.js index b5fd3c51b..861fae8a2 100644 --- a/test/proxy/Clones.behaviour.js +++ b/test/proxy/Clones.behaviour.js @@ -1,33 +1,29 @@ -const { expectRevert } = require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const DummyImplementation = artifacts.require('DummyImplementation'); - -module.exports = function shouldBehaveLikeClone(createClone) { - before('deploy implementation', async function () { - this.implementation = web3.utils.toChecksumAddress((await DummyImplementation.new()).address); - }); - +module.exports = function shouldBehaveLikeClone() { const assertProxyInitialization = function ({ value, balance }) { it('initializes the proxy', async function () { - const dummy = new DummyImplementation(this.proxy); - expect(await dummy.value()).to.be.bignumber.equal(value.toString()); + const dummy = await ethers.getContractAt('DummyImplementation', this.proxy); + expect(await dummy.value()).to.equal(value); }); it('has expected balance', async function () { - expect(await web3.eth.getBalance(this.proxy)).to.be.bignumber.equal(balance.toString()); + expect(await ethers.provider.getBalance(this.proxy)).to.equal(balance); }); }; describe('initialization without parameters', function () { describe('non payable', function () { - const expectedInitializedValue = 10; - const initializeData = new DummyImplementation('').contract.methods['initializeNonPayable()']().encodeABI(); + const expectedInitializedValue = 10n; + + beforeEach(async function () { + this.initializeData = await this.implementation.interface.encodeFunctionData('initializeNonPayable'); + }); describe('when not sending balance', function () { beforeEach('creating proxy', async function () { - this.proxy = (await createClone(this.implementation, initializeData)).address; + this.proxy = await this.createClone(this.initializeData); }); assertProxyInitialization({ @@ -37,21 +33,24 @@ module.exports = function shouldBehaveLikeClone(createClone) { }); describe('when sending some balance', function () { - const value = 10e5; + const value = 10n ** 6n; it('reverts', async function () { - await expectRevert.unspecified(createClone(this.implementation, initializeData, { value })); + await expect(this.createClone(this.initializeData, { value })).to.be.reverted; }); }); }); describe('payable', function () { - const expectedInitializedValue = 100; - const initializeData = new DummyImplementation('').contract.methods['initializePayable()']().encodeABI(); + const expectedInitializedValue = 100n; + + beforeEach(async function () { + this.initializeData = await this.implementation.interface.encodeFunctionData('initializePayable'); + }); describe('when not sending balance', function () { beforeEach('creating proxy', async function () { - this.proxy = (await createClone(this.implementation, initializeData)).address; + this.proxy = await this.createClone(this.initializeData); }); assertProxyInitialization({ @@ -61,10 +60,10 @@ module.exports = function shouldBehaveLikeClone(createClone) { }); describe('when sending some balance', function () { - const value = 10e5; + const value = 10n ** 6n; beforeEach('creating proxy', async function () { - this.proxy = (await createClone(this.implementation, initializeData, { value })).address; + this.proxy = await this.createClone(this.initializeData, { value }); }); assertProxyInitialization({ @@ -77,14 +76,17 @@ module.exports = function shouldBehaveLikeClone(createClone) { describe('initialization with parameters', function () { describe('non payable', function () { - const expectedInitializedValue = 10; - const initializeData = new DummyImplementation('').contract.methods - .initializeNonPayableWithValue(expectedInitializedValue) - .encodeABI(); + const expectedInitializedValue = 10n; + + beforeEach(async function () { + this.initializeData = await this.implementation.interface.encodeFunctionData('initializeNonPayableWithValue', [ + expectedInitializedValue, + ]); + }); describe('when not sending balance', function () { beforeEach('creating proxy', async function () { - this.proxy = (await createClone(this.implementation, initializeData)).address; + this.proxy = await this.createClone(this.initializeData); }); assertProxyInitialization({ @@ -94,23 +96,26 @@ module.exports = function shouldBehaveLikeClone(createClone) { }); describe('when sending some balance', function () { - const value = 10e5; + const value = 10n ** 6n; it('reverts', async function () { - await expectRevert.unspecified(createClone(this.implementation, initializeData, { value })); + await expect(this.createClone(this.initializeData, { value })).to.be.reverted; }); }); }); describe('payable', function () { - const expectedInitializedValue = 42; - const initializeData = new DummyImplementation('').contract.methods - .initializePayableWithValue(expectedInitializedValue) - .encodeABI(); + const expectedInitializedValue = 42n; + + beforeEach(function () { + this.initializeData = this.implementation.interface.encodeFunctionData('initializePayableWithValue', [ + expectedInitializedValue, + ]); + }); describe('when not sending balance', function () { beforeEach('creating proxy', async function () { - this.proxy = (await createClone(this.implementation, initializeData)).address; + this.proxy = await this.createClone(this.initializeData); }); assertProxyInitialization({ @@ -120,10 +125,10 @@ module.exports = function shouldBehaveLikeClone(createClone) { }); describe('when sending some balance', function () { - const value = 10e5; + const value = 10n ** 6n; beforeEach('creating proxy', async function () { - this.proxy = (await createClone(this.implementation, initializeData, { value })).address; + this.proxy = await this.createClone(this.initializeData, { value }); }); assertProxyInitialization({ diff --git a/test/proxy/Clones.test.js b/test/proxy/Clones.test.js index ad3dd537c..626b1e564 100644 --- a/test/proxy/Clones.test.js +++ b/test/proxy/Clones.test.js @@ -1,62 +1,87 @@ -const { ethers } = require('ethers'); -const { expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../helpers/customError'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const shouldBehaveLikeClone = require('./Clones.behaviour'); -const Clones = artifacts.require('$Clones'); +async function fixture() { + const [deployer] = await ethers.getSigners(); -contract('Clones', function (accounts) { - const [deployer] = accounts; + const factory = await ethers.deployContract('$Clones'); + const implementation = await ethers.deployContract('DummyImplementation'); + + const newClone = async (initData, opts = {}) => { + const clone = await factory.$clone.staticCall(implementation).then(address => implementation.attach(address)); + await factory.$clone(implementation); + await deployer.sendTransaction({ to: clone, value: opts.value ?? 0n, data: initData ?? '0x' }); + return clone; + }; + + const newCloneDeterministic = async (initData, opts = {}) => { + const salt = opts.salt ?? ethers.randomBytes(32); + const clone = await factory.$cloneDeterministic + .staticCall(implementation, salt) + .then(address => implementation.attach(address)); + await factory.$cloneDeterministic(implementation, salt); + await deployer.sendTransaction({ to: clone, value: opts.value ?? 0n, data: initData ?? '0x' }); + return clone; + }; + + return { deployer, factory, implementation, newClone, newCloneDeterministic }; +} + +describe('Clones', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); describe('clone', function () { - shouldBehaveLikeClone(async (implementation, initData, opts = {}) => { - const factory = await Clones.new(); - const receipt = await factory.$clone(implementation); - const address = receipt.logs.find(({ event }) => event === 'return$clone').args.instance; - await web3.eth.sendTransaction({ from: deployer, to: address, value: opts.value, data: initData }); - return { address }; + beforeEach(async function () { + this.createClone = this.newClone; }); + + shouldBehaveLikeClone(); }); describe('cloneDeterministic', function () { - shouldBehaveLikeClone(async (implementation, initData, opts = {}) => { - const salt = web3.utils.randomHex(32); - const factory = await Clones.new(); - const receipt = await factory.$cloneDeterministic(implementation, salt); - const address = receipt.logs.find(({ event }) => event === 'return$cloneDeterministic').args.instance; - await web3.eth.sendTransaction({ from: deployer, to: address, value: opts.value, data: initData }); - return { address }; + beforeEach(async function () { + this.createClone = this.newCloneDeterministic; }); - it('address already used', async function () { - const implementation = web3.utils.randomHex(20); - const salt = web3.utils.randomHex(32); - const factory = await Clones.new(); + shouldBehaveLikeClone(); + + it('revert if address already used', async function () { + const salt = ethers.randomBytes(32); + // deploy once - expectEvent(await factory.$cloneDeterministic(implementation, salt), 'return$cloneDeterministic'); + await expect(this.factory.$cloneDeterministic(this.implementation, salt)).to.emit( + this.factory, + 'return$cloneDeterministic', + ); + // deploy twice - await expectRevertCustomError(factory.$cloneDeterministic(implementation, salt), 'ERC1167FailedCreateClone', []); + await expect(this.factory.$cloneDeterministic(this.implementation, salt)).to.be.revertedWithCustomError( + this.factory, + 'ERC1167FailedCreateClone', + ); }); it('address prediction', async function () { - const implementation = web3.utils.randomHex(20); - const salt = web3.utils.randomHex(32); - const factory = await Clones.new(); - const predicted = await factory.$predictDeterministicAddress(implementation, salt); + const salt = ethers.randomBytes(32); - const creationCode = [ + const creationCode = ethers.concat([ '0x3d602d80600a3d3981f3363d3d373d3d3d363d73', - implementation.replace(/0x/, '').toLowerCase(), - '5af43d82803e903d91602b57fd5bf3', - ].join(''); + this.implementation.target, + '0x5af43d82803e903d91602b57fd5bf3', + ]); - expect(ethers.getCreate2Address(factory.address, salt, ethers.keccak256(creationCode))).to.be.equal(predicted); + const predicted = await this.factory.$predictDeterministicAddress(this.implementation, salt); + const expected = ethers.getCreate2Address(this.factory.target, salt, ethers.keccak256(creationCode)); + expect(predicted).to.equal(expected); - expectEvent(await factory.$cloneDeterministic(implementation, salt), 'return$cloneDeterministic', { - instance: predicted, - }); + await expect(this.factory.$cloneDeterministic(this.implementation, salt)) + .to.emit(this.factory, 'return$cloneDeterministic') + .withArgs(predicted); }); }); }); diff --git a/test/proxy/ERC1967/ERC1967Proxy.test.js b/test/proxy/ERC1967/ERC1967Proxy.test.js index 81cc43507..b22280046 100644 --- a/test/proxy/ERC1967/ERC1967Proxy.test.js +++ b/test/proxy/ERC1967/ERC1967Proxy.test.js @@ -1,12 +1,23 @@ +const { ethers } = require('hardhat'); + const shouldBehaveLikeProxy = require('../Proxy.behaviour'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + +const fixture = async () => { + const [nonContractAddress] = await ethers.getSigners(); + + const implementation = await ethers.deployContract('DummyImplementation'); + + const createProxy = (implementation, initData, opts) => + ethers.deployContract('ERC1967Proxy', [implementation, initData], opts); -const ERC1967Proxy = artifacts.require('ERC1967Proxy'); + return { nonContractAddress, implementation, createProxy }; +}; -contract('ERC1967Proxy', function (accounts) { - // `undefined`, `null` and other false-ish opts will not be forwarded. - const createProxy = async function (implementation, initData, opts) { - return ERC1967Proxy.new(implementation, initData, ...[opts].filter(Boolean)); - }; +describe('ERC1967Proxy', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); - shouldBehaveLikeProxy(createProxy, accounts); + shouldBehaveLikeProxy(); }); diff --git a/test/proxy/ERC1967/ERC1967Utils.test.js b/test/proxy/ERC1967/ERC1967Utils.test.js index 975b08d81..f733e297f 100644 --- a/test/proxy/ERC1967/ERC1967Utils.test.js +++ b/test/proxy/ERC1967/ERC1967Utils.test.js @@ -1,70 +1,65 @@ -const { expectEvent, constants } = require('@openzeppelin/test-helpers'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const { getAddressInSlot, setSlot, ImplementationSlot, AdminSlot, BeaconSlot } = require('../../helpers/erc1967'); +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { ZERO_ADDRESS } = constants; +const { getAddressInSlot, setSlot, ImplementationSlot, AdminSlot, BeaconSlot } = require('../../helpers/erc1967'); -const ERC1967Utils = artifacts.require('$ERC1967Utils'); +async function fixture() { + const [, admin, anotherAccount] = await ethers.getSigners(); -const V1 = artifacts.require('DummyImplementation'); -const V2 = artifacts.require('CallReceiverMock'); -const UpgradeableBeaconMock = artifacts.require('UpgradeableBeaconMock'); -const UpgradeableBeaconReentrantMock = artifacts.require('UpgradeableBeaconReentrantMock'); + const utils = await ethers.deployContract('$ERC1967Utils'); + const v1 = await ethers.deployContract('DummyImplementation'); + const v2 = await ethers.deployContract('CallReceiverMock'); -contract('ERC1967Utils', function (accounts) { - const [, admin, anotherAccount] = accounts; - const EMPTY_DATA = '0x'; + return { admin, anotherAccount, utils, v1, v2 }; +} +describe('ERC1967Utils', function () { beforeEach('setup', async function () { - this.utils = await ERC1967Utils.new(); - this.v1 = await V1.new(); - this.v2 = await V2.new(); + Object.assign(this, await loadFixture(fixture)); }); describe('IMPLEMENTATION_SLOT', function () { beforeEach('set v1 implementation', async function () { - await setSlot(this.utils, ImplementationSlot, this.v1.address); + await setSlot(this.utils, ImplementationSlot, this.v1); }); describe('getImplementation', function () { it('returns current implementation and matches implementation slot value', async function () { - expect(await this.utils.$getImplementation()).to.equal(this.v1.address); - expect(await getAddressInSlot(this.utils.address, ImplementationSlot)).to.equal(this.v1.address); + expect(await this.utils.$getImplementation()).to.equal(this.v1.target); + expect(await getAddressInSlot(this.utils, ImplementationSlot)).to.equal(this.v1.target); }); }); describe('upgradeToAndCall', function () { it('sets implementation in storage and emits event', async function () { - const newImplementation = this.v2.address; - const receipt = await this.utils.$upgradeToAndCall(newImplementation, EMPTY_DATA); + const newImplementation = this.v2; + const tx = await this.utils.$upgradeToAndCall(newImplementation, '0x'); - expect(await getAddressInSlot(this.utils.address, ImplementationSlot)).to.equal(newImplementation); - expectEvent(receipt, 'Upgraded', { implementation: newImplementation }); + expect(await getAddressInSlot(this.utils, ImplementationSlot)).to.equal(newImplementation.target); + await expect(tx).to.emit(this.utils, 'Upgraded').withArgs(newImplementation.target); }); it('reverts when implementation does not contain code', async function () { - await expectRevertCustomError( - this.utils.$upgradeToAndCall(anotherAccount, EMPTY_DATA), - 'ERC1967InvalidImplementation', - [anotherAccount], - ); + await expect(this.utils.$upgradeToAndCall(this.anotherAccount, '0x')) + .to.be.revertedWithCustomError(this.utils, 'ERC1967InvalidImplementation') + .withArgs(this.anotherAccount.address); }); describe('when data is empty', function () { it('reverts when value is sent', async function () { - await expectRevertCustomError( - this.utils.$upgradeToAndCall(this.v2.address, EMPTY_DATA, { value: 1 }), + await expect(this.utils.$upgradeToAndCall(this.v2, '0x', { value: 1 })).to.be.revertedWithCustomError( + this.utils, 'ERC1967NonPayable', - [], ); }); }); describe('when data is not empty', function () { it('delegates a call to the new implementation', async function () { - const initializeData = this.v2.contract.methods.mockFunction().encodeABI(); - const receipt = await this.utils.$upgradeToAndCall(this.v2.address, initializeData); - await expectEvent.inTransaction(receipt.tx, await V2.at(this.utils.address), 'MockFunctionCalled'); + const initializeData = this.v2.interface.encodeFunctionData('mockFunction'); + const tx = await this.utils.$upgradeToAndCall(this.v2, initializeData); + await expect(tx).to.emit(await ethers.getContractAt('CallReceiverMock', this.utils), 'MockFunctionCalled'); }); }); }); @@ -72,99 +67,94 @@ contract('ERC1967Utils', function (accounts) { describe('ADMIN_SLOT', function () { beforeEach('set admin', async function () { - await setSlot(this.utils, AdminSlot, admin); + await setSlot(this.utils, AdminSlot, this.admin); }); describe('getAdmin', function () { it('returns current admin and matches admin slot value', async function () { - expect(await this.utils.$getAdmin()).to.equal(admin); - expect(await getAddressInSlot(this.utils.address, AdminSlot)).to.equal(admin); + expect(await this.utils.$getAdmin()).to.equal(this.admin.address); + expect(await getAddressInSlot(this.utils, AdminSlot)).to.equal(this.admin.address); }); }); describe('changeAdmin', function () { it('sets admin in storage and emits event', async function () { - const newAdmin = anotherAccount; - const receipt = await this.utils.$changeAdmin(newAdmin); + const newAdmin = this.anotherAccount; + const tx = await this.utils.$changeAdmin(newAdmin); - expect(await getAddressInSlot(this.utils.address, AdminSlot)).to.equal(newAdmin); - expectEvent(receipt, 'AdminChanged', { previousAdmin: admin, newAdmin: newAdmin }); + expect(await getAddressInSlot(this.utils, AdminSlot)).to.equal(newAdmin.address); + await expect(tx).to.emit(this.utils, 'AdminChanged').withArgs(this.admin.address, newAdmin.address); }); it('reverts when setting the address zero as admin', async function () { - await expectRevertCustomError(this.utils.$changeAdmin(ZERO_ADDRESS), 'ERC1967InvalidAdmin', [ZERO_ADDRESS]); + await expect(this.utils.$changeAdmin(ethers.ZeroAddress)) + .to.be.revertedWithCustomError(this.utils, 'ERC1967InvalidAdmin') + .withArgs(ethers.ZeroAddress); }); }); }); describe('BEACON_SLOT', function () { beforeEach('set beacon', async function () { - this.beacon = await UpgradeableBeaconMock.new(this.v1.address); - await setSlot(this.utils, BeaconSlot, this.beacon.address); + this.beacon = await ethers.deployContract('UpgradeableBeaconMock', [this.v1]); + await setSlot(this.utils, BeaconSlot, this.beacon); }); describe('getBeacon', function () { it('returns current beacon and matches beacon slot value', async function () { - expect(await this.utils.$getBeacon()).to.equal(this.beacon.address); - expect(await getAddressInSlot(this.utils.address, BeaconSlot)).to.equal(this.beacon.address); + expect(await this.utils.$getBeacon()).to.equal(this.beacon.target); + expect(await getAddressInSlot(this.utils, BeaconSlot)).to.equal(this.beacon.target); }); }); describe('upgradeBeaconToAndCall', function () { it('sets beacon in storage and emits event', async function () { - const newBeacon = await UpgradeableBeaconMock.new(this.v2.address); - const receipt = await this.utils.$upgradeBeaconToAndCall(newBeacon.address, EMPTY_DATA); + const newBeacon = await ethers.deployContract('UpgradeableBeaconMock', [this.v2]); + const tx = await this.utils.$upgradeBeaconToAndCall(newBeacon, '0x'); - expect(await getAddressInSlot(this.utils.address, BeaconSlot)).to.equal(newBeacon.address); - expectEvent(receipt, 'BeaconUpgraded', { beacon: newBeacon.address }); + expect(await getAddressInSlot(this.utils, BeaconSlot)).to.equal(newBeacon.target); + await expect(tx).to.emit(this.utils, 'BeaconUpgraded').withArgs(newBeacon.target); }); it('reverts when beacon does not contain code', async function () { - await expectRevertCustomError( - this.utils.$upgradeBeaconToAndCall(anotherAccount, EMPTY_DATA), - 'ERC1967InvalidBeacon', - [anotherAccount], - ); + await expect(this.utils.$upgradeBeaconToAndCall(this.anotherAccount, '0x')) + .to.be.revertedWithCustomError(this.utils, 'ERC1967InvalidBeacon') + .withArgs(this.anotherAccount.address); }); it("reverts when beacon's implementation does not contain code", async function () { - const newBeacon = await UpgradeableBeaconMock.new(anotherAccount); + const newBeacon = await ethers.deployContract('UpgradeableBeaconMock', [this.anotherAccount]); - await expectRevertCustomError( - this.utils.$upgradeBeaconToAndCall(newBeacon.address, EMPTY_DATA), - 'ERC1967InvalidImplementation', - [anotherAccount], - ); + await expect(this.utils.$upgradeBeaconToAndCall(newBeacon, '0x')) + .to.be.revertedWithCustomError(this.utils, 'ERC1967InvalidImplementation') + .withArgs(this.anotherAccount.address); }); describe('when data is empty', function () { it('reverts when value is sent', async function () { - const newBeacon = await UpgradeableBeaconMock.new(this.v2.address); - await expectRevertCustomError( - this.utils.$upgradeBeaconToAndCall(newBeacon.address, EMPTY_DATA, { value: 1 }), + const newBeacon = await ethers.deployContract('UpgradeableBeaconMock', [this.v2]); + await expect(this.utils.$upgradeBeaconToAndCall(newBeacon, '0x', { value: 1 })).to.be.revertedWithCustomError( + this.utils, 'ERC1967NonPayable', - [], ); }); }); describe('when data is not empty', function () { it('delegates a call to the new implementation', async function () { - const initializeData = this.v2.contract.methods.mockFunction().encodeABI(); - const newBeacon = await UpgradeableBeaconMock.new(this.v2.address); - const receipt = await this.utils.$upgradeBeaconToAndCall(newBeacon.address, initializeData); - await expectEvent.inTransaction(receipt.tx, await V2.at(this.utils.address), 'MockFunctionCalled'); + const initializeData = this.v2.interface.encodeFunctionData('mockFunction'); + const newBeacon = await ethers.deployContract('UpgradeableBeaconMock', [this.v2]); + const tx = await this.utils.$upgradeBeaconToAndCall(newBeacon, initializeData); + await expect(tx).to.emit(await ethers.getContractAt('CallReceiverMock', this.utils), 'MockFunctionCalled'); }); }); describe('reentrant beacon implementation() call', function () { it('sees the new beacon implementation', async function () { - const newBeacon = await UpgradeableBeaconReentrantMock.new(); - await expectRevertCustomError( - this.utils.$upgradeBeaconToAndCall(newBeacon.address, '0x'), - 'BeaconProxyBeaconSlotAddress', - [newBeacon.address], - ); + const newBeacon = await ethers.deployContract('UpgradeableBeaconReentrantMock'); + await expect(this.utils.$upgradeBeaconToAndCall(newBeacon, '0x')) + .to.be.revertedWithCustomError(newBeacon, 'BeaconProxyBeaconSlotAddress') + .withArgs(newBeacon.target); }); }); }); diff --git a/test/proxy/Proxy.behaviour.js b/test/proxy/Proxy.behaviour.js index acce6d188..84cd93b51 100644 --- a/test/proxy/Proxy.behaviour.js +++ b/test/proxy/Proxy.behaviour.js @@ -1,100 +1,94 @@ -const { expectRevert } = require('@openzeppelin/test-helpers'); -const { getSlot, ImplementationSlot } = require('../helpers/erc1967'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../helpers/customError'); -const DummyImplementation = artifacts.require('DummyImplementation'); +const { getAddressInSlot, ImplementationSlot } = require('../helpers/erc1967'); -module.exports = function shouldBehaveLikeProxy(createProxy, accounts) { +module.exports = function shouldBehaveLikeProxy() { it('cannot be initialized with a non-contract address', async function () { - const nonContractAddress = accounts[0]; - const initializeData = Buffer.from(''); - await expectRevert.unspecified(createProxy(nonContractAddress, initializeData)); - }); - - before('deploy implementation', async function () { - this.implementation = web3.utils.toChecksumAddress((await DummyImplementation.new()).address); + const initializeData = '0x'; + await expect(this.createProxy(this.nonContractAddress, initializeData)) + .to.be.revertedWithCustomError(await ethers.getContractFactory('ERC1967Proxy'), 'ERC1967InvalidImplementation') + .withArgs(this.nonContractAddress.address); }); const assertProxyInitialization = function ({ value, balance }) { it('sets the implementation address', async function () { - const implementationSlot = await getSlot(this.proxy, ImplementationSlot); - const implementationAddress = web3.utils.toChecksumAddress(implementationSlot.substr(-40)); - expect(implementationAddress).to.be.equal(this.implementation); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.implementation.target); }); it('initializes the proxy', async function () { - const dummy = new DummyImplementation(this.proxy); - expect(await dummy.value()).to.be.bignumber.equal(value.toString()); + const dummy = this.implementation.attach(this.proxy); + expect(await dummy.value()).to.equal(value); }); it('has expected balance', async function () { - expect(await web3.eth.getBalance(this.proxy)).to.be.bignumber.equal(balance.toString()); + expect(await ethers.provider.getBalance(this.proxy)).to.equal(balance); }); }; describe('without initialization', function () { - const initializeData = Buffer.from(''); + const initializeData = '0x'; describe('when not sending balance', function () { beforeEach('creating proxy', async function () { - this.proxy = (await createProxy(this.implementation, initializeData)).address; + this.proxy = await this.createProxy(this.implementation, initializeData); }); - assertProxyInitialization({ value: 0, balance: 0 }); + assertProxyInitialization({ value: 0n, balance: 0n }); }); describe('when sending some balance', function () { - const value = 10e5; + const value = 10n ** 5n; it('reverts', async function () { - await expectRevertCustomError( - createProxy(this.implementation, initializeData, { value }), - 'ERC1967NonPayable', - [], - ); + await expect(this.createProxy(this.implementation, initializeData, { value })).to.be.reverted; }); }); }); describe('initialization without parameters', function () { describe('non payable', function () { - const expectedInitializedValue = 10; - const initializeData = new DummyImplementation('').contract.methods['initializeNonPayable()']().encodeABI(); + const expectedInitializedValue = 10n; + + beforeEach(function () { + this.initializeData = this.implementation.interface.encodeFunctionData('initializeNonPayable'); + }); describe('when not sending balance', function () { beforeEach('creating proxy', async function () { - this.proxy = (await createProxy(this.implementation, initializeData)).address; + this.proxy = await this.createProxy(this.implementation, this.initializeData); }); assertProxyInitialization({ value: expectedInitializedValue, - balance: 0, + balance: 0n, }); }); describe('when sending some balance', function () { - const value = 10e5; + const value = 10n ** 5n; it('reverts', async function () { - await expectRevert.unspecified(createProxy(this.implementation, initializeData, { value })); + await expect(this.createProxy(this.implementation, this.initializeData, { value })).to.be.reverted; }); }); }); describe('payable', function () { - const expectedInitializedValue = 100; - const initializeData = new DummyImplementation('').contract.methods['initializePayable()']().encodeABI(); + const expectedInitializedValue = 100n; + + beforeEach(function () { + this.initializeData = this.implementation.interface.encodeFunctionData('initializePayable'); + }); describe('when not sending balance', function () { beforeEach('creating proxy', async function () { - this.proxy = (await createProxy(this.implementation, initializeData)).address; + this.proxy = await this.createProxy(this.implementation, this.initializeData); }); assertProxyInitialization({ value: expectedInitializedValue, - balance: 0, + balance: 0n, }); }); @@ -102,7 +96,7 @@ module.exports = function shouldBehaveLikeProxy(createProxy, accounts) { const value = 10e5; beforeEach('creating proxy', async function () { - this.proxy = (await createProxy(this.implementation, initializeData, { value })).address; + this.proxy = await this.createProxy(this.implementation, this.initializeData, { value }); }); assertProxyInitialization({ @@ -115,14 +109,17 @@ module.exports = function shouldBehaveLikeProxy(createProxy, accounts) { describe('initialization with parameters', function () { describe('non payable', function () { - const expectedInitializedValue = 10; - const initializeData = new DummyImplementation('').contract.methods - .initializeNonPayableWithValue(expectedInitializedValue) - .encodeABI(); + const expectedInitializedValue = 10n; + + beforeEach(function () { + this.initializeData = this.implementation.interface.encodeFunctionData('initializeNonPayableWithValue', [ + expectedInitializedValue, + ]); + }); describe('when not sending balance', function () { beforeEach('creating proxy', async function () { - this.proxy = (await createProxy(this.implementation, initializeData)).address; + this.proxy = await this.createProxy(this.implementation, this.initializeData); }); assertProxyInitialization({ @@ -135,33 +132,36 @@ module.exports = function shouldBehaveLikeProxy(createProxy, accounts) { const value = 10e5; it('reverts', async function () { - await expectRevert.unspecified(createProxy(this.implementation, initializeData, { value })); + await expect(this.createProxy(this.implementation, this.initializeData, { value })).to.be.reverted; }); }); }); describe('payable', function () { - const expectedInitializedValue = 42; - const initializeData = new DummyImplementation('').contract.methods - .initializePayableWithValue(expectedInitializedValue) - .encodeABI(); + const expectedInitializedValue = 42n; + + beforeEach(function () { + this.initializeData = this.implementation.interface.encodeFunctionData('initializePayableWithValue', [ + expectedInitializedValue, + ]); + }); describe('when not sending balance', function () { beforeEach('creating proxy', async function () { - this.proxy = (await createProxy(this.implementation, initializeData)).address; + this.proxy = await this.createProxy(this.implementation, this.initializeData); }); assertProxyInitialization({ value: expectedInitializedValue, - balance: 0, + balance: 0n, }); }); describe('when sending some balance', function () { - const value = 10e5; + const value = 10n ** 5n; beforeEach('creating proxy', async function () { - this.proxy = (await createProxy(this.implementation, initializeData, { value })).address; + this.proxy = await this.createProxy(this.implementation, this.initializeData, { value }); }); assertProxyInitialization({ @@ -172,10 +172,12 @@ module.exports = function shouldBehaveLikeProxy(createProxy, accounts) { }); describe('reverting initialization', function () { - const initializeData = new DummyImplementation('').contract.methods.reverts().encodeABI(); + beforeEach(function () { + this.initializeData = this.implementation.interface.encodeFunctionData('reverts'); + }); it('reverts', async function () { - await expectRevert(createProxy(this.implementation, initializeData), 'DummyImplementation reverted'); + await expect(this.createProxy(this.implementation, this.initializeData)).to.be.reverted; }); }); }); diff --git a/test/proxy/beacon/BeaconProxy.test.js b/test/proxy/beacon/BeaconProxy.test.js index d583d0ffb..66856ac08 100644 --- a/test/proxy/beacon/BeaconProxy.test.js +++ b/test/proxy/beacon/BeaconProxy.test.js @@ -1,152 +1,138 @@ -const { expectRevert } = require('@openzeppelin/test-helpers'); -const { getSlot, BeaconSlot } = require('../../helpers/erc1967'); +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { getAddressInSlot, BeaconSlot } = require('../../helpers/erc1967'); -const { expectRevertCustomError } = require('../../helpers/customError'); +async function fixture() { + const [admin, other] = await ethers.getSigners(); -const { expect } = require('chai'); + const v1 = await ethers.deployContract('DummyImplementation'); + const v2 = await ethers.deployContract('DummyImplementationV2'); + const factory = await ethers.getContractFactory('BeaconProxy'); + const beacon = await ethers.deployContract('UpgradeableBeacon', [v1, admin]); + + const newBeaconProxy = (beacon, data, opts = {}) => factory.deploy(beacon, data, opts); -const UpgradeableBeacon = artifacts.require('UpgradeableBeacon'); -const BeaconProxy = artifacts.require('BeaconProxy'); -const DummyImplementation = artifacts.require('DummyImplementation'); -const DummyImplementationV2 = artifacts.require('DummyImplementationV2'); -const BadBeaconNoImpl = artifacts.require('BadBeaconNoImpl'); -const BadBeaconNotContract = artifacts.require('BadBeaconNotContract'); + return { admin, other, factory, beacon, v1, v2, newBeaconProxy }; +} -contract('BeaconProxy', function (accounts) { - const [upgradeableBeaconAdmin, anotherAccount] = accounts; +describe('BeaconProxy', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); describe('bad beacon is not accepted', async function () { it('non-contract beacon', async function () { - await expectRevertCustomError(BeaconProxy.new(anotherAccount, '0x'), 'ERC1967InvalidBeacon', [anotherAccount]); + const notBeacon = this.other; + + await expect(this.newBeaconProxy(notBeacon, '0x')) + .to.be.revertedWithCustomError(this.factory, 'ERC1967InvalidBeacon') + .withArgs(notBeacon.address); }); it('non-compliant beacon', async function () { - const beacon = await BadBeaconNoImpl.new(); - await expectRevert.unspecified(BeaconProxy.new(beacon.address, '0x')); + const badBeacon = await ethers.deployContract('BadBeaconNoImpl'); + + await expect(this.newBeaconProxy(badBeacon, '0x')).to.be.revertedWithoutReason; }); it('non-contract implementation', async function () { - const beacon = await BadBeaconNotContract.new(); - const implementation = await beacon.implementation(); - await expectRevertCustomError(BeaconProxy.new(beacon.address, '0x'), 'ERC1967InvalidImplementation', [ - implementation, - ]); - }); - }); + const badBeacon = await ethers.deployContract('BadBeaconNotContract'); - before('deploy implementation', async function () { - this.implementationV0 = await DummyImplementation.new(); - this.implementationV1 = await DummyImplementationV2.new(); + await expect(this.newBeaconProxy(badBeacon, '0x')) + .to.be.revertedWithCustomError(this.factory, 'ERC1967InvalidImplementation') + .withArgs(await badBeacon.implementation()); + }); }); describe('initialization', function () { - before(function () { - this.assertInitialized = async ({ value, balance }) => { - const beaconSlot = await getSlot(this.proxy, BeaconSlot); - const beaconAddress = web3.utils.toChecksumAddress(beaconSlot.substr(-40)); - expect(beaconAddress).to.equal(this.beacon.address); + async function assertInitialized({ value, balance }) { + const beaconAddress = await getAddressInSlot(this.proxy, BeaconSlot); + expect(beaconAddress).to.equal(this.beacon.target); - const dummy = new DummyImplementation(this.proxy.address); - expect(await dummy.value()).to.bignumber.eq(value); - - expect(await web3.eth.getBalance(this.proxy.address)).to.bignumber.eq(balance); - }; - }); + const dummy = this.v1.attach(this.proxy); + expect(await dummy.value()).to.equal(value); - beforeEach('deploy beacon', async function () { - this.beacon = await UpgradeableBeacon.new(this.implementationV0.address, upgradeableBeaconAdmin); - }); + expect(await ethers.provider.getBalance(this.proxy)).to.equal(balance); + } it('no initialization', async function () { - const data = Buffer.from(''); - this.proxy = await BeaconProxy.new(this.beacon.address, data); - await this.assertInitialized({ value: '0', balance: '0' }); + this.proxy = await this.newBeaconProxy(this.beacon, '0x'); + await assertInitialized.bind(this)({ value: 0n, balance: 0n }); }); it('non-payable initialization', async function () { - const value = '55'; - const data = this.implementationV0.contract.methods.initializeNonPayableWithValue(value).encodeABI(); - this.proxy = await BeaconProxy.new(this.beacon.address, data); - await this.assertInitialized({ value, balance: '0' }); + const value = 55n; + const data = this.v1.interface.encodeFunctionData('initializeNonPayableWithValue', [value]); + + this.proxy = await this.newBeaconProxy(this.beacon, data); + await assertInitialized.bind(this)({ value, balance: 0n }); }); it('payable initialization', async function () { - const value = '55'; - const data = this.implementationV0.contract.methods.initializePayableWithValue(value).encodeABI(); - const balance = '100'; - this.proxy = await BeaconProxy.new(this.beacon.address, data, { value: balance }); - await this.assertInitialized({ value, balance }); + const value = 55n; + const data = this.v1.interface.encodeFunctionData('initializePayableWithValue', [value]); + const balance = 100n; + + this.proxy = await this.newBeaconProxy(this.beacon, data, { value: balance }); + await assertInitialized.bind(this)({ value, balance }); }); it('reverting initialization due to value', async function () { - const data = Buffer.from(''); - await expectRevertCustomError( - BeaconProxy.new(this.beacon.address, data, { value: '1' }), + await expect(this.newBeaconProxy(this.beacon, '0x', { value: 1n })).to.be.revertedWithCustomError( + this.factory, 'ERC1967NonPayable', - [], ); }); it('reverting initialization function', async function () { - const data = this.implementationV0.contract.methods.reverts().encodeABI(); - await expectRevert(BeaconProxy.new(this.beacon.address, data), 'DummyImplementation reverted'); + const data = this.v1.interface.encodeFunctionData('reverts'); + await expect(this.newBeaconProxy(this.beacon, data)).to.be.revertedWith('DummyImplementation reverted'); }); }); - it('upgrade a proxy by upgrading its beacon', async function () { - const beacon = await UpgradeableBeacon.new(this.implementationV0.address, upgradeableBeaconAdmin); + describe('upgrade', async function () { + it('upgrade a proxy by upgrading its beacon', async function () { + const value = 10n; + const data = this.v1.interface.encodeFunctionData('initializeNonPayableWithValue', [value]); + const proxy = await this.newBeaconProxy(this.beacon, data).then(instance => this.v1.attach(instance)); - const value = '10'; - const data = this.implementationV0.contract.methods.initializeNonPayableWithValue(value).encodeABI(); - const proxy = await BeaconProxy.new(beacon.address, data); + // test initial values + expect(await proxy.value()).to.equal(value); - const dummy = new DummyImplementation(proxy.address); + // test initial version + expect(await proxy.version()).to.equal('V1'); - // test initial values - expect(await dummy.value()).to.bignumber.eq(value); + // upgrade beacon + await this.beacon.connect(this.admin).upgradeTo(this.v2); - // test initial version - expect(await dummy.version()).to.eq('V1'); - - // upgrade beacon - await beacon.upgradeTo(this.implementationV1.address, { from: upgradeableBeaconAdmin }); - - // test upgraded version - expect(await dummy.version()).to.eq('V2'); - }); - - it('upgrade 2 proxies by upgrading shared beacon', async function () { - const value1 = '10'; - const value2 = '42'; - - const beacon = await UpgradeableBeacon.new(this.implementationV0.address, upgradeableBeaconAdmin); - - const proxy1InitializeData = this.implementationV0.contract.methods - .initializeNonPayableWithValue(value1) - .encodeABI(); - const proxy1 = await BeaconProxy.new(beacon.address, proxy1InitializeData); + // test upgraded version + expect(await proxy.version()).to.equal('V2'); + }); - const proxy2InitializeData = this.implementationV0.contract.methods - .initializeNonPayableWithValue(value2) - .encodeABI(); - const proxy2 = await BeaconProxy.new(beacon.address, proxy2InitializeData); + it('upgrade 2 proxies by upgrading shared beacon', async function () { + const value1 = 10n; + const data1 = this.v1.interface.encodeFunctionData('initializeNonPayableWithValue', [value1]); + const proxy1 = await this.newBeaconProxy(this.beacon, data1).then(instance => this.v1.attach(instance)); - const dummy1 = new DummyImplementation(proxy1.address); - const dummy2 = new DummyImplementation(proxy2.address); + const value2 = 42n; + const data2 = this.v1.interface.encodeFunctionData('initializeNonPayableWithValue', [value2]); + const proxy2 = await this.newBeaconProxy(this.beacon, data2).then(instance => this.v1.attach(instance)); - // test initial values - expect(await dummy1.value()).to.bignumber.eq(value1); - expect(await dummy2.value()).to.bignumber.eq(value2); + // test initial values + expect(await proxy1.value()).to.equal(value1); + expect(await proxy2.value()).to.equal(value2); - // test initial version - expect(await dummy1.version()).to.eq('V1'); - expect(await dummy2.version()).to.eq('V1'); + // test initial version + expect(await proxy1.version()).to.equal('V1'); + expect(await proxy2.version()).to.equal('V1'); - // upgrade beacon - await beacon.upgradeTo(this.implementationV1.address, { from: upgradeableBeaconAdmin }); + // upgrade beacon + await this.beacon.connect(this.admin).upgradeTo(this.v2); - // test upgraded version - expect(await dummy1.version()).to.eq('V2'); - expect(await dummy2.version()).to.eq('V2'); + // test upgraded version + expect(await proxy1.version()).to.equal('V2'); + expect(await proxy2.version()).to.equal('V2'); + }); }); }); diff --git a/test/proxy/beacon/UpgradeableBeacon.test.js b/test/proxy/beacon/UpgradeableBeacon.test.js index 0737f6fdf..be6aca754 100644 --- a/test/proxy/beacon/UpgradeableBeacon.test.js +++ b/test/proxy/beacon/UpgradeableBeacon.test.js @@ -1,54 +1,55 @@ -const { expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { expectRevertCustomError } = require('../../helpers/customError'); +async function fixture() { + const [admin, other] = await ethers.getSigners(); -const UpgradeableBeacon = artifacts.require('UpgradeableBeacon'); -const Implementation1 = artifacts.require('Implementation1'); -const Implementation2 = artifacts.require('Implementation2'); + const v1 = await ethers.deployContract('Implementation1'); + const v2 = await ethers.deployContract('Implementation2'); + const beacon = await ethers.deployContract('UpgradeableBeacon', [v1, admin]); -contract('UpgradeableBeacon', function (accounts) { - const [owner, other] = accounts; + return { admin, other, beacon, v1, v2 }; +} - it('cannot be created with non-contract implementation', async function () { - await expectRevertCustomError(UpgradeableBeacon.new(other, owner), 'BeaconInvalidImplementation', [other]); +describe('UpgradeableBeacon', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); - context('once deployed', async function () { - beforeEach('deploying beacon', async function () { - this.v1 = await Implementation1.new(); - this.beacon = await UpgradeableBeacon.new(this.v1.address, owner); - }); + it('cannot be created with non-contract implementation', async function () { + await expect(ethers.deployContract('UpgradeableBeacon', [this.other, this.admin])) + .to.be.revertedWithCustomError(this.beacon, 'BeaconInvalidImplementation') + .withArgs(this.other.address); + }); + describe('once deployed', async function () { it('emits Upgraded event to the first implementation', async function () { - const beacon = await UpgradeableBeacon.new(this.v1.address, owner); - await expectEvent.inTransaction(beacon.contract.transactionHash, beacon, 'Upgraded', { - implementation: this.v1.address, - }); + await expect(this.beacon.deploymentTransaction()).to.emit(this.beacon, 'Upgraded').withArgs(this.v1.target); }); it('returns implementation', async function () { - expect(await this.beacon.implementation()).to.equal(this.v1.address); + expect(await this.beacon.implementation()).to.equal(this.v1.target); }); - it('can be upgraded by the owner', async function () { - const v2 = await Implementation2.new(); - const receipt = await this.beacon.upgradeTo(v2.address, { from: owner }); - expectEvent(receipt, 'Upgraded', { implementation: v2.address }); - expect(await this.beacon.implementation()).to.equal(v2.address); + it('can be upgraded by the admin', async function () { + await expect(this.beacon.connect(this.admin).upgradeTo(this.v2)) + .to.emit(this.beacon, 'Upgraded') + .withArgs(this.v2.target); + + expect(await this.beacon.implementation()).to.equal(this.v2.target); }); it('cannot be upgraded to a non-contract', async function () { - await expectRevertCustomError(this.beacon.upgradeTo(other, { from: owner }), 'BeaconInvalidImplementation', [ - other, - ]); + await expect(this.beacon.connect(this.admin).upgradeTo(this.other)) + .to.be.revertedWithCustomError(this.beacon, 'BeaconInvalidImplementation') + .withArgs(this.other.address); }); it('cannot be upgraded by other account', async function () { - const v2 = await Implementation2.new(); - await expectRevertCustomError(this.beacon.upgradeTo(v2.address, { from: other }), 'OwnableUnauthorizedAccount', [ - other, - ]); + await expect(this.beacon.connect(this.other).upgradeTo(this.v2)) + .to.be.revertedWithCustomError(this.beacon, 'OwnableUnauthorizedAccount') + .withArgs(this.other.address); }); }); }); diff --git a/test/proxy/transparent/ProxyAdmin.test.js b/test/proxy/transparent/ProxyAdmin.test.js index a3122eae3..9f137536a 100644 --- a/test/proxy/transparent/ProxyAdmin.test.js +++ b/test/proxy/transparent/ProxyAdmin.test.js @@ -1,36 +1,33 @@ const { ethers } = require('hardhat'); -const { expectRevert } = require('@openzeppelin/test-helpers'); const { expect } = require('chai'); -const ImplV1 = artifacts.require('DummyImplementation'); -const ImplV2 = artifacts.require('DummyImplementationV2'); -const ProxyAdmin = artifacts.require('ProxyAdmin'); -const TransparentUpgradeableProxy = artifacts.require('TransparentUpgradeableProxy'); -const ITransparentUpgradeableProxy = artifacts.require('ITransparentUpgradeableProxy'); - +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { getAddressInSlot, ImplementationSlot } = require('../../helpers/erc1967'); -const { expectRevertCustomError } = require('../../helpers/customError'); -contract('ProxyAdmin', function (accounts) { - const [proxyAdminOwner, anotherAccount] = accounts; +async function fixture() { + const [admin, other] = await ethers.getSigners(); - before('set implementations', async function () { - this.implementationV1 = await ImplV1.new(); - this.implementationV2 = await ImplV2.new(); - }); + const v1 = await ethers.deployContract('DummyImplementation'); + const v2 = await ethers.deployContract('DummyImplementationV2'); - beforeEach(async function () { - const initializeData = Buffer.from(''); - const proxy = await TransparentUpgradeableProxy.new(this.implementationV1.address, proxyAdminOwner, initializeData); + const proxy = await ethers + .deployContract('TransparentUpgradeableProxy', [v1, admin, '0x']) + .then(instance => ethers.getContractAt('ITransparentUpgradeableProxy', instance)); + + const proxyAdmin = await ethers.getContractAt( + 'ProxyAdmin', + ethers.getCreateAddress({ from: proxy.target, nonce: 1n }), + ); - const proxyNonce = await web3.eth.getTransactionCount(proxy.address); - const proxyAdminAddress = ethers.getCreateAddress({ from: proxy.address, nonce: proxyNonce - 1 }); // Nonce already used - this.proxyAdmin = await ProxyAdmin.at(proxyAdminAddress); + return { admin, other, v1, v2, proxy, proxyAdmin }; +} - this.proxy = await ITransparentUpgradeableProxy.at(proxy.address); +describe('ProxyAdmin', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); it('has an owner', async function () { - expect(await this.proxyAdmin.owner()).to.equal(proxyAdminOwner); + expect(await this.proxyAdmin.owner()).to.equal(this.admin.address); }); it('has an interface version', async function () { @@ -40,24 +37,16 @@ contract('ProxyAdmin', function (accounts) { describe('without data', function () { context('with unauthorized account', function () { it('fails to upgrade', async function () { - await expectRevertCustomError( - this.proxyAdmin.upgradeAndCall(this.proxy.address, this.implementationV2.address, '0x', { - from: anotherAccount, - }), - 'OwnableUnauthorizedAccount', - [anotherAccount], - ); + await expect(this.proxyAdmin.connect(this.other).upgradeAndCall(this.proxy, this.v2, '0x')) + .to.be.revertedWithCustomError(this.proxyAdmin, 'OwnableUnauthorizedAccount') + .withArgs(this.other.address); }); }); context('with authorized account', function () { it('upgrades implementation', async function () { - await this.proxyAdmin.upgradeAndCall(this.proxy.address, this.implementationV2.address, '0x', { - from: proxyAdminOwner, - }); - - const implementationAddress = await getAddressInSlot(this.proxy, ImplementationSlot); - expect(implementationAddress).to.be.equal(this.implementationV2.address); + await this.proxyAdmin.connect(this.admin).upgradeAndCall(this.proxy, this.v2, '0x'); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2.target); }); }); }); @@ -65,37 +54,26 @@ contract('ProxyAdmin', function (accounts) { describe('with data', function () { context('with unauthorized account', function () { it('fails to upgrade', async function () { - const callData = new ImplV1('').contract.methods.initializeNonPayableWithValue(1337).encodeABI(); - await expectRevertCustomError( - this.proxyAdmin.upgradeAndCall(this.proxy.address, this.implementationV2.address, callData, { - from: anotherAccount, - }), - 'OwnableUnauthorizedAccount', - [anotherAccount], - ); + const data = this.v1.interface.encodeFunctionData('initializeNonPayableWithValue', [1337n]); + await expect(this.proxyAdmin.connect(this.other).upgradeAndCall(this.proxy, this.v2, data)) + .to.be.revertedWithCustomError(this.proxyAdmin, 'OwnableUnauthorizedAccount') + .withArgs(this.other.address); }); }); context('with authorized account', function () { context('with invalid callData', function () { it('fails to upgrade', async function () { - const callData = '0x12345678'; - await expectRevert.unspecified( - this.proxyAdmin.upgradeAndCall(this.proxy.address, this.implementationV2.address, callData, { - from: proxyAdminOwner, - }), - ); + const data = '0x12345678'; + await expect(this.proxyAdmin.connect(this.admin).upgradeAndCall(this.proxy, this.v2, data)).to.be.reverted; }); }); context('with valid callData', function () { it('upgrades implementation', async function () { - const callData = new ImplV1('').contract.methods.initializeNonPayableWithValue(1337).encodeABI(); - await this.proxyAdmin.upgradeAndCall(this.proxy.address, this.implementationV2.address, callData, { - from: proxyAdminOwner, - }); - const implementationAddress = await getAddressInSlot(this.proxy, ImplementationSlot); - expect(implementationAddress).to.be.equal(this.implementationV2.address); + const data = this.v2.interface.encodeFunctionData('initializeNonPayableWithValue', [1337n]); + await this.proxyAdmin.connect(this.admin).upgradeAndCall(this.proxy, this.v2, data); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2.target); }); }); }); diff --git a/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js b/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js index da4d99287..021228199 100644 --- a/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js +++ b/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js @@ -1,261 +1,223 @@ -const { BN, expectRevert, expectEvent, constants } = require('@openzeppelin/test-helpers'); -const { ZERO_ADDRESS } = constants; -const { getAddressInSlot, ImplementationSlot, AdminSlot } = require('../../helpers/erc1967'); -const { expectRevertCustomError } = require('../../helpers/customError'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { ethers, web3 } = require('hardhat'); + +const { getAddressInSlot, ImplementationSlot, AdminSlot } = require('../../helpers/erc1967'); const { impersonate } = require('../../helpers/account'); -const Implementation1 = artifacts.require('Implementation1'); -const Implementation2 = artifacts.require('Implementation2'); -const Implementation3 = artifacts.require('Implementation3'); -const Implementation4 = artifacts.require('Implementation4'); -const MigratableMockV1 = artifacts.require('MigratableMockV1'); -const MigratableMockV2 = artifacts.require('MigratableMockV2'); -const MigratableMockV3 = artifacts.require('MigratableMockV3'); -const InitializableMock = artifacts.require('InitializableMock'); -const DummyImplementation = artifacts.require('DummyImplementation'); -const ClashingImplementation = artifacts.require('ClashingImplementation'); -const Ownable = artifacts.require('Ownable'); - -module.exports = function shouldBehaveLikeTransparentUpgradeableProxy(createProxy, initialOwner, accounts) { - const [anotherAccount] = accounts; - - async function createProxyWithImpersonatedProxyAdmin(logic, initData, opts = undefined) { - const proxy = await createProxy(logic, initData, opts); - - // Expect proxy admin to be the first and only contract created by the proxy - const proxyAdminAddress = ethers.getCreateAddress({ from: proxy.address, nonce: 1 }); - await impersonate(proxyAdminAddress); - - return { - proxy, - proxyAdminAddress, +// createProxy, initialOwner, accounts +module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { + before(async function () { + const implementationV0 = await ethers.deployContract('DummyImplementation'); + const implementationV1 = await ethers.deployContract('DummyImplementation'); + + const createProxyWithImpersonatedProxyAdmin = async (logic, initData, opts = undefined) => { + const [proxy, tx] = await this.createProxy(logic, initData, opts).then(instance => + Promise.all([ethers.getContractAt('ITransparentUpgradeableProxy', instance), instance.deploymentTransaction()]), + ); + + const proxyAdmin = await ethers.getContractAt( + 'ProxyAdmin', + ethers.getCreateAddress({ from: proxy.target, nonce: 1n }), + ); + const proxyAdminAsSigner = await proxyAdmin.getAddress().then(impersonate); + + return { + instance: logic.attach(proxy.target), // attaching proxy directly works well for everything except for event resolution + proxy, + proxyAdmin, + proxyAdminAsSigner, + tx, + }; }; - } - before(async function () { - this.implementationV0 = (await DummyImplementation.new()).address; - this.implementationV1 = (await DummyImplementation.new()).address; + Object.assign(this, { + implementationV0, + implementationV1, + createProxyWithImpersonatedProxyAdmin, + }); }); beforeEach(async function () { - const initializeData = Buffer.from(''); - const { proxy, proxyAdminAddress } = await createProxyWithImpersonatedProxyAdmin( - this.implementationV0, - initializeData, - ); - this.proxy = proxy; - this.proxyAdminAddress = proxyAdminAddress; + Object.assign(this, await this.createProxyWithImpersonatedProxyAdmin(this.implementationV0, '0x')); }); describe('implementation', function () { it('returns the current implementation address', async function () { - const implementationAddress = await getAddressInSlot(this.proxy, ImplementationSlot); - expect(implementationAddress).to.be.equal(this.implementationV0); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.implementationV0.target); }); it('delegates to the implementation', async function () { - const dummy = new DummyImplementation(this.proxy.address); - const value = await dummy.get(); - - expect(value).to.equal(true); + expect(await this.instance.get()).to.be.true; }); }); describe('proxy admin', function () { it('emits AdminChanged event during construction', async function () { - await expectEvent.inConstruction(this.proxy, 'AdminChanged', { - previousAdmin: ZERO_ADDRESS, - newAdmin: this.proxyAdminAddress, - }); + await expect(this.tx).to.emit(this.proxy, 'AdminChanged').withArgs(ethers.ZeroAddress, this.proxyAdmin.target); }); it('sets the proxy admin in storage with the correct initial owner', async function () { - expect(await getAddressInSlot(this.proxy, AdminSlot)).to.be.equal(this.proxyAdminAddress); - const proxyAdmin = await Ownable.at(this.proxyAdminAddress); - expect(await proxyAdmin.owner()).to.be.equal(initialOwner); + expect(await getAddressInSlot(this.proxy, AdminSlot)).to.equal(this.proxyAdmin.target); + + expect(await this.proxyAdmin.owner()).to.equal(this.owner.address); }); it('can overwrite the admin by the implementation', async function () { - const dummy = new DummyImplementation(this.proxy.address); - await dummy.unsafeOverrideAdmin(anotherAccount); + await this.instance.unsafeOverrideAdmin(this.other); + const ERC1967AdminSlotValue = await getAddressInSlot(this.proxy, AdminSlot); - expect(ERC1967AdminSlotValue).to.be.equal(anotherAccount); + expect(ERC1967AdminSlotValue).to.equal(this.other.address); + expect(ERC1967AdminSlotValue).to.not.equal(this.proxyAdmin.address); // Still allows previous admin to execute admin operations - expect(ERC1967AdminSlotValue).to.not.equal(this.proxyAdminAddress); - expectEvent( - await this.proxy.upgradeToAndCall(this.implementationV1, '0x', { from: this.proxyAdminAddress }), - 'Upgraded', - { - implementation: this.implementationV1, - }, - ); + await expect(this.proxy.connect(this.proxyAdminAsSigner).upgradeToAndCall(this.implementationV1, '0x')) + .to.emit(this.proxy, 'Upgraded') + .withArgs(this.implementationV1.target); }); }); describe('upgradeToAndCall', function () { describe('without migrations', function () { beforeEach(async function () { - this.behavior = await InitializableMock.new(); + this.behavior = await ethers.deployContract('InitializableMock'); }); describe('when the call does not fail', function () { - const initializeData = new InitializableMock('').contract.methods['initializeWithX(uint256)'](42).encodeABI(); + beforeEach(function () { + this.initializeData = this.behavior.interface.encodeFunctionData('initializeWithX', [42n]); + }); describe('when the sender is the admin', function () { - const value = 1e5; + const value = 10n ** 5n; beforeEach(async function () { - this.receipt = await this.proxy.upgradeToAndCall(this.behavior.address, initializeData, { - from: this.proxyAdminAddress, - value, - }); + this.tx = await this.proxy + .connect(this.proxyAdminAsSigner) + .upgradeToAndCall(this.behavior, this.initializeData, { + value, + }); }); it('upgrades to the requested implementation', async function () { - const implementationAddress = await getAddressInSlot(this.proxy, ImplementationSlot); - expect(implementationAddress).to.be.equal(this.behavior.address); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behavior.target); }); - it('emits an event', function () { - expectEvent(this.receipt, 'Upgraded', { implementation: this.behavior.address }); + it('emits an event', async function () { + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behavior.target); }); it('calls the initializer function', async function () { - const migratable = new InitializableMock(this.proxy.address); - const x = await migratable.x(); - expect(x).to.be.bignumber.equal('42'); + expect(await this.behavior.attach(this.proxy).x()).to.equal(42n); }); it('sends given value to the proxy', async function () { - const balance = await web3.eth.getBalance(this.proxy.address); - expect(balance.toString()).to.be.bignumber.equal(value.toString()); + expect(await ethers.provider.getBalance(this.proxy)).to.equal(value); }); it('uses the storage of the proxy', async function () { // storage layout should look as follows: // - 0: Initializable storage ++ initializerRan ++ onlyInitializingRan // - 1: x - const storedValue = await web3.eth.getStorageAt(this.proxy.address, 1); - expect(parseInt(storedValue)).to.eq(42); + expect(await ethers.provider.getStorage(this.proxy, 1n)).to.equal(42n); }); }); describe('when the sender is not the admin', function () { it('reverts', async function () { - await expectRevert.unspecified( - this.proxy.upgradeToAndCall(this.behavior.address, initializeData, { from: anotherAccount }), - ); + await expect(this.proxy.connect(this.other).upgradeToAndCall(this.behavior, this.initializeData)).to.be + .reverted; }); }); }); describe('when the call does fail', function () { - const initializeData = new InitializableMock('').contract.methods.fail().encodeABI(); + beforeEach(function () { + this.initializeData = this.behavior.interface.encodeFunctionData('fail'); + }); it('reverts', async function () { - await expectRevert.unspecified( - this.proxy.upgradeToAndCall(this.behavior.address, initializeData, { from: this.proxyAdminAddress }), - ); + await expect(this.proxy.connect(this.proxyAdminAsSigner).upgradeToAndCall(this.behavior, this.initializeData)) + .to.be.reverted; }); }); }); describe('with migrations', function () { describe('when the sender is the admin', function () { - const value = 1e5; + const value = 10n ** 5n; describe('when upgrading to V1', function () { - const v1MigrationData = new MigratableMockV1('').contract.methods.initialize(42).encodeABI(); - beforeEach(async function () { - this.behaviorV1 = await MigratableMockV1.new(); - this.balancePreviousV1 = new BN(await web3.eth.getBalance(this.proxy.address)); - this.receipt = await this.proxy.upgradeToAndCall(this.behaviorV1.address, v1MigrationData, { - from: this.proxyAdminAddress, - value, - }); + this.behaviorV1 = await ethers.deployContract('MigratableMockV1'); + const v1MigrationData = this.behaviorV1.interface.encodeFunctionData('initialize', [42n]); + + this.balancePreviousV1 = await ethers.provider.getBalance(this.proxy); + this.tx = await this.proxy + .connect(this.proxyAdminAsSigner) + .upgradeToAndCall(this.behaviorV1, v1MigrationData, { + value, + }); }); it('upgrades to the requested version and emits an event', async function () { - const implementation = await getAddressInSlot(this.proxy, ImplementationSlot); - expect(implementation).to.be.equal(this.behaviorV1.address); - expectEvent(this.receipt, 'Upgraded', { implementation: this.behaviorV1.address }); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV1.target); + + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV1.target); }); it("calls the 'initialize' function and sends given value to the proxy", async function () { - const migratable = new MigratableMockV1(this.proxy.address); - - const x = await migratable.x(); - expect(x).to.be.bignumber.equal('42'); - - const balance = await web3.eth.getBalance(this.proxy.address); - expect(new BN(balance)).to.be.bignumber.equal(this.balancePreviousV1.addn(value)); + expect(await this.behaviorV1.attach(this.proxy).x()).to.equal(42n); + expect(await ethers.provider.getBalance(this.proxy)).to.equal(this.balancePreviousV1 + value); }); describe('when upgrading to V2', function () { - const v2MigrationData = new MigratableMockV2('').contract.methods.migrate(10, 42).encodeABI(); - beforeEach(async function () { - this.behaviorV2 = await MigratableMockV2.new(); - this.balancePreviousV2 = new BN(await web3.eth.getBalance(this.proxy.address)); - this.receipt = await this.proxy.upgradeToAndCall(this.behaviorV2.address, v2MigrationData, { - from: this.proxyAdminAddress, - value, - }); + this.behaviorV2 = await ethers.deployContract('MigratableMockV2'); + const v2MigrationData = this.behaviorV2.interface.encodeFunctionData('migrate', [10n, 42n]); + + this.balancePreviousV2 = await ethers.provider.getBalance(this.proxy); + this.tx = await this.proxy + .connect(this.proxyAdminAsSigner) + .upgradeToAndCall(this.behaviorV2, v2MigrationData, { + value, + }); }); it('upgrades to the requested version and emits an event', async function () { - const implementation = await getAddressInSlot(this.proxy, ImplementationSlot); - expect(implementation).to.be.equal(this.behaviorV2.address); - expectEvent(this.receipt, 'Upgraded', { implementation: this.behaviorV2.address }); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV2.target); + + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV2.target); }); it("calls the 'migrate' function and sends given value to the proxy", async function () { - const migratable = new MigratableMockV2(this.proxy.address); - - const x = await migratable.x(); - expect(x).to.be.bignumber.equal('10'); - - const y = await migratable.y(); - expect(y).to.be.bignumber.equal('42'); - - const balance = new BN(await web3.eth.getBalance(this.proxy.address)); - expect(balance).to.be.bignumber.equal(this.balancePreviousV2.addn(value)); + expect(await this.behaviorV2.attach(this.proxy).x()).to.equal(10n); + expect(await this.behaviorV2.attach(this.proxy).y()).to.equal(42n); + expect(await ethers.provider.getBalance(this.proxy)).to.equal(this.balancePreviousV2 + value); }); describe('when upgrading to V3', function () { - const v3MigrationData = new MigratableMockV3('').contract.methods['migrate()']().encodeABI(); - beforeEach(async function () { - this.behaviorV3 = await MigratableMockV3.new(); - this.balancePreviousV3 = new BN(await web3.eth.getBalance(this.proxy.address)); - this.receipt = await this.proxy.upgradeToAndCall(this.behaviorV3.address, v3MigrationData, { - from: this.proxyAdminAddress, - value, - }); + this.behaviorV3 = await ethers.deployContract('MigratableMockV3'); + const v3MigrationData = this.behaviorV3.interface.encodeFunctionData('migrate()'); + + this.balancePreviousV3 = await ethers.provider.getBalance(this.proxy); + this.tx = await this.proxy + .connect(this.proxyAdminAsSigner) + .upgradeToAndCall(this.behaviorV3, v3MigrationData, { + value, + }); }); it('upgrades to the requested version and emits an event', async function () { - const implementation = await getAddressInSlot(this.proxy, ImplementationSlot); - expect(implementation).to.be.equal(this.behaviorV3.address); - expectEvent(this.receipt, 'Upgraded', { implementation: this.behaviorV3.address }); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV3.target); + + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV3.target); }); it("calls the 'migrate' function and sends given value to the proxy", async function () { - const migratable = new MigratableMockV3(this.proxy.address); - - const x = await migratable.x(); - expect(x).to.be.bignumber.equal('42'); - - const y = await migratable.y(); - expect(y).to.be.bignumber.equal('10'); - - const balance = new BN(await web3.eth.getBalance(this.proxy.address)); - expect(balance).to.be.bignumber.equal(this.balancePreviousV3.addn(value)); + expect(await this.behaviorV3.attach(this.proxy).x()).to.equal(42n); + expect(await this.behaviorV3.attach(this.proxy).y()).to.equal(10n); + expect(await ethers.provider.getBalance(this.proxy)).to.equal(this.balancePreviousV3 + value); }); }); }); @@ -263,12 +225,10 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy(createProx }); describe('when the sender is not the admin', function () { - const from = anotherAccount; - it('reverts', async function () { - const behaviorV1 = await MigratableMockV1.new(); - const v1MigrationData = new MigratableMockV1('').contract.methods.initialize(42).encodeABI(); - await expectRevert.unspecified(this.proxy.upgradeToAndCall(behaviorV1.address, v1MigrationData, { from })); + const behaviorV1 = await ethers.deployContract('MigratableMockV1'); + const v1MigrationData = behaviorV1.interface.encodeFunctionData('initialize', [42n]); + await expect(this.proxy.connect(this.other).upgradeToAndCall(behaviorV1, v1MigrationData)).to.be.reverted; }); }); }); @@ -276,137 +236,122 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy(createProx describe('transparent proxy', function () { beforeEach('creating proxy', async function () { - const initializeData = Buffer.from(''); - this.clashingImplV0 = (await ClashingImplementation.new()).address; - this.clashingImplV1 = (await ClashingImplementation.new()).address; - const { proxy, proxyAdminAddress } = await createProxyWithImpersonatedProxyAdmin( - this.clashingImplV0, - initializeData, - ); - this.proxy = proxy; - this.proxyAdminAddress = proxyAdminAddress; - this.clashing = new ClashingImplementation(this.proxy.address); + this.clashingImplV0 = await ethers.deployContract('ClashingImplementation'); + this.clashingImplV1 = await ethers.deployContract('ClashingImplementation'); + + Object.assign(this, await this.createProxyWithImpersonatedProxyAdmin(this.clashingImplV0, '0x')); }); it('proxy admin cannot call delegated functions', async function () { - await expectRevertCustomError( - this.clashing.delegatedFunction({ from: this.proxyAdminAddress }), + const interface = await ethers.getContractFactory('TransparentUpgradeableProxy'); + + await expect(this.instance.connect(this.proxyAdminAsSigner).delegatedFunction()).to.be.revertedWithCustomError( + interface, 'ProxyDeniedAdminAccess', - [], ); }); describe('when function names clash', function () { it('executes the proxy function if the sender is the admin', async function () { - const receipt = await this.proxy.upgradeToAndCall(this.clashingImplV1, '0x', { - from: this.proxyAdminAddress, - }); - expectEvent(receipt, 'Upgraded', { implementation: this.clashingImplV1 }); + await expect(this.proxy.connect(this.proxyAdminAsSigner).upgradeToAndCall(this.clashingImplV1, '0x')) + .to.emit(this.proxy, 'Upgraded') + .withArgs(this.clashingImplV1.target); }); it('delegates the call to implementation when sender is not the admin', async function () { - const receipt = await this.proxy.upgradeToAndCall(this.clashingImplV1, '0x', { - from: anotherAccount, - }); - expectEvent.notEmitted(receipt, 'Upgraded'); - expectEvent.inTransaction(receipt.tx, this.clashing, 'ClashingImplementationCall'); + await expect(this.proxy.connect(this.other).upgradeToAndCall(this.clashingImplV1, '0x')) + .to.emit(this.instance, 'ClashingImplementationCall') + .to.not.emit(this.proxy, 'Upgraded'); }); }); }); - describe('regression', () => { - const initializeData = Buffer.from(''); + describe('regression', function () { + const initializeData = '0x'; - it('should add new function', async () => { - const instance1 = await Implementation1.new(); - const { proxy, proxyAdminAddress } = await createProxyWithImpersonatedProxyAdmin( - instance1.address, + it('should add new function', async function () { + const impl1 = await ethers.deployContract('Implementation1'); + const impl2 = await ethers.deployContract('Implementation2'); + const { instance, proxy, proxyAdminAsSigner } = await this.createProxyWithImpersonatedProxyAdmin( + impl1, initializeData, ); - const proxyInstance1 = new Implementation1(proxy.address); - await proxyInstance1.setValue(42); + await instance.setValue(42n); + + // `getValue` is not available in impl1 + await expect(impl2.attach(instance).getValue()).to.be.reverted; - const instance2 = await Implementation2.new(); - await proxy.upgradeToAndCall(instance2.address, '0x', { from: proxyAdminAddress }); + // do upgrade + await proxy.connect(proxyAdminAsSigner).upgradeToAndCall(impl2, '0x'); - const proxyInstance2 = new Implementation2(proxy.address); - const res = await proxyInstance2.getValue(); - expect(res.toString()).to.eq('42'); + // `getValue` is available in impl2 + expect(await impl2.attach(instance).getValue()).to.equal(42n); }); - it('should remove function', async () => { - const instance2 = await Implementation2.new(); - const { proxy, proxyAdminAddress } = await createProxyWithImpersonatedProxyAdmin( - instance2.address, + it('should remove function', async function () { + const impl1 = await ethers.deployContract('Implementation1'); + const impl2 = await ethers.deployContract('Implementation2'); + const { instance, proxy, proxyAdminAsSigner } = await this.createProxyWithImpersonatedProxyAdmin( + impl2, initializeData, ); - const proxyInstance2 = new Implementation2(proxy.address); - await proxyInstance2.setValue(42); - const res = await proxyInstance2.getValue(); - expect(res.toString()).to.eq('42'); + await instance.setValue(42n); + + // `getValue` is available in impl2 + expect(await impl2.attach(instance).getValue()).to.equal(42n); - const instance1 = await Implementation1.new(); - await proxy.upgradeToAndCall(instance1.address, '0x', { from: proxyAdminAddress }); + // do downgrade + await proxy.connect(proxyAdminAsSigner).upgradeToAndCall(impl1, '0x'); - const proxyInstance1 = new Implementation2(proxy.address); - await expectRevert.unspecified(proxyInstance1.getValue()); + // `getValue` is not available in impl1 + await expect(impl2.attach(instance).getValue()).to.be.reverted; }); - it('should change function signature', async () => { - const instance1 = await Implementation1.new(); - const { proxy, proxyAdminAddress } = await createProxyWithImpersonatedProxyAdmin( - instance1.address, + it('should change function signature', async function () { + const impl1 = await ethers.deployContract('Implementation1'); + const impl3 = await ethers.deployContract('Implementation3'); + const { instance, proxy, proxyAdminAsSigner } = await this.createProxyWithImpersonatedProxyAdmin( + impl1, initializeData, ); - const proxyInstance1 = new Implementation1(proxy.address); - await proxyInstance1.setValue(42); + await instance.setValue(42n); - const instance3 = await Implementation3.new(); - await proxy.upgradeToAndCall(instance3.address, '0x', { from: proxyAdminAddress }); - const proxyInstance3 = new Implementation3(proxy.address); + await proxy.connect(proxyAdminAsSigner).upgradeToAndCall(impl3, '0x'); - const res = await proxyInstance3.getValue(8); - expect(res.toString()).to.eq('50'); + expect(await impl3.attach(instance).getValue(8n)).to.equal(50n); }); - it('should add fallback function', async () => { - const initializeData = Buffer.from(''); - const instance1 = await Implementation1.new(); - const { proxy, proxyAdminAddress } = await createProxyWithImpersonatedProxyAdmin( - instance1.address, + it('should add fallback function', async function () { + const impl1 = await ethers.deployContract('Implementation1'); + const impl4 = await ethers.deployContract('Implementation4'); + const { instance, proxy, proxyAdminAsSigner } = await this.createProxyWithImpersonatedProxyAdmin( + impl1, initializeData, ); - const instance4 = await Implementation4.new(); - await proxy.upgradeToAndCall(instance4.address, '0x', { from: proxyAdminAddress }); - const proxyInstance4 = new Implementation4(proxy.address); + await proxy.connect(proxyAdminAsSigner).upgradeToAndCall(impl4, '0x'); - const data = '0x'; - await web3.eth.sendTransaction({ to: proxy.address, from: anotherAccount, data }); + await this.other.sendTransaction({ to: proxy }); - const res = await proxyInstance4.getValue(); - expect(res.toString()).to.eq('1'); + expect(await impl4.attach(instance).getValue()).to.equal(1n); }); - it('should remove fallback function', async () => { - const instance4 = await Implementation4.new(); - const { proxy, proxyAdminAddress } = await createProxyWithImpersonatedProxyAdmin( - instance4.address, + it('should remove fallback function', async function () { + const impl2 = await ethers.deployContract('Implementation2'); + const impl4 = await ethers.deployContract('Implementation4'); + const { instance, proxy, proxyAdminAsSigner } = await this.createProxyWithImpersonatedProxyAdmin( + impl4, initializeData, ); - const instance2 = await Implementation2.new(); - await proxy.upgradeToAndCall(instance2.address, '0x', { from: proxyAdminAddress }); + await proxy.connect(proxyAdminAsSigner).upgradeToAndCall(impl2, '0x'); - const data = '0x'; - await expectRevert.unspecified(web3.eth.sendTransaction({ to: proxy.address, from: anotherAccount, data })); + await expect(this.other.sendTransaction({ to: proxy })).to.be.reverted; - const proxyInstance2 = new Implementation2(proxy.address); - const res = await proxyInstance2.getValue(); - expect(res.toString()).to.eq('0'); + expect(await impl2.attach(instance).getValue()).to.equal(0n); }); }); }; diff --git a/test/proxy/transparent/TransparentUpgradeableProxy.test.js b/test/proxy/transparent/TransparentUpgradeableProxy.test.js index f45e392f6..61e18014e 100644 --- a/test/proxy/transparent/TransparentUpgradeableProxy.test.js +++ b/test/proxy/transparent/TransparentUpgradeableProxy.test.js @@ -1,24 +1,28 @@ +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const shouldBehaveLikeProxy = require('../Proxy.behaviour'); const shouldBehaveLikeTransparentUpgradeableProxy = require('./TransparentUpgradeableProxy.behaviour'); -const TransparentUpgradeableProxy = artifacts.require('TransparentUpgradeableProxy'); -const ITransparentUpgradeableProxy = artifacts.require('ITransparentUpgradeableProxy'); - -contract('TransparentUpgradeableProxy', function (accounts) { - const [owner, ...otherAccounts] = accounts; - - // `undefined`, `null` and other false-ish opts will not be forwarded. - const createProxy = async function (logic, initData, opts = undefined) { - const { address, transactionHash } = await TransparentUpgradeableProxy.new( - logic, - owner, - initData, - ...[opts].filter(Boolean), - ); - const instance = await ITransparentUpgradeableProxy.at(address); - return { ...instance, transactionHash }; +async function fixture() { + const [owner, other, ...accounts] = await ethers.getSigners(); + + const implementation = await ethers.deployContract('DummyImplementation'); + + const createProxy = function (logic, initData, opts = undefined) { + return ethers.deployContract('TransparentUpgradeableProxy', [logic, owner, initData], opts); }; - shouldBehaveLikeProxy(createProxy, otherAccounts); - shouldBehaveLikeTransparentUpgradeableProxy(createProxy, owner, otherAccounts); + return { nonContractAddress: owner, owner, other, accounts, implementation, createProxy }; +} + +describe('TransparentUpgradeableProxy', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); + + shouldBehaveLikeProxy(); + + // createProxy, owner, otherAccounts + shouldBehaveLikeTransparentUpgradeableProxy(); }); diff --git a/test/proxy/utils/Initializable.test.js b/test/proxy/utils/Initializable.test.js index b9ff3b052..bc26e6b60 100644 --- a/test/proxy/utils/Initializable.test.js +++ b/test/proxy/utils/Initializable.test.js @@ -1,220 +1,218 @@ -const { expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const { MAX_UINT64 } = require('../../helpers/constants'); - -const InitializableMock = artifacts.require('InitializableMock'); -const ConstructorInitializableMock = artifacts.require('ConstructorInitializableMock'); -const ChildConstructorInitializableMock = artifacts.require('ChildConstructorInitializableMock'); -const ReinitializerMock = artifacts.require('ReinitializerMock'); -const SampleChild = artifacts.require('SampleChild'); -const DisableBad1 = artifacts.require('DisableBad1'); -const DisableBad2 = artifacts.require('DisableBad2'); -const DisableOk = artifacts.require('DisableOk'); - -contract('Initializable', function () { +const { + bigint: { MAX_UINT64 }, +} = require('../../helpers/constants'); + +describe('Initializable', function () { describe('basic testing without inheritance', function () { beforeEach('deploying', async function () { - this.contract = await InitializableMock.new(); + this.mock = await ethers.deployContract('InitializableMock'); }); describe('before initialize', function () { it('initializer has not run', async function () { - expect(await this.contract.initializerRan()).to.equal(false); + expect(await this.mock.initializerRan()).to.be.false; }); it('_initializing returns false before initialization', async function () { - expect(await this.contract.isInitializing()).to.equal(false); + expect(await this.mock.isInitializing()).to.be.false; }); }); describe('after initialize', function () { beforeEach('initializing', async function () { - await this.contract.initialize(); + await this.mock.initialize(); }); it('initializer has run', async function () { - expect(await this.contract.initializerRan()).to.equal(true); + expect(await this.mock.initializerRan()).to.be.true; }); it('_initializing returns false after initialization', async function () { - expect(await this.contract.isInitializing()).to.equal(false); + expect(await this.mock.isInitializing()).to.be.false; }); it('initializer does not run again', async function () { - await expectRevertCustomError(this.contract.initialize(), 'InvalidInitialization', []); + await expect(this.mock.initialize()).to.be.revertedWithCustomError(this.mock, 'InvalidInitialization'); }); }); describe('nested under an initializer', function () { it('initializer modifier reverts', async function () { - await expectRevertCustomError(this.contract.initializerNested(), 'InvalidInitialization', []); + await expect(this.mock.initializerNested()).to.be.revertedWithCustomError(this.mock, 'InvalidInitialization'); }); it('onlyInitializing modifier succeeds', async function () { - await this.contract.onlyInitializingNested(); - expect(await this.contract.onlyInitializingRan()).to.equal(true); + await this.mock.onlyInitializingNested(); + expect(await this.mock.onlyInitializingRan()).to.be.true; }); }); it('cannot call onlyInitializable function outside the scope of an initializable function', async function () { - await expectRevertCustomError(this.contract.initializeOnlyInitializing(), 'NotInitializing', []); + await expect(this.mock.initializeOnlyInitializing()).to.be.revertedWithCustomError(this.mock, 'NotInitializing'); }); }); it('nested initializer can run during construction', async function () { - const contract2 = await ConstructorInitializableMock.new(); - expect(await contract2.initializerRan()).to.equal(true); - expect(await contract2.onlyInitializingRan()).to.equal(true); + const mock = await ethers.deployContract('ConstructorInitializableMock'); + expect(await mock.initializerRan()).to.be.true; + expect(await mock.onlyInitializingRan()).to.be.true; }); it('multiple constructor levels can be initializers', async function () { - const contract2 = await ChildConstructorInitializableMock.new(); - expect(await contract2.initializerRan()).to.equal(true); - expect(await contract2.childInitializerRan()).to.equal(true); - expect(await contract2.onlyInitializingRan()).to.equal(true); + const mock = await ethers.deployContract('ChildConstructorInitializableMock'); + expect(await mock.initializerRan()).to.be.true; + expect(await mock.childInitializerRan()).to.be.true; + expect(await mock.onlyInitializingRan()).to.be.true; }); describe('reinitialization', function () { beforeEach('deploying', async function () { - this.contract = await ReinitializerMock.new(); + this.mock = await ethers.deployContract('ReinitializerMock'); }); it('can reinitialize', async function () { - expect(await this.contract.counter()).to.be.bignumber.equal('0'); - await this.contract.initialize(); - expect(await this.contract.counter()).to.be.bignumber.equal('1'); - await this.contract.reinitialize(2); - expect(await this.contract.counter()).to.be.bignumber.equal('2'); - await this.contract.reinitialize(3); - expect(await this.contract.counter()).to.be.bignumber.equal('3'); + expect(await this.mock.counter()).to.equal(0n); + await this.mock.initialize(); + expect(await this.mock.counter()).to.equal(1n); + await this.mock.reinitialize(2); + expect(await this.mock.counter()).to.equal(2n); + await this.mock.reinitialize(3); + expect(await this.mock.counter()).to.equal(3n); }); it('can jump multiple steps', async function () { - expect(await this.contract.counter()).to.be.bignumber.equal('0'); - await this.contract.initialize(); - expect(await this.contract.counter()).to.be.bignumber.equal('1'); - await this.contract.reinitialize(128); - expect(await this.contract.counter()).to.be.bignumber.equal('2'); + expect(await this.mock.counter()).to.equal(0n); + await this.mock.initialize(); + expect(await this.mock.counter()).to.equal(1n); + await this.mock.reinitialize(128); + expect(await this.mock.counter()).to.equal(2n); }); it('cannot nest reinitializers', async function () { - expect(await this.contract.counter()).to.be.bignumber.equal('0'); - await expectRevertCustomError(this.contract.nestedReinitialize(2, 2), 'InvalidInitialization', []); - await expectRevertCustomError(this.contract.nestedReinitialize(2, 3), 'InvalidInitialization', []); - await expectRevertCustomError(this.contract.nestedReinitialize(3, 2), 'InvalidInitialization', []); + expect(await this.mock.counter()).to.equal(0n); + await expect(this.mock.nestedReinitialize(2, 2)).to.be.revertedWithCustomError( + this.mock, + 'InvalidInitialization', + ); + await expect(this.mock.nestedReinitialize(2, 3)).to.be.revertedWithCustomError( + this.mock, + 'InvalidInitialization', + ); + await expect(this.mock.nestedReinitialize(3, 2)).to.be.revertedWithCustomError( + this.mock, + 'InvalidInitialization', + ); }); it('can chain reinitializers', async function () { - expect(await this.contract.counter()).to.be.bignumber.equal('0'); - await this.contract.chainReinitialize(2, 3); - expect(await this.contract.counter()).to.be.bignumber.equal('2'); + expect(await this.mock.counter()).to.equal(0n); + await this.mock.chainReinitialize(2, 3); + expect(await this.mock.counter()).to.equal(2n); }); it('_getInitializedVersion returns right version', async function () { - await this.contract.initialize(); - expect(await this.contract.getInitializedVersion()).to.be.bignumber.equal('1'); - await this.contract.reinitialize(12); - expect(await this.contract.getInitializedVersion()).to.be.bignumber.equal('12'); + await this.mock.initialize(); + expect(await this.mock.getInitializedVersion()).to.equal(1n); + await this.mock.reinitialize(12); + expect(await this.mock.getInitializedVersion()).to.equal(12n); }); describe('contract locking', function () { it('prevents initialization', async function () { - await this.contract.disableInitializers(); - await expectRevertCustomError(this.contract.initialize(), 'InvalidInitialization', []); + await this.mock.disableInitializers(); + await expect(this.mock.initialize()).to.be.revertedWithCustomError(this.mock, 'InvalidInitialization'); }); it('prevents re-initialization', async function () { - await this.contract.disableInitializers(); - await expectRevertCustomError(this.contract.reinitialize(255), 'InvalidInitialization', []); + await this.mock.disableInitializers(); + await expect(this.mock.reinitialize(255n)).to.be.revertedWithCustomError(this.mock, 'InvalidInitialization'); }); it('can lock contract after initialization', async function () { - await this.contract.initialize(); - await this.contract.disableInitializers(); - await expectRevertCustomError(this.contract.reinitialize(255), 'InvalidInitialization', []); + await this.mock.initialize(); + await this.mock.disableInitializers(); + await expect(this.mock.reinitialize(255n)).to.be.revertedWithCustomError(this.mock, 'InvalidInitialization'); }); }); }); describe('events', function () { it('constructor initialization emits event', async function () { - const contract = await ConstructorInitializableMock.new(); - - await expectEvent.inTransaction(contract.transactionHash, contract, 'Initialized', { version: '1' }); + const mock = await ethers.deployContract('ConstructorInitializableMock'); + await expect(mock.deploymentTransaction()).to.emit(mock, 'Initialized').withArgs(1n); }); it('initialization emits event', async function () { - const contract = await ReinitializerMock.new(); - - const { receipt } = await contract.initialize(); - expect(receipt.logs.filter(({ event }) => event === 'Initialized').length).to.be.equal(1); - expectEvent(receipt, 'Initialized', { version: '1' }); + const mock = await ethers.deployContract('ReinitializerMock'); + await expect(mock.initialize()).to.emit(mock, 'Initialized').withArgs(1n); }); it('reinitialization emits event', async function () { - const contract = await ReinitializerMock.new(); - - const { receipt } = await contract.reinitialize(128); - expect(receipt.logs.filter(({ event }) => event === 'Initialized').length).to.be.equal(1); - expectEvent(receipt, 'Initialized', { version: '128' }); + const mock = await ethers.deployContract('ReinitializerMock'); + await expect(mock.reinitialize(128)).to.emit(mock, 'Initialized').withArgs(128n); }); it('chained reinitialization emits multiple events', async function () { - const contract = await ReinitializerMock.new(); + const mock = await ethers.deployContract('ReinitializerMock'); - const { receipt } = await contract.chainReinitialize(2, 3); - expect(receipt.logs.filter(({ event }) => event === 'Initialized').length).to.be.equal(2); - expectEvent(receipt, 'Initialized', { version: '2' }); - expectEvent(receipt, 'Initialized', { version: '3' }); + await expect(mock.chainReinitialize(2, 3)) + .to.emit(mock, 'Initialized') + .withArgs(2n) + .to.emit(mock, 'Initialized') + .withArgs(3n); }); }); describe('complex testing with inheritance', function () { - const mother = '12'; + const mother = 12n; const gramps = '56'; - const father = '34'; - const child = '78'; + const father = 34n; + const child = 78n; beforeEach('deploying', async function () { - this.contract = await SampleChild.new(); - }); - - beforeEach('initializing', async function () { - await this.contract.initialize(mother, gramps, father, child); + this.mock = await ethers.deployContract('SampleChild'); + await this.mock.initialize(mother, gramps, father, child); }); it('initializes human', async function () { - expect(await this.contract.isHuman()).to.be.equal(true); + expect(await this.mock.isHuman()).to.be.true; }); it('initializes mother', async function () { - expect(await this.contract.mother()).to.be.bignumber.equal(mother); + expect(await this.mock.mother()).to.equal(mother); }); it('initializes gramps', async function () { - expect(await this.contract.gramps()).to.be.bignumber.equal(gramps); + expect(await this.mock.gramps()).to.equal(gramps); }); it('initializes father', async function () { - expect(await this.contract.father()).to.be.bignumber.equal(father); + expect(await this.mock.father()).to.equal(father); }); it('initializes child', async function () { - expect(await this.contract.child()).to.be.bignumber.equal(child); + expect(await this.mock.child()).to.equal(child); }); }); describe('disabling initialization', function () { it('old and new patterns in bad sequence', async function () { - await expectRevertCustomError(DisableBad1.new(), 'InvalidInitialization', []); - await expectRevertCustomError(DisableBad2.new(), 'InvalidInitialization', []); + const DisableBad1 = await ethers.getContractFactory('DisableBad1'); + await expect(DisableBad1.deploy()).to.be.revertedWithCustomError(DisableBad1, 'InvalidInitialization'); + + const DisableBad2 = await ethers.getContractFactory('DisableBad2'); + await expect(DisableBad2.deploy()).to.be.revertedWithCustomError(DisableBad2, 'InvalidInitialization'); }); it('old and new patterns in good sequence', async function () { - const ok = await DisableOk.new(); - await expectEvent.inConstruction(ok, 'Initialized', { version: '1' }); - await expectEvent.inConstruction(ok, 'Initialized', { version: MAX_UINT64 }); + const ok = await ethers.deployContract('DisableOk'); + await expect(ok.deploymentTransaction()) + .to.emit(ok, 'Initialized') + .withArgs(1n) + .to.emit(ok, 'Initialized') + .withArgs(MAX_UINT64); }); }); }); diff --git a/test/proxy/utils/UUPSUpgradeable.test.js b/test/proxy/utils/UUPSUpgradeable.test.js index 0baa90520..876a64cf9 100644 --- a/test/proxy/utils/UUPSUpgradeable.test.js +++ b/test/proxy/utils/UUPSUpgradeable.test.js @@ -1,28 +1,36 @@ -const { expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { getAddressInSlot, ImplementationSlot } = require('../../helpers/erc1967'); -const { expectRevertCustomError } = require('../../helpers/customError'); - -const ERC1967Proxy = artifacts.require('ERC1967Proxy'); -const UUPSUpgradeableMock = artifacts.require('UUPSUpgradeableMock'); -const UUPSUpgradeableUnsafeMock = artifacts.require('UUPSUpgradeableUnsafeMock'); -const NonUpgradeableMock = artifacts.require('NonUpgradeableMock'); -const UUPSUnsupportedProxiableUUID = artifacts.require('UUPSUnsupportedProxiableUUID'); -const Clones = artifacts.require('$Clones'); - -contract('UUPSUpgradeable', function () { - before(async function () { - this.implInitial = await UUPSUpgradeableMock.new(); - this.implUpgradeOk = await UUPSUpgradeableMock.new(); - this.implUpgradeUnsafe = await UUPSUpgradeableUnsafeMock.new(); - this.implUpgradeNonUUPS = await NonUpgradeableMock.new(); - this.implUnsupportedUUID = await UUPSUnsupportedProxiableUUID.new(); - // Used for testing non ERC1967 compliant proxies (clones are proxies that don't use the ERC1967 implementation slot) - this.cloneFactory = await Clones.new(); - }); +async function fixture() { + const implInitial = await ethers.deployContract('UUPSUpgradeableMock'); + const implUpgradeOk = await ethers.deployContract('UUPSUpgradeableMock'); + const implUpgradeUnsafe = await ethers.deployContract('UUPSUpgradeableUnsafeMock'); + const implUpgradeNonUUPS = await ethers.deployContract('NonUpgradeableMock'); + const implUnsupportedUUID = await ethers.deployContract('UUPSUnsupportedProxiableUUID'); + // Used for testing non ERC1967 compliant proxies (clones are proxies that don't use the ERC1967 implementation slot) + const cloneFactory = await ethers.deployContract('$Clones'); + + const instance = await ethers + .deployContract('ERC1967Proxy', [implInitial, '0x']) + .then(proxy => implInitial.attach(proxy.target)); + + return { + implInitial, + implUpgradeOk, + implUpgradeUnsafe, + implUpgradeNonUUPS, + implUnsupportedUUID, + cloneFactory, + instance, + }; +} + +describe('UUPSUpgradeable', function () { beforeEach(async function () { - const { address } = await ERC1967Proxy.new(this.implInitial.address, '0x'); - this.instance = await UUPSUpgradeableMock.at(address); + Object.assign(this, await loadFixture(fixture)); }); it('has an interface version', async function () { @@ -30,102 +38,83 @@ contract('UUPSUpgradeable', function () { }); it('upgrade to upgradeable implementation', async function () { - const { receipt } = await this.instance.upgradeToAndCall(this.implUpgradeOk.address, '0x'); - expect(receipt.logs.filter(({ event }) => event === 'Upgraded').length).to.be.equal(1); - expectEvent(receipt, 'Upgraded', { implementation: this.implUpgradeOk.address }); - expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.be.equal(this.implUpgradeOk.address); + await expect(this.instance.upgradeToAndCall(this.implUpgradeOk, '0x')) + .to.emit(this.instance, 'Upgraded') + .withArgs(this.implUpgradeOk.target); + + expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeOk.target); }); it('upgrade to upgradeable implementation with call', async function () { - expect(await this.instance.current()).to.be.bignumber.equal('0'); + expect(await this.instance.current()).to.equal(0n); - const { receipt } = await this.instance.upgradeToAndCall( - this.implUpgradeOk.address, - this.implUpgradeOk.contract.methods.increment().encodeABI(), - ); - expect(receipt.logs.filter(({ event }) => event === 'Upgraded').length).to.be.equal(1); - expectEvent(receipt, 'Upgraded', { implementation: this.implUpgradeOk.address }); - expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.be.equal(this.implUpgradeOk.address); + await expect( + this.instance.upgradeToAndCall(this.implUpgradeOk, this.implUpgradeOk.interface.encodeFunctionData('increment')), + ) + .to.emit(this.instance, 'Upgraded') + .withArgs(this.implUpgradeOk.target); + + expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeOk.target); - expect(await this.instance.current()).to.be.bignumber.equal('1'); + expect(await this.instance.current()).to.equal(1n); }); it('calling upgradeTo on the implementation reverts', async function () { - await expectRevertCustomError( - this.implInitial.upgradeToAndCall(this.implUpgradeOk.address, '0x'), + await expect(this.implInitial.upgradeToAndCall(this.implUpgradeOk, '0x')).to.be.revertedWithCustomError( + this.implInitial, 'UUPSUnauthorizedCallContext', - [], ); }); it('calling upgradeToAndCall on the implementation reverts', async function () { - await expectRevertCustomError( + await expect( this.implInitial.upgradeToAndCall( - this.implUpgradeOk.address, - this.implUpgradeOk.contract.methods.increment().encodeABI(), + this.implUpgradeOk, + this.implUpgradeOk.interface.encodeFunctionData('increment'), ), - 'UUPSUnauthorizedCallContext', - [], - ); - }); - - it('calling upgradeTo from a contract that is not an ERC1967 proxy (with the right implementation) reverts', async function () { - const receipt = await this.cloneFactory.$clone(this.implUpgradeOk.address); - const instance = await UUPSUpgradeableMock.at( - receipt.logs.find(({ event }) => event === 'return$clone').args.instance, - ); - - await expectRevertCustomError( - instance.upgradeToAndCall(this.implUpgradeUnsafe.address, '0x'), - 'UUPSUnauthorizedCallContext', - [], - ); + ).to.be.revertedWithCustomError(this.implUpgradeOk, 'UUPSUnauthorizedCallContext'); }); it('calling upgradeToAndCall from a contract that is not an ERC1967 proxy (with the right implementation) reverts', async function () { - const receipt = await this.cloneFactory.$clone(this.implUpgradeOk.address); - const instance = await UUPSUpgradeableMock.at( - receipt.logs.find(({ event }) => event === 'return$clone').args.instance, - ); + const instance = await this.cloneFactory.$clone + .staticCall(this.implUpgradeOk) + .then(address => this.implInitial.attach(address)); + await this.cloneFactory.$clone(this.implUpgradeOk); - await expectRevertCustomError( - instance.upgradeToAndCall(this.implUpgradeUnsafe.address, '0x'), + await expect(instance.upgradeToAndCall(this.implUpgradeUnsafe, '0x')).to.be.revertedWithCustomError( + instance, 'UUPSUnauthorizedCallContext', - [], ); }); it('rejects upgrading to an unsupported UUID', async function () { - await expectRevertCustomError( - this.instance.upgradeToAndCall(this.implUnsupportedUUID.address, '0x'), - 'UUPSUnsupportedProxiableUUID', - [web3.utils.keccak256('invalid UUID')], - ); + await expect(this.instance.upgradeToAndCall(this.implUnsupportedUUID, '0x')) + .to.be.revertedWithCustomError(this.instance, 'UUPSUnsupportedProxiableUUID') + .withArgs(ethers.id('invalid UUID')); }); it('upgrade to and unsafe upgradeable implementation', async function () { - const { receipt } = await this.instance.upgradeToAndCall(this.implUpgradeUnsafe.address, '0x'); - expectEvent(receipt, 'Upgraded', { implementation: this.implUpgradeUnsafe.address }); - expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.be.equal(this.implUpgradeUnsafe.address); + await expect(this.instance.upgradeToAndCall(this.implUpgradeUnsafe, '0x')) + .to.emit(this.instance, 'Upgraded') + .withArgs(this.implUpgradeUnsafe.target); + + expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeUnsafe.target); }); // delegate to a non existing upgradeTo function causes a low level revert it('reject upgrade to non uups implementation', async function () { - await expectRevertCustomError( - this.instance.upgradeToAndCall(this.implUpgradeNonUUPS.address, '0x'), - 'ERC1967InvalidImplementation', - [this.implUpgradeNonUUPS.address], - ); + await expect(this.instance.upgradeToAndCall(this.implUpgradeNonUUPS, '0x')) + .to.be.revertedWithCustomError(this.instance, 'ERC1967InvalidImplementation') + .withArgs(this.implUpgradeNonUUPS.target); }); it('reject proxy address as implementation', async function () { - const { address } = await ERC1967Proxy.new(this.implInitial.address, '0x'); - const otherInstance = await UUPSUpgradeableMock.at(address); + const otherInstance = await ethers + .deployContract('ERC1967Proxy', [this.implInitial, '0x']) + .then(proxy => this.implInitial.attach(proxy.target)); - await expectRevertCustomError( - this.instance.upgradeToAndCall(otherInstance.address, '0x'), - 'ERC1967InvalidImplementation', - [otherInstance.address], - ); + await expect(this.instance.upgradeToAndCall(otherInstance, '0x')) + .to.be.revertedWithCustomError(this.instance, 'ERC1967InvalidImplementation') + .withArgs(otherInstance.target); }); }); From 552cffde563e83043a6c3a35012b626a25eba775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 30 Nov 2023 08:04:34 -0600 Subject: [PATCH 131/167] Add Governor note for state changes between proposal creation and execution (#4766) Co-authored-by: Hadrien Croubois --- contracts/governance/IGovernor.sol | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contracts/governance/IGovernor.sol b/contracts/governance/IGovernor.sol index 85fc281d7..63589612e 100644 --- a/contracts/governance/IGovernor.sol +++ b/contracts/governance/IGovernor.sol @@ -317,6 +317,12 @@ interface IGovernor is IERC165, IERC6372 { * duration specified by {IGovernor-votingPeriod}. * * Emits a {ProposalCreated} event. + * + * NOTE: The state of the Governor and `targets` may change between the proposal creation and its execution. + * This may be the result of third party actions on the targeted contracts, or other governor proposals. + * For example, the balance of this contract could be updated or its access control permissions may be modified, + * possibly compromising the proposal's ability to execute successfully (e.g. the governor doesn't have enough + * value to cover a proposal with multiple transfers). */ function propose( address[] memory targets, From ef699fa6a224de863ffe48347a5ab95d3d8ba2ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Fri, 1 Dec 2023 07:46:46 -0600 Subject: [PATCH 132/167] Update Math `try*` operations return reference (#4775) --- contracts/utils/math/Math.sol | 20 ++++++++++---------- docs/modules/ROOT/pages/utilities.adoc | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/contracts/utils/math/Math.sol b/contracts/utils/math/Math.sol index 86316cb29..3a1d5a4b2 100644 --- a/contracts/utils/math/Math.sol +++ b/contracts/utils/math/Math.sol @@ -20,9 +20,9 @@ library Math { } /** - * @dev Returns the addition of two unsigned integers, with an overflow flag. + * @dev Returns the addition of two unsigned integers, with an success flag (no overflow). */ - function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { + function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); @@ -31,9 +31,9 @@ library Math { } /** - * @dev Returns the subtraction of two unsigned integers, with an overflow flag. + * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow). */ - function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { + function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b > a) return (false, 0); return (true, a - b); @@ -41,9 +41,9 @@ library Math { } /** - * @dev Returns the multiplication of two unsigned integers, with an overflow flag. + * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow). */ - function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { + function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. @@ -56,9 +56,9 @@ library Math { } /** - * @dev Returns the division of two unsigned integers, with a division by zero flag. + * @dev Returns the division of two unsigned integers, with a success flag (no division by zero). */ - function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { + function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a / b); @@ -66,9 +66,9 @@ library Math { } /** - * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. + * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero). */ - function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { + function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a % b); diff --git a/docs/modules/ROOT/pages/utilities.adoc b/docs/modules/ROOT/pages/utilities.adoc index f940d0d22..02ae4efff 100644 --- a/docs/modules/ROOT/pages/utilities.adoc +++ b/docs/modules/ROOT/pages/utilities.adoc @@ -82,10 +82,10 @@ contract MyContract { using SignedMath for int256; function tryOperations(uint256 a, uint256 b) internal pure { - (bool overflowsAdd, uint256 resultAdd) = x.tryAdd(y); - (bool overflowsSub, uint256 resultSub) = x.trySub(y); - (bool overflowsMul, uint256 resultMul) = x.tryMul(y); - (bool overflowsDiv, uint256 resultDiv) = x.tryDiv(y); + (bool succededAdd, uint256 resultAdd) = x.tryAdd(y); + (bool succededSub, uint256 resultSub) = x.trySub(y); + (bool succededMul, uint256 resultMul) = x.tryMul(y); + (bool succededDiv, uint256 resultDiv) = x.tryDiv(y); // ... } From cffb2f1ddcd87efd68effc92cfd336c5145acabd Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Mon, 4 Dec 2023 20:00:00 +0100 Subject: [PATCH 133/167] Migrate math tests to ethers.js v6 (#4769) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto García --- test/helpers/enums.js | 24 +- test/helpers/iterate.js | 6 - test/helpers/math.js | 21 +- test/metatx/ERC2771Forwarder.test.js | 2 +- .../extensions/ERC721Consecutive.test.js | 3 +- test/utils/math/Math.test.js | 500 +++++++++--------- test/utils/math/SafeCast.test.js | 157 +++--- test/utils/math/SignedMath.test.js | 91 +--- test/utils/types/Time.test.js | 3 +- 9 files changed, 366 insertions(+), 441 deletions(-) diff --git a/test/helpers/enums.js b/test/helpers/enums.js index 6280e0f31..b75e73ba8 100644 --- a/test/helpers/enums.js +++ b/test/helpers/enums.js @@ -2,10 +2,20 @@ function Enum(...options) { return Object.fromEntries(options.map((key, i) => [key, web3.utils.toBN(i)])); } -module.exports = { - Enum, - ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), - VoteType: Enum('Against', 'For', 'Abstain'), - Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), - OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), -}; +function EnumBigInt(...options) { + return Object.fromEntries(options.map((key, i) => [key, BigInt(i)])); +} + +// TODO: remove web3, simplify code +function createExport(Enum) { + return { + Enum, + ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), + VoteType: Enum('Against', 'For', 'Abstain'), + Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), + OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), + }; +} + +module.exports = createExport(Enum); +module.exports.bigint = createExport(EnumBigInt); diff --git a/test/helpers/iterate.js b/test/helpers/iterate.js index 7f6e0e678..2a84dfbeb 100644 --- a/test/helpers/iterate.js +++ b/test/helpers/iterate.js @@ -1,16 +1,10 @@ // Map values in an object const mapValues = (obj, fn) => Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, fn(v)])); -// Array of number or bigint -const max = (...values) => values.slice(1).reduce((x, y) => (x > y ? x : y), values[0]); -const min = (...values) => values.slice(1).reduce((x, y) => (x < y ? x : y), values[0]); - // Cartesian product of a list of arrays const product = (...arrays) => arrays.reduce((a, b) => a.flatMap(ai => b.map(bi => [...ai, bi])), [[]]); module.exports = { mapValues, - max, - min, product, }; diff --git a/test/helpers/math.js b/test/helpers/math.js index 134f8b045..708990519 100644 --- a/test/helpers/math.js +++ b/test/helpers/math.js @@ -1,12 +1,13 @@ +// Array of number or bigint +const max = (...values) => values.slice(1).reduce((x, y) => (x > y ? x : y), values.at(0)); +const min = (...values) => values.slice(1).reduce((x, y) => (x < y ? x : y), values.at(0)); +const sum = (...values) => values.slice(1).reduce((x, y) => x + y, values.at(0)); + module.exports = { - // sum of integer / bignumber - sum: (...args) => args.reduce((acc, n) => acc + n, 0), - bigintSum: (...args) => args.reduce((acc, n) => acc + n, 0n), - BNsum: (...args) => args.reduce((acc, n) => acc.add(n), web3.utils.toBN(0)), - // min of integer / bignumber - min: (...args) => args.slice(1).reduce((x, y) => (x < y ? x : y), args[0]), - BNmin: (...args) => args.slice(1).reduce((x, y) => (x.lt(y) ? x : y), args[0]), - // max of integer / bignumber - max: (...args) => args.slice(1).reduce((x, y) => (x > y ? x : y), args[0]), - BNmax: (...args) => args.slice(1).reduce((x, y) => (x.gt(y) ? x : y), args[0]), + // re-export min, max & sum of integer / bignumber + min, + max, + sum, + // deprecated: BN version of sum + BNsum: (...args) => args.slice(1).reduce((x, y) => x.add(y), args.at(0)), }; diff --git a/test/metatx/ERC2771Forwarder.test.js b/test/metatx/ERC2771Forwarder.test.js index a665471f3..e0d1090c4 100644 --- a/test/metatx/ERC2771Forwarder.test.js +++ b/test/metatx/ERC2771Forwarder.test.js @@ -4,7 +4,7 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { getDomain } = require('../helpers/eip712'); const { bigint: time } = require('../helpers/time'); -const { bigintSum: sum } = require('../helpers/math'); +const { sum } = require('../helpers/math'); async function fixture() { const [sender, refundReceiver, another, ...accounts] = await ethers.getSigners(); diff --git a/test/token/ERC721/extensions/ERC721Consecutive.test.js b/test/token/ERC721/extensions/ERC721Consecutive.test.js index d9e33aff2..e4ee3196d 100644 --- a/test/token/ERC721/extensions/ERC721Consecutive.test.js +++ b/test/token/ERC721/extensions/ERC721Consecutive.test.js @@ -70,7 +70,8 @@ contract('ERC721Consecutive', function (accounts) { it('balance & voting power are set', async function () { for (const account of accounts) { - const balance = sum(...batches.filter(({ receiver }) => receiver === account).map(({ amount }) => amount)); + const balance = + sum(...batches.filter(({ receiver }) => receiver === account).map(({ amount }) => amount)) ?? 0; expect(await this.token.balanceOf(account)).to.be.bignumber.equal(web3.utils.toBN(balance)); diff --git a/test/utils/math/Math.test.js b/test/utils/math/Math.test.js index 7d4a58c81..6e4fa3b9c 100644 --- a/test/utils/math/Math.test.js +++ b/test/utils/math/Math.test.js @@ -1,320 +1,298 @@ -const { BN, constants, expectRevert } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { MAX_UINT256 } = constants; -const { Rounding } = require('../../helpers/enums.js'); -const { expectRevertCustomError } = require('../../helpers/customError.js'); - -const Math = artifacts.require('$Math'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); +const { min, max } = require('../../helpers/math'); +const { + bigint: { Rounding }, +} = require('../../helpers/enums.js'); const RoundingDown = [Rounding.Floor, Rounding.Trunc]; const RoundingUp = [Rounding.Ceil, Rounding.Expand]; -function expectStruct(value, expected) { - for (const key in expected) { - if (BN.isBN(value[key])) { - expect(value[key]).to.be.bignumber.equal(expected[key]); - } else { - expect(value[key]).to.be.equal(expected[key]); - } - } +async function testCommutative(fn, lhs, rhs, expected, ...extra) { + expect(await fn(lhs, rhs, ...extra)).to.deep.equal(expected); + expect(await fn(rhs, lhs, ...extra)).to.deep.equal(expected); } -async function testCommutativeIterable(fn, lhs, rhs, expected, ...extra) { - expectStruct(await fn(lhs, rhs, ...extra), expected); - expectStruct(await fn(rhs, lhs, ...extra), expected); -} +async function fixture() { + const mock = await ethers.deployContract('$Math'); -contract('Math', function () { - const min = new BN('1234'); - const max = new BN('5678'); - const MAX_UINT256_SUB1 = MAX_UINT256.sub(new BN('1')); - const MAX_UINT256_SUB2 = MAX_UINT256.sub(new BN('2')); + // disambiguation, we use the version with explicit rounding + mock.$mulDiv = mock['$mulDiv(uint256,uint256,uint256,uint8)']; + mock.$sqrt = mock['$sqrt(uint256,uint8)']; + mock.$log2 = mock['$log2(uint256,uint8)']; + mock.$log10 = mock['$log10(uint256,uint8)']; + mock.$log256 = mock['$log256(uint256,uint8)']; + return { mock }; +} + +describe('Math', function () { beforeEach(async function () { - this.math = await Math.new(); + Object.assign(this, await loadFixture(fixture)); }); describe('tryAdd', function () { it('adds correctly', async function () { - const a = new BN('5678'); - const b = new BN('1234'); - - await testCommutativeIterable(this.math.$tryAdd, a, b, [true, a.add(b)]); + const a = 5678n; + const b = 1234n; + await testCommutative(this.mock.$tryAdd, a, b, [true, a + b]); }); it('reverts on addition overflow', async function () { - const a = MAX_UINT256; - const b = new BN('1'); - - await testCommutativeIterable(this.math.$tryAdd, a, b, [false, '0']); + const a = ethers.MaxUint256; + const b = 1n; + await testCommutative(this.mock.$tryAdd, a, b, [false, 0n]); }); }); describe('trySub', function () { it('subtracts correctly', async function () { - const a = new BN('5678'); - const b = new BN('1234'); - - expectStruct(await this.math.$trySub(a, b), [true, a.sub(b)]); + const a = 5678n; + const b = 1234n; + expect(await this.mock.$trySub(a, b)).to.deep.equal([true, a - b]); }); it('reverts if subtraction result would be negative', async function () { - const a = new BN('1234'); - const b = new BN('5678'); - - expectStruct(await this.math.$trySub(a, b), [false, '0']); + const a = 1234n; + const b = 5678n; + expect(await this.mock.$trySub(a, b)).to.deep.equal([false, 0n]); }); }); describe('tryMul', function () { it('multiplies correctly', async function () { - const a = new BN('1234'); - const b = new BN('5678'); - - await testCommutativeIterable(this.math.$tryMul, a, b, [true, a.mul(b)]); + const a = 1234n; + const b = 5678n; + await testCommutative(this.mock.$tryMul, a, b, [true, a * b]); }); it('multiplies by zero correctly', async function () { - const a = new BN('0'); - const b = new BN('5678'); - - await testCommutativeIterable(this.math.$tryMul, a, b, [true, a.mul(b)]); + const a = 0n; + const b = 5678n; + await testCommutative(this.mock.$tryMul, a, b, [true, a * b]); }); it('reverts on multiplication overflow', async function () { - const a = MAX_UINT256; - const b = new BN('2'); - - await testCommutativeIterable(this.math.$tryMul, a, b, [false, '0']); + const a = ethers.MaxUint256; + const b = 2n; + await testCommutative(this.mock.$tryMul, a, b, [false, 0n]); }); }); describe('tryDiv', function () { it('divides correctly', async function () { - const a = new BN('5678'); - const b = new BN('5678'); - - expectStruct(await this.math.$tryDiv(a, b), [true, a.div(b)]); + const a = 5678n; + const b = 5678n; + expect(await this.mock.$tryDiv(a, b)).to.deep.equal([true, a / b]); }); it('divides zero correctly', async function () { - const a = new BN('0'); - const b = new BN('5678'); - - expectStruct(await this.math.$tryDiv(a, b), [true, a.div(b)]); + const a = 0n; + const b = 5678n; + expect(await this.mock.$tryDiv(a, b)).to.deep.equal([true, a / b]); }); it('returns complete number result on non-even division', async function () { - const a = new BN('7000'); - const b = new BN('5678'); - - expectStruct(await this.math.$tryDiv(a, b), [true, a.div(b)]); + const a = 7000n; + const b = 5678n; + expect(await this.mock.$tryDiv(a, b)).to.deep.equal([true, a / b]); }); it('reverts on division by zero', async function () { - const a = new BN('5678'); - const b = new BN('0'); - - expectStruct(await this.math.$tryDiv(a, b), [false, '0']); + const a = 5678n; + const b = 0n; + expect(await this.mock.$tryDiv(a, b)).to.deep.equal([false, 0n]); }); }); describe('tryMod', function () { - describe('modulos correctly', async function () { + describe('modulos correctly', function () { it('when the dividend is smaller than the divisor', async function () { - const a = new BN('284'); - const b = new BN('5678'); - - expectStruct(await this.math.$tryMod(a, b), [true, a.mod(b)]); + const a = 284n; + const b = 5678n; + expect(await this.mock.$tryMod(a, b)).to.deep.equal([true, a % b]); }); it('when the dividend is equal to the divisor', async function () { - const a = new BN('5678'); - const b = new BN('5678'); - - expectStruct(await this.math.$tryMod(a, b), [true, a.mod(b)]); + const a = 5678n; + const b = 5678n; + expect(await this.mock.$tryMod(a, b)).to.deep.equal([true, a % b]); }); it('when the dividend is larger than the divisor', async function () { - const a = new BN('7000'); - const b = new BN('5678'); - - expectStruct(await this.math.$tryMod(a, b), [true, a.mod(b)]); + const a = 7000n; + const b = 5678n; + expect(await this.mock.$tryMod(a, b)).to.deep.equal([true, a % b]); }); it('when the dividend is a multiple of the divisor', async function () { - const a = new BN('17034'); // 17034 == 5678 * 3 - const b = new BN('5678'); - - expectStruct(await this.math.$tryMod(a, b), [true, a.mod(b)]); + const a = 17034n; // 17034 == 5678 * 3 + const b = 5678n; + expect(await this.mock.$tryMod(a, b)).to.deep.equal([true, a % b]); }); }); it('reverts with a 0 divisor', async function () { - const a = new BN('5678'); - const b = new BN('0'); - - expectStruct(await this.math.$tryMod(a, b), [false, '0']); + const a = 5678n; + const b = 0n; + expect(await this.mock.$tryMod(a, b)).to.deep.equal([false, 0n]); }); }); describe('max', function () { - it('is correctly detected in first argument position', async function () { - expect(await this.math.$max(max, min)).to.be.bignumber.equal(max); - }); - - it('is correctly detected in second argument position', async function () { - expect(await this.math.$max(min, max)).to.be.bignumber.equal(max); + it('is correctly detected in both position', async function () { + await testCommutative(this.mock.$max, 1234n, 5678n, max(1234n, 5678n)); }); }); describe('min', function () { - it('is correctly detected in first argument position', async function () { - expect(await this.math.$min(min, max)).to.be.bignumber.equal(min); - }); - - it('is correctly detected in second argument position', async function () { - expect(await this.math.$min(max, min)).to.be.bignumber.equal(min); + it('is correctly detected in both position', async function () { + await testCommutative(this.mock.$min, 1234n, 5678n, min(1234n, 5678n)); }); }); describe('average', function () { - function bnAverage(a, b) { - return a.add(b).divn(2); - } - it('is correctly calculated with two odd numbers', async function () { - const a = new BN('57417'); - const b = new BN('95431'); - expect(await this.math.$average(a, b)).to.be.bignumber.equal(bnAverage(a, b)); + const a = 57417n; + const b = 95431n; + expect(await this.mock.$average(a, b)).to.equal((a + b) / 2n); }); it('is correctly calculated with two even numbers', async function () { - const a = new BN('42304'); - const b = new BN('84346'); - expect(await this.math.$average(a, b)).to.be.bignumber.equal(bnAverage(a, b)); + const a = 42304n; + const b = 84346n; + expect(await this.mock.$average(a, b)).to.equal((a + b) / 2n); }); it('is correctly calculated with one even and one odd number', async function () { - const a = new BN('57417'); - const b = new BN('84346'); - expect(await this.math.$average(a, b)).to.be.bignumber.equal(bnAverage(a, b)); + const a = 57417n; + const b = 84346n; + expect(await this.mock.$average(a, b)).to.equal((a + b) / 2n); }); it('is correctly calculated with two max uint256 numbers', async function () { - const a = MAX_UINT256; - expect(await this.math.$average(a, a)).to.be.bignumber.equal(bnAverage(a, a)); + const a = ethers.MaxUint256; + expect(await this.mock.$average(a, a)).to.equal(a); }); }); describe('ceilDiv', function () { it('reverts on zero division', async function () { - const a = new BN('2'); - const b = new BN('0'); + const a = 2n; + const b = 0n; // It's unspecified because it's a low level 0 division error - await expectRevert.unspecified(this.math.$ceilDiv(a, b)); + await expect(this.mock.$ceilDiv(a, b)).to.be.revertedWithPanic(PANIC_CODES.DIVISION_BY_ZERO); }); it('does not round up a zero result', async function () { - const a = new BN('0'); - const b = new BN('2'); - expect(await this.math.$ceilDiv(a, b)).to.be.bignumber.equal('0'); + const a = 0n; + const b = 2n; + const r = 0n; + expect(await this.mock.$ceilDiv(a, b)).to.equal(r); }); it('does not round up on exact division', async function () { - const a = new BN('10'); - const b = new BN('5'); - expect(await this.math.$ceilDiv(a, b)).to.be.bignumber.equal('2'); + const a = 10n; + const b = 5n; + const r = 2n; + expect(await this.mock.$ceilDiv(a, b)).to.equal(r); }); it('rounds up on division with remainders', async function () { - const a = new BN('42'); - const b = new BN('13'); - expect(await this.math.$ceilDiv(a, b)).to.be.bignumber.equal('4'); + const a = 42n; + const b = 13n; + const r = 4n; + expect(await this.mock.$ceilDiv(a, b)).to.equal(r); }); it('does not overflow', async function () { - const b = new BN('2'); - const result = new BN('1').shln(255); - expect(await this.math.$ceilDiv(MAX_UINT256, b)).to.be.bignumber.equal(result); + const a = ethers.MaxUint256; + const b = 2n; + const r = 1n << 255n; + expect(await this.mock.$ceilDiv(a, b)).to.equal(r); }); it('correctly computes max uint256 divided by 1', async function () { - const b = new BN('1'); - expect(await this.math.$ceilDiv(MAX_UINT256, b)).to.be.bignumber.equal(MAX_UINT256); + const a = ethers.MaxUint256; + const b = 1n; + const r = ethers.MaxUint256; + expect(await this.mock.$ceilDiv(a, b)).to.equal(r); }); }); describe('muldiv', function () { it('divide by 0', async function () { - await expectRevert.unspecified(this.math.$mulDiv(1, 1, 0, Rounding.Floor)); + const a = 1n; + const b = 1n; + const c = 0n; + await expect(this.mock.$mulDiv(a, b, c, Rounding.Floor)).to.be.revertedWithPanic(PANIC_CODES.DIVISION_BY_ZERO); }); it('reverts with result higher than 2 ^ 256', async function () { - await expectRevertCustomError(this.math.$mulDiv(5, MAX_UINT256, 2, Rounding.Floor), 'MathOverflowedMulDiv', []); + const a = 5n; + const b = ethers.MaxUint256; + const c = 2n; + await expect(this.mock.$mulDiv(a, b, c, Rounding.Floor)).to.be.revertedWithCustomError( + this.mock, + 'MathOverflowedMulDiv', + ); }); - describe('does round down', async function () { + describe('does round down', function () { it('small values', async function () { for (const rounding of RoundingDown) { - expect(await this.math.$mulDiv('3', '4', '5', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$mulDiv('3', '5', '5', rounding)).to.be.bignumber.equal('3'); + expect(await this.mock.$mulDiv(3n, 4n, 5n, rounding)).to.equal(2n); + expect(await this.mock.$mulDiv(3n, 5n, 5n, rounding)).to.equal(3n); } }); it('large values', async function () { for (const rounding of RoundingDown) { - expect(await this.math.$mulDiv(new BN('42'), MAX_UINT256_SUB1, MAX_UINT256, rounding)).to.be.bignumber.equal( - new BN('41'), - ); + expect(await this.mock.$mulDiv(42n, ethers.MaxUint256 - 1n, ethers.MaxUint256, rounding)).to.equal(41n); - expect(await this.math.$mulDiv(new BN('17'), MAX_UINT256, MAX_UINT256, rounding)).to.be.bignumber.equal( - new BN('17'), - ); + expect(await this.mock.$mulDiv(17n, ethers.MaxUint256, ethers.MaxUint256, rounding)).to.equal(17n); expect( - await this.math.$mulDiv(MAX_UINT256_SUB1, MAX_UINT256_SUB1, MAX_UINT256, rounding), - ).to.be.bignumber.equal(MAX_UINT256_SUB2); + await this.mock.$mulDiv(ethers.MaxUint256 - 1n, ethers.MaxUint256 - 1n, ethers.MaxUint256, rounding), + ).to.equal(ethers.MaxUint256 - 2n); - expect(await this.math.$mulDiv(MAX_UINT256, MAX_UINT256_SUB1, MAX_UINT256, rounding)).to.be.bignumber.equal( - MAX_UINT256_SUB1, - ); + expect( + await this.mock.$mulDiv(ethers.MaxUint256, ethers.MaxUint256 - 1n, ethers.MaxUint256, rounding), + ).to.equal(ethers.MaxUint256 - 1n); - expect(await this.math.$mulDiv(MAX_UINT256, MAX_UINT256, MAX_UINT256, rounding)).to.be.bignumber.equal( - MAX_UINT256, + expect(await this.mock.$mulDiv(ethers.MaxUint256, ethers.MaxUint256, ethers.MaxUint256, rounding)).to.equal( + ethers.MaxUint256, ); } }); }); - describe('does round up', async function () { + describe('does round up', function () { it('small values', async function () { for (const rounding of RoundingUp) { - expect(await this.math.$mulDiv('3', '4', '5', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.$mulDiv('3', '5', '5', rounding)).to.be.bignumber.equal('3'); + expect(await this.mock.$mulDiv(3n, 4n, 5n, rounding)).to.equal(3n); + expect(await this.mock.$mulDiv(3n, 5n, 5n, rounding)).to.equal(3n); } }); it('large values', async function () { for (const rounding of RoundingUp) { - expect(await this.math.$mulDiv(new BN('42'), MAX_UINT256_SUB1, MAX_UINT256, rounding)).to.be.bignumber.equal( - new BN('42'), - ); + expect(await this.mock.$mulDiv(42n, ethers.MaxUint256 - 1n, ethers.MaxUint256, rounding)).to.equal(42n); - expect(await this.math.$mulDiv(new BN('17'), MAX_UINT256, MAX_UINT256, rounding)).to.be.bignumber.equal( - new BN('17'), - ); + expect(await this.mock.$mulDiv(17n, ethers.MaxUint256, ethers.MaxUint256, rounding)).to.equal(17n); expect( - await this.math.$mulDiv(MAX_UINT256_SUB1, MAX_UINT256_SUB1, MAX_UINT256, rounding), - ).to.be.bignumber.equal(MAX_UINT256_SUB1); + await this.mock.$mulDiv(ethers.MaxUint256 - 1n, ethers.MaxUint256 - 1n, ethers.MaxUint256, rounding), + ).to.equal(ethers.MaxUint256 - 1n); - expect(await this.math.$mulDiv(MAX_UINT256, MAX_UINT256_SUB1, MAX_UINT256, rounding)).to.be.bignumber.equal( - MAX_UINT256_SUB1, - ); + expect( + await this.mock.$mulDiv(ethers.MaxUint256, ethers.MaxUint256 - 1n, ethers.MaxUint256, rounding), + ).to.equal(ethers.MaxUint256 - 1n); - expect(await this.math.$mulDiv(MAX_UINT256, MAX_UINT256, MAX_UINT256, rounding)).to.be.bignumber.equal( - MAX_UINT256, + expect(await this.mock.$mulDiv(ethers.MaxUint256, ethers.MaxUint256, ethers.MaxUint256, rounding)).to.equal( + ethers.MaxUint256, ); } }); @@ -324,39 +302,35 @@ contract('Math', function () { describe('sqrt', function () { it('rounds down', async function () { for (const rounding of RoundingDown) { - expect(await this.math.$sqrt('0', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$sqrt('1', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$sqrt('2', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$sqrt('3', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$sqrt('4', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$sqrt('144', rounding)).to.be.bignumber.equal('12'); - expect(await this.math.$sqrt('999999', rounding)).to.be.bignumber.equal('999'); - expect(await this.math.$sqrt('1000000', rounding)).to.be.bignumber.equal('1000'); - expect(await this.math.$sqrt('1000001', rounding)).to.be.bignumber.equal('1000'); - expect(await this.math.$sqrt('1002000', rounding)).to.be.bignumber.equal('1000'); - expect(await this.math.$sqrt('1002001', rounding)).to.be.bignumber.equal('1001'); - expect(await this.math.$sqrt(MAX_UINT256, rounding)).to.be.bignumber.equal( - '340282366920938463463374607431768211455', - ); + expect(await this.mock.$sqrt(0n, rounding)).to.equal(0n); + expect(await this.mock.$sqrt(1n, rounding)).to.equal(1n); + expect(await this.mock.$sqrt(2n, rounding)).to.equal(1n); + expect(await this.mock.$sqrt(3n, rounding)).to.equal(1n); + expect(await this.mock.$sqrt(4n, rounding)).to.equal(2n); + expect(await this.mock.$sqrt(144n, rounding)).to.equal(12n); + expect(await this.mock.$sqrt(999999n, rounding)).to.equal(999n); + expect(await this.mock.$sqrt(1000000n, rounding)).to.equal(1000n); + expect(await this.mock.$sqrt(1000001n, rounding)).to.equal(1000n); + expect(await this.mock.$sqrt(1002000n, rounding)).to.equal(1000n); + expect(await this.mock.$sqrt(1002001n, rounding)).to.equal(1001n); + expect(await this.mock.$sqrt(ethers.MaxUint256, rounding)).to.equal(340282366920938463463374607431768211455n); } }); it('rounds up', async function () { for (const rounding of RoundingUp) { - expect(await this.math.$sqrt('0', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$sqrt('1', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$sqrt('2', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$sqrt('3', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$sqrt('4', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$sqrt('144', rounding)).to.be.bignumber.equal('12'); - expect(await this.math.$sqrt('999999', rounding)).to.be.bignumber.equal('1000'); - expect(await this.math.$sqrt('1000000', rounding)).to.be.bignumber.equal('1000'); - expect(await this.math.$sqrt('1000001', rounding)).to.be.bignumber.equal('1001'); - expect(await this.math.$sqrt('1002000', rounding)).to.be.bignumber.equal('1001'); - expect(await this.math.$sqrt('1002001', rounding)).to.be.bignumber.equal('1001'); - expect(await this.math.$sqrt(MAX_UINT256, rounding)).to.be.bignumber.equal( - '340282366920938463463374607431768211456', - ); + expect(await this.mock.$sqrt(0n, rounding)).to.equal(0n); + expect(await this.mock.$sqrt(1n, rounding)).to.equal(1n); + expect(await this.mock.$sqrt(2n, rounding)).to.equal(2n); + expect(await this.mock.$sqrt(3n, rounding)).to.equal(2n); + expect(await this.mock.$sqrt(4n, rounding)).to.equal(2n); + expect(await this.mock.$sqrt(144n, rounding)).to.equal(12n); + expect(await this.mock.$sqrt(999999n, rounding)).to.equal(1000n); + expect(await this.mock.$sqrt(1000000n, rounding)).to.equal(1000n); + expect(await this.mock.$sqrt(1000001n, rounding)).to.equal(1001n); + expect(await this.mock.$sqrt(1002000n, rounding)).to.equal(1001n); + expect(await this.mock.$sqrt(1002001n, rounding)).to.equal(1001n); + expect(await this.mock.$sqrt(ethers.MaxUint256, rounding)).to.equal(340282366920938463463374607431768211456n); } }); }); @@ -365,33 +339,33 @@ contract('Math', function () { describe('log2', function () { it('rounds down', async function () { for (const rounding of RoundingDown) { - expect(await this.math.methods['$log2(uint256,uint8)']('0', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.methods['$log2(uint256,uint8)']('1', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.methods['$log2(uint256,uint8)']('2', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.methods['$log2(uint256,uint8)']('3', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.methods['$log2(uint256,uint8)']('4', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.methods['$log2(uint256,uint8)']('5', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.methods['$log2(uint256,uint8)']('6', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.methods['$log2(uint256,uint8)']('7', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.methods['$log2(uint256,uint8)']('8', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.methods['$log2(uint256,uint8)']('9', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.methods['$log2(uint256,uint8)'](MAX_UINT256, rounding)).to.be.bignumber.equal('255'); + expect(await this.mock.$log2(0n, rounding)).to.equal(0n); + expect(await this.mock.$log2(1n, rounding)).to.equal(0n); + expect(await this.mock.$log2(2n, rounding)).to.equal(1n); + expect(await this.mock.$log2(3n, rounding)).to.equal(1n); + expect(await this.mock.$log2(4n, rounding)).to.equal(2n); + expect(await this.mock.$log2(5n, rounding)).to.equal(2n); + expect(await this.mock.$log2(6n, rounding)).to.equal(2n); + expect(await this.mock.$log2(7n, rounding)).to.equal(2n); + expect(await this.mock.$log2(8n, rounding)).to.equal(3n); + expect(await this.mock.$log2(9n, rounding)).to.equal(3n); + expect(await this.mock.$log2(ethers.MaxUint256, rounding)).to.equal(255n); } }); it('rounds up', async function () { for (const rounding of RoundingUp) { - expect(await this.math.methods['$log2(uint256,uint8)']('0', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.methods['$log2(uint256,uint8)']('1', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.methods['$log2(uint256,uint8)']('2', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.methods['$log2(uint256,uint8)']('3', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.methods['$log2(uint256,uint8)']('4', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.methods['$log2(uint256,uint8)']('5', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.methods['$log2(uint256,uint8)']('6', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.methods['$log2(uint256,uint8)']('7', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.methods['$log2(uint256,uint8)']('8', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.methods['$log2(uint256,uint8)']('9', rounding)).to.be.bignumber.equal('4'); - expect(await this.math.methods['$log2(uint256,uint8)'](MAX_UINT256, rounding)).to.be.bignumber.equal('256'); + expect(await this.mock.$log2(0n, rounding)).to.equal(0n); + expect(await this.mock.$log2(1n, rounding)).to.equal(0n); + expect(await this.mock.$log2(2n, rounding)).to.equal(1n); + expect(await this.mock.$log2(3n, rounding)).to.equal(2n); + expect(await this.mock.$log2(4n, rounding)).to.equal(2n); + expect(await this.mock.$log2(5n, rounding)).to.equal(3n); + expect(await this.mock.$log2(6n, rounding)).to.equal(3n); + expect(await this.mock.$log2(7n, rounding)).to.equal(3n); + expect(await this.mock.$log2(8n, rounding)).to.equal(3n); + expect(await this.mock.$log2(9n, rounding)).to.equal(4n); + expect(await this.mock.$log2(ethers.MaxUint256, rounding)).to.equal(256n); } }); }); @@ -399,37 +373,37 @@ contract('Math', function () { describe('log10', function () { it('rounds down', async function () { for (const rounding of RoundingDown) { - expect(await this.math.$log10('0', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log10('1', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log10('2', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log10('9', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log10('10', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log10('11', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log10('99', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log10('100', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$log10('101', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$log10('999', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$log10('1000', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.$log10('1001', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.$log10(MAX_UINT256, rounding)).to.be.bignumber.equal('77'); + expect(await this.mock.$log10(0n, rounding)).to.equal(0n); + expect(await this.mock.$log10(1n, rounding)).to.equal(0n); + expect(await this.mock.$log10(2n, rounding)).to.equal(0n); + expect(await this.mock.$log10(9n, rounding)).to.equal(0n); + expect(await this.mock.$log10(10n, rounding)).to.equal(1n); + expect(await this.mock.$log10(11n, rounding)).to.equal(1n); + expect(await this.mock.$log10(99n, rounding)).to.equal(1n); + expect(await this.mock.$log10(100n, rounding)).to.equal(2n); + expect(await this.mock.$log10(101n, rounding)).to.equal(2n); + expect(await this.mock.$log10(999n, rounding)).to.equal(2n); + expect(await this.mock.$log10(1000n, rounding)).to.equal(3n); + expect(await this.mock.$log10(1001n, rounding)).to.equal(3n); + expect(await this.mock.$log10(ethers.MaxUint256, rounding)).to.equal(77n); } }); it('rounds up', async function () { for (const rounding of RoundingUp) { - expect(await this.math.$log10('0', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log10('1', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log10('2', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log10('9', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log10('10', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log10('11', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$log10('99', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$log10('100', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$log10('101', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.$log10('999', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.$log10('1000', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.$log10('1001', rounding)).to.be.bignumber.equal('4'); - expect(await this.math.$log10(MAX_UINT256, rounding)).to.be.bignumber.equal('78'); + expect(await this.mock.$log10(0n, rounding)).to.equal(0n); + expect(await this.mock.$log10(1n, rounding)).to.equal(0n); + expect(await this.mock.$log10(2n, rounding)).to.equal(1n); + expect(await this.mock.$log10(9n, rounding)).to.equal(1n); + expect(await this.mock.$log10(10n, rounding)).to.equal(1n); + expect(await this.mock.$log10(11n, rounding)).to.equal(2n); + expect(await this.mock.$log10(99n, rounding)).to.equal(2n); + expect(await this.mock.$log10(100n, rounding)).to.equal(2n); + expect(await this.mock.$log10(101n, rounding)).to.equal(3n); + expect(await this.mock.$log10(999n, rounding)).to.equal(3n); + expect(await this.mock.$log10(1000n, rounding)).to.equal(3n); + expect(await this.mock.$log10(1001n, rounding)).to.equal(4n); + expect(await this.mock.$log10(ethers.MaxUint256, rounding)).to.equal(78n); } }); }); @@ -437,31 +411,31 @@ contract('Math', function () { describe('log256', function () { it('rounds down', async function () { for (const rounding of RoundingDown) { - expect(await this.math.$log256('0', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log256('1', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log256('2', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log256('255', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log256('256', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log256('257', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log256('65535', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log256('65536', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$log256('65537', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$log256(MAX_UINT256, rounding)).to.be.bignumber.equal('31'); + expect(await this.mock.$log256(0n, rounding)).to.equal(0n); + expect(await this.mock.$log256(1n, rounding)).to.equal(0n); + expect(await this.mock.$log256(2n, rounding)).to.equal(0n); + expect(await this.mock.$log256(255n, rounding)).to.equal(0n); + expect(await this.mock.$log256(256n, rounding)).to.equal(1n); + expect(await this.mock.$log256(257n, rounding)).to.equal(1n); + expect(await this.mock.$log256(65535n, rounding)).to.equal(1n); + expect(await this.mock.$log256(65536n, rounding)).to.equal(2n); + expect(await this.mock.$log256(65537n, rounding)).to.equal(2n); + expect(await this.mock.$log256(ethers.MaxUint256, rounding)).to.equal(31n); } }); it('rounds up', async function () { for (const rounding of RoundingUp) { - expect(await this.math.$log256('0', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log256('1', rounding)).to.be.bignumber.equal('0'); - expect(await this.math.$log256('2', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log256('255', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log256('256', rounding)).to.be.bignumber.equal('1'); - expect(await this.math.$log256('257', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$log256('65535', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$log256('65536', rounding)).to.be.bignumber.equal('2'); - expect(await this.math.$log256('65537', rounding)).to.be.bignumber.equal('3'); - expect(await this.math.$log256(MAX_UINT256, rounding)).to.be.bignumber.equal('32'); + expect(await this.mock.$log256(0n, rounding)).to.equal(0n); + expect(await this.mock.$log256(1n, rounding)).to.equal(0n); + expect(await this.mock.$log256(2n, rounding)).to.equal(1n); + expect(await this.mock.$log256(255n, rounding)).to.equal(1n); + expect(await this.mock.$log256(256n, rounding)).to.equal(1n); + expect(await this.mock.$log256(257n, rounding)).to.equal(2n); + expect(await this.mock.$log256(65535n, rounding)).to.equal(2n); + expect(await this.mock.$log256(65536n, rounding)).to.equal(2n); + expect(await this.mock.$log256(65537n, rounding)).to.equal(3n); + expect(await this.mock.$log256(ethers.MaxUint256, rounding)).to.equal(32n); } }); }); diff --git a/test/utils/math/SafeCast.test.js b/test/utils/math/SafeCast.test.js index 4b8ec5a72..dd04f75ba 100644 --- a/test/utils/math/SafeCast.test.js +++ b/test/utils/math/SafeCast.test.js @@ -1,161 +1,148 @@ -const { BN } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { range } = require('../../../scripts/helpers'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const SafeCast = artifacts.require('$SafeCast'); +async function fixture() { + const mock = await ethers.deployContract('$SafeCast'); + return { mock }; +} -contract('SafeCast', async function () { +contract('SafeCast', function () { beforeEach(async function () { - this.safeCast = await SafeCast.new(); + Object.assign(this, await loadFixture(fixture)); }); - function testToUint(bits) { - describe(`toUint${bits}`, () => { - const maxValue = new BN('2').pow(new BN(bits)).subn(1); + for (const bits of range(8, 256, 8).map(ethers.toBigInt)) { + const maxValue = 2n ** bits - 1n; + describe(`toUint${bits}`, () => { it('downcasts 0', async function () { - expect(await this.safeCast[`$toUint${bits}`](0)).to.be.bignumber.equal('0'); + expect(await this.mock[`$toUint${bits}`](0n)).is.equal(0n); }); it('downcasts 1', async function () { - expect(await this.safeCast[`$toUint${bits}`](1)).to.be.bignumber.equal('1'); + expect(await this.mock[`$toUint${bits}`](1n)).is.equal(1n); }); it(`downcasts 2^${bits} - 1 (${maxValue})`, async function () { - expect(await this.safeCast[`$toUint${bits}`](maxValue)).to.be.bignumber.equal(maxValue); + expect(await this.mock[`$toUint${bits}`](maxValue)).is.equal(maxValue); }); - it(`reverts when downcasting 2^${bits} (${maxValue.addn(1)})`, async function () { - await expectRevertCustomError( - this.safeCast[`$toUint${bits}`](maxValue.addn(1)), - `SafeCastOverflowedUintDowncast`, - [bits, maxValue.addn(1)], - ); + it(`reverts when downcasting 2^${bits} (${maxValue + 1n})`, async function () { + await expect(this.mock[`$toUint${bits}`](maxValue + 1n)) + .to.be.revertedWithCustomError(this.mock, 'SafeCastOverflowedUintDowncast') + .withArgs(bits, maxValue + 1n); }); - it(`reverts when downcasting 2^${bits} + 1 (${maxValue.addn(2)})`, async function () { - await expectRevertCustomError( - this.safeCast[`$toUint${bits}`](maxValue.addn(2)), - `SafeCastOverflowedUintDowncast`, - [bits, maxValue.addn(2)], - ); + it(`reverts when downcasting 2^${bits} + 1 (${maxValue + 2n})`, async function () { + await expect(this.mock[`$toUint${bits}`](maxValue + 2n)) + .to.be.revertedWithCustomError(this.mock, 'SafeCastOverflowedUintDowncast') + .withArgs(bits, maxValue + 2n); }); }); } - range(8, 256, 8).forEach(bits => testToUint(bits)); - describe('toUint256', () => { - const maxInt256 = new BN('2').pow(new BN(255)).subn(1); - const minInt256 = new BN('2').pow(new BN(255)).neg(); - it('casts 0', async function () { - expect(await this.safeCast.$toUint256(0)).to.be.bignumber.equal('0'); + expect(await this.mock.$toUint256(0n)).is.equal(0n); }); it('casts 1', async function () { - expect(await this.safeCast.$toUint256(1)).to.be.bignumber.equal('1'); + expect(await this.mock.$toUint256(1n)).is.equal(1n); }); - it(`casts INT256_MAX (${maxInt256})`, async function () { - expect(await this.safeCast.$toUint256(maxInt256)).to.be.bignumber.equal(maxInt256); + it(`casts INT256_MAX (${ethers.MaxInt256})`, async function () { + expect(await this.mock.$toUint256(ethers.MaxInt256)).is.equal(ethers.MaxInt256); }); it('reverts when casting -1', async function () { - await expectRevertCustomError(this.safeCast.$toUint256(-1), `SafeCastOverflowedIntToUint`, [-1]); + await expect(this.mock.$toUint256(-1n)) + .to.be.revertedWithCustomError(this.mock, 'SafeCastOverflowedIntToUint') + .withArgs(-1n); }); - it(`reverts when casting INT256_MIN (${minInt256})`, async function () { - await expectRevertCustomError(this.safeCast.$toUint256(minInt256), `SafeCastOverflowedIntToUint`, [minInt256]); + it(`reverts when casting INT256_MIN (${ethers.MinInt256})`, async function () { + await expect(this.mock.$toUint256(ethers.MinInt256)) + .to.be.revertedWithCustomError(this.mock, 'SafeCastOverflowedIntToUint') + .withArgs(ethers.MinInt256); }); }); - function testToInt(bits) { - describe(`toInt${bits}`, () => { - const minValue = new BN('-2').pow(new BN(bits - 1)); - const maxValue = new BN('2').pow(new BN(bits - 1)).subn(1); + for (const bits of range(8, 256, 8).map(ethers.toBigInt)) { + const minValue = -(2n ** (bits - 1n)); + const maxValue = 2n ** (bits - 1n) - 1n; + describe(`toInt${bits}`, () => { it('downcasts 0', async function () { - expect(await this.safeCast[`$toInt${bits}`](0)).to.be.bignumber.equal('0'); + expect(await this.mock[`$toInt${bits}`](0n)).is.equal(0n); }); it('downcasts 1', async function () { - expect(await this.safeCast[`$toInt${bits}`](1)).to.be.bignumber.equal('1'); + expect(await this.mock[`$toInt${bits}`](1n)).is.equal(1n); }); it('downcasts -1', async function () { - expect(await this.safeCast[`$toInt${bits}`](-1)).to.be.bignumber.equal('-1'); + expect(await this.mock[`$toInt${bits}`](-1n)).is.equal(-1n); }); - it(`downcasts -2^${bits - 1} (${minValue})`, async function () { - expect(await this.safeCast[`$toInt${bits}`](minValue)).to.be.bignumber.equal(minValue); + it(`downcasts -2^${bits - 1n} (${minValue})`, async function () { + expect(await this.mock[`$toInt${bits}`](minValue)).is.equal(minValue); }); - it(`downcasts 2^${bits - 1} - 1 (${maxValue})`, async function () { - expect(await this.safeCast[`$toInt${bits}`](maxValue)).to.be.bignumber.equal(maxValue); + it(`downcasts 2^${bits - 1n} - 1 (${maxValue})`, async function () { + expect(await this.mock[`$toInt${bits}`](maxValue)).is.equal(maxValue); }); - it(`reverts when downcasting -2^${bits - 1} - 1 (${minValue.subn(1)})`, async function () { - await expectRevertCustomError( - this.safeCast[`$toInt${bits}`](minValue.subn(1)), - `SafeCastOverflowedIntDowncast`, - [bits, minValue.subn(1)], - ); + it(`reverts when downcasting -2^${bits - 1n} - 1 (${minValue - 1n})`, async function () { + await expect(this.mock[`$toInt${bits}`](minValue - 1n)) + .to.be.revertedWithCustomError(this.mock, 'SafeCastOverflowedIntDowncast') + .withArgs(bits, minValue - 1n); }); - it(`reverts when downcasting -2^${bits - 1} - 2 (${minValue.subn(2)})`, async function () { - await expectRevertCustomError( - this.safeCast[`$toInt${bits}`](minValue.subn(2)), - `SafeCastOverflowedIntDowncast`, - [bits, minValue.subn(2)], - ); + it(`reverts when downcasting -2^${bits - 1n} - 2 (${minValue - 2n})`, async function () { + await expect(this.mock[`$toInt${bits}`](minValue - 2n)) + .to.be.revertedWithCustomError(this.mock, 'SafeCastOverflowedIntDowncast') + .withArgs(bits, minValue - 2n); }); - it(`reverts when downcasting 2^${bits - 1} (${maxValue.addn(1)})`, async function () { - await expectRevertCustomError( - this.safeCast[`$toInt${bits}`](maxValue.addn(1)), - `SafeCastOverflowedIntDowncast`, - [bits, maxValue.addn(1)], - ); + it(`reverts when downcasting 2^${bits - 1n} (${maxValue + 1n})`, async function () { + await expect(this.mock[`$toInt${bits}`](maxValue + 1n)) + .to.be.revertedWithCustomError(this.mock, 'SafeCastOverflowedIntDowncast') + .withArgs(bits, maxValue + 1n); }); - it(`reverts when downcasting 2^${bits - 1} + 1 (${maxValue.addn(2)})`, async function () { - await expectRevertCustomError( - this.safeCast[`$toInt${bits}`](maxValue.addn(2)), - `SafeCastOverflowedIntDowncast`, - [bits, maxValue.addn(2)], - ); + it(`reverts when downcasting 2^${bits - 1n} + 1 (${maxValue + 2n})`, async function () { + await expect(this.mock[`$toInt${bits}`](maxValue + 2n)) + .to.be.revertedWithCustomError(this.mock, 'SafeCastOverflowedIntDowncast') + .withArgs(bits, maxValue + 2n); }); }); } - range(8, 256, 8).forEach(bits => testToInt(bits)); - describe('toInt256', () => { - const maxUint256 = new BN('2').pow(new BN(256)).subn(1); - const maxInt256 = new BN('2').pow(new BN(255)).subn(1); - it('casts 0', async function () { - expect(await this.safeCast.$toInt256(0)).to.be.bignumber.equal('0'); + expect(await this.mock.$toInt256(0)).is.equal(0n); }); it('casts 1', async function () { - expect(await this.safeCast.$toInt256(1)).to.be.bignumber.equal('1'); + expect(await this.mock.$toInt256(1)).is.equal(1n); }); - it(`casts INT256_MAX (${maxInt256})`, async function () { - expect(await this.safeCast.$toInt256(maxInt256)).to.be.bignumber.equal(maxInt256); + it(`casts INT256_MAX (${ethers.MaxInt256})`, async function () { + expect(await this.mock.$toInt256(ethers.MaxInt256)).is.equal(ethers.MaxInt256); }); - it(`reverts when casting INT256_MAX + 1 (${maxInt256.addn(1)})`, async function () { - await expectRevertCustomError(this.safeCast.$toInt256(maxInt256.addn(1)), 'SafeCastOverflowedUintToInt', [ - maxInt256.addn(1), - ]); + it(`reverts when casting INT256_MAX + 1 (${ethers.MaxInt256 + 1n})`, async function () { + await expect(this.mock.$toInt256(ethers.MaxInt256 + 1n)) + .to.be.revertedWithCustomError(this.mock, 'SafeCastOverflowedUintToInt') + .withArgs(ethers.MaxInt256 + 1n); }); - it(`reverts when casting UINT256_MAX (${maxUint256})`, async function () { - await expectRevertCustomError(this.safeCast.$toInt256(maxUint256), 'SafeCastOverflowedUintToInt', [maxUint256]); + it(`reverts when casting UINT256_MAX (${ethers.MaxUint256})`, async function () { + await expect(this.mock.$toInt256(ethers.MaxUint256)) + .to.be.revertedWithCustomError(this.mock, 'SafeCastOverflowedUintToInt') + .withArgs(ethers.MaxUint256); }); }); }); diff --git a/test/utils/math/SignedMath.test.js b/test/utils/math/SignedMath.test.js index c014e22ba..253e72357 100644 --- a/test/utils/math/SignedMath.test.js +++ b/test/utils/math/SignedMath.test.js @@ -1,94 +1,51 @@ -const { BN, constants } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { MIN_INT256, MAX_INT256 } = constants; +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { min, max } = require('../../helpers/math'); -const SignedMath = artifacts.require('$SignedMath'); +async function testCommutative(fn, lhs, rhs, expected, ...extra) { + expect(await fn(lhs, rhs, ...extra)).to.deep.equal(expected); + expect(await fn(rhs, lhs, ...extra)).to.deep.equal(expected); +} -contract('SignedMath', function () { - const min = new BN('-1234'); - const max = new BN('5678'); +async function fixture() { + const mock = await ethers.deployContract('$SignedMath'); + return { mock }; +} +contract('SignedMath', function () { beforeEach(async function () { - this.math = await SignedMath.new(); + Object.assign(this, await loadFixture(fixture)); }); describe('max', function () { - it('is correctly detected in first argument position', async function () { - expect(await this.math.$max(max, min)).to.be.bignumber.equal(max); - }); - - it('is correctly detected in second argument position', async function () { - expect(await this.math.$max(min, max)).to.be.bignumber.equal(max); + it('is correctly detected in both position', async function () { + await testCommutative(this.mock.$max, -1234n, 5678n, max(-1234n, 5678n)); }); }); describe('min', function () { - it('is correctly detected in first argument position', async function () { - expect(await this.math.$min(min, max)).to.be.bignumber.equal(min); - }); - - it('is correctly detected in second argument position', async function () { - expect(await this.math.$min(max, min)).to.be.bignumber.equal(min); + it('is correctly detected in both position', async function () { + await testCommutative(this.mock.$min, -1234n, 5678n, min(-1234n, 5678n)); }); }); describe('average', function () { - function bnAverage(a, b) { - return a.add(b).divn(2); - } - it('is correctly calculated with various input', async function () { - const valuesX = [ - new BN('0'), - new BN('3'), - new BN('-3'), - new BN('4'), - new BN('-4'), - new BN('57417'), - new BN('-57417'), - new BN('42304'), - new BN('-42304'), - MIN_INT256, - MAX_INT256, - ]; - - const valuesY = [ - new BN('0'), - new BN('5'), - new BN('-5'), - new BN('2'), - new BN('-2'), - new BN('57417'), - new BN('-57417'), - new BN('42304'), - new BN('-42304'), - MIN_INT256, - MAX_INT256, - ]; - - for (const x of valuesX) { - for (const y of valuesY) { - expect(await this.math.$average(x, y)).to.be.bignumber.equal( - bnAverage(x, y), - `Bad result for average(${x}, ${y})`, - ); + for (const x of [ethers.MinInt256, -57417n, -42304n, -4n, -3n, 0n, 3n, 4n, 42304n, 57417n, ethers.MaxInt256]) { + for (const y of [ethers.MinInt256, -57417n, -42304n, -5n, -2n, 0n, 2n, 5n, 42304n, 57417n, ethers.MaxInt256]) { + expect(await this.mock.$average(x, y)).to.equal((x + y) / 2n); } } }); }); describe('abs', function () { - for (const n of [ - MIN_INT256, - MIN_INT256.addn(1), - new BN('-1'), - new BN('0'), - new BN('1'), - MAX_INT256.subn(1), - MAX_INT256, - ]) { + const abs = x => (x < 0n ? -x : x); + + for (const n of [ethers.MinInt256, ethers.MinInt256 + 1n, -1n, 0n, 1n, ethers.MaxInt256 - 1n, ethers.MaxInt256]) { it(`correctly computes the absolute value of ${n}`, async function () { - expect(await this.math.$abs(n)).to.be.bignumber.equal(n.abs()); + expect(await this.mock.$abs(n)).to.equal(abs(n)); }); } }); diff --git a/test/utils/types/Time.test.js b/test/utils/types/Time.test.js index 614911738..d30daffc2 100644 --- a/test/utils/types/Time.test.js +++ b/test/utils/types/Time.test.js @@ -2,7 +2,8 @@ require('@openzeppelin/test-helpers'); const { expect } = require('chai'); const { clock } = require('../../helpers/time'); -const { product, max } = require('../../helpers/iterate'); +const { product } = require('../../helpers/iterate'); +const { max } = require('../../helpers/math'); const Time = artifacts.require('$Time'); From 3af62716dded52b323c688da0721099a420adfb8 Mon Sep 17 00:00:00 2001 From: ernestognw Date: Thu, 7 Dec 2023 12:37:52 -0600 Subject: [PATCH 134/167] Make Multicall context-aware --- .changeset/rude-weeks-beg.md | 5 +++++ .changeset/strong-points-invent.md | 5 +++++ contracts/metatx/ERC2771Context.sol | 29 +++++++++++++++++-------- contracts/mocks/ERC2771ContextMock.sol | 7 +++++- contracts/utils/Context.sol | 4 ++++ contracts/utils/Multicall.sol | 18 ++++++++++++++-- test/metatx/ERC2771Context.test.js | 30 ++++++++++++++++++++++++-- 7 files changed, 84 insertions(+), 14 deletions(-) create mode 100644 .changeset/rude-weeks-beg.md create mode 100644 .changeset/strong-points-invent.md diff --git a/.changeset/rude-weeks-beg.md b/.changeset/rude-weeks-beg.md new file mode 100644 index 000000000..77fe423c6 --- /dev/null +++ b/.changeset/rude-weeks-beg.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': patch +--- + +`ERC2771Context` and `Context`: Introduce a `_contextPrefixLength()` getter, used to trim extra information appended to `msg.data`. diff --git a/.changeset/strong-points-invent.md b/.changeset/strong-points-invent.md new file mode 100644 index 000000000..980000c42 --- /dev/null +++ b/.changeset/strong-points-invent.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': patch +--- + +`Multicall`: Make aware of non-canonical context (i.e. `msg.sender` is not `_msgSender()`), allowing compatibility with `ERC2771Context`. diff --git a/contracts/metatx/ERC2771Context.sol b/contracts/metatx/ERC2771Context.sol index 0724a0b69..2c17f10e4 100644 --- a/contracts/metatx/ERC2771Context.sol +++ b/contracts/metatx/ERC2771Context.sol @@ -13,6 +13,10 @@ import {Context} from "../utils/Context.sol"; * specification adding the address size in bytes (20) to the calldata size. An example of an unexpected * behavior could be an unintended fallback (or another function) invocation while trying to invoke the `receive` * function only accessible if `msg.data.length == 0`. + * + * WARNING: The usage of `delegatecall` in this contract is dangerous and may result in context corruption. + * Any forwarded request to this contract triggering a `delegatecall` to itself will result in an invalid {_msgSender} + * recovery. */ abstract contract ERC2771Context is Context { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable @@ -48,13 +52,11 @@ abstract contract ERC2771Context is Context { * a call is not performed by the trusted forwarder or the calldata length is less than * 20 bytes (an address length). */ - function _msgSender() internal view virtual override returns (address sender) { - if (isTrustedForwarder(msg.sender) && msg.data.length >= 20) { - // The assembly code is more direct than the Solidity version using `abi.decode`. - /// @solidity memory-safe-assembly - assembly { - sender := shr(96, calldataload(sub(calldatasize(), 20))) - } + function _msgSender() internal view virtual override returns (address) { + uint256 calldataLength = msg.data.length; + uint256 contextSuffixLength = _contextSuffixLength(); + if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { + return address(bytes20(msg.data[calldataLength - contextSuffixLength:])); } else { return super._msgSender(); } @@ -66,10 +68,19 @@ abstract contract ERC2771Context is Context { * 20 bytes (an address length). */ function _msgData() internal view virtual override returns (bytes calldata) { - if (isTrustedForwarder(msg.sender) && msg.data.length >= 20) { - return msg.data[:msg.data.length - 20]; + uint256 calldataLength = msg.data.length; + uint256 contextSuffixLength = _contextSuffixLength(); + if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { + return msg.data[:calldataLength - contextSuffixLength]; } else { return super._msgData(); } } + + /** + * @dev ERC-2771 specifies the context as being a single address (20 bytes). + */ + function _contextSuffixLength() internal view virtual override returns (uint256) { + return 20; + } } diff --git a/contracts/mocks/ERC2771ContextMock.sol b/contracts/mocks/ERC2771ContextMock.sol index 22b9203e7..33887cf45 100644 --- a/contracts/mocks/ERC2771ContextMock.sol +++ b/contracts/mocks/ERC2771ContextMock.sol @@ -4,10 +4,11 @@ pragma solidity ^0.8.20; import {ContextMock} from "./ContextMock.sol"; import {Context} from "../utils/Context.sol"; +import {Multicall} from "../utils/Multicall.sol"; import {ERC2771Context} from "../metatx/ERC2771Context.sol"; // By inheriting from ERC2771Context, Context's internal functions are overridden automatically -contract ERC2771ContextMock is ContextMock, ERC2771Context { +contract ERC2771ContextMock is ContextMock, ERC2771Context, Multicall { /// @custom:oz-upgrades-unsafe-allow constructor constructor(address trustedForwarder) ERC2771Context(trustedForwarder) { emit Sender(_msgSender()); // _msgSender() should be accessible during construction @@ -20,4 +21,8 @@ contract ERC2771ContextMock is ContextMock, ERC2771Context { function _msgData() internal view override(Context, ERC2771Context) returns (bytes calldata) { return ERC2771Context._msgData(); } + + function _contextSuffixLength() internal view override(Context, ERC2771Context) returns (uint256) { + return ERC2771Context._contextSuffixLength(); + } } diff --git a/contracts/utils/Context.sol b/contracts/utils/Context.sol index 9037dcd14..f881fb6f7 100644 --- a/contracts/utils/Context.sol +++ b/contracts/utils/Context.sol @@ -21,4 +21,8 @@ abstract contract Context { function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } + + function _contextSuffixLength() internal view virtual returns (uint256) { + return 0; + } } diff --git a/contracts/utils/Multicall.sol b/contracts/utils/Multicall.sol index 2d925a91e..91c2323ca 100644 --- a/contracts/utils/Multicall.sol +++ b/contracts/utils/Multicall.sol @@ -4,19 +4,33 @@ pragma solidity ^0.8.20; import {Address} from "./Address.sol"; +import {Context} from "./Context.sol"; /** * @dev Provides a function to batch together multiple calls in a single external call. + * + * Consider any assumption about calldata validation performed by the sender may be violated if it's not especially + * careful about sending transactions invoking {multicall}. For example, a relay address that filters function + * selectors won't filter calls nested within a {multicall} operation. + * + * NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}). + * If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data` + * to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of + * {_msgSender} are not propagated to subcalls. */ -abstract contract Multicall { +abstract contract Multicall is Context { /** * @dev Receives and executes a batch of function calls on this contract. * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) { + bytes memory context = msg.sender == _msgSender() + ? new bytes(0) + : msg.data[msg.data.length - _contextSuffixLength():]; + results = new bytes[](data.length); for (uint256 i = 0; i < data.length; i++) { - results[i] = Address.functionDelegateCall(address(this), data[i]); + results[i] = Address.functionDelegateCall(address(this), bytes.concat(data[i], context)); } return results; } diff --git a/test/metatx/ERC2771Context.test.js b/test/metatx/ERC2771Context.test.js index bb6718ce2..1ae48e6f2 100644 --- a/test/metatx/ERC2771Context.test.js +++ b/test/metatx/ERC2771Context.test.js @@ -9,7 +9,7 @@ const { MAX_UINT48 } = require('../helpers/constants'); const { shouldBehaveLikeRegularContext } = require('../utils/Context.behavior'); async function fixture() { - const [sender] = await ethers.getSigners(); + const [sender, other] = await ethers.getSigners(); const forwarder = await ethers.deployContract('ERC2771Forwarder', []); const forwarderAsSigner = await impersonate(forwarder.target); @@ -27,7 +27,7 @@ async function fixture() { ], }; - return { sender, forwarder, forwarderAsSigner, context, domain, types }; + return { sender, other, forwarder, forwarderAsSigner, context, domain, types }; } describe('ERC2771Context', function () { @@ -114,4 +114,30 @@ describe('ERC2771Context', function () { .withArgs(data); }); }); + + it('multicall poison attack', async function () { + const nonce = await this.forwarder.nonces(this.sender); + const data = this.context.interface.encodeFunctionData('multicall', [ + [ + // poisonned call to 'msgSender()' + ethers.concat([this.context.interface.encodeFunctionData('msgSender'), this.other.address]), + ], + ]); + + const req = { + from: await this.sender.getAddress(), + to: await this.context.getAddress(), + value: 0n, + data, + gas: 100000n, + nonce, + deadline: MAX_UINT48, + }; + + req.signature = await this.sender.signTypedData(this.domain, this.types, req); + + expect(await this.forwarder.verify(req)).to.equal(true); + + await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender.address); + }); }); From 6ba452dea4258afe77726293435f10baf2bed265 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 15:47:12 +0000 Subject: [PATCH 135/167] Merge release-v5.0 branch (#4787) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] Co-authored-by: Francisco Giordano Co-authored-by: Ernesto García Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Eric Lau Co-authored-by: Hadrien Croubois Co-authored-by: Zack Reneau-Wedeen --- CHANGELOG.md | 6 ++++++ contracts/metatx/ERC2771Context.sol | 2 +- contracts/package.json | 2 +- contracts/token/ERC1155/IERC1155.sol | 2 +- contracts/utils/Context.sol | 2 +- contracts/utils/Multicall.sol | 2 +- lib/forge-std | 2 +- package.json | 2 +- 8 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf9a27a1a..68afd7edd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog + +## 5.0.1 (2023-12-07) + +- `ERC2771Context` and `Context`: Introduce a `_contextPrefixLength()` getter, used to trim extra information appended to `msg.data`. +- `Multicall`: Make aware of non-canonical context (i.e. `msg.sender` is not `_msgSender()`), allowing compatibility with `ERC2771Context`. + ## 5.0.0 (2023-10-05) ### Additions Summary diff --git a/contracts/metatx/ERC2771Context.sol b/contracts/metatx/ERC2771Context.sol index 2c17f10e4..d448b24b1 100644 --- a/contracts/metatx/ERC2771Context.sol +++ b/contracts/metatx/ERC2771Context.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (metatx/ERC2771Context.sol) +// OpenZeppelin Contracts (last updated v5.0.1) (metatx/ERC2771Context.sol) pragma solidity ^0.8.20; diff --git a/contracts/package.json b/contracts/package.json index be3e741e3..6ab89138a 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,7 +1,7 @@ { "name": "@openzeppelin/contracts", "description": "Secure Smart Contract library for Solidity", - "version": "5.0.0", + "version": "5.0.1", "files": [ "**/*.sol", "/build/contracts/*.json", diff --git a/contracts/token/ERC1155/IERC1155.sol b/contracts/token/ERC1155/IERC1155.sol index 62ad4a9bd..db865a72f 100644 --- a/contracts/token/ERC1155/IERC1155.sol +++ b/contracts/token/ERC1155/IERC1155.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155.sol) +// OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/Context.sol b/contracts/utils/Context.sol index f881fb6f7..4e535fe03 100644 --- a/contracts/utils/Context.sol +++ b/contracts/utils/Context.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) +// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/Multicall.sol b/contracts/utils/Multicall.sol index 91c2323ca..0dd5b4adc 100644 --- a/contracts/utils/Multicall.sol +++ b/contracts/utils/Multicall.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (utils/Multicall.sol) +// OpenZeppelin Contracts (last updated v5.0.1) (utils/Multicall.sol) pragma solidity ^0.8.20; diff --git a/lib/forge-std b/lib/forge-std index eb980e1d4..c2236853a 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit eb980e1d4f0e8173ec27da77297ae411840c8ccb +Subproject commit c2236853aadb8e2d9909bbecdc490099519b70a4 diff --git a/package.json b/package.json index 7eb460388..d1005679c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "openzeppelin-solidity", "description": "Secure Smart Contract library for Solidity", - "version": "5.0.0", + "version": "5.0.1", "private": true, "files": [ "/contracts/**/*.sol", From 88512b23d2bf5714b5d1bd59feee1d912439689d Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Wed, 13 Dec 2023 19:31:56 -0300 Subject: [PATCH 136/167] Migrate ERC20 extensions tests to ethers v6 (#4773) Co-authored-by: Hadrien Croubois Co-authored-by: ernestognw --- test/governance/Governor.test.js | 6 +- .../extensions/GovernorWithParams.test.js | 6 +- test/governance/utils/Votes.behavior.js | 6 +- test/helpers/eip712-types.js | 96 +- test/helpers/eip712.js | 2 +- test/helpers/time.js | 9 +- test/metatx/ERC2771Context.test.js | 14 +- test/metatx/ERC2771Forwarder.test.js | 14 +- .../extensions/ERC20Burnable.behavior.js | 116 -- .../ERC20/extensions/ERC20Burnable.test.js | 110 +- .../ERC20/extensions/ERC20Capped.behavior.js | 31 - .../ERC20/extensions/ERC20Capped.test.js | 57 +- .../ERC20/extensions/ERC20FlashMint.test.js | 248 ++- .../ERC20/extensions/ERC20Pausable.test.js | 103 +- .../ERC20/extensions/ERC20Permit.test.js | 158 +- .../token/ERC20/extensions/ERC20Votes.test.js | 6 +- .../ERC20/extensions/ERC20Wrapper.test.js | 19 +- test/token/ERC20/extensions/ERC4626.test.js | 1427 +++++++---------- test/utils/cryptography/EIP712.test.js | 9 +- 19 files changed, 1046 insertions(+), 1391 deletions(-) delete mode 100644 test/token/ERC20/extensions/ERC20Burnable.behavior.js delete mode 100644 test/token/ERC20/extensions/ERC20Capped.behavior.js diff --git a/test/governance/Governor.test.js b/test/governance/Governor.test.js index 71e80d737..b277d8c12 100644 --- a/test/governance/Governor.test.js +++ b/test/governance/Governor.test.js @@ -4,11 +4,7 @@ const ethSigUtil = require('eth-sig-util'); const Wallet = require('ethereumjs-wallet').default; const Enums = require('../helpers/enums'); -const { - getDomain, - domainType, - types: { Ballot }, -} = require('../helpers/eip712'); +const { getDomain, domainType, Ballot } = require('../helpers/eip712'); const { GovernorHelper, proposalStatesToBitMap } = require('../helpers/governance'); const { clockFromReceipt } = require('../helpers/time'); const { expectRevertCustomError } = require('../helpers/customError'); diff --git a/test/governance/extensions/GovernorWithParams.test.js b/test/governance/extensions/GovernorWithParams.test.js index da392b3ea..bbac688a2 100644 --- a/test/governance/extensions/GovernorWithParams.test.js +++ b/test/governance/extensions/GovernorWithParams.test.js @@ -4,11 +4,7 @@ const ethSigUtil = require('eth-sig-util'); const Wallet = require('ethereumjs-wallet').default; const Enums = require('../../helpers/enums'); -const { - getDomain, - domainType, - types: { ExtendedBallot }, -} = require('../../helpers/eip712'); +const { getDomain, domainType, ExtendedBallot } = require('../../helpers/eip712'); const { GovernorHelper } = require('../../helpers/governance'); const { expectRevertCustomError } = require('../../helpers/customError'); diff --git a/test/governance/utils/Votes.behavior.js b/test/governance/utils/Votes.behavior.js index 68445f0fb..6243cf4e4 100644 --- a/test/governance/utils/Votes.behavior.js +++ b/test/governance/utils/Votes.behavior.js @@ -7,11 +7,7 @@ const ethSigUtil = require('eth-sig-util'); const Wallet = require('ethereumjs-wallet').default; const { shouldBehaveLikeERC6372 } = require('./ERC6372.behavior'); -const { - getDomain, - domainType, - types: { Delegation }, -} = require('../../helpers/eip712'); +const { getDomain, domainType, Delegation } = require('../../helpers/eip712'); const { clockFromReceipt } = require('../../helpers/time'); const { expectRevertCustomError } = require('../../helpers/customError'); diff --git a/test/helpers/eip712-types.js b/test/helpers/eip712-types.js index 8aacf5325..b2b6ccf83 100644 --- a/test/helpers/eip712-types.js +++ b/test/helpers/eip712-types.js @@ -1,44 +1,52 @@ -module.exports = { - EIP712Domain: [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, - { name: 'salt', type: 'bytes32' }, - ], - Permit: [ - { name: 'owner', type: 'address' }, - { name: 'spender', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'deadline', type: 'uint256' }, - ], - Ballot: [ - { name: 'proposalId', type: 'uint256' }, - { name: 'support', type: 'uint8' }, - { name: 'voter', type: 'address' }, - { name: 'nonce', type: 'uint256' }, - ], - ExtendedBallot: [ - { name: 'proposalId', type: 'uint256' }, - { name: 'support', type: 'uint8' }, - { name: 'voter', type: 'address' }, - { name: 'nonce', type: 'uint256' }, - { name: 'reason', type: 'string' }, - { name: 'params', type: 'bytes' }, - ], - Delegation: [ - { name: 'delegatee', type: 'address' }, - { name: 'nonce', type: 'uint256' }, - { name: 'expiry', type: 'uint256' }, - ], - ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'deadline', type: 'uint48' }, - { name: 'data', type: 'bytes' }, - ], -}; +const { mapValues } = require('./iterate'); + +const formatType = schema => Object.entries(schema).map(([name, type]) => ({ name, type })); + +module.exports = mapValues( + { + EIP712Domain: { + name: 'string', + version: 'string', + chainId: 'uint256', + verifyingContract: 'address', + salt: 'bytes32', + }, + Permit: { + owner: 'address', + spender: 'address', + value: 'uint256', + nonce: 'uint256', + deadline: 'uint256', + }, + Ballot: { + proposalId: 'uint256', + support: 'uint8', + voter: 'address', + nonce: 'uint256', + }, + ExtendedBallot: { + proposalId: 'uint256', + support: 'uint8', + voter: 'address', + nonce: 'uint256', + reason: 'string', + params: 'bytes', + }, + Delegation: { + delegatee: 'address', + nonce: 'uint256', + expiry: 'uint256', + }, + ForwardRequest: { + from: 'address', + to: 'address', + value: 'uint256', + gas: 'uint256', + nonce: 'uint256', + deadline: 'uint48', + data: 'bytes', + }, + }, + formatType, +); +module.exports.formatType = formatType; diff --git a/test/helpers/eip712.js b/test/helpers/eip712.js index 295c1b953..278e86cce 100644 --- a/test/helpers/eip712.js +++ b/test/helpers/eip712.js @@ -38,9 +38,9 @@ function hashTypedData(domain, structHash) { } module.exports = { - types, getDomain, domainType, domainSeparator: ethers.TypedDataEncoder.hashDomain, hashTypedData, + ...types, }; diff --git a/test/helpers/time.js b/test/helpers/time.js index 1f83a4aa2..874713ee5 100644 --- a/test/helpers/time.js +++ b/test/helpers/time.js @@ -1,6 +1,5 @@ const { time, mineUpTo } = require('@nomicfoundation/hardhat-network-helpers'); - -const mapObject = (obj, fn) => Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, fn(value)])); +const { mapValues } = require('./iterate'); module.exports = { clock: { @@ -22,8 +21,8 @@ module.exports = { // TODO: deprecate the old version in favor of this one module.exports.bigint = { - clock: mapObject(module.exports.clock, fn => () => fn().then(BigInt)), - clockFromReceipt: mapObject(module.exports.clockFromReceipt, fn => receipt => fn(receipt).then(BigInt)), + clock: mapValues(module.exports.clock, fn => () => fn().then(BigInt)), + clockFromReceipt: mapValues(module.exports.clockFromReceipt, fn => receipt => fn(receipt).then(BigInt)), forward: module.exports.forward, - duration: mapObject(module.exports.duration, fn => n => BigInt(fn(n))), + duration: mapValues(module.exports.duration, fn => n => BigInt(fn(n))), }; diff --git a/test/metatx/ERC2771Context.test.js b/test/metatx/ERC2771Context.test.js index 1ae48e6f2..07c4ff335 100644 --- a/test/metatx/ERC2771Context.test.js +++ b/test/metatx/ERC2771Context.test.js @@ -3,7 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { impersonate } = require('../helpers/account'); -const { getDomain } = require('../helpers/eip712'); +const { getDomain, ForwardRequest } = require('../helpers/eip712'); const { MAX_UINT48 } = require('../helpers/constants'); const { shouldBehaveLikeRegularContext } = require('../utils/Context.behavior'); @@ -15,17 +15,7 @@ async function fixture() { const forwarderAsSigner = await impersonate(forwarder.target); const context = await ethers.deployContract('ERC2771ContextMock', [forwarder]); const domain = await getDomain(forwarder); - const types = { - ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'deadline', type: 'uint48' }, - { name: 'data', type: 'bytes' }, - ], - }; + const types = { ForwardRequest }; return { sender, other, forwarder, forwarderAsSigner, context, domain, types }; } diff --git a/test/metatx/ERC2771Forwarder.test.js b/test/metatx/ERC2771Forwarder.test.js index e0d1090c4..3bf264530 100644 --- a/test/metatx/ERC2771Forwarder.test.js +++ b/test/metatx/ERC2771Forwarder.test.js @@ -2,7 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { getDomain } = require('../helpers/eip712'); +const { getDomain, ForwardRequest } = require('../helpers/eip712'); const { bigint: time } = require('../helpers/time'); const { sum } = require('../helpers/math'); @@ -12,17 +12,7 @@ async function fixture() { const forwarder = await ethers.deployContract('ERC2771Forwarder', ['ERC2771Forwarder']); const receiver = await ethers.deployContract('CallReceiverMockTrustingForwarder', [forwarder]); const domain = await getDomain(forwarder); - const types = { - ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'deadline', type: 'uint48' }, - { name: 'data', type: 'bytes' }, - ], - }; + const types = { ForwardRequest }; const forgeRequest = async (override = {}, signer = sender) => { const req = { diff --git a/test/token/ERC20/extensions/ERC20Burnable.behavior.js b/test/token/ERC20/extensions/ERC20Burnable.behavior.js deleted file mode 100644 index 937491bdf..000000000 --- a/test/token/ERC20/extensions/ERC20Burnable.behavior.js +++ /dev/null @@ -1,116 +0,0 @@ -const { BN, constants, expectEvent } = require('@openzeppelin/test-helpers'); -const { ZERO_ADDRESS } = constants; - -const { expect } = require('chai'); -const { expectRevertCustomError } = require('../../../helpers/customError'); - -function shouldBehaveLikeERC20Burnable(owner, initialBalance, [burner]) { - describe('burn', function () { - describe('when the given value is not greater than balance of the sender', function () { - context('for a zero value', function () { - shouldBurn(new BN(0)); - }); - - context('for a non-zero value', function () { - shouldBurn(new BN(100)); - }); - - function shouldBurn(value) { - beforeEach(async function () { - this.receipt = await this.token.burn(value, { from: owner }); - }); - - it('burns the requested value', async function () { - expect(await this.token.balanceOf(owner)).to.be.bignumber.equal(initialBalance.sub(value)); - }); - - it('emits a transfer event', async function () { - expectEvent(this.receipt, 'Transfer', { - from: owner, - to: ZERO_ADDRESS, - value: value, - }); - }); - } - }); - - describe('when the given value is greater than the balance of the sender', function () { - const value = initialBalance.addn(1); - - it('reverts', async function () { - await expectRevertCustomError(this.token.burn(value, { from: owner }), 'ERC20InsufficientBalance', [ - owner, - initialBalance, - value, - ]); - }); - }); - }); - - describe('burnFrom', function () { - describe('on success', function () { - context('for a zero value', function () { - shouldBurnFrom(new BN(0)); - }); - - context('for a non-zero value', function () { - shouldBurnFrom(new BN(100)); - }); - - function shouldBurnFrom(value) { - const originalAllowance = value.muln(3); - - beforeEach(async function () { - await this.token.approve(burner, originalAllowance, { from: owner }); - this.receipt = await this.token.burnFrom(owner, value, { from: burner }); - }); - - it('burns the requested value', async function () { - expect(await this.token.balanceOf(owner)).to.be.bignumber.equal(initialBalance.sub(value)); - }); - - it('decrements allowance', async function () { - expect(await this.token.allowance(owner, burner)).to.be.bignumber.equal(originalAllowance.sub(value)); - }); - - it('emits a transfer event', async function () { - expectEvent(this.receipt, 'Transfer', { - from: owner, - to: ZERO_ADDRESS, - value: value, - }); - }); - } - }); - - describe('when the given value is greater than the balance of the sender', function () { - const value = initialBalance.addn(1); - - it('reverts', async function () { - await this.token.approve(burner, value, { from: owner }); - await expectRevertCustomError(this.token.burnFrom(owner, value, { from: burner }), 'ERC20InsufficientBalance', [ - owner, - initialBalance, - value, - ]); - }); - }); - - describe('when the given value is greater than the allowance', function () { - const allowance = new BN(100); - - it('reverts', async function () { - await this.token.approve(burner, allowance, { from: owner }); - await expectRevertCustomError( - this.token.burnFrom(owner, allowance.addn(1), { from: burner }), - 'ERC20InsufficientAllowance', - [burner, allowance, allowance.addn(1)], - ); - }); - }); - }); -} - -module.exports = { - shouldBehaveLikeERC20Burnable, -}; diff --git a/test/token/ERC20/extensions/ERC20Burnable.test.js b/test/token/ERC20/extensions/ERC20Burnable.test.js index 00acc81ed..8253acbf1 100644 --- a/test/token/ERC20/extensions/ERC20Burnable.test.js +++ b/test/token/ERC20/extensions/ERC20Burnable.test.js @@ -1,20 +1,108 @@ -const { BN } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { shouldBehaveLikeERC20Burnable } = require('./ERC20Burnable.behavior'); -const ERC20Burnable = artifacts.require('$ERC20Burnable'); +const name = 'My Token'; +const symbol = 'MTKN'; +const initialBalance = 1000n; -contract('ERC20Burnable', function (accounts) { - const [owner, ...otherAccounts] = accounts; +async function fixture() { + const [owner, burner] = await ethers.getSigners(); - const initialBalance = new BN(1000); + const token = await ethers.deployContract('$ERC20Burnable', [name, symbol], owner); + await token.$_mint(owner, initialBalance); - const name = 'My Token'; - const symbol = 'MTKN'; + return { owner, burner, token, initialBalance }; +} +describe('ERC20Burnable', function () { beforeEach(async function () { - this.token = await ERC20Burnable.new(name, symbol, { from: owner }); - await this.token.$_mint(owner, initialBalance); + Object.assign(this, await loadFixture(fixture)); }); - shouldBehaveLikeERC20Burnable(owner, initialBalance, otherAccounts); + describe('burn', function () { + it('reverts if not enough balance', async function () { + const value = this.initialBalance + 1n; + + await expect(this.token.connect(this.owner).burn(value)) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') + .withArgs(this.owner.address, this.initialBalance, value); + }); + + describe('on success', function () { + for (const { title, value } of [ + { title: 'for a zero value', value: 0n }, + { title: 'for a non-zero value', value: 100n }, + ]) { + describe(title, function () { + beforeEach(async function () { + this.tx = await this.token.connect(this.owner).burn(value); + }); + + it('burns the requested value', async function () { + await expect(this.tx).to.changeTokenBalance(this.token, this.owner, -value); + }); + + it('emits a transfer event', async function () { + await expect(this.tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, ethers.ZeroAddress, value); + }); + }); + } + }); + }); + + describe('burnFrom', function () { + describe('reverts', function () { + it('if not enough balance', async function () { + const value = this.initialBalance + 1n; + + await this.token.connect(this.owner).approve(this.burner, value); + + await expect(this.token.connect(this.burner).burnFrom(this.owner, value)) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') + .withArgs(this.owner.address, this.initialBalance, value); + }); + + it('if not enough allowance', async function () { + const allowance = 100n; + + await this.token.connect(this.owner).approve(this.burner, allowance); + + await expect(this.token.connect(this.burner).burnFrom(this.owner, allowance + 1n)) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientAllowance') + .withArgs(this.burner.address, allowance, allowance + 1n); + }); + }); + + describe('on success', function () { + for (const { title, value } of [ + { title: 'for a zero value', value: 0n }, + { title: 'for a non-zero value', value: 100n }, + ]) { + describe(title, function () { + const originalAllowance = value * 3n; + + beforeEach(async function () { + await this.token.connect(this.owner).approve(this.burner, originalAllowance); + this.tx = await this.token.connect(this.burner).burnFrom(this.owner, value); + }); + + it('burns the requested value', async function () { + await expect(this.tx).to.changeTokenBalance(this.token, this.owner, -value); + }); + + it('decrements allowance', async function () { + expect(await this.token.allowance(this.owner, this.burner)).to.equal(originalAllowance - value); + }); + + it('emits a transfer event', async function () { + await expect(this.tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, ethers.ZeroAddress, value); + }); + }); + } + }); + }); }); diff --git a/test/token/ERC20/extensions/ERC20Capped.behavior.js b/test/token/ERC20/extensions/ERC20Capped.behavior.js deleted file mode 100644 index 5af5c3ddc..000000000 --- a/test/token/ERC20/extensions/ERC20Capped.behavior.js +++ /dev/null @@ -1,31 +0,0 @@ -const { expect } = require('chai'); -const { expectRevertCustomError } = require('../../../helpers/customError'); - -function shouldBehaveLikeERC20Capped(accounts, cap) { - describe('capped token', function () { - const user = accounts[0]; - - it('starts with the correct cap', async function () { - expect(await this.token.cap()).to.be.bignumber.equal(cap); - }); - - it('mints when value is less than cap', async function () { - await this.token.$_mint(user, cap.subn(1)); - expect(await this.token.totalSupply()).to.be.bignumber.equal(cap.subn(1)); - }); - - it('fails to mint if the value exceeds the cap', async function () { - await this.token.$_mint(user, cap.subn(1)); - await expectRevertCustomError(this.token.$_mint(user, 2), 'ERC20ExceededCap', [cap.addn(1), cap]); - }); - - it('fails to mint after cap is reached', async function () { - await this.token.$_mint(user, cap); - await expectRevertCustomError(this.token.$_mint(user, 1), 'ERC20ExceededCap', [cap.addn(1), cap]); - }); - }); -} - -module.exports = { - shouldBehaveLikeERC20Capped, -}; diff --git a/test/token/ERC20/extensions/ERC20Capped.test.js b/test/token/ERC20/extensions/ERC20Capped.test.js index 1f4a2bee3..a32ec43a8 100644 --- a/test/token/ERC20/extensions/ERC20Capped.test.js +++ b/test/token/ERC20/extensions/ERC20Capped.test.js @@ -1,24 +1,55 @@ -const { ether } = require('@openzeppelin/test-helpers'); -const { shouldBehaveLikeERC20Capped } = require('./ERC20Capped.behavior'); -const { expectRevertCustomError } = require('../../../helpers/customError'); +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const ERC20Capped = artifacts.require('$ERC20Capped'); +const name = 'My Token'; +const symbol = 'MTKN'; +const cap = 1000n; -contract('ERC20Capped', function (accounts) { - const cap = ether('1000'); +async function fixture() { + const [user] = await ethers.getSigners(); - const name = 'My Token'; - const symbol = 'MTKN'; + const token = await ethers.deployContract('$ERC20Capped', [name, symbol, cap]); + + return { user, token, cap }; +} + +describe('ERC20Capped', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); it('requires a non-zero cap', async function () { - await expectRevertCustomError(ERC20Capped.new(name, symbol, 0), 'ERC20InvalidCap', [0]); + const ERC20Capped = await ethers.getContractFactory('$ERC20Capped'); + + await expect(ERC20Capped.deploy(name, symbol, 0)) + .to.be.revertedWithCustomError(ERC20Capped, 'ERC20InvalidCap') + .withArgs(0); }); - context('once deployed', async function () { - beforeEach(async function () { - this.token = await ERC20Capped.new(name, symbol, cap); + describe('capped token', function () { + it('starts with the correct cap', async function () { + expect(await this.token.cap()).to.equal(this.cap); }); - shouldBehaveLikeERC20Capped(accounts, cap); + it('mints when value is less than cap', async function () { + const value = this.cap - 1n; + await this.token.$_mint(this.user, value); + expect(await this.token.totalSupply()).to.equal(value); + }); + + it('fails to mint if the value exceeds the cap', async function () { + await this.token.$_mint(this.user, this.cap - 1n); + await expect(this.token.$_mint(this.user, 2)) + .to.be.revertedWithCustomError(this.token, 'ERC20ExceededCap') + .withArgs(this.cap + 1n, this.cap); + }); + + it('fails to mint after cap is reached', async function () { + await this.token.$_mint(this.user, this.cap); + await expect(this.token.$_mint(this.user, 1)) + .to.be.revertedWithCustomError(this.token, 'ERC20ExceededCap') + .withArgs(this.cap + 1n, this.cap); + }); }); }); diff --git a/test/token/ERC20/extensions/ERC20FlashMint.test.js b/test/token/ERC20/extensions/ERC20FlashMint.test.js index 13d5b3ef4..cee00db0f 100644 --- a/test/token/ERC20/extensions/ERC20FlashMint.test.js +++ b/test/token/ERC20/extensions/ERC20FlashMint.test.js @@ -1,209 +1,163 @@ -/* eslint-disable */ - -const { BN, constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../../../helpers/customError'); -const { MAX_UINT256, ZERO_ADDRESS } = constants; +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const ERC20FlashMintMock = artifacts.require('$ERC20FlashMintMock'); -const ERC3156FlashBorrowerMock = artifacts.require('ERC3156FlashBorrowerMock'); +const name = 'My Token'; +const symbol = 'MTKN'; +const initialSupply = 100n; +const loanValue = 10_000_000_000_000n; -contract('ERC20FlashMint', function (accounts) { - const [initialHolder, other, anotherAccount] = accounts; +async function fixture() { + const [initialHolder, other, anotherAccount] = await ethers.getSigners(); - const name = 'My Token'; - const symbol = 'MTKN'; + const token = await ethers.deployContract('$ERC20FlashMintMock', [name, symbol]); + await token.$_mint(initialHolder, initialSupply); - const initialSupply = new BN(100); - const loanValue = new BN(10000000000000); + return { initialHolder, other, anotherAccount, token }; +} +describe('ERC20FlashMint', function () { beforeEach(async function () { - this.token = await ERC20FlashMintMock.new(name, symbol); - await this.token.$_mint(initialHolder, initialSupply); + Object.assign(this, await loadFixture(fixture)); }); describe('maxFlashLoan', function () { it('token match', async function () { - expect(await this.token.maxFlashLoan(this.token.address)).to.be.bignumber.equal(MAX_UINT256.sub(initialSupply)); + expect(await this.token.maxFlashLoan(this.token)).to.equal(ethers.MaxUint256 - initialSupply); }); it('token mismatch', async function () { - expect(await this.token.maxFlashLoan(ZERO_ADDRESS)).to.be.bignumber.equal('0'); + expect(await this.token.maxFlashLoan(ethers.ZeroAddress)).to.equal(0n); }); }); describe('flashFee', function () { it('token match', async function () { - expect(await this.token.flashFee(this.token.address, loanValue)).to.be.bignumber.equal('0'); + expect(await this.token.flashFee(this.token, loanValue)).to.equal(0n); }); it('token mismatch', async function () { - await expectRevertCustomError(this.token.flashFee(ZERO_ADDRESS, loanValue), 'ERC3156UnsupportedToken', [ - ZERO_ADDRESS, - ]); + await expect(this.token.flashFee(ethers.ZeroAddress, loanValue)) + .to.be.revertedWithCustomError(this.token, 'ERC3156UnsupportedToken') + .withArgs(ethers.ZeroAddress); }); }); describe('flashFeeReceiver', function () { it('default receiver', async function () { - expect(await this.token.$_flashFeeReceiver()).to.be.eq(ZERO_ADDRESS); + expect(await this.token.$_flashFeeReceiver()).to.equal(ethers.ZeroAddress); }); }); describe('flashLoan', function () { it('success', async function () { - const receiver = await ERC3156FlashBorrowerMock.new(true, true); - const { tx } = await this.token.flashLoan(receiver.address, this.token.address, loanValue, '0x'); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: ZERO_ADDRESS, - to: receiver.address, - value: loanValue, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: receiver.address, - to: ZERO_ADDRESS, - value: loanValue, - }); - await expectEvent.inTransaction(tx, receiver, 'BalanceOf', { - token: this.token.address, - account: receiver.address, - value: loanValue, - }); - await expectEvent.inTransaction(tx, receiver, 'TotalSupply', { - token: this.token.address, - value: initialSupply.add(loanValue), - }); - - expect(await this.token.totalSupply()).to.be.bignumber.equal(initialSupply); - expect(await this.token.balanceOf(receiver.address)).to.be.bignumber.equal('0'); - expect(await this.token.allowance(receiver.address, this.token.address)).to.be.bignumber.equal('0'); + const receiver = await ethers.deployContract('ERC3156FlashBorrowerMock', [true, true]); + + const tx = await this.token.flashLoan(receiver, this.token, loanValue, '0x'); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, receiver.target, loanValue) + .to.emit(this.token, 'Transfer') + .withArgs(receiver.target, ethers.ZeroAddress, loanValue) + .to.emit(receiver, 'BalanceOf') + .withArgs(this.token.target, receiver.target, loanValue) + .to.emit(receiver, 'TotalSupply') + .withArgs(this.token.target, initialSupply + loanValue); + await expect(tx).to.changeTokenBalance(this.token, receiver, 0); + + expect(await this.token.totalSupply()).to.equal(initialSupply); + expect(await this.token.allowance(receiver, this.token)).to.equal(0n); }); it('missing return value', async function () { - const receiver = await ERC3156FlashBorrowerMock.new(false, true); - await expectRevertCustomError( - this.token.flashLoan(receiver.address, this.token.address, loanValue, '0x'), - 'ERC3156InvalidReceiver', - [receiver.address], - ); + const receiver = await ethers.deployContract('ERC3156FlashBorrowerMock', [false, true]); + await expect(this.token.flashLoan(receiver, this.token, loanValue, '0x')) + .to.be.revertedWithCustomError(this.token, 'ERC3156InvalidReceiver') + .withArgs(receiver.target); }); it('missing approval', async function () { - const receiver = await ERC3156FlashBorrowerMock.new(true, false); - await expectRevertCustomError( - this.token.flashLoan(receiver.address, this.token.address, loanValue, '0x'), - 'ERC20InsufficientAllowance', - [this.token.address, 0, loanValue], - ); + const receiver = await ethers.deployContract('ERC3156FlashBorrowerMock', [true, false]); + await expect(this.token.flashLoan(receiver, this.token, loanValue, '0x')) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientAllowance') + .withArgs(this.token.target, 0, loanValue); }); it('unavailable funds', async function () { - const receiver = await ERC3156FlashBorrowerMock.new(true, true); - const data = this.token.contract.methods.transfer(other, 10).encodeABI(); - await expectRevertCustomError( - this.token.flashLoan(receiver.address, this.token.address, loanValue, data), - 'ERC20InsufficientBalance', - [receiver.address, loanValue - 10, loanValue], - ); + const receiver = await ethers.deployContract('ERC3156FlashBorrowerMock', [true, true]); + const data = this.token.interface.encodeFunctionData('transfer', [this.other.address, 10]); + await expect(this.token.flashLoan(receiver, this.token, loanValue, data)) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') + .withArgs(receiver.target, loanValue - 10n, loanValue); }); it('more than maxFlashLoan', async function () { - const receiver = await ERC3156FlashBorrowerMock.new(true, true); - const data = this.token.contract.methods.transfer(other, 10).encodeABI(); - // _mint overflow reverts using a panic code. No reason string. - await expectRevert.unspecified(this.token.flashLoan(receiver.address, this.token.address, MAX_UINT256, data)); + const receiver = await ethers.deployContract('ERC3156FlashBorrowerMock', [true, true]); + const data = this.token.interface.encodeFunctionData('transfer', [this.other.address, 10]); + await expect(this.token.flashLoan(receiver, this.token, ethers.MaxUint256, data)) + .to.be.revertedWithCustomError(this.token, 'ERC3156ExceededMaxLoan') + .withArgs(ethers.MaxUint256 - initialSupply); }); describe('custom flash fee & custom fee receiver', function () { - const receiverInitialBalance = new BN(200000); - const flashFee = new BN(5000); + const receiverInitialBalance = 200_000n; + const flashFee = 5_000n; beforeEach('init receiver balance & set flash fee', async function () { - this.receiver = await ERC3156FlashBorrowerMock.new(true, true); - const receipt = await this.token.$_mint(this.receiver.address, receiverInitialBalance); - await expectEvent(receipt, 'Transfer', { - from: ZERO_ADDRESS, - to: this.receiver.address, - value: receiverInitialBalance, - }); - expect(await this.token.balanceOf(this.receiver.address)).to.be.bignumber.equal(receiverInitialBalance); + this.receiver = await ethers.deployContract('ERC3156FlashBorrowerMock', [true, true]); + + const tx = await this.token.$_mint(this.receiver, receiverInitialBalance); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.receiver.target, receiverInitialBalance); + await expect(tx).to.changeTokenBalance(this.token, this.receiver, receiverInitialBalance); await this.token.setFlashFee(flashFee); - expect(await this.token.flashFee(this.token.address, loanValue)).to.be.bignumber.equal(flashFee); + expect(await this.token.flashFee(this.token, loanValue)).to.equal(flashFee); }); it('default flash fee receiver', async function () { - const { tx } = await this.token.flashLoan(this.receiver.address, this.token.address, loanValue, '0x'); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: ZERO_ADDRESS, - to: this.receiver.address, - value: loanValue, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.receiver.address, - to: ZERO_ADDRESS, - value: loanValue.add(flashFee), - }); - await expectEvent.inTransaction(tx, this.receiver, 'BalanceOf', { - token: this.token.address, - account: this.receiver.address, - value: receiverInitialBalance.add(loanValue), - }); - await expectEvent.inTransaction(tx, this.receiver, 'TotalSupply', { - token: this.token.address, - value: initialSupply.add(receiverInitialBalance).add(loanValue), - }); - - expect(await this.token.totalSupply()).to.be.bignumber.equal( - initialSupply.add(receiverInitialBalance).sub(flashFee), - ); - expect(await this.token.balanceOf(this.receiver.address)).to.be.bignumber.equal( - receiverInitialBalance.sub(flashFee), - ); - expect(await this.token.balanceOf(await this.token.$_flashFeeReceiver())).to.be.bignumber.equal('0'); - expect(await this.token.allowance(this.receiver.address, this.token.address)).to.be.bignumber.equal('0'); + const tx = await this.token.flashLoan(this.receiver, this.token, loanValue, '0x'); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.receiver.target, loanValue) + .to.emit(this.token, 'Transfer') + .withArgs(this.receiver.target, ethers.ZeroAddress, loanValue + flashFee) + .to.emit(this.receiver, 'BalanceOf') + .withArgs(this.token.target, this.receiver.target, receiverInitialBalance + loanValue) + .to.emit(this.receiver, 'TotalSupply') + .withArgs(this.token.target, initialSupply + receiverInitialBalance + loanValue); + await expect(tx).to.changeTokenBalances(this.token, [this.receiver, ethers.ZeroAddress], [-flashFee, 0]); + + expect(await this.token.totalSupply()).to.equal(initialSupply + receiverInitialBalance - flashFee); + expect(await this.token.allowance(this.receiver, this.token)).to.equal(0n); }); it('custom flash fee receiver', async function () { - const flashFeeReceiverAddress = anotherAccount; + const flashFeeReceiverAddress = this.anotherAccount; await this.token.setFlashFeeReceiver(flashFeeReceiverAddress); - expect(await this.token.$_flashFeeReceiver()).to.be.eq(flashFeeReceiverAddress); - - expect(await this.token.balanceOf(flashFeeReceiverAddress)).to.be.bignumber.equal('0'); - - const { tx } = await this.token.flashLoan(this.receiver.address, this.token.address, loanValue, '0x'); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: ZERO_ADDRESS, - to: this.receiver.address, - value: loanValue, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.receiver.address, - to: ZERO_ADDRESS, - value: loanValue, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.receiver.address, - to: flashFeeReceiverAddress, - value: flashFee, - }); - await expectEvent.inTransaction(tx, this.receiver, 'BalanceOf', { - token: this.token.address, - account: this.receiver.address, - value: receiverInitialBalance.add(loanValue), - }); - await expectEvent.inTransaction(tx, this.receiver, 'TotalSupply', { - token: this.token.address, - value: initialSupply.add(receiverInitialBalance).add(loanValue), - }); - - expect(await this.token.totalSupply()).to.be.bignumber.equal(initialSupply.add(receiverInitialBalance)); - expect(await this.token.balanceOf(this.receiver.address)).to.be.bignumber.equal( - receiverInitialBalance.sub(flashFee), + expect(await this.token.$_flashFeeReceiver()).to.equal(flashFeeReceiverAddress.address); + + const tx = await this.token.flashLoan(this.receiver, this.token, loanValue, '0x'); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.receiver.target, loanValue) + .to.emit(this.token, 'Transfer') + .withArgs(this.receiver.target, ethers.ZeroAddress, loanValue) + .to.emit(this.token, 'Transfer') + .withArgs(this.receiver.target, flashFeeReceiverAddress.address, flashFee) + .to.emit(this.receiver, 'BalanceOf') + .withArgs(this.token.target, this.receiver.target, receiverInitialBalance + loanValue) + .to.emit(this.receiver, 'TotalSupply') + .withArgs(this.token.target, initialSupply + receiverInitialBalance + loanValue); + await expect(tx).to.changeTokenBalances( + this.token, + [this.receiver, flashFeeReceiverAddress], + [-flashFee, flashFee], ); - expect(await this.token.balanceOf(flashFeeReceiverAddress)).to.be.bignumber.equal(flashFee); - expect(await this.token.allowance(this.receiver.address, flashFeeReceiverAddress)).to.be.bignumber.equal('0'); + + expect(await this.token.totalSupply()).to.equal(initialSupply + receiverInitialBalance); + expect(await this.token.allowance(this.receiver, flashFeeReceiverAddress)).to.equal(0n); }); }); }); diff --git a/test/token/ERC20/extensions/ERC20Pausable.test.js b/test/token/ERC20/extensions/ERC20Pausable.test.js index 92c90b9b8..1f1157c19 100644 --- a/test/token/ERC20/extensions/ERC20Pausable.test.js +++ b/test/token/ERC20/extensions/ERC20Pausable.test.js @@ -1,135 +1,128 @@ -const { BN } = require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../../../helpers/customError'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const ERC20Pausable = artifacts.require('$ERC20Pausable'); +const name = 'My Token'; +const symbol = 'MTKN'; +const initialSupply = 100n; -contract('ERC20Pausable', function (accounts) { - const [holder, recipient, anotherAccount] = accounts; +async function fixture() { + const [holder, recipient, approved] = await ethers.getSigners(); - const initialSupply = new BN(100); + const token = await ethers.deployContract('$ERC20Pausable', [name, symbol]); + await token.$_mint(holder, initialSupply); - const name = 'My Token'; - const symbol = 'MTKN'; + return { holder, recipient, approved, token }; +} +describe('ERC20Pausable', function () { beforeEach(async function () { - this.token = await ERC20Pausable.new(name, symbol); - await this.token.$_mint(holder, initialSupply); + Object.assign(this, await loadFixture(fixture)); }); describe('pausable token', function () { describe('transfer', function () { it('allows to transfer when unpaused', async function () { - await this.token.transfer(recipient, initialSupply, { from: holder }); - - expect(await this.token.balanceOf(holder)).to.be.bignumber.equal('0'); - expect(await this.token.balanceOf(recipient)).to.be.bignumber.equal(initialSupply); + await expect(this.token.connect(this.holder).transfer(this.recipient, initialSupply)).to.changeTokenBalances( + this.token, + [this.holder, this.recipient], + [-initialSupply, initialSupply], + ); }); it('allows to transfer when paused and then unpaused', async function () { await this.token.$_pause(); await this.token.$_unpause(); - await this.token.transfer(recipient, initialSupply, { from: holder }); - - expect(await this.token.balanceOf(holder)).to.be.bignumber.equal('0'); - expect(await this.token.balanceOf(recipient)).to.be.bignumber.equal(initialSupply); + await expect(this.token.connect(this.holder).transfer(this.recipient, initialSupply)).to.changeTokenBalances( + this.token, + [this.holder, this.recipient], + [-initialSupply, initialSupply], + ); }); it('reverts when trying to transfer when paused', async function () { await this.token.$_pause(); - await expectRevertCustomError( - this.token.transfer(recipient, initialSupply, { from: holder }), - 'EnforcedPause', - [], - ); + await expect( + this.token.connect(this.holder).transfer(this.recipient, initialSupply), + ).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); }); describe('transfer from', function () { - const allowance = new BN(40); + const allowance = 40n; beforeEach(async function () { - await this.token.approve(anotherAccount, allowance, { from: holder }); + await this.token.connect(this.holder).approve(this.approved, allowance); }); it('allows to transfer from when unpaused', async function () { - await this.token.transferFrom(holder, recipient, allowance, { from: anotherAccount }); - - expect(await this.token.balanceOf(recipient)).to.be.bignumber.equal(allowance); - expect(await this.token.balanceOf(holder)).to.be.bignumber.equal(initialSupply.sub(allowance)); + await expect( + this.token.connect(this.approved).transferFrom(this.holder, this.recipient, allowance), + ).to.changeTokenBalances(this.token, [this.holder, this.recipient], [-allowance, allowance]); }); it('allows to transfer when paused and then unpaused', async function () { await this.token.$_pause(); await this.token.$_unpause(); - await this.token.transferFrom(holder, recipient, allowance, { from: anotherAccount }); - - expect(await this.token.balanceOf(recipient)).to.be.bignumber.equal(allowance); - expect(await this.token.balanceOf(holder)).to.be.bignumber.equal(initialSupply.sub(allowance)); + await expect( + this.token.connect(this.approved).transferFrom(this.holder, this.recipient, allowance), + ).to.changeTokenBalances(this.token, [this.holder, this.recipient], [-allowance, allowance]); }); it('reverts when trying to transfer from when paused', async function () { await this.token.$_pause(); - await expectRevertCustomError( - this.token.transferFrom(holder, recipient, allowance, { from: anotherAccount }), - 'EnforcedPause', - [], - ); + await expect( + this.token.connect(this.approved).transferFrom(this.holder, this.recipient, allowance), + ).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); }); describe('mint', function () { - const value = new BN('42'); + const value = 42n; it('allows to mint when unpaused', async function () { - await this.token.$_mint(recipient, value); - - expect(await this.token.balanceOf(recipient)).to.be.bignumber.equal(value); + await expect(this.token.$_mint(this.recipient, value)).to.changeTokenBalance(this.token, this.recipient, value); }); it('allows to mint when paused and then unpaused', async function () { await this.token.$_pause(); await this.token.$_unpause(); - await this.token.$_mint(recipient, value); - - expect(await this.token.balanceOf(recipient)).to.be.bignumber.equal(value); + await expect(this.token.$_mint(this.recipient, value)).to.changeTokenBalance(this.token, this.recipient, value); }); it('reverts when trying to mint when paused', async function () { await this.token.$_pause(); - await expectRevertCustomError(this.token.$_mint(recipient, value), 'EnforcedPause', []); + await expect(this.token.$_mint(this.recipient, value)).to.be.revertedWithCustomError( + this.token, + 'EnforcedPause', + ); }); }); describe('burn', function () { - const value = new BN('42'); + const value = 42n; it('allows to burn when unpaused', async function () { - await this.token.$_burn(holder, value); - - expect(await this.token.balanceOf(holder)).to.be.bignumber.equal(initialSupply.sub(value)); + await expect(this.token.$_burn(this.holder, value)).to.changeTokenBalance(this.token, this.holder, -value); }); it('allows to burn when paused and then unpaused', async function () { await this.token.$_pause(); await this.token.$_unpause(); - await this.token.$_burn(holder, value); - - expect(await this.token.balanceOf(holder)).to.be.bignumber.equal(initialSupply.sub(value)); + await expect(this.token.$_burn(this.holder, value)).to.changeTokenBalance(this.token, this.holder, -value); }); it('reverts when trying to burn when paused', async function () { await this.token.$_pause(); - await expectRevertCustomError(this.token.$_burn(holder, value), 'EnforcedPause', []); + await expect(this.token.$_burn(this.holder, value)).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); }); }); diff --git a/test/token/ERC20/extensions/ERC20Permit.test.js b/test/token/ERC20/extensions/ERC20Permit.test.js index db2363cd2..e27a98239 100644 --- a/test/token/ERC20/extensions/ERC20Permit.test.js +++ b/test/token/ERC20/extensions/ERC20Permit.test.js @@ -1,41 +1,38 @@ -/* eslint-disable */ - -const { BN, constants, time } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { MAX_UINT256 } = constants; - -const { fromRpcSig } = require('ethereumjs-util'); -const ethSigUtil = require('eth-sig-util'); -const Wallet = require('ethereumjs-wallet').default; - -const ERC20Permit = artifacts.require('$ERC20Permit'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { getDomain, domainSeparator, Permit } = require('../../../helpers/eip712'); const { - types: { Permit }, - getDomain, - domainType, - domainSeparator, -} = require('../../../helpers/eip712'); -const { getChainId } = require('../../../helpers/chainid'); -const { expectRevertCustomError } = require('../../../helpers/customError'); + bigint: { clock, duration }, +} = require('../../../helpers/time'); -contract('ERC20Permit', function (accounts) { - const [initialHolder, spender] = accounts; +const name = 'My Token'; +const symbol = 'MTKN'; +const initialSupply = 100n; - const name = 'My Token'; - const symbol = 'MTKN'; +async function fixture() { + const [initialHolder, spender, owner, other] = await ethers.getSigners(); - const initialSupply = new BN(100); + const token = await ethers.deployContract('$ERC20Permit', [name, symbol, name]); + await token.$_mint(initialHolder, initialSupply); - beforeEach(async function () { - this.chainId = await getChainId(); + return { + initialHolder, + spender, + owner, + other, + token, + }; +} - this.token = await ERC20Permit.new(name, symbol, name); - await this.token.$_mint(initialHolder, initialSupply); +describe('ERC20Permit', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); it('initial nonce is 0', async function () { - expect(await this.token.nonces(initialHolder)).to.be.bignumber.equal('0'); + expect(await this.token.nonces(this.initialHolder)).to.equal(0n); }); it('domain separator', async function () { @@ -43,81 +40,72 @@ contract('ERC20Permit', function (accounts) { }); describe('permit', function () { - const wallet = Wallet.generate(); - - const owner = wallet.getAddressString(); - const value = new BN(42); - const nonce = 0; - const maxDeadline = MAX_UINT256; - - const buildData = (contract, deadline = maxDeadline) => - getDomain(contract).then(domain => ({ - primaryType: 'Permit', - types: { EIP712Domain: domainType(domain), Permit }, - domain, - message: { owner, spender, value, nonce, deadline }, - })); + const value = 42n; + const nonce = 0n; + const maxDeadline = ethers.MaxUint256; + + beforeEach(function () { + this.buildData = (contract, deadline = maxDeadline) => + getDomain(contract).then(domain => ({ + domain, + types: { Permit }, + message: { + owner: this.owner.address, + spender: this.spender.address, + value, + nonce, + deadline, + }, + })); + }); it('accepts owner signature', async function () { - const { v, r, s } = await buildData(this.token) - .then(data => ethSigUtil.signTypedMessage(wallet.getPrivateKey(), { data })) - .then(fromRpcSig); + const { v, r, s } = await this.buildData(this.token) + .then(({ domain, types, message }) => this.owner.signTypedData(domain, types, message)) + .then(ethers.Signature.from); - await this.token.permit(owner, spender, value, maxDeadline, v, r, s); + await this.token.permit(this.owner, this.spender, value, maxDeadline, v, r, s); - expect(await this.token.nonces(owner)).to.be.bignumber.equal('1'); - expect(await this.token.allowance(owner, spender)).to.be.bignumber.equal(value); + expect(await this.token.nonces(this.owner)).to.equal(1n); + expect(await this.token.allowance(this.owner, this.spender)).to.equal(value); }); it('rejects reused signature', async function () { - const sig = await buildData(this.token).then(data => - ethSigUtil.signTypedMessage(wallet.getPrivateKey(), { data }), - ); - const { r, s, v } = fromRpcSig(sig); - - await this.token.permit(owner, spender, value, maxDeadline, v, r, s); - - const domain = await getDomain(this.token); - const typedMessage = { - primaryType: 'Permit', - types: { EIP712Domain: domainType(domain), Permit }, - domain, - message: { owner, spender, value, nonce: nonce + 1, deadline: maxDeadline }, - }; - - await expectRevertCustomError( - this.token.permit(owner, spender, value, maxDeadline, v, r, s), - 'ERC2612InvalidSigner', - [ethSigUtil.recoverTypedSignature({ data: typedMessage, sig }), owner], + const { v, r, s, serialized } = await this.buildData(this.token) + .then(({ domain, types, message }) => this.owner.signTypedData(domain, types, message)) + .then(ethers.Signature.from); + + await this.token.permit(this.owner, this.spender, value, maxDeadline, v, r, s); + + const recovered = await this.buildData(this.token).then(({ domain, types, message }) => + ethers.verifyTypedData(domain, types, { ...message, nonce: nonce + 1n, deadline: maxDeadline }, serialized), ); + + await expect(this.token.permit(this.owner, this.spender, value, maxDeadline, v, r, s)) + .to.be.revertedWithCustomError(this.token, 'ERC2612InvalidSigner') + .withArgs(recovered, this.owner.address); }); it('rejects other signature', async function () { - const otherWallet = Wallet.generate(); + const { v, r, s } = await this.buildData(this.token) + .then(({ domain, types, message }) => this.other.signTypedData(domain, types, message)) + .then(ethers.Signature.from); - const { v, r, s } = await buildData(this.token) - .then(data => ethSigUtil.signTypedMessage(otherWallet.getPrivateKey(), { data })) - .then(fromRpcSig); - - await expectRevertCustomError( - this.token.permit(owner, spender, value, maxDeadline, v, r, s), - 'ERC2612InvalidSigner', - [await otherWallet.getAddressString(), owner], - ); + await expect(this.token.permit(this.owner, this.spender, value, maxDeadline, v, r, s)) + .to.be.revertedWithCustomError(this.token, 'ERC2612InvalidSigner') + .withArgs(this.other.address, this.owner.address); }); it('rejects expired permit', async function () { - const deadline = (await time.latest()) - time.duration.weeks(1); + const deadline = (await clock.timestamp()) - duration.weeks(1); - const { v, r, s } = await buildData(this.token, deadline) - .then(data => ethSigUtil.signTypedMessage(wallet.getPrivateKey(), { data })) - .then(fromRpcSig); + const { v, r, s } = await this.buildData(this.token, deadline) + .then(({ domain, types, message }) => this.owner.signTypedData(domain, types, message)) + .then(ethers.Signature.from); - await expectRevertCustomError( - this.token.permit(owner, spender, value, deadline, v, r, s), - 'ERC2612ExpiredSignature', - [deadline], - ); + await expect(this.token.permit(this.owner, this.spender, value, deadline, v, r, s)) + .to.be.revertedWithCustomError(this.token, 'ERC2612ExpiredSignature') + .withArgs(deadline); }); }); }); diff --git a/test/token/ERC20/extensions/ERC20Votes.test.js b/test/token/ERC20/extensions/ERC20Votes.test.js index a0da162a4..9ec1c09e9 100644 --- a/test/token/ERC20/extensions/ERC20Votes.test.js +++ b/test/token/ERC20/extensions/ERC20Votes.test.js @@ -10,11 +10,7 @@ const ethSigUtil = require('eth-sig-util'); const Wallet = require('ethereumjs-wallet').default; const { batchInBlock } = require('../../../helpers/txpool'); -const { - getDomain, - domainType, - types: { Delegation }, -} = require('../../../helpers/eip712'); +const { getDomain, domainType, Delegation } = require('../../../helpers/eip712'); const { clock, clockFromReceipt } = require('../../../helpers/time'); const { expectRevertCustomError } = require('../../../helpers/customError'); diff --git a/test/token/ERC20/extensions/ERC20Wrapper.test.js b/test/token/ERC20/extensions/ERC20Wrapper.test.js index b61573edd..af746d65a 100644 --- a/test/token/ERC20/extensions/ERC20Wrapper.test.js +++ b/test/token/ERC20/extensions/ERC20Wrapper.test.js @@ -6,12 +6,13 @@ const { shouldBehaveLikeERC20 } = require('../ERC20.behavior'); const name = 'My Token'; const symbol = 'MTKN'; +const decimals = 9n; const initialSupply = 100n; async function fixture() { const [initialHolder, recipient, anotherAccount] = await ethers.getSigners(); - const underlying = await ethers.deployContract('$ERC20DecimalsMock', [name, symbol, 9]); + const underlying = await ethers.deployContract('$ERC20DecimalsMock', [name, symbol, decimals]); await underlying.$_mint(initialHolder, initialSupply); const token = await ethers.deployContract('$ERC20Wrapper', [`Wrapped ${name}`, `W${symbol}`, underlying]); @@ -20,9 +21,6 @@ async function fixture() { } describe('ERC20Wrapper', function () { - const name = 'My Token'; - const symbol = 'MTKN'; - beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); @@ -40,7 +38,7 @@ describe('ERC20Wrapper', function () { }); it('has the same decimals as the underlying token', async function () { - expect(await this.token.decimals()).to.be.equal(9n); + expect(await this.token.decimals()).to.be.equal(decimals); }); it('decimals default back to 18 if token has no metadata', async function () { @@ -56,13 +54,13 @@ describe('ERC20Wrapper', function () { describe('deposit', function () { it('executes with approval', async function () { await this.underlying.connect(this.initialHolder).approve(this.token, initialSupply); + const tx = await this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply); await expect(tx) .to.emit(this.underlying, 'Transfer') .withArgs(this.initialHolder.address, this.token.target, initialSupply) .to.emit(this.token, 'Transfer') .withArgs(ethers.ZeroAddress, this.initialHolder.address, initialSupply); - await expect(tx).to.changeTokenBalances( this.underlying, [this.initialHolder, this.token], @@ -79,6 +77,7 @@ describe('ERC20Wrapper', function () { it('reverts when inssuficient balance', async function () { await this.underlying.connect(this.initialHolder).approve(this.token, ethers.MaxUint256); + await expect(this.token.connect(this.initialHolder).depositFor(this.initialHolder, ethers.MaxUint256)) .to.be.revertedWithCustomError(this.underlying, 'ERC20InsufficientBalance') .withArgs(this.initialHolder.address, initialSupply, ethers.MaxUint256); @@ -86,13 +85,13 @@ describe('ERC20Wrapper', function () { it('deposits to other account', async function () { await this.underlying.connect(this.initialHolder).approve(this.token, initialSupply); + const tx = await this.token.connect(this.initialHolder).depositFor(this.recipient, initialSupply); await expect(tx) .to.emit(this.underlying, 'Transfer') .withArgs(this.initialHolder.address, this.token.target, initialSupply) .to.emit(this.token, 'Transfer') .withArgs(ethers.ZeroAddress, this.recipient.address, initialSupply); - await expect(tx).to.changeTokenBalances( this.underlying, [this.initialHolder, this.token], @@ -103,6 +102,7 @@ describe('ERC20Wrapper', function () { it('reverts minting to the wrapper contract', async function () { await this.underlying.connect(this.initialHolder).approve(this.token, ethers.MaxUint256); + await expect(this.token.connect(this.initialHolder).depositFor(this.token, ethers.MaxUint256)) .to.be.revertedWithCustomError(this.token, 'ERC20InvalidReceiver') .withArgs(this.token.target); @@ -130,7 +130,6 @@ describe('ERC20Wrapper', function () { .withArgs(this.token.target, this.initialHolder.address, value) .to.emit(this.token, 'Transfer') .withArgs(this.initialHolder.address, ethers.ZeroAddress, value); - await expect(tx).to.changeTokenBalances(this.underlying, [this.token, this.initialHolder], [-value, value]); await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, -value); }); @@ -142,7 +141,6 @@ describe('ERC20Wrapper', function () { .withArgs(this.token.target, this.initialHolder.address, initialSupply) .to.emit(this.token, 'Transfer') .withArgs(this.initialHolder.address, ethers.ZeroAddress, initialSupply); - await expect(tx).to.changeTokenBalances( this.underlying, [this.token, this.initialHolder], @@ -158,7 +156,6 @@ describe('ERC20Wrapper', function () { .withArgs(this.token.target, this.recipient.address, initialSupply) .to.emit(this.token, 'Transfer') .withArgs(this.initialHolder.address, ethers.ZeroAddress, initialSupply); - await expect(tx).to.changeTokenBalances( this.underlying, [this.token, this.initialHolder, this.recipient], @@ -181,7 +178,6 @@ describe('ERC20Wrapper', function () { const tx = await this.token.$_recover(this.recipient); await expect(tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.recipient.address, 0n); - await expect(tx).to.changeTokenBalance(this.token, this.recipient, 0); }); @@ -192,7 +188,6 @@ describe('ERC20Wrapper', function () { await expect(tx) .to.emit(this.token, 'Transfer') .withArgs(ethers.ZeroAddress, this.recipient.address, initialSupply); - await expect(tx).to.changeTokenBalance(this.token, this.recipient, initialSupply); }); }); diff --git a/test/token/ERC20/extensions/ERC4626.test.js b/test/token/ERC20/extensions/ERC4626.test.js index fa66785f0..907855efe 100644 --- a/test/token/ERC20/extensions/ERC4626.test.js +++ b/test/token/ERC20/extensions/ERC4626.test.js @@ -1,72 +1,71 @@ -const { constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); -const { Enum } = require('../../../helpers/enums'); -const { expectRevertCustomError } = require('../../../helpers/customError'); +const { + bigint: { Enum }, +} = require('../../../helpers/enums'); -const ERC20Decimals = artifacts.require('$ERC20DecimalsMock'); -const ERC4626 = artifacts.require('$ERC4626'); -const ERC4626LimitsMock = artifacts.require('$ERC4626LimitsMock'); -const ERC4626OffsetMock = artifacts.require('$ERC4626OffsetMock'); -const ERC4626FeesMock = artifacts.require('$ERC4626FeesMock'); -const ERC20ExcessDecimalsMock = artifacts.require('ERC20ExcessDecimalsMock'); -const ERC20Reentrant = artifacts.require('$ERC20Reentrant'); +const name = 'My Token'; +const symbol = 'MTKN'; +const decimals = 18n; -contract('ERC4626', function (accounts) { - const [holder, recipient, spender, other, user1, user2] = accounts; +async function fixture() { + const [holder, recipient, spender, other, ...accounts] = await ethers.getSigners(); + return { holder, recipient, spender, other, accounts }; +} - const name = 'My Token'; - const symbol = 'MTKN'; - const decimals = web3.utils.toBN(18); +describe('ERC4626', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); + }); it('inherit decimals if from asset', async function () { - for (const decimals of [0, 9, 12, 18, 36].map(web3.utils.toBN)) { - const token = await ERC20Decimals.new('', '', decimals); - const vault = await ERC4626.new('', '', token.address); - expect(await vault.decimals()).to.be.bignumber.equal(decimals); + for (const decimals of [0n, 9n, 12n, 18n, 36n]) { + const token = await ethers.deployContract('$ERC20DecimalsMock', ['', '', decimals]); + const vault = await ethers.deployContract('$ERC4626', ['', '', token]); + expect(await vault.decimals()).to.equal(decimals); } }); it('asset has not yet been created', async function () { - const vault = await ERC4626.new('', '', other); - expect(await vault.decimals()).to.be.bignumber.equal(decimals); + const vault = await ethers.deployContract('$ERC4626', ['', '', this.other.address]); + expect(await vault.decimals()).to.equal(decimals); }); it('underlying excess decimals', async function () { - const token = await ERC20ExcessDecimalsMock.new(); - const vault = await ERC4626.new('', '', token.address); - expect(await vault.decimals()).to.be.bignumber.equal(decimals); + const token = await ethers.deployContract('$ERC20ExcessDecimalsMock'); + const vault = await ethers.deployContract('$ERC4626', ['', '', token]); + expect(await vault.decimals()).to.equal(decimals); }); it('decimals overflow', async function () { - for (const offset of [243, 250, 255].map(web3.utils.toBN)) { - const token = await ERC20Decimals.new('', '', decimals); - const vault = await ERC4626OffsetMock.new(name + ' Vault', symbol + 'V', token.address, offset); - await expectRevert( - vault.decimals(), - 'reverted with panic code 0x11 (Arithmetic operation underflowed or overflowed outside of an unchecked block)', - ); + for (const offset of [243n, 250n, 255n]) { + const token = await ethers.deployContract('$ERC20DecimalsMock', ['', '', decimals]); + const vault = await ethers.deployContract('$ERC4626OffsetMock', ['', '', token, offset]); + await expect(vault.decimals()).to.be.revertedWithPanic(PANIC_CODES.ARITHMETIC_UNDER_OR_OVERFLOW); } }); describe('reentrancy', async function () { const reenterType = Enum('No', 'Before', 'After'); - const value = web3.utils.toBN(1000000000000000000); - const reenterValue = web3.utils.toBN(1000000000); - let token; - let vault; + const value = 1_000_000_000_000_000_000n; + const reenterValue = 1_000_000_000n; beforeEach(async function () { - token = await ERC20Reentrant.new(); // Use offset 1 so the rate is not 1:1 and we can't possibly confuse assets and shares - vault = await ERC4626OffsetMock.new('', '', token.address, 1); + const token = await ethers.deployContract('$ERC20Reentrant'); + const vault = await ethers.deployContract('$ERC4626OffsetMock', ['', '', token, 1n]); // Funds and approval for tests - await token.$_mint(holder, value); - await token.$_mint(other, value); - await token.$_approve(holder, vault.address, constants.MAX_UINT256); - await token.$_approve(other, vault.address, constants.MAX_UINT256); - await token.$_approve(token.address, vault.address, constants.MAX_UINT256); + await token.$_mint(this.holder, value); + await token.$_mint(this.other, value); + await token.$_approve(this.holder, vault, ethers.MaxUint256); + await token.$_approve(this.other, vault, ethers.MaxUint256); + await token.$_approve(token, vault, ethers.MaxUint256); + + Object.assign(this, { token, vault }); }); // During a `_deposit`, the vault does `transferFrom(depositor, vault, assets)` -> `_mint(receiver, shares)` @@ -75,40 +74,29 @@ contract('ERC4626', function (accounts) { // intermediate state in which the ratio of assets/shares has been decreased (more shares than assets). it('correct share price is observed during reentrancy before deposit', async function () { // mint token for deposit - await token.$_mint(token.address, reenterValue); + await this.token.$_mint(this.token, reenterValue); // Schedules a reentrancy from the token contract - await token.scheduleReenter( + await this.token.scheduleReenter( reenterType.Before, - vault.address, - vault.contract.methods.deposit(reenterValue, holder).encodeABI(), + this.vault, + this.vault.interface.encodeFunctionData('deposit', [reenterValue, this.holder.address]), ); // Initial share price - const sharesForDeposit = await vault.previewDeposit(value, { from: holder }); - const sharesForReenter = await vault.previewDeposit(reenterValue, { from: holder }); - - // Deposit normally, reentering before the internal `_update` - const receipt = await vault.deposit(value, holder, { from: holder }); - - // Main deposit event - await expectEvent(receipt, 'Deposit', { - sender: holder, - owner: holder, - assets: value, - shares: sharesForDeposit, - }); - // Reentrant deposit event → uses the same price - await expectEvent(receipt, 'Deposit', { - sender: token.address, - owner: holder, - assets: reenterValue, - shares: sharesForReenter, - }); + const sharesForDeposit = await this.vault.previewDeposit(value); + const sharesForReenter = await this.vault.previewDeposit(reenterValue); + + await expect(this.vault.connect(this.holder).deposit(value, this.holder)) + // Deposit normally, reentering before the internal `_update` + .to.emit(this.vault, 'Deposit') + .withArgs(this.holder.address, this.holder.address, value, sharesForDeposit) + // Reentrant deposit event → uses the same price + .to.emit(this.vault, 'Deposit') + .withArgs(this.token.target, this.holder.address, reenterValue, sharesForReenter); // Assert prices is kept - const sharesAfter = await vault.previewDeposit(value, { from: holder }); - expect(sharesForDeposit).to.be.bignumber.eq(sharesAfter); + expect(await this.vault.previewDeposit(value)).to.equal(sharesForDeposit); }); // During a `_withdraw`, the vault does `_burn(owner, shares)` -> `transfer(receiver, assets)` @@ -117,43 +105,31 @@ contract('ERC4626', function (accounts) { // intermediate state in which the ratio of shares/assets has been decreased (more assets than shares). it('correct share price is observed during reentrancy after withdraw', async function () { // Deposit into the vault: holder gets `value` share, token.address gets `reenterValue` shares - await vault.deposit(value, holder, { from: holder }); - await vault.deposit(reenterValue, token.address, { from: other }); + await this.vault.connect(this.holder).deposit(value, this.holder); + await this.vault.connect(this.other).deposit(reenterValue, this.token); // Schedules a reentrancy from the token contract - await token.scheduleReenter( + await this.token.scheduleReenter( reenterType.After, - vault.address, - vault.contract.methods.withdraw(reenterValue, holder, token.address).encodeABI(), + this.vault, + this.vault.interface.encodeFunctionData('withdraw', [reenterValue, this.holder.address, this.token.target]), ); // Initial share price - const sharesForWithdraw = await vault.previewWithdraw(value, { from: holder }); - const sharesForReenter = await vault.previewWithdraw(reenterValue, { from: holder }); + const sharesForWithdraw = await this.vault.previewWithdraw(value); + const sharesForReenter = await this.vault.previewWithdraw(reenterValue); // Do withdraw normally, triggering the _afterTokenTransfer hook - const receipt = await vault.withdraw(value, holder, holder, { from: holder }); - - // Main withdraw event - await expectEvent(receipt, 'Withdraw', { - sender: holder, - receiver: holder, - owner: holder, - assets: value, - shares: sharesForWithdraw, - }); - // Reentrant withdraw event → uses the same price - await expectEvent(receipt, 'Withdraw', { - sender: token.address, - receiver: holder, - owner: token.address, - assets: reenterValue, - shares: sharesForReenter, - }); + await expect(this.vault.connect(this.holder).withdraw(value, this.holder, this.holder)) + // Main withdraw event + .to.emit(this.vault, 'Withdraw') + .withArgs(this.holder.address, this.holder.address, this.holder.address, value, sharesForWithdraw) + // Reentrant withdraw event → uses the same price + .to.emit(this.vault, 'Withdraw') + .withArgs(this.token.target, this.holder.address, this.token.target, reenterValue, sharesForReenter); // Assert price is kept - const sharesAfter = await vault.previewWithdraw(value, { from: holder }); - expect(sharesForWithdraw).to.be.bignumber.eq(sharesAfter); + expect(await this.vault.previewWithdraw(value)).to.equal(sharesForWithdraw); }); // Donate newly minted tokens to the vault during the reentracy causes the share price to increase. @@ -161,254 +137,210 @@ contract('ERC4626', function (accounts) { // Further deposits will get a different price (getting fewer shares for the same value of assets) it('share price change during reentracy does not affect deposit', async function () { // Schedules a reentrancy from the token contract that mess up the share price - await token.scheduleReenter( + await this.token.scheduleReenter( reenterType.Before, - token.address, - token.contract.methods.$_mint(vault.address, reenterValue).encodeABI(), + this.token, + this.token.interface.encodeFunctionData('$_mint', [this.vault.target, reenterValue]), ); // Price before - const sharesBefore = await vault.previewDeposit(value); + const sharesBefore = await this.vault.previewDeposit(value); // Deposit, reentering before the internal `_update` - const receipt = await vault.deposit(value, holder, { from: holder }); - - // Price is as previewed - await expectEvent(receipt, 'Deposit', { - sender: holder, - owner: holder, - assets: value, - shares: sharesBefore, - }); + await expect(this.vault.connect(this.holder).deposit(value, this.holder)) + // Price is as previewed + .to.emit(this.vault, 'Deposit') + .withArgs(this.holder.address, this.holder.address, value, sharesBefore); // Price was modified during reentrancy - const sharesAfter = await vault.previewDeposit(value); - expect(sharesAfter).to.be.bignumber.lt(sharesBefore); + expect(await this.vault.previewDeposit(value)).to.lt(sharesBefore); }); // Burn some tokens from the vault during the reentracy causes the share price to drop. // Still, the withdraw that trigger the reentracy is not affected and get the previewed price. // Further withdraw will get a different price (needing more shares for the same value of assets) it('share price change during reentracy does not affect withdraw', async function () { - await vault.deposit(value, other, { from: other }); - await vault.deposit(value, holder, { from: holder }); + await this.vault.connect(this.holder).deposit(value, this.holder); + await this.vault.connect(this.other).deposit(value, this.other); // Schedules a reentrancy from the token contract that mess up the share price - await token.scheduleReenter( + await this.token.scheduleReenter( reenterType.After, - token.address, - token.contract.methods.$_burn(vault.address, reenterValue).encodeABI(), + this.token, + this.token.interface.encodeFunctionData('$_burn', [this.vault.target, reenterValue]), ); // Price before - const sharesBefore = await vault.previewWithdraw(value); + const sharesBefore = await this.vault.previewWithdraw(value); // Withdraw, triggering the _afterTokenTransfer hook - const receipt = await vault.withdraw(value, holder, holder, { from: holder }); - - // Price is as previewed - await expectEvent(receipt, 'Withdraw', { - sender: holder, - receiver: holder, - owner: holder, - assets: value, - shares: sharesBefore, - }); + await expect(this.vault.connect(this.holder).withdraw(value, this.holder, this.holder)) + // Price is as previewed + .to.emit(this.vault, 'Withdraw') + .withArgs(this.holder.address, this.holder.address, this.holder.address, value, sharesBefore); // Price was modified during reentrancy - const sharesAfter = await vault.previewWithdraw(value); - expect(sharesAfter).to.be.bignumber.gt(sharesBefore); + expect(await this.vault.previewWithdraw(value)).to.gt(sharesBefore); }); }); describe('limits', async function () { beforeEach(async function () { - this.token = await ERC20Decimals.new(name, symbol, decimals); - this.vault = await ERC4626LimitsMock.new(name + ' Vault', symbol + 'V', this.token.address); + const token = await ethers.deployContract('$ERC20DecimalsMock', [name, symbol, decimals]); + const vault = await ethers.deployContract('$ERC4626LimitsMock', ['', '', token]); + + Object.assign(this, { token, vault }); }); it('reverts on deposit() above max deposit', async function () { - const maxDeposit = await this.vault.maxDeposit(holder); - await expectRevertCustomError(this.vault.deposit(maxDeposit.addn(1), recipient), 'ERC4626ExceededMaxDeposit', [ - recipient, - maxDeposit.addn(1), - maxDeposit, - ]); + const maxDeposit = await this.vault.maxDeposit(this.holder); + await expect(this.vault.connect(this.holder).deposit(maxDeposit + 1n, this.recipient)) + .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxDeposit') + .withArgs(this.recipient.address, maxDeposit + 1n, maxDeposit); }); it('reverts on mint() above max mint', async function () { - const maxMint = await this.vault.maxMint(holder); - await expectRevertCustomError(this.vault.mint(maxMint.addn(1), recipient), 'ERC4626ExceededMaxMint', [ - recipient, - maxMint.addn(1), - maxMint, - ]); + const maxMint = await this.vault.maxMint(this.holder); + + await expect(this.vault.connect(this.holder).mint(maxMint + 1n, this.recipient)) + .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxMint') + .withArgs(this.recipient.address, maxMint + 1n, maxMint); }); it('reverts on withdraw() above max withdraw', async function () { - const maxWithdraw = await this.vault.maxWithdraw(holder); - await expectRevertCustomError( - this.vault.withdraw(maxWithdraw.addn(1), recipient, holder), - 'ERC4626ExceededMaxWithdraw', - [holder, maxWithdraw.addn(1), maxWithdraw], - ); + const maxWithdraw = await this.vault.maxWithdraw(this.holder); + + await expect(this.vault.connect(this.holder).withdraw(maxWithdraw + 1n, this.recipient, this.holder)) + .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxWithdraw') + .withArgs(this.holder.address, maxWithdraw + 1n, maxWithdraw); }); it('reverts on redeem() above max redeem', async function () { - const maxRedeem = await this.vault.maxRedeem(holder); - await expectRevertCustomError( - this.vault.redeem(maxRedeem.addn(1), recipient, holder), - 'ERC4626ExceededMaxRedeem', - [holder, maxRedeem.addn(1), maxRedeem], - ); + const maxRedeem = await this.vault.maxRedeem(this.holder); + + await expect(this.vault.connect(this.holder).redeem(maxRedeem + 1n, this.recipient, this.holder)) + .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxRedeem') + .withArgs(this.holder.address, maxRedeem + 1n, maxRedeem); }); }); - for (const offset of [0, 6, 18].map(web3.utils.toBN)) { - const parseToken = token => web3.utils.toBN(10).pow(decimals).muln(token); - const parseShare = share => web3.utils.toBN(10).pow(decimals.add(offset)).muln(share); + for (const offset of [0n, 6n, 18n]) { + const parseToken = token => token * 10n ** decimals; + const parseShare = share => share * 10n ** (decimals + offset); - const virtualAssets = web3.utils.toBN(1); - const virtualShares = web3.utils.toBN(10).pow(offset); + const virtualAssets = 1n; + const virtualShares = 10n ** offset; describe(`offset: ${offset}`, function () { beforeEach(async function () { - this.token = await ERC20Decimals.new(name, symbol, decimals); - this.vault = await ERC4626OffsetMock.new(name + ' Vault', symbol + 'V', this.token.address, offset); + const token = await ethers.deployContract('$ERC20DecimalsMock', [name, symbol, decimals]); + const vault = await ethers.deployContract('$ERC4626OffsetMock', [name + ' Vault', symbol + 'V', token, offset]); - await this.token.$_mint(holder, constants.MAX_INT256); // 50% of maximum - await this.token.approve(this.vault.address, constants.MAX_UINT256, { from: holder }); - await this.vault.approve(spender, constants.MAX_UINT256, { from: holder }); + await token.$_mint(this.holder, ethers.MaxUint256 / 2n); // 50% of maximum + await token.$_approve(this.holder, vault, ethers.MaxUint256); + await vault.$_approve(this.holder, this.spender, ethers.MaxUint256); + + Object.assign(this, { token, vault }); }); it('metadata', async function () { - expect(await this.vault.name()).to.be.equal(name + ' Vault'); - expect(await this.vault.symbol()).to.be.equal(symbol + 'V'); - expect(await this.vault.decimals()).to.be.bignumber.equal(decimals.add(offset)); - expect(await this.vault.asset()).to.be.equal(this.token.address); + expect(await this.vault.name()).to.equal(name + ' Vault'); + expect(await this.vault.symbol()).to.equal(symbol + 'V'); + expect(await this.vault.decimals()).to.equal(decimals + offset); + expect(await this.vault.asset()).to.equal(this.token.target); }); describe('empty vault: no assets & no shares', function () { it('status', async function () { - expect(await this.vault.totalAssets()).to.be.bignumber.equal('0'); + expect(await this.vault.totalAssets()).to.equal(0n); }); it('deposit', async function () { - expect(await this.vault.maxDeposit(holder)).to.be.bignumber.equal(constants.MAX_UINT256); - expect(await this.vault.previewDeposit(parseToken(1))).to.be.bignumber.equal(parseShare(1)); - - const { tx } = await this.vault.deposit(parseToken(1), recipient, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: holder, - to: this.vault.address, - value: parseToken(1), - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: recipient, - value: parseShare(1), - }); - - await expectEvent.inTransaction(tx, this.vault, 'Deposit', { - sender: holder, - owner: recipient, - assets: parseToken(1), - shares: parseShare(1), - }); + expect(await this.vault.maxDeposit(this.holder)).to.equal(ethers.MaxUint256); + expect(await this.vault.previewDeposit(parseToken(1n))).to.equal(parseShare(1n)); + + const tx = this.vault.connect(this.holder).deposit(parseToken(1n), this.recipient); + + await expect(tx).to.changeTokenBalances( + this.token, + [this.holder, this.vault], + [-parseToken(1n), parseToken(1n)], + ); + await expect(tx).to.changeTokenBalance(this.vault, this.recipient, parseShare(1n)); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.vault.target, parseToken(1n)) + .to.emit(this.vault, 'Transfer') + .withArgs(ethers.ZeroAddress, this.recipient.address, parseShare(1n)) + .to.emit(this.vault, 'Deposit') + .withArgs(this.holder.address, this.recipient.address, parseToken(1n), parseShare(1n)); }); it('mint', async function () { - expect(await this.vault.maxMint(holder)).to.be.bignumber.equal(constants.MAX_UINT256); - expect(await this.vault.previewMint(parseShare(1))).to.be.bignumber.equal(parseToken(1)); - - const { tx } = await this.vault.mint(parseShare(1), recipient, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: holder, - to: this.vault.address, - value: parseToken(1), - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: recipient, - value: parseShare(1), - }); - - await expectEvent.inTransaction(tx, this.vault, 'Deposit', { - sender: holder, - owner: recipient, - assets: parseToken(1), - shares: parseShare(1), - }); + expect(await this.vault.maxMint(this.holder)).to.equal(ethers.MaxUint256); + expect(await this.vault.previewMint(parseShare(1n))).to.equal(parseToken(1n)); + + const tx = this.vault.connect(this.holder).mint(parseShare(1n), this.recipient); + + await expect(tx).to.changeTokenBalances( + this.token, + [this.holder, this.vault], + [-parseToken(1n), parseToken(1n)], + ); + await expect(tx).to.changeTokenBalance(this.vault, this.recipient, parseShare(1n)); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.vault.target, parseToken(1n)) + .to.emit(this.vault, 'Transfer') + .withArgs(ethers.ZeroAddress, this.recipient.address, parseShare(1n)) + .to.emit(this.vault, 'Deposit') + .withArgs(this.holder.address, this.recipient.address, parseToken(1n), parseShare(1n)); }); it('withdraw', async function () { - expect(await this.vault.maxWithdraw(holder)).to.be.bignumber.equal('0'); - expect(await this.vault.previewWithdraw('0')).to.be.bignumber.equal('0'); - - const { tx } = await this.vault.withdraw('0', recipient, holder, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.vault.address, - to: recipient, - value: '0', - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: holder, - to: constants.ZERO_ADDRESS, - value: '0', - }); - - await expectEvent.inTransaction(tx, this.vault, 'Withdraw', { - sender: holder, - receiver: recipient, - owner: holder, - assets: '0', - shares: '0', - }); + expect(await this.vault.maxWithdraw(this.holder)).to.equal(0n); + expect(await this.vault.previewWithdraw(0n)).to.equal(0n); + + const tx = this.vault.connect(this.holder).withdraw(0n, this.recipient, this.holder); + + await expect(tx).to.changeTokenBalances(this.token, [this.vault, this.recipient], [0n, 0n]); + await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.vault.target, this.recipient.address, 0n) + .to.emit(this.vault, 'Transfer') + .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .to.emit(this.vault, 'Withdraw') + .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); }); it('redeem', async function () { - expect(await this.vault.maxRedeem(holder)).to.be.bignumber.equal('0'); - expect(await this.vault.previewRedeem('0')).to.be.bignumber.equal('0'); - - const { tx } = await this.vault.redeem('0', recipient, holder, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.vault.address, - to: recipient, - value: '0', - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: holder, - to: constants.ZERO_ADDRESS, - value: '0', - }); - - await expectEvent.inTransaction(tx, this.vault, 'Withdraw', { - sender: holder, - receiver: recipient, - owner: holder, - assets: '0', - shares: '0', - }); + expect(await this.vault.maxRedeem(this.holder)).to.equal(0n); + expect(await this.vault.previewRedeem(0n)).to.equal(0n); + + const tx = this.vault.connect(this.holder).redeem(0n, this.recipient, this.holder); + + await expect(tx).to.changeTokenBalances(this.token, [this.vault, this.recipient], [0n, 0n]); + await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.vault.target, this.recipient.address, 0n) + .to.emit(this.vault, 'Transfer') + .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .to.emit(this.vault, 'Withdraw') + .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); }); }); describe('inflation attack: offset price by direct deposit of assets', function () { beforeEach(async function () { // Donate 1 token to the vault to offset the price - await this.token.$_mint(this.vault.address, parseToken(1)); + await this.token.$_mint(this.vault, parseToken(1n)); }); it('status', async function () { - expect(await this.vault.totalSupply()).to.be.bignumber.equal('0'); - expect(await this.vault.totalAssets()).to.be.bignumber.equal(parseToken(1)); + expect(await this.vault.totalSupply()).to.equal(0n); + expect(await this.vault.totalAssets()).to.equal(parseToken(1n)); }); /** @@ -423,35 +355,30 @@ contract('ERC4626', function (accounts) { * was trying to deposit */ it('deposit', async function () { - const effectiveAssets = await this.vault.totalAssets().then(x => x.add(virtualAssets)); - const effectiveShares = await this.vault.totalSupply().then(x => x.add(virtualShares)); - - const depositAssets = parseToken(1); - const expectedShares = depositAssets.mul(effectiveShares).div(effectiveAssets); - - expect(await this.vault.maxDeposit(holder)).to.be.bignumber.equal(constants.MAX_UINT256); - expect(await this.vault.previewDeposit(depositAssets)).to.be.bignumber.equal(expectedShares); - - const { tx } = await this.vault.deposit(depositAssets, recipient, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: holder, - to: this.vault.address, - value: depositAssets, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: recipient, - value: expectedShares, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Deposit', { - sender: holder, - owner: recipient, - assets: depositAssets, - shares: expectedShares, - }); + const effectiveAssets = (await this.vault.totalAssets()) + virtualAssets; + const effectiveShares = (await this.vault.totalSupply()) + virtualShares; + + const depositAssets = parseToken(1n); + const expectedShares = (depositAssets * effectiveShares) / effectiveAssets; + + expect(await this.vault.maxDeposit(this.holder)).to.equal(ethers.MaxUint256); + expect(await this.vault.previewDeposit(depositAssets)).to.equal(expectedShares); + + const tx = this.vault.connect(this.holder).deposit(depositAssets, this.recipient); + + await expect(tx).to.changeTokenBalances( + this.token, + [this.holder, this.vault], + [-depositAssets, depositAssets], + ); + await expect(tx).to.changeTokenBalance(this.vault, this.recipient, expectedShares); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.vault.target, depositAssets) + .to.emit(this.vault, 'Transfer') + .withArgs(ethers.ZeroAddress, this.recipient.address, expectedShares) + .to.emit(this.vault, 'Deposit') + .withArgs(this.holder.address, this.recipient.address, depositAssets, expectedShares); }); /** @@ -466,102 +393,77 @@ contract('ERC4626', function (accounts) { * large deposits. */ it('mint', async function () { - const effectiveAssets = await this.vault.totalAssets().then(x => x.add(virtualAssets)); - const effectiveShares = await this.vault.totalSupply().then(x => x.add(virtualShares)); - - const mintShares = parseShare(1); - const expectedAssets = mintShares.mul(effectiveAssets).div(effectiveShares); - - expect(await this.vault.maxMint(holder)).to.be.bignumber.equal(constants.MAX_UINT256); - expect(await this.vault.previewMint(mintShares)).to.be.bignumber.equal(expectedAssets); - - const { tx } = await this.vault.mint(mintShares, recipient, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: holder, - to: this.vault.address, - value: expectedAssets, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: recipient, - value: mintShares, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Deposit', { - sender: holder, - owner: recipient, - assets: expectedAssets, - shares: mintShares, - }); + const effectiveAssets = (await this.vault.totalAssets()) + virtualAssets; + const effectiveShares = (await this.vault.totalSupply()) + virtualShares; + + const mintShares = parseShare(1n); + const expectedAssets = (mintShares * effectiveAssets) / effectiveShares; + + expect(await this.vault.maxMint(this.holder)).to.equal(ethers.MaxUint256); + expect(await this.vault.previewMint(mintShares)).to.equal(expectedAssets); + + const tx = this.vault.connect(this.holder).mint(mintShares, this.recipient); + + await expect(tx).to.changeTokenBalances( + this.token, + [this.holder, this.vault], + [-expectedAssets, expectedAssets], + ); + await expect(tx).to.changeTokenBalance(this.vault, this.recipient, mintShares); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.vault.target, expectedAssets) + .to.emit(this.vault, 'Transfer') + .withArgs(ethers.ZeroAddress, this.recipient.address, mintShares) + .to.emit(this.vault, 'Deposit') + .withArgs(this.holder.address, this.recipient.address, expectedAssets, mintShares); }); it('withdraw', async function () { - expect(await this.vault.maxWithdraw(holder)).to.be.bignumber.equal('0'); - expect(await this.vault.previewWithdraw('0')).to.be.bignumber.equal('0'); - - const { tx } = await this.vault.withdraw('0', recipient, holder, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.vault.address, - to: recipient, - value: '0', - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: holder, - to: constants.ZERO_ADDRESS, - value: '0', - }); - - await expectEvent.inTransaction(tx, this.vault, 'Withdraw', { - sender: holder, - receiver: recipient, - owner: holder, - assets: '0', - shares: '0', - }); + expect(await this.vault.maxWithdraw(this.holder)).to.equal(0n); + expect(await this.vault.previewWithdraw(0n)).to.equal(0n); + + const tx = this.vault.connect(this.holder).withdraw(0n, this.recipient, this.holder); + + await expect(tx).to.changeTokenBalances(this.token, [this.vault, this.recipient], [0n, 0n]); + await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.vault.target, this.recipient.address, 0n) + .to.emit(this.vault, 'Transfer') + .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .to.emit(this.vault, 'Withdraw') + .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); }); it('redeem', async function () { - expect(await this.vault.maxRedeem(holder)).to.be.bignumber.equal('0'); - expect(await this.vault.previewRedeem('0')).to.be.bignumber.equal('0'); - - const { tx } = await this.vault.redeem('0', recipient, holder, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.vault.address, - to: recipient, - value: '0', - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: holder, - to: constants.ZERO_ADDRESS, - value: '0', - }); - - await expectEvent.inTransaction(tx, this.vault, 'Withdraw', { - sender: holder, - receiver: recipient, - owner: holder, - assets: '0', - shares: '0', - }); + expect(await this.vault.maxRedeem(this.holder)).to.equal(0n); + expect(await this.vault.previewRedeem(0n)).to.equal(0n); + + const tx = this.vault.connect(this.holder).redeem(0n, this.recipient, this.holder); + + await expect(tx).to.changeTokenBalances(this.token, [this.vault, this.recipient], [0n, 0n]); + await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.vault.target, this.recipient.address, 0n) + .to.emit(this.vault, 'Transfer') + .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .to.emit(this.vault, 'Withdraw') + .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); }); }); describe('full vault: assets & shares', function () { beforeEach(async function () { // Add 1 token of underlying asset and 100 shares to the vault - await this.token.$_mint(this.vault.address, parseToken(1)); - await this.vault.$_mint(holder, parseShare(100)); + await this.token.$_mint(this.vault, parseToken(1n)); + await this.vault.$_mint(this.holder, parseShare(100n)); }); it('status', async function () { - expect(await this.vault.totalSupply()).to.be.bignumber.equal(parseShare(100)); - expect(await this.vault.totalAssets()).to.be.bignumber.equal(parseToken(1)); + expect(await this.vault.totalSupply()).to.equal(parseShare(100n)); + expect(await this.vault.totalAssets()).to.equal(parseToken(1n)); }); /** @@ -574,35 +476,30 @@ contract('ERC4626', function (accounts) { * Virtual shares & assets captures part of the value */ it('deposit', async function () { - const effectiveAssets = await this.vault.totalAssets().then(x => x.add(virtualAssets)); - const effectiveShares = await this.vault.totalSupply().then(x => x.add(virtualShares)); - - const depositAssets = parseToken(1); - const expectedShares = depositAssets.mul(effectiveShares).div(effectiveAssets); - - expect(await this.vault.maxDeposit(holder)).to.be.bignumber.equal(constants.MAX_UINT256); - expect(await this.vault.previewDeposit(depositAssets)).to.be.bignumber.equal(expectedShares); - - const { tx } = await this.vault.deposit(depositAssets, recipient, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: holder, - to: this.vault.address, - value: depositAssets, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: recipient, - value: expectedShares, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Deposit', { - sender: holder, - owner: recipient, - assets: depositAssets, - shares: expectedShares, - }); + const effectiveAssets = (await this.vault.totalAssets()) + virtualAssets; + const effectiveShares = (await this.vault.totalSupply()) + virtualShares; + + const depositAssets = parseToken(1n); + const expectedShares = (depositAssets * effectiveShares) / effectiveAssets; + + expect(await this.vault.maxDeposit(this.holder)).to.equal(ethers.MaxUint256); + expect(await this.vault.previewDeposit(depositAssets)).to.equal(expectedShares); + + const tx = this.vault.connect(this.holder).deposit(depositAssets, this.recipient); + + await expect(tx).to.changeTokenBalances( + this.token, + [this.holder, this.vault], + [-depositAssets, depositAssets], + ); + await expect(tx).to.changeTokenBalance(this.vault, this.recipient, expectedShares); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.vault.target, depositAssets) + .to.emit(this.vault, 'Transfer') + .withArgs(ethers.ZeroAddress, this.recipient.address, expectedShares) + .to.emit(this.vault, 'Deposit') + .withArgs(this.holder.address, this.recipient.address, depositAssets, expectedShares); }); /** @@ -615,249 +512,216 @@ contract('ERC4626', function (accounts) { * Virtual shares & assets captures part of the value */ it('mint', async function () { - const effectiveAssets = await this.vault.totalAssets().then(x => x.add(virtualAssets)); - const effectiveShares = await this.vault.totalSupply().then(x => x.add(virtualShares)); - - const mintShares = parseShare(1); - const expectedAssets = mintShares.mul(effectiveAssets).div(effectiveShares).addn(1); // add for the rounding - - expect(await this.vault.maxMint(holder)).to.be.bignumber.equal(constants.MAX_UINT256); - expect(await this.vault.previewMint(mintShares)).to.be.bignumber.equal(expectedAssets); - - const { tx } = await this.vault.mint(mintShares, recipient, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: holder, - to: this.vault.address, - value: expectedAssets, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: recipient, - value: mintShares, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Deposit', { - sender: holder, - owner: recipient, - assets: expectedAssets, - shares: mintShares, - }); + const effectiveAssets = (await this.vault.totalAssets()) + virtualAssets; + const effectiveShares = (await this.vault.totalSupply()) + virtualShares; + + const mintShares = parseShare(1n); + const expectedAssets = (mintShares * effectiveAssets) / effectiveShares + 1n; // add for the rounding + + expect(await this.vault.maxMint(this.holder)).to.equal(ethers.MaxUint256); + expect(await this.vault.previewMint(mintShares)).to.equal(expectedAssets); + + const tx = this.vault.connect(this.holder).mint(mintShares, this.recipient); + + await expect(tx).to.changeTokenBalances( + this.token, + [this.holder, this.vault], + [-expectedAssets, expectedAssets], + ); + await expect(tx).to.changeTokenBalance(this.vault, this.recipient, mintShares); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.vault.target, expectedAssets) + .to.emit(this.vault, 'Transfer') + .withArgs(ethers.ZeroAddress, this.recipient.address, mintShares) + .to.emit(this.vault, 'Deposit') + .withArgs(this.holder.address, this.recipient.address, expectedAssets, mintShares); }); it('withdraw', async function () { - const effectiveAssets = await this.vault.totalAssets().then(x => x.add(virtualAssets)); - const effectiveShares = await this.vault.totalSupply().then(x => x.add(virtualShares)); - - const withdrawAssets = parseToken(1); - const expectedShares = withdrawAssets.mul(effectiveShares).div(effectiveAssets).addn(1); // add for the rounding - - expect(await this.vault.maxWithdraw(holder)).to.be.bignumber.equal(withdrawAssets); - expect(await this.vault.previewWithdraw(withdrawAssets)).to.be.bignumber.equal(expectedShares); - - const { tx } = await this.vault.withdraw(withdrawAssets, recipient, holder, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.vault.address, - to: recipient, - value: withdrawAssets, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: holder, - to: constants.ZERO_ADDRESS, - value: expectedShares, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Withdraw', { - sender: holder, - receiver: recipient, - owner: holder, - assets: withdrawAssets, - shares: expectedShares, - }); + const effectiveAssets = (await this.vault.totalAssets()) + virtualAssets; + const effectiveShares = (await this.vault.totalSupply()) + virtualShares; + + const withdrawAssets = parseToken(1n); + const expectedShares = (withdrawAssets * effectiveShares) / effectiveAssets + 1n; // add for the rounding + + expect(await this.vault.maxWithdraw(this.holder)).to.equal(withdrawAssets); + expect(await this.vault.previewWithdraw(withdrawAssets)).to.equal(expectedShares); + + const tx = this.vault.connect(this.holder).withdraw(withdrawAssets, this.recipient, this.holder); + + await expect(tx).to.changeTokenBalances( + this.token, + [this.vault, this.recipient], + [-withdrawAssets, withdrawAssets], + ); + await expect(tx).to.changeTokenBalance(this.vault, this.holder, -expectedShares); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.vault.target, this.recipient.address, withdrawAssets) + .to.emit(this.vault, 'Transfer') + .withArgs(this.holder.address, ethers.ZeroAddress, expectedShares) + .to.emit(this.vault, 'Withdraw') + .withArgs(this.holder.address, this.recipient.address, this.holder.address, withdrawAssets, expectedShares); }); it('withdraw with approval', async function () { - const assets = await this.vault.previewWithdraw(parseToken(1)); - await expectRevertCustomError( - this.vault.withdraw(parseToken(1), recipient, holder, { from: other }), - 'ERC20InsufficientAllowance', - [other, 0, assets], - ); + const assets = await this.vault.previewWithdraw(parseToken(1n)); - await this.vault.withdraw(parseToken(1), recipient, holder, { from: spender }); + await expect(this.vault.connect(this.other).withdraw(parseToken(1n), this.recipient, this.holder)) + .to.be.revertedWithCustomError(this.vault, 'ERC20InsufficientAllowance') + .withArgs(this.other.address, 0n, assets); + + await expect(this.vault.connect(this.spender).withdraw(parseToken(1n), this.recipient, this.holder)).to.not.be + .reverted; }); it('redeem', async function () { - const effectiveAssets = await this.vault.totalAssets().then(x => x.add(virtualAssets)); - const effectiveShares = await this.vault.totalSupply().then(x => x.add(virtualShares)); - - const redeemShares = parseShare(100); - const expectedAssets = redeemShares.mul(effectiveAssets).div(effectiveShares); - - expect(await this.vault.maxRedeem(holder)).to.be.bignumber.equal(redeemShares); - expect(await this.vault.previewRedeem(redeemShares)).to.be.bignumber.equal(expectedAssets); - - const { tx } = await this.vault.redeem(redeemShares, recipient, holder, { from: holder }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.vault.address, - to: recipient, - value: expectedAssets, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: holder, - to: constants.ZERO_ADDRESS, - value: redeemShares, - }); - - await expectEvent.inTransaction(tx, this.vault, 'Withdraw', { - sender: holder, - receiver: recipient, - owner: holder, - assets: expectedAssets, - shares: redeemShares, - }); + const effectiveAssets = (await this.vault.totalAssets()) + virtualAssets; + const effectiveShares = (await this.vault.totalSupply()) + virtualShares; + + const redeemShares = parseShare(100n); + const expectedAssets = (redeemShares * effectiveAssets) / effectiveShares; + + expect(await this.vault.maxRedeem(this.holder)).to.equal(redeemShares); + expect(await this.vault.previewRedeem(redeemShares)).to.equal(expectedAssets); + + const tx = this.vault.connect(this.holder).redeem(redeemShares, this.recipient, this.holder); + + await expect(tx).to.changeTokenBalances( + this.token, + [this.vault, this.recipient], + [-expectedAssets, expectedAssets], + ); + await expect(tx).to.changeTokenBalance(this.vault, this.holder, -redeemShares); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.vault.target, this.recipient.address, expectedAssets) + .to.emit(this.vault, 'Transfer') + .withArgs(this.holder.address, ethers.ZeroAddress, redeemShares) + .to.emit(this.vault, 'Withdraw') + .withArgs(this.holder.address, this.recipient.address, this.holder.address, expectedAssets, redeemShares); }); it('redeem with approval', async function () { - await expectRevertCustomError( - this.vault.redeem(parseShare(100), recipient, holder, { from: other }), - 'ERC20InsufficientAllowance', - [other, 0, parseShare(100)], - ); + await expect(this.vault.connect(this.other).redeem(parseShare(100n), this.recipient, this.holder)) + .to.be.revertedWithCustomError(this.vault, 'ERC20InsufficientAllowance') + .withArgs(this.other.address, 0n, parseShare(100n)); - await this.vault.redeem(parseShare(100), recipient, holder, { from: spender }); + await expect(this.vault.connect(this.spender).redeem(parseShare(100n), this.recipient, this.holder)).to.not.be + .reverted; }); }); }); } describe('ERC4626Fees', function () { - const feeBasisPoints = web3.utils.toBN(5e3); - const valueWithoutFees = web3.utils.toBN(10000); - const fees = valueWithoutFees.mul(feeBasisPoints).divn(1e4); - const valueWithFees = valueWithoutFees.add(fees); + const feeBasisPoints = 500n; // 5% + const valueWithoutFees = 10_000n; + const fees = (valueWithoutFees * feeBasisPoints) / 10_000n; + const valueWithFees = valueWithoutFees + fees; describe('input fees', function () { beforeEach(async function () { - this.token = await ERC20Decimals.new(name, symbol, 18); - this.vault = await ERC4626FeesMock.new( - name + ' Vault', - symbol + 'V', - this.token.address, + const token = await ethers.deployContract('$ERC20DecimalsMock', [name, symbol, 18n]); + const vault = await ethers.deployContract('$ERC4626FeesMock', [ + '', + '', + token, feeBasisPoints, - other, - 0, - constants.ZERO_ADDRESS, - ); + this.other, + 0n, + ethers.ZeroAddress, + ]); - await this.token.$_mint(holder, constants.MAX_INT256); - await this.token.approve(this.vault.address, constants.MAX_INT256, { from: holder }); + await token.$_mint(this.holder, ethers.MaxUint256 / 2n); + await token.$_approve(this.holder, vault, ethers.MaxUint256 / 2n); + + Object.assign(this, { token, vault }); }); it('deposit', async function () { - expect(await this.vault.previewDeposit(valueWithFees)).to.be.bignumber.equal(valueWithoutFees); - ({ tx: this.tx } = await this.vault.deposit(valueWithFees, recipient, { from: holder })); + expect(await this.vault.previewDeposit(valueWithFees)).to.equal(valueWithoutFees); + this.tx = this.vault.connect(this.holder).deposit(valueWithFees, this.recipient); }); it('mint', async function () { - expect(await this.vault.previewMint(valueWithoutFees)).to.be.bignumber.equal(valueWithFees); - ({ tx: this.tx } = await this.vault.mint(valueWithoutFees, recipient, { from: holder })); + expect(await this.vault.previewMint(valueWithoutFees)).to.equal(valueWithFees); + this.tx = this.vault.connect(this.holder).mint(valueWithoutFees, this.recipient); }); afterEach(async function () { - // get total - await expectEvent.inTransaction(this.tx, this.token, 'Transfer', { - from: holder, - to: this.vault.address, - value: valueWithFees, - }); - - // redirect fees - await expectEvent.inTransaction(this.tx, this.token, 'Transfer', { - from: this.vault.address, - to: other, - value: fees, - }); - - // mint shares - await expectEvent.inTransaction(this.tx, this.vault, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: recipient, - value: valueWithoutFees, - }); - - // deposit event - await expectEvent.inTransaction(this.tx, this.vault, 'Deposit', { - sender: holder, - owner: recipient, - assets: valueWithFees, - shares: valueWithoutFees, - }); + await expect(this.tx).to.changeTokenBalances( + this.token, + [this.holder, this.vault, this.other], + [-valueWithFees, valueWithoutFees, fees], + ); + await expect(this.tx).to.changeTokenBalance(this.vault, this.recipient, valueWithoutFees); + await expect(this.tx) + // get total + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.vault.target, valueWithFees) + // redirect fees + .to.emit(this.token, 'Transfer') + .withArgs(this.vault.target, this.other.address, fees) + // mint shares + .to.emit(this.vault, 'Transfer') + .withArgs(ethers.ZeroAddress, this.recipient.address, valueWithoutFees) + // deposit event + .to.emit(this.vault, 'Deposit') + .withArgs(this.holder.address, this.recipient.address, valueWithFees, valueWithoutFees); }); }); describe('output fees', function () { beforeEach(async function () { - this.token = await ERC20Decimals.new(name, symbol, 18); - this.vault = await ERC4626FeesMock.new( - name + ' Vault', - symbol + 'V', - this.token.address, - 0, - constants.ZERO_ADDRESS, - 5e3, // 5% - other, - ); + const token = await ethers.deployContract('$ERC20DecimalsMock', [name, symbol, 18n]); + const vault = await ethers.deployContract('$ERC4626FeesMock', [ + '', + '', + token, + 0n, + ethers.ZeroAddress, + feeBasisPoints, + this.other, + ]); - await this.token.$_mint(this.vault.address, constants.MAX_INT256); - await this.vault.$_mint(holder, constants.MAX_INT256); + await token.$_mint(vault, ethers.MaxUint256 / 2n); + await vault.$_mint(this.holder, ethers.MaxUint256 / 2n); + + Object.assign(this, { token, vault }); }); it('redeem', async function () { - expect(await this.vault.previewRedeem(valueWithFees)).to.be.bignumber.equal(valueWithoutFees); - ({ tx: this.tx } = await this.vault.redeem(valueWithFees, recipient, holder, { from: holder })); + expect(await this.vault.previewRedeem(valueWithFees)).to.equal(valueWithoutFees); + this.tx = this.vault.connect(this.holder).redeem(valueWithFees, this.recipient, this.holder); }); it('withdraw', async function () { - expect(await this.vault.previewWithdraw(valueWithoutFees)).to.be.bignumber.equal(valueWithFees); - ({ tx: this.tx } = await this.vault.withdraw(valueWithoutFees, recipient, holder, { from: holder })); + expect(await this.vault.previewWithdraw(valueWithoutFees)).to.equal(valueWithFees); + this.tx = this.vault.connect(this.holder).withdraw(valueWithoutFees, this.recipient, this.holder); }); afterEach(async function () { - // withdraw principal - await expectEvent.inTransaction(this.tx, this.token, 'Transfer', { - from: this.vault.address, - to: recipient, - value: valueWithoutFees, - }); - - // redirect fees - await expectEvent.inTransaction(this.tx, this.token, 'Transfer', { - from: this.vault.address, - to: other, - value: fees, - }); - - // mint shares - await expectEvent.inTransaction(this.tx, this.vault, 'Transfer', { - from: holder, - to: constants.ZERO_ADDRESS, - value: valueWithFees, - }); - - // withdraw event - await expectEvent.inTransaction(this.tx, this.vault, 'Withdraw', { - sender: holder, - receiver: recipient, - owner: holder, - assets: valueWithoutFees, - shares: valueWithFees, - }); + await expect(this.tx).to.changeTokenBalances( + this.token, + [this.vault, this.recipient, this.other], + [-valueWithFees, valueWithoutFees, fees], + ); + await expect(this.tx).to.changeTokenBalance(this.vault, this.holder, -valueWithFees); + await expect(this.tx) + // withdraw principal + .to.emit(this.token, 'Transfer') + .withArgs(this.vault.target, this.recipient.address, valueWithoutFees) + // redirect fees + .to.emit(this.token, 'Transfer') + .withArgs(this.vault.target, this.other.address, fees) + // mint shares + .to.emit(this.vault, 'Transfer') + .withArgs(this.holder.address, ethers.ZeroAddress, valueWithFees) + // withdraw event + .to.emit(this.vault, 'Withdraw') + .withArgs(this.holder.address, this.recipient.address, this.holder.address, valueWithoutFees, valueWithFees); }); }); }); @@ -866,244 +730,161 @@ contract('ERC4626', function (accounts) { /// https://github.com/transmissions11/solmate/blob/main/src/test/ERC4626.t.sol it('multiple mint, deposit, redeem & withdrawal', async function () { // test designed with both asset using similar decimals - this.token = await ERC20Decimals.new(name, symbol, 18); - this.vault = await ERC4626.new(name + ' Vault', symbol + 'V', this.token.address); + const [alice, bruce] = this.accounts; + const token = await ethers.deployContract('$ERC20DecimalsMock', [name, symbol, 18n]); + const vault = await ethers.deployContract('$ERC4626', ['', '', token]); - await this.token.$_mint(user1, 4000); - await this.token.$_mint(user2, 7001); - await this.token.approve(this.vault.address, 4000, { from: user1 }); - await this.token.approve(this.vault.address, 7001, { from: user2 }); + await token.$_mint(alice, 4000n); + await token.$_mint(bruce, 7001n); + await token.connect(alice).approve(vault, 4000n); + await token.connect(bruce).approve(vault, 7001n); // 1. Alice mints 2000 shares (costs 2000 tokens) - { - const { tx } = await this.vault.mint(2000, user1, { from: user1 }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: user1, - to: this.vault.address, - value: '2000', - }); - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: user1, - value: '2000', - }); - - expect(await this.vault.previewDeposit(2000)).to.be.bignumber.equal('2000'); - expect(await this.vault.balanceOf(user1)).to.be.bignumber.equal('2000'); - expect(await this.vault.balanceOf(user2)).to.be.bignumber.equal('0'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user1))).to.be.bignumber.equal('2000'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user2))).to.be.bignumber.equal('0'); - expect(await this.vault.convertToShares(await this.token.balanceOf(this.vault.address))).to.be.bignumber.equal( - '2000', - ); - expect(await this.vault.totalSupply()).to.be.bignumber.equal('2000'); - expect(await this.vault.totalAssets()).to.be.bignumber.equal('2000'); - } - - // 2. Bob deposits 4000 tokens (mints 4000 shares) - { - const { tx } = await this.vault.mint(4000, user2, { from: user2 }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: user2, - to: this.vault.address, - value: '4000', - }); - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: user2, - value: '4000', - }); - - expect(await this.vault.previewDeposit(4000)).to.be.bignumber.equal('4000'); - expect(await this.vault.balanceOf(user1)).to.be.bignumber.equal('2000'); - expect(await this.vault.balanceOf(user2)).to.be.bignumber.equal('4000'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user1))).to.be.bignumber.equal('2000'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user2))).to.be.bignumber.equal('4000'); - expect(await this.vault.convertToShares(await this.token.balanceOf(this.vault.address))).to.be.bignumber.equal( - '6000', - ); - expect(await this.vault.totalSupply()).to.be.bignumber.equal('6000'); - expect(await this.vault.totalAssets()).to.be.bignumber.equal('6000'); - } + await expect(vault.connect(alice).mint(2000n, alice)) + .to.emit(token, 'Transfer') + .withArgs(alice.address, vault.target, 2000n) + .to.emit(vault, 'Transfer') + .withArgs(ethers.ZeroAddress, alice.address, 2000n); + + expect(await vault.previewDeposit(2000n)).to.equal(2000n); + expect(await vault.balanceOf(alice)).to.equal(2000n); + expect(await vault.balanceOf(bruce)).to.equal(0n); + expect(await vault.convertToAssets(await vault.balanceOf(alice))).to.equal(2000n); + expect(await vault.convertToAssets(await vault.balanceOf(bruce))).to.equal(0n); + expect(await vault.convertToShares(await token.balanceOf(vault))).to.equal(2000n); + expect(await vault.totalSupply()).to.equal(2000n); + expect(await vault.totalAssets()).to.equal(2000n); + + // 2. Bruce deposits 4000 tokens (mints 4000 shares) + await expect(vault.connect(bruce).mint(4000n, bruce)) + .to.emit(token, 'Transfer') + .withArgs(bruce.address, vault.target, 4000n) + .to.emit(vault, 'Transfer') + .withArgs(ethers.ZeroAddress, bruce.address, 4000n); + + expect(await vault.previewDeposit(4000n)).to.equal(4000n); + expect(await vault.balanceOf(alice)).to.equal(2000n); + expect(await vault.balanceOf(bruce)).to.equal(4000n); + expect(await vault.convertToAssets(await vault.balanceOf(alice))).to.equal(2000n); + expect(await vault.convertToAssets(await vault.balanceOf(bruce))).to.equal(4000n); + expect(await vault.convertToShares(await token.balanceOf(vault))).to.equal(6000n); + expect(await vault.totalSupply()).to.equal(6000n); + expect(await vault.totalAssets()).to.equal(6000n); // 3. Vault mutates by +3000 tokens (simulated yield returned from strategy) - await this.token.$_mint(this.vault.address, 3000); - - expect(await this.vault.balanceOf(user1)).to.be.bignumber.equal('2000'); - expect(await this.vault.balanceOf(user2)).to.be.bignumber.equal('4000'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user1))).to.be.bignumber.equal('2999'); // used to be 3000, but virtual assets/shares captures part of the yield - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user2))).to.be.bignumber.equal('5999'); // used to be 6000, but virtual assets/shares captures part of the yield - expect(await this.vault.convertToShares(await this.token.balanceOf(this.vault.address))).to.be.bignumber.equal( - '6000', - ); - expect(await this.vault.totalSupply()).to.be.bignumber.equal('6000'); - expect(await this.vault.totalAssets()).to.be.bignumber.equal('9000'); + await token.$_mint(vault, 3000n); - // 4. Alice deposits 2000 tokens (mints 1333 shares) - { - const { tx } = await this.vault.deposit(2000, user1, { from: user1 }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: user1, - to: this.vault.address, - value: '2000', - }); - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: user1, - value: '1333', - }); + expect(await vault.balanceOf(alice)).to.equal(2000n); + expect(await vault.balanceOf(bruce)).to.equal(4000n); + expect(await vault.convertToAssets(await vault.balanceOf(alice))).to.equal(2999n); // used to be 3000, but virtual assets/shares captures part of the yield + expect(await vault.convertToAssets(await vault.balanceOf(bruce))).to.equal(5999n); // used to be 6000, but virtual assets/shares captures part of the yield + expect(await vault.convertToShares(await token.balanceOf(vault))).to.equal(6000n); + expect(await vault.totalSupply()).to.equal(6000n); + expect(await vault.totalAssets()).to.equal(9000n); - expect(await this.vault.balanceOf(user1)).to.be.bignumber.equal('3333'); - expect(await this.vault.balanceOf(user2)).to.be.bignumber.equal('4000'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user1))).to.be.bignumber.equal('4999'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user2))).to.be.bignumber.equal('6000'); - expect(await this.vault.convertToShares(await this.token.balanceOf(this.vault.address))).to.be.bignumber.equal( - '7333', - ); - expect(await this.vault.totalSupply()).to.be.bignumber.equal('7333'); - expect(await this.vault.totalAssets()).to.be.bignumber.equal('11000'); - } - - // 5. Bob mints 2000 shares (costs 3001 assets) - // NOTE: Bob's assets spent got rounded towards infinity + // 4. Alice deposits 2000 tokens (mints 1333 shares) + await expect(vault.connect(alice).deposit(2000n, alice)) + .to.emit(token, 'Transfer') + .withArgs(alice.address, vault.target, 2000n) + .to.emit(vault, 'Transfer') + .withArgs(ethers.ZeroAddress, alice.address, 1333n); + + expect(await vault.balanceOf(alice)).to.equal(3333n); + expect(await vault.balanceOf(bruce)).to.equal(4000n); + expect(await vault.convertToAssets(await vault.balanceOf(alice))).to.equal(4999n); + expect(await vault.convertToAssets(await vault.balanceOf(bruce))).to.equal(6000n); + expect(await vault.convertToShares(await token.balanceOf(vault))).to.equal(7333n); + expect(await vault.totalSupply()).to.equal(7333n); + expect(await vault.totalAssets()).to.equal(11000n); + + // 5. Bruce mints 2000 shares (costs 3001 assets) + // NOTE: Bruce's assets spent got rounded towards infinity // NOTE: Alices's vault assets got rounded towards infinity - { - const { tx } = await this.vault.mint(2000, user2, { from: user2 }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: user2, - to: this.vault.address, - value: '3000', // used to be 3001 - }); - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: user2, - value: '2000', - }); - - expect(await this.vault.balanceOf(user1)).to.be.bignumber.equal('3333'); - expect(await this.vault.balanceOf(user2)).to.be.bignumber.equal('6000'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user1))).to.be.bignumber.equal('4999'); // used to be 5000 - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user2))).to.be.bignumber.equal('9000'); - expect(await this.vault.convertToShares(await this.token.balanceOf(this.vault.address))).to.be.bignumber.equal( - '9333', - ); - expect(await this.vault.totalSupply()).to.be.bignumber.equal('9333'); - expect(await this.vault.totalAssets()).to.be.bignumber.equal('14000'); // used to be 14001 - } + await expect(vault.connect(bruce).mint(2000n, bruce)) + .to.emit(token, 'Transfer') + .withArgs(bruce.address, vault.target, 3000n) + .to.emit(vault, 'Transfer') + .withArgs(ethers.ZeroAddress, bruce.address, 2000n); + + expect(await vault.balanceOf(alice)).to.equal(3333n); + expect(await vault.balanceOf(bruce)).to.equal(6000n); + expect(await vault.convertToAssets(await vault.balanceOf(alice))).to.equal(4999n); // used to be 5000 + expect(await vault.convertToAssets(await vault.balanceOf(bruce))).to.equal(9000n); + expect(await vault.convertToShares(await token.balanceOf(vault))).to.equal(9333n); + expect(await vault.totalSupply()).to.equal(9333n); + expect(await vault.totalAssets()).to.equal(14000n); // used to be 14001 // 6. Vault mutates by +3000 tokens // NOTE: Vault holds 17001 tokens, but sum of assetsOf() is 17000. - await this.token.$_mint(this.vault.address, 3000); - - expect(await this.vault.balanceOf(user1)).to.be.bignumber.equal('3333'); - expect(await this.vault.balanceOf(user2)).to.be.bignumber.equal('6000'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user1))).to.be.bignumber.equal('6070'); // used to be 6071 - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user2))).to.be.bignumber.equal('10928'); // used to be 10929 - expect(await this.vault.convertToShares(await this.token.balanceOf(this.vault.address))).to.be.bignumber.equal( - '9333', - ); - expect(await this.vault.totalSupply()).to.be.bignumber.equal('9333'); - expect(await this.vault.totalAssets()).to.be.bignumber.equal('17000'); // used to be 17001 + await token.$_mint(vault, 3000n); - // 7. Alice redeem 1333 shares (2428 assets) - { - const { tx } = await this.vault.redeem(1333, user1, user1, { from: user1 }); - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: user1, - to: constants.ZERO_ADDRESS, - value: '1333', - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.vault.address, - to: user1, - value: '2427', // used to be 2428 - }); - - expect(await this.vault.balanceOf(user1)).to.be.bignumber.equal('2000'); - expect(await this.vault.balanceOf(user2)).to.be.bignumber.equal('6000'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user1))).to.be.bignumber.equal('3643'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user2))).to.be.bignumber.equal('10929'); - expect(await this.vault.convertToShares(await this.token.balanceOf(this.vault.address))).to.be.bignumber.equal( - '8000', - ); - expect(await this.vault.totalSupply()).to.be.bignumber.equal('8000'); - expect(await this.vault.totalAssets()).to.be.bignumber.equal('14573'); - } - - // 8. Bob withdraws 2929 assets (1608 shares) - { - const { tx } = await this.vault.withdraw(2929, user2, user2, { from: user2 }); - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: user2, - to: constants.ZERO_ADDRESS, - value: '1608', - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.vault.address, - to: user2, - value: '2929', - }); + expect(await vault.balanceOf(alice)).to.equal(3333n); + expect(await vault.balanceOf(bruce)).to.equal(6000n); + expect(await vault.convertToAssets(await vault.balanceOf(alice))).to.equal(6070n); // used to be 6071 + expect(await vault.convertToAssets(await vault.balanceOf(bruce))).to.equal(10928n); // used to be 10929 + expect(await vault.convertToShares(await token.balanceOf(vault))).to.equal(9333n); + expect(await vault.totalSupply()).to.equal(9333n); + expect(await vault.totalAssets()).to.equal(17000n); // used to be 17001 - expect(await this.vault.balanceOf(user1)).to.be.bignumber.equal('2000'); - expect(await this.vault.balanceOf(user2)).to.be.bignumber.equal('4392'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user1))).to.be.bignumber.equal('3643'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user2))).to.be.bignumber.equal('8000'); - expect(await this.vault.convertToShares(await this.token.balanceOf(this.vault.address))).to.be.bignumber.equal( - '6392', - ); - expect(await this.vault.totalSupply()).to.be.bignumber.equal('6392'); - expect(await this.vault.totalAssets()).to.be.bignumber.equal('11644'); - } + // 7. Alice redeem 1333 shares (2428 assets) + await expect(vault.connect(alice).redeem(1333n, alice, alice)) + .to.emit(vault, 'Transfer') + .withArgs(alice.address, ethers.ZeroAddress, 1333n) + .to.emit(token, 'Transfer') + .withArgs(vault.target, alice.address, 2427n); // used to be 2428 + + expect(await vault.balanceOf(alice)).to.equal(2000n); + expect(await vault.balanceOf(bruce)).to.equal(6000n); + expect(await vault.convertToAssets(await vault.balanceOf(alice))).to.equal(3643n); + expect(await vault.convertToAssets(await vault.balanceOf(bruce))).to.equal(10929n); + expect(await vault.convertToShares(await token.balanceOf(vault))).to.equal(8000n); + expect(await vault.totalSupply()).to.equal(8000n); + expect(await vault.totalAssets()).to.equal(14573n); + + // 8. Bruce withdraws 2929 assets (1608 shares) + await expect(vault.connect(bruce).withdraw(2929n, bruce, bruce)) + .to.emit(vault, 'Transfer') + .withArgs(bruce.address, ethers.ZeroAddress, 1608n) + .to.emit(token, 'Transfer') + .withArgs(vault.target, bruce.address, 2929n); + + expect(await vault.balanceOf(alice)).to.equal(2000n); + expect(await vault.balanceOf(bruce)).to.equal(4392n); + expect(await vault.convertToAssets(await vault.balanceOf(alice))).to.equal(3643n); + expect(await vault.convertToAssets(await vault.balanceOf(bruce))).to.equal(8000n); + expect(await vault.convertToShares(await token.balanceOf(vault))).to.equal(6392n); + expect(await vault.totalSupply()).to.equal(6392n); + expect(await vault.totalAssets()).to.equal(11644n); // 9. Alice withdraws 3643 assets (2000 shares) - // NOTE: Bob's assets have been rounded back towards infinity - { - const { tx } = await this.vault.withdraw(3643, user1, user1, { from: user1 }); - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: user1, - to: constants.ZERO_ADDRESS, - value: '2000', - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.vault.address, - to: user1, - value: '3643', - }); - - expect(await this.vault.balanceOf(user1)).to.be.bignumber.equal('0'); - expect(await this.vault.balanceOf(user2)).to.be.bignumber.equal('4392'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user1))).to.be.bignumber.equal('0'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user2))).to.be.bignumber.equal('8000'); // used to be 8001 - expect(await this.vault.convertToShares(await this.token.balanceOf(this.vault.address))).to.be.bignumber.equal( - '4392', - ); - expect(await this.vault.totalSupply()).to.be.bignumber.equal('4392'); - expect(await this.vault.totalAssets()).to.be.bignumber.equal('8001'); - } - - // 10. Bob redeem 4392 shares (8001 tokens) - { - const { tx } = await this.vault.redeem(4392, user2, user2, { from: user2 }); - await expectEvent.inTransaction(tx, this.vault, 'Transfer', { - from: user2, - to: constants.ZERO_ADDRESS, - value: '4392', - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.vault.address, - to: user2, - value: '8000', // used to be 8001 - }); - - expect(await this.vault.balanceOf(user1)).to.be.bignumber.equal('0'); - expect(await this.vault.balanceOf(user2)).to.be.bignumber.equal('0'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user1))).to.be.bignumber.equal('0'); - expect(await this.vault.convertToAssets(await this.vault.balanceOf(user2))).to.be.bignumber.equal('0'); - expect(await this.vault.convertToShares(await this.token.balanceOf(this.vault.address))).to.be.bignumber.equal( - '0', - ); - expect(await this.vault.totalSupply()).to.be.bignumber.equal('0'); - expect(await this.vault.totalAssets()).to.be.bignumber.equal('1'); // used to be 0 - } + // NOTE: Bruce's assets have been rounded back towards infinity + await expect(vault.connect(alice).withdraw(3643n, alice, alice)) + .to.emit(vault, 'Transfer') + .withArgs(alice.address, ethers.ZeroAddress, 2000n) + .to.emit(token, 'Transfer') + .withArgs(vault.target, alice.address, 3643n); + + expect(await vault.balanceOf(alice)).to.equal(0n); + expect(await vault.balanceOf(bruce)).to.equal(4392n); + expect(await vault.convertToAssets(await vault.balanceOf(alice))).to.equal(0n); + expect(await vault.convertToAssets(await vault.balanceOf(bruce))).to.equal(8000n); // used to be 8001 + expect(await vault.convertToShares(await token.balanceOf(vault))).to.equal(4392n); + expect(await vault.totalSupply()).to.equal(4392n); + expect(await vault.totalAssets()).to.equal(8001n); + + // 10. Bruce redeem 4392 shares (8001 tokens) + await expect(vault.connect(bruce).redeem(4392n, bruce, bruce)) + .to.emit(vault, 'Transfer') + .withArgs(bruce.address, ethers.ZeroAddress, 4392n) + .to.emit(token, 'Transfer') + .withArgs(vault.target, bruce.address, 8000n); // used to be 8001 + + expect(await vault.balanceOf(alice)).to.equal(0n); + expect(await vault.balanceOf(bruce)).to.equal(0n); + expect(await vault.convertToAssets(await vault.balanceOf(alice))).to.equal(0n); + expect(await vault.convertToAssets(await vault.balanceOf(bruce))).to.equal(0n); + expect(await vault.convertToShares(await token.balanceOf(vault))).to.equal(0n); + expect(await vault.totalSupply()).to.equal(0n); + expect(await vault.totalAssets()).to.equal(1n); // used to be 0 }); }); diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js index 2b88f5f8e..03a5b7cca 100644 --- a/test/utils/cryptography/EIP712.test.js +++ b/test/utils/cryptography/EIP712.test.js @@ -3,6 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { getDomain, domainSeparator, hashTypedData } = require('../../helpers/eip712'); +const { formatType } = require('../../helpers/eip712-types'); const { getChainId } = require('../../helpers/chainid'); const LENGTHS = { @@ -77,10 +78,10 @@ describe('EIP712', function () { it('digest', async function () { const types = { - Mail: [ - { name: 'to', type: 'address' }, - { name: 'contents', type: 'string' }, - ], + Mail: formatType({ + to: 'address', + contents: 'string', + }), }; const message = { From 88211e8fbad2e690e62c0dbfc4b14b2d2b6ab566 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 14 Dec 2023 10:07:55 +0100 Subject: [PATCH 137/167] Migrate ERC721 tests (#4793) Co-authored-by: ernestognw --- test/token/ERC721/ERC721.behavior.js | 850 +++++++++--------- test/token/ERC721/ERC721.test.js | 22 +- test/token/ERC721/ERC721Enumerable.test.js | 24 +- .../ERC721/extensions/ERC721Burnable.test.js | 79 +- .../extensions/ERC721Consecutive.test.js | 252 +++--- .../ERC721/extensions/ERC721Pausable.test.js | 75 +- .../ERC721/extensions/ERC721Royalty.test.js | 60 +- .../extensions/ERC721URIStorage.test.js | 105 ++- .../ERC721/extensions/ERC721Wrapper.test.js | 324 +++---- test/token/ERC721/utils/ERC721Holder.test.js | 24 +- test/token/common/ERC2981.behavior.js | 163 ++-- 11 files changed, 955 insertions(+), 1023 deletions(-) diff --git a/test/token/ERC721/ERC721.behavior.js b/test/token/ERC721/ERC721.behavior.js index 10f848265..32d67d90d 100644 --- a/test/token/ERC721/ERC721.behavior.js +++ b/test/token/ERC721/ERC721.behavior.js @@ -1,68 +1,76 @@ -const { BN, constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { ZERO_ADDRESS } = constants; +const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); +const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { shouldSupportInterfaces } = require('../../utils/introspection/SupportsInterface.behavior'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const { Enum } = require('../../helpers/enums'); - -const ERC721ReceiverMock = artifacts.require('ERC721ReceiverMock'); -const NonERC721ReceiverMock = artifacts.require('CallReceiverMock'); +const { + bigint: { Enum }, +} = require('../../helpers/enums'); const RevertType = Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'); -const firstTokenId = new BN('5042'); -const secondTokenId = new BN('79217'); -const nonExistentTokenId = new BN('13'); -const fourthTokenId = new BN(4); +const firstTokenId = 5042n; +const secondTokenId = 79217n; +const nonExistentTokenId = 13n; +const fourthTokenId = 4n; const baseURI = 'https://api.example.com/v1/'; const RECEIVER_MAGIC_VALUE = '0x150b7a02'; -function shouldBehaveLikeERC721(owner, newOwner, approved, anotherApproved, operator, other) { +function shouldBehaveLikeERC721() { + beforeEach(async function () { + const [owner, newOwner, approved, operator, other] = this.accounts; + Object.assign(this, { owner, newOwner, approved, operator, other }); + }); + shouldSupportInterfaces(['ERC165', 'ERC721']); - context('with minted tokens', function () { + describe('with minted tokens', function () { beforeEach(async function () { - await this.token.$_mint(owner, firstTokenId); - await this.token.$_mint(owner, secondTokenId); - this.toWhom = other; // default to other for toWhom in context-dependent tests + await this.token.$_mint(this.owner, firstTokenId); + await this.token.$_mint(this.owner, secondTokenId); + this.to = this.other; }); describe('balanceOf', function () { - context('when the given address owns some tokens', function () { + describe('when the given address owns some tokens', function () { it('returns the amount of tokens owned by the given address', async function () { - expect(await this.token.balanceOf(owner)).to.be.bignumber.equal('2'); + expect(await this.token.balanceOf(this.owner)).to.equal(2n); }); }); - context('when the given address does not own any tokens', function () { + describe('when the given address does not own any tokens', function () { it('returns 0', async function () { - expect(await this.token.balanceOf(other)).to.be.bignumber.equal('0'); + expect(await this.token.balanceOf(this.other)).to.equal(0n); }); }); - context('when querying the zero address', function () { + describe('when querying the zero address', function () { it('throws', async function () { - await expectRevertCustomError(this.token.balanceOf(ZERO_ADDRESS), 'ERC721InvalidOwner', [ZERO_ADDRESS]); + await expect(this.token.balanceOf(ethers.ZeroAddress)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidOwner') + .withArgs(ethers.ZeroAddress); }); }); }); describe('ownerOf', function () { - context('when the given token ID was tracked by this token', function () { + describe('when the given token ID was tracked by this token', function () { const tokenId = firstTokenId; it('returns the owner of the given token ID', async function () { - expect(await this.token.ownerOf(tokenId)).to.be.equal(owner); + expect(await this.token.ownerOf(tokenId)).to.equal(this.owner.address); }); }); - context('when the given token ID was not tracked by this token', function () { + describe('when the given token ID was not tracked by this token', function () { const tokenId = nonExistentTokenId; it('reverts', async function () { - await expectRevertCustomError(this.token.ownerOf(tokenId), 'ERC721NonexistentToken', [tokenId]); + await expect(this.token.ownerOf(tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(tokenId); }); }); }); @@ -71,194 +79,204 @@ function shouldBehaveLikeERC721(owner, newOwner, approved, anotherApproved, oper const tokenId = firstTokenId; const data = '0x42'; - let receipt = null; - beforeEach(async function () { - await this.token.approve(approved, tokenId, { from: owner }); - await this.token.setApprovalForAll(operator, true, { from: owner }); + await this.token.connect(this.owner).approve(this.approved, tokenId); + await this.token.connect(this.owner).setApprovalForAll(this.operator, true); }); - const transferWasSuccessful = function ({ owner, tokenId }) { + const transferWasSuccessful = () => { it('transfers the ownership of the given token ID to the given address', async function () { - expect(await this.token.ownerOf(tokenId)).to.be.equal(this.toWhom); + await this.tx(); + expect(await this.token.ownerOf(tokenId)).to.equal(this.to.address ?? this.to.target); }); it('emits a Transfer event', async function () { - expectEvent(receipt, 'Transfer', { from: owner, to: this.toWhom, tokenId: tokenId }); + await expect(this.tx()) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, this.to.address ?? this.to.target, tokenId); }); it('clears the approval for the token ID with no event', async function () { - expect(await this.token.getApproved(tokenId)).to.be.equal(ZERO_ADDRESS); - expectEvent.notEmitted(receipt, 'Approval'); + await expect(this.tx()).to.not.emit(this.token, 'Approval'); + + expect(await this.token.getApproved(tokenId)).to.equal(ethers.ZeroAddress); }); it('adjusts owners balances', async function () { - expect(await this.token.balanceOf(owner)).to.be.bignumber.equal('1'); + const balanceBefore = await this.token.balanceOf(this.owner); + await this.tx(); + expect(await this.token.balanceOf(this.owner)).to.equal(balanceBefore - 1n); }); it('adjusts owners tokens by index', async function () { if (!this.token.tokenOfOwnerByIndex) return; - expect(await this.token.tokenOfOwnerByIndex(this.toWhom, 0)).to.be.bignumber.equal(tokenId); - - expect(await this.token.tokenOfOwnerByIndex(owner, 0)).to.be.bignumber.not.equal(tokenId); + await this.tx(); + expect(await this.token.tokenOfOwnerByIndex(this.to, 0n)).to.equal(tokenId); + expect(await this.token.tokenOfOwnerByIndex(this.owner, 0n)).to.not.equal(tokenId); }); }; - const shouldTransferTokensByUsers = function (transferFunction, opts = {}) { - context('when called by the owner', function () { + const shouldTransferTokensByUsers = function (fragment, opts = {}) { + describe('when called by the owner', function () { beforeEach(async function () { - receipt = await transferFunction.call(this, owner, this.toWhom, tokenId, { from: owner }); + this.tx = () => + this.token.connect(this.owner)[fragment](this.owner, this.to, tokenId, ...(opts.extra ?? [])); }); - transferWasSuccessful({ owner, tokenId, approved }); + transferWasSuccessful(); }); - context('when called by the approved individual', function () { + describe('when called by the approved individual', function () { beforeEach(async function () { - receipt = await transferFunction.call(this, owner, this.toWhom, tokenId, { from: approved }); + this.tx = () => + this.token.connect(this.approved)[fragment](this.owner, this.to, tokenId, ...(opts.extra ?? [])); }); - transferWasSuccessful({ owner, tokenId, approved }); + transferWasSuccessful(); }); - context('when called by the operator', function () { + describe('when called by the operator', function () { beforeEach(async function () { - receipt = await transferFunction.call(this, owner, this.toWhom, tokenId, { from: operator }); + this.tx = () => + this.token.connect(this.operator)[fragment](this.owner, this.to, tokenId, ...(opts.extra ?? [])); }); - transferWasSuccessful({ owner, tokenId, approved }); + transferWasSuccessful(); }); - context('when called by the owner without an approved user', function () { + describe('when called by the owner without an approved user', function () { beforeEach(async function () { - await this.token.approve(ZERO_ADDRESS, tokenId, { from: owner }); - receipt = await transferFunction.call(this, owner, this.toWhom, tokenId, { from: operator }); + await this.token.connect(this.owner).approve(ethers.ZeroAddress, tokenId); + this.tx = () => + this.token.connect(this.operator)[fragment](this.owner, this.to, tokenId, ...(opts.extra ?? [])); }); - transferWasSuccessful({ owner, tokenId, approved: null }); + transferWasSuccessful(); }); - context('when sent to the owner', function () { + describe('when sent to the owner', function () { beforeEach(async function () { - receipt = await transferFunction.call(this, owner, owner, tokenId, { from: owner }); + this.tx = () => + this.token.connect(this.owner)[fragment](this.owner, this.owner, tokenId, ...(opts.extra ?? [])); }); it('keeps ownership of the token', async function () { - expect(await this.token.ownerOf(tokenId)).to.be.equal(owner); + await this.tx(); + expect(await this.token.ownerOf(tokenId)).to.equal(this.owner.address); }); it('clears the approval for the token ID', async function () { - expect(await this.token.getApproved(tokenId)).to.be.equal(ZERO_ADDRESS); + await this.tx(); + expect(await this.token.getApproved(tokenId)).to.equal(ethers.ZeroAddress); }); it('emits only a transfer event', async function () { - expectEvent(receipt, 'Transfer', { - from: owner, - to: owner, - tokenId: tokenId, - }); + await expect(this.tx()) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, this.owner.address, tokenId); }); it('keeps the owner balance', async function () { - expect(await this.token.balanceOf(owner)).to.be.bignumber.equal('2'); + const balanceBefore = await this.token.balanceOf(this.owner); + await this.tx(); + expect(await this.token.balanceOf(this.owner)).to.equal(balanceBefore); }); it('keeps same tokens by index', async function () { if (!this.token.tokenOfOwnerByIndex) return; - const tokensListed = await Promise.all([0, 1].map(i => this.token.tokenOfOwnerByIndex(owner, i))); - expect(tokensListed.map(t => t.toNumber())).to.have.members([ - firstTokenId.toNumber(), - secondTokenId.toNumber(), - ]); + + expect(await Promise.all([0n, 1n].map(i => this.token.tokenOfOwnerByIndex(this.owner, i)))).to.have.members( + [firstTokenId, secondTokenId], + ); }); }); - context('when the address of the previous owner is incorrect', function () { + describe('when the address of the previous owner is incorrect', function () { it('reverts', async function () { - await expectRevertCustomError( - transferFunction.call(this, other, other, tokenId, { from: owner }), - 'ERC721IncorrectOwner', - [other, tokenId, owner], - ); + await expect( + this.token.connect(this.owner)[fragment](this.other, this.other, tokenId, ...(opts.extra ?? [])), + ) + .to.be.revertedWithCustomError(this.token, 'ERC721IncorrectOwner') + .withArgs(this.other.address, tokenId, this.owner.address); }); }); - context('when the sender is not authorized for the token id', function () { + describe('when the sender is not authorized for the token id', function () { if (opts.unrestricted) { it('does not revert', async function () { - await transferFunction.call(this, owner, other, tokenId, { from: other }); + await this.token.connect(this.other)[fragment](this.owner, this.other, tokenId, ...(opts.extra ?? [])); }); } else { it('reverts', async function () { - await expectRevertCustomError( - transferFunction.call(this, owner, other, tokenId, { from: other }), - 'ERC721InsufficientApproval', - [other, tokenId], - ); + await expect( + this.token.connect(this.other)[fragment](this.owner, this.other, tokenId, ...(opts.extra ?? [])), + ) + .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') + .withArgs(this.other.address, tokenId); }); } }); - context('when the given token ID does not exist', function () { + describe('when the given token ID does not exist', function () { it('reverts', async function () { - await expectRevertCustomError( - transferFunction.call(this, owner, other, nonExistentTokenId, { from: owner }), - 'ERC721NonexistentToken', - [nonExistentTokenId], - ); + await expect( + this.token + .connect(this.owner) + [fragment](this.owner, this.other, nonExistentTokenId, ...(opts.extra ?? [])), + ) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(nonExistentTokenId); }); }); - context('when the address to transfer the token to is the zero address', function () { + describe('when the address to transfer the token to is the zero address', function () { it('reverts', async function () { - await expectRevertCustomError( - transferFunction.call(this, owner, ZERO_ADDRESS, tokenId, { from: owner }), - 'ERC721InvalidReceiver', - [ZERO_ADDRESS], - ); + await expect( + this.token.connect(this.owner)[fragment](this.owner, ethers.ZeroAddress, tokenId, ...(opts.extra ?? [])), + ) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') + .withArgs(ethers.ZeroAddress); }); }); }; - const shouldTransferSafely = function (transferFun, data, opts = {}) { + const shouldTransferSafely = function (fragment, data, opts = {}) { + // sanity + it('function exists', async function () { + expect(this.token.interface.hasFunction(fragment)).to.be.true; + }); + describe('to a user account', function () { - shouldTransferTokensByUsers(transferFun, opts); + shouldTransferTokensByUsers(fragment, opts); }); describe('to a valid receiver contract', function () { beforeEach(async function () { - this.receiver = await ERC721ReceiverMock.new(RECEIVER_MAGIC_VALUE, RevertType.None); - this.toWhom = this.receiver.address; + this.to = await ethers.deployContract('ERC721ReceiverMock', [RECEIVER_MAGIC_VALUE, RevertType.None]); }); - shouldTransferTokensByUsers(transferFun, opts); + shouldTransferTokensByUsers(fragment, opts); it('calls onERC721Received', async function () { - const receipt = await transferFun.call(this, owner, this.receiver.address, tokenId, { from: owner }); - - await expectEvent.inTransaction(receipt.tx, ERC721ReceiverMock, 'Received', { - operator: owner, - from: owner, - tokenId: tokenId, - data: data, - }); + await expect(this.token.connect(this.owner)[fragment](this.owner, this.to, tokenId, ...(opts.extra ?? []))) + .to.emit(this.to, 'Received') + .withArgs(this.owner.address, this.owner.address, tokenId, data, anyValue); }); it('calls onERC721Received from approved', async function () { - const receipt = await transferFun.call(this, owner, this.receiver.address, tokenId, { from: approved }); - - await expectEvent.inTransaction(receipt.tx, ERC721ReceiverMock, 'Received', { - operator: approved, - from: owner, - tokenId: tokenId, - data: data, - }); + await expect( + this.token.connect(this.approved)[fragment](this.owner, this.to, tokenId, ...(opts.extra ?? [])), + ) + .to.emit(this.to, 'Received') + .withArgs(this.approved.address, this.owner.address, tokenId, data, anyValue); }); describe('with an invalid token id', function () { it('reverts', async function () { - await expectRevertCustomError( - transferFun.call(this, owner, this.receiver.address, nonExistentTokenId, { from: owner }), - 'ERC721NonexistentToken', - [nonExistentTokenId], - ); + await expect( + this.token + .connect(this.approved) + [fragment](this.owner, this.to, nonExistentTokenId, ...(opts.extra ?? [])), + ) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(nonExistentTokenId); }); }); }); @@ -269,9 +287,7 @@ function shouldBehaveLikeERC721(owner, newOwner, approved, anotherApproved, oper { fnName: '$_transfer', opts: { unrestricted: true } }, ]) { describe(`via ${fnName}`, function () { - shouldTransferTokensByUsers(function (from, to, tokenId, opts) { - return this.token[fnName](from, to, tokenId, opts); - }, opts); + shouldTransferTokensByUsers(fnName, opts); }); } @@ -280,103 +296,86 @@ function shouldBehaveLikeERC721(owner, newOwner, approved, anotherApproved, oper { fnName: '$_safeTransfer', opts: { unrestricted: true } }, ]) { describe(`via ${fnName}`, function () { - const safeTransferFromWithData = function (from, to, tokenId, opts) { - return this.token.methods[fnName + '(address,address,uint256,bytes)'](from, to, tokenId, data, opts); - }; - - const safeTransferFromWithoutData = function (from, to, tokenId, opts) { - return this.token.methods[fnName + '(address,address,uint256)'](from, to, tokenId, opts); - }; - describe('with data', function () { - shouldTransferSafely(safeTransferFromWithData, data, opts); + shouldTransferSafely(fnName, data, { ...opts, extra: [ethers.Typed.bytes(data)] }); }); describe('without data', function () { - shouldTransferSafely(safeTransferFromWithoutData, null, opts); + shouldTransferSafely(fnName, '0x', opts); }); describe('to a receiver contract returning unexpected value', function () { it('reverts', async function () { - const invalidReceiver = await ERC721ReceiverMock.new('0x42', RevertType.None); - await expectRevertCustomError( - this.token.methods[fnName + '(address,address,uint256)'](owner, invalidReceiver.address, tokenId, { - from: owner, - }), - 'ERC721InvalidReceiver', - [invalidReceiver.address], - ); + const invalidReceiver = await ethers.deployContract('ERC721ReceiverMock', [ + '0xdeadbeef', + RevertType.None, + ]); + + await expect(this.token.connect(this.owner)[fnName](this.owner, invalidReceiver, tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') + .withArgs(invalidReceiver.target); }); }); describe('to a receiver contract that reverts with message', function () { it('reverts', async function () { - const revertingReceiver = await ERC721ReceiverMock.new( + const revertingReceiver = await ethers.deployContract('ERC721ReceiverMock', [ RECEIVER_MAGIC_VALUE, RevertType.RevertWithMessage, - ); - await expectRevert( - this.token.methods[fnName + '(address,address,uint256)'](owner, revertingReceiver.address, tokenId, { - from: owner, - }), - 'ERC721ReceiverMock: reverting', - ); + ]); + + await expect( + this.token.connect(this.owner)[fnName](this.owner, revertingReceiver, tokenId), + ).to.be.revertedWith('ERC721ReceiverMock: reverting'); }); }); describe('to a receiver contract that reverts without message', function () { it('reverts', async function () { - const revertingReceiver = await ERC721ReceiverMock.new( + const revertingReceiver = await ethers.deployContract('ERC721ReceiverMock', [ RECEIVER_MAGIC_VALUE, RevertType.RevertWithoutMessage, - ); - await expectRevertCustomError( - this.token.methods[fnName + '(address,address,uint256)'](owner, revertingReceiver.address, tokenId, { - from: owner, - }), - 'ERC721InvalidReceiver', - [revertingReceiver.address], - ); + ]); + + await expect(this.token.connect(this.owner)[fnName](this.owner, revertingReceiver, tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') + .withArgs(revertingReceiver.target); }); }); describe('to a receiver contract that reverts with custom error', function () { it('reverts', async function () { - const revertingReceiver = await ERC721ReceiverMock.new( + const revertingReceiver = await ethers.deployContract('ERC721ReceiverMock', [ RECEIVER_MAGIC_VALUE, RevertType.RevertWithCustomError, - ); - await expectRevertCustomError( - this.token.methods[fnName + '(address,address,uint256)'](owner, revertingReceiver.address, tokenId, { - from: owner, - }), - 'CustomError', - [RECEIVER_MAGIC_VALUE], - ); + ]); + + await expect(this.token.connect(this.owner)[fnName](this.owner, revertingReceiver, tokenId)) + .to.be.revertedWithCustomError(revertingReceiver, 'CustomError') + .withArgs(RECEIVER_MAGIC_VALUE); }); }); describe('to a receiver contract that panics', function () { it('reverts', async function () { - const revertingReceiver = await ERC721ReceiverMock.new(RECEIVER_MAGIC_VALUE, RevertType.Panic); - await expectRevert.unspecified( - this.token.methods[fnName + '(address,address,uint256)'](owner, revertingReceiver.address, tokenId, { - from: owner, - }), - ); + const revertingReceiver = await ethers.deployContract('ERC721ReceiverMock', [ + RECEIVER_MAGIC_VALUE, + RevertType.Panic, + ]); + + await expect( + this.token.connect(this.owner)[fnName](this.owner, revertingReceiver, tokenId), + ).to.be.revertedWithPanic(PANIC_CODES.DIVISION_BY_ZERO); }); }); describe('to a contract that does not implement the required function', function () { it('reverts', async function () { - const nonReceiver = await NonERC721ReceiverMock.new(); - await expectRevertCustomError( - this.token.methods[fnName + '(address,address,uint256)'](owner, nonReceiver.address, tokenId, { - from: owner, - }), - 'ERC721InvalidReceiver', - [nonReceiver.address], - ); + const nonReceiver = await ethers.deployContract('CallReceiverMock'); + + await expect(this.token.connect(this.owner)[fnName](this.owner, nonReceiver, tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') + .withArgs(nonReceiver.target); }); }); }); @@ -390,88 +389,90 @@ function shouldBehaveLikeERC721(owner, newOwner, approved, anotherApproved, oper describe('via safeMint', function () { // regular minting is tested in ERC721Mintable.test.js and others it('calls onERC721Received — with data', async function () { - this.receiver = await ERC721ReceiverMock.new(RECEIVER_MAGIC_VALUE, RevertType.None); - const receipt = await this.token.$_safeMint(this.receiver.address, tokenId, data); + const receiver = await ethers.deployContract('ERC721ReceiverMock', [RECEIVER_MAGIC_VALUE, RevertType.None]); - await expectEvent.inTransaction(receipt.tx, ERC721ReceiverMock, 'Received', { - from: ZERO_ADDRESS, - tokenId: tokenId, - data: data, - }); + await expect(await this.token.$_safeMint(receiver, tokenId, ethers.Typed.bytes(data))) + .to.emit(receiver, 'Received') + .withArgs(anyValue, ethers.ZeroAddress, tokenId, data, anyValue); }); it('calls onERC721Received — without data', async function () { - this.receiver = await ERC721ReceiverMock.new(RECEIVER_MAGIC_VALUE, RevertType.None); - const receipt = await this.token.$_safeMint(this.receiver.address, tokenId); + const receiver = await ethers.deployContract('ERC721ReceiverMock', [RECEIVER_MAGIC_VALUE, RevertType.None]); - await expectEvent.inTransaction(receipt.tx, ERC721ReceiverMock, 'Received', { - from: ZERO_ADDRESS, - tokenId: tokenId, - }); + await expect(await this.token.$_safeMint(receiver, tokenId)) + .to.emit(receiver, 'Received') + .withArgs(anyValue, ethers.ZeroAddress, tokenId, '0x', anyValue); }); - context('to a receiver contract returning unexpected value', function () { + describe('to a receiver contract returning unexpected value', function () { it('reverts', async function () { - const invalidReceiver = await ERC721ReceiverMock.new('0x42', RevertType.None); - await expectRevertCustomError( - this.token.$_safeMint(invalidReceiver.address, tokenId), - 'ERC721InvalidReceiver', - [invalidReceiver.address], - ); + const invalidReceiver = await ethers.deployContract('ERC721ReceiverMock', ['0xdeadbeef', RevertType.None]); + + await expect(this.token.$_safeMint(invalidReceiver, tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') + .withArgs(invalidReceiver.target); }); }); - context('to a receiver contract that reverts with message', function () { + describe('to a receiver contract that reverts with message', function () { it('reverts', async function () { - const revertingReceiver = await ERC721ReceiverMock.new(RECEIVER_MAGIC_VALUE, RevertType.RevertWithMessage); - await expectRevert( - this.token.$_safeMint(revertingReceiver.address, tokenId), + const revertingReceiver = await ethers.deployContract('ERC721ReceiverMock', [ + RECEIVER_MAGIC_VALUE, + RevertType.RevertWithMessage, + ]); + + await expect(this.token.$_safeMint(revertingReceiver, tokenId)).to.be.revertedWith( 'ERC721ReceiverMock: reverting', ); }); }); - context('to a receiver contract that reverts without message', function () { + describe('to a receiver contract that reverts without message', function () { it('reverts', async function () { - const revertingReceiver = await ERC721ReceiverMock.new( + const revertingReceiver = await ethers.deployContract('ERC721ReceiverMock', [ RECEIVER_MAGIC_VALUE, RevertType.RevertWithoutMessage, - ); - await expectRevertCustomError( - this.token.$_safeMint(revertingReceiver.address, tokenId), - 'ERC721InvalidReceiver', - [revertingReceiver.address], - ); + ]); + + await expect(this.token.$_safeMint(revertingReceiver, tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') + .withArgs(revertingReceiver.target); }); }); - context('to a receiver contract that reverts with custom error', function () { + describe('to a receiver contract that reverts with custom error', function () { it('reverts', async function () { - const revertingReceiver = await ERC721ReceiverMock.new( + const revertingReceiver = await ethers.deployContract('ERC721ReceiverMock', [ RECEIVER_MAGIC_VALUE, RevertType.RevertWithCustomError, - ); - await expectRevertCustomError(this.token.$_safeMint(revertingReceiver.address, tokenId), 'CustomError', [ - RECEIVER_MAGIC_VALUE, ]); + + await expect(this.token.$_safeMint(revertingReceiver, tokenId)) + .to.be.revertedWithCustomError(revertingReceiver, 'CustomError') + .withArgs(RECEIVER_MAGIC_VALUE); }); }); - context('to a receiver contract that panics', function () { + describe('to a receiver contract that panics', function () { it('reverts', async function () { - const revertingReceiver = await ERC721ReceiverMock.new(RECEIVER_MAGIC_VALUE, RevertType.Panic); - await expectRevert.unspecified(this.token.$_safeMint(revertingReceiver.address, tokenId)); + const revertingReceiver = await ethers.deployContract('ERC721ReceiverMock', [ + RECEIVER_MAGIC_VALUE, + RevertType.Panic, + ]); + + await expect(this.token.$_safeMint(revertingReceiver, tokenId)).to.be.revertedWithPanic( + PANIC_CODES.DIVISION_BY_ZERO, + ); }); }); - context('to a contract that does not implement the required function', function () { + describe('to a contract that does not implement the required function', function () { it('reverts', async function () { - const nonReceiver = await NonERC721ReceiverMock.new(); - await expectRevertCustomError( - this.token.$_safeMint(nonReceiver.address, tokenId), - 'ERC721InvalidReceiver', - [nonReceiver.address], - ); + const nonReceiver = await ethers.deployContract('CallReceiverMock'); + + await expect(this.token.$_safeMint(nonReceiver, tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') + .withArgs(nonReceiver.target); }); }); }); @@ -480,227 +481,207 @@ function shouldBehaveLikeERC721(owner, newOwner, approved, anotherApproved, oper describe('approve', function () { const tokenId = firstTokenId; - let receipt = null; - const itClearsApproval = function () { it('clears approval for the token', async function () { - expect(await this.token.getApproved(tokenId)).to.be.equal(ZERO_ADDRESS); + expect(await this.token.getApproved(tokenId)).to.equal(ethers.ZeroAddress); }); }; - const itApproves = function (address) { + const itApproves = function () { it('sets the approval for the target address', async function () { - expect(await this.token.getApproved(tokenId)).to.be.equal(address); + expect(await this.token.getApproved(tokenId)).to.equal(this.approved.address ?? this.approved); }); }; - const itEmitsApprovalEvent = function (address) { + const itEmitsApprovalEvent = function () { it('emits an approval event', async function () { - expectEvent(receipt, 'Approval', { - owner: owner, - approved: address, - tokenId: tokenId, - }); + await expect(this.tx) + .to.emit(this.token, 'Approval') + .withArgs(this.owner.address, this.approved.address ?? this.approved, tokenId); }); }; - context('when clearing approval', function () { - context('when there was no prior approval', function () { + describe('when clearing approval', function () { + describe('when there was no prior approval', function () { beforeEach(async function () { - receipt = await this.token.approve(ZERO_ADDRESS, tokenId, { from: owner }); + this.approved = ethers.ZeroAddress; + this.tx = await this.token.connect(this.owner).approve(this.approved, tokenId); }); itClearsApproval(); - itEmitsApprovalEvent(ZERO_ADDRESS); + itEmitsApprovalEvent(); }); - context('when there was a prior approval', function () { + describe('when there was a prior approval', function () { beforeEach(async function () { - await this.token.approve(approved, tokenId, { from: owner }); - receipt = await this.token.approve(ZERO_ADDRESS, tokenId, { from: owner }); + await this.token.connect(this.owner).approve(this.other, tokenId); + this.approved = ethers.ZeroAddress; + this.tx = await this.token.connect(this.owner).approve(this.approved, tokenId); }); itClearsApproval(); - itEmitsApprovalEvent(ZERO_ADDRESS); + itEmitsApprovalEvent(); }); }); - context('when approving a non-zero address', function () { - context('when there was no prior approval', function () { + describe('when approving a non-zero address', function () { + describe('when there was no prior approval', function () { beforeEach(async function () { - receipt = await this.token.approve(approved, tokenId, { from: owner }); + this.tx = await this.token.connect(this.owner).approve(this.approved, tokenId); }); - itApproves(approved); - itEmitsApprovalEvent(approved); + itApproves(); + itEmitsApprovalEvent(); }); - context('when there was a prior approval to the same address', function () { + describe('when there was a prior approval to the same address', function () { beforeEach(async function () { - await this.token.approve(approved, tokenId, { from: owner }); - receipt = await this.token.approve(approved, tokenId, { from: owner }); + await this.token.connect(this.owner).approve(this.approved, tokenId); + this.tx = await this.token.connect(this.owner).approve(this.approved, tokenId); }); - itApproves(approved); - itEmitsApprovalEvent(approved); + itApproves(); + itEmitsApprovalEvent(); }); - context('when there was a prior approval to a different address', function () { + describe('when there was a prior approval to a different address', function () { beforeEach(async function () { - await this.token.approve(anotherApproved, tokenId, { from: owner }); - receipt = await this.token.approve(anotherApproved, tokenId, { from: owner }); + await this.token.connect(this.owner).approve(this.other, tokenId); + this.tx = await this.token.connect(this.owner).approve(this.approved, tokenId); }); - itApproves(anotherApproved); - itEmitsApprovalEvent(anotherApproved); + itApproves(); + itEmitsApprovalEvent(); }); }); - context('when the sender does not own the given token ID', function () { + describe('when the sender does not own the given token ID', function () { it('reverts', async function () { - await expectRevertCustomError( - this.token.approve(approved, tokenId, { from: other }), - 'ERC721InvalidApprover', - [other], - ); + await expect(this.token.connect(this.other).approve(this.approved, tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidApprover') + .withArgs(this.other.address); }); }); - context('when the sender is approved for the given token ID', function () { + describe('when the sender is approved for the given token ID', function () { it('reverts', async function () { - await this.token.approve(approved, tokenId, { from: owner }); - await expectRevertCustomError( - this.token.approve(anotherApproved, tokenId, { from: approved }), - 'ERC721InvalidApprover', - [approved], - ); + await this.token.connect(this.owner).approve(this.approved, tokenId); + + await expect(this.token.connect(this.approved).approve(this.other, tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidApprover') + .withArgs(this.approved.address); }); }); - context('when the sender is an operator', function () { + describe('when the sender is an operator', function () { beforeEach(async function () { - await this.token.setApprovalForAll(operator, true, { from: owner }); - receipt = await this.token.approve(approved, tokenId, { from: operator }); + await this.token.connect(this.owner).setApprovalForAll(this.operator, true); + + this.tx = await this.token.connect(this.operator).approve(this.approved, tokenId); }); - itApproves(approved); - itEmitsApprovalEvent(approved); + itApproves(); + itEmitsApprovalEvent(); }); - context('when the given token ID does not exist', function () { + describe('when the given token ID does not exist', function () { it('reverts', async function () { - await expectRevertCustomError( - this.token.approve(approved, nonExistentTokenId, { from: operator }), - 'ERC721NonexistentToken', - [nonExistentTokenId], - ); + await expect(this.token.connect(this.operator).approve(this.approved, nonExistentTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(nonExistentTokenId); }); }); }); describe('setApprovalForAll', function () { - context('when the operator willing to approve is not the owner', function () { - context('when there is no operator approval set by the sender', function () { + describe('when the operator willing to approve is not the owner', function () { + describe('when there is no operator approval set by the sender', function () { it('approves the operator', async function () { - await this.token.setApprovalForAll(operator, true, { from: owner }); + await this.token.connect(this.owner).setApprovalForAll(this.operator, true); - expect(await this.token.isApprovedForAll(owner, operator)).to.equal(true); + expect(await this.token.isApprovedForAll(this.owner, this.operator)).to.be.true; }); it('emits an approval event', async function () { - const receipt = await this.token.setApprovalForAll(operator, true, { from: owner }); - - expectEvent(receipt, 'ApprovalForAll', { - owner: owner, - operator: operator, - approved: true, - }); + await expect(this.token.connect(this.owner).setApprovalForAll(this.operator, true)) + .to.emit(this.token, 'ApprovalForAll') + .withArgs(this.owner.address, this.operator.address, true); }); }); - context('when the operator was set as not approved', function () { + describe('when the operator was set as not approved', function () { beforeEach(async function () { - await this.token.setApprovalForAll(operator, false, { from: owner }); + await this.token.connect(this.owner).setApprovalForAll(this.operator, false); }); it('approves the operator', async function () { - await this.token.setApprovalForAll(operator, true, { from: owner }); + await this.token.connect(this.owner).setApprovalForAll(this.operator, true); - expect(await this.token.isApprovedForAll(owner, operator)).to.equal(true); + expect(await this.token.isApprovedForAll(this.owner, this.operator)).to.be.true; }); it('emits an approval event', async function () { - const receipt = await this.token.setApprovalForAll(operator, true, { from: owner }); - - expectEvent(receipt, 'ApprovalForAll', { - owner: owner, - operator: operator, - approved: true, - }); + await expect(this.token.connect(this.owner).setApprovalForAll(this.operator, true)) + .to.emit(this.token, 'ApprovalForAll') + .withArgs(this.owner.address, this.operator.address, true); }); it('can unset the operator approval', async function () { - await this.token.setApprovalForAll(operator, false, { from: owner }); + await this.token.connect(this.owner).setApprovalForAll(this.operator, false); - expect(await this.token.isApprovedForAll(owner, operator)).to.equal(false); + expect(await this.token.isApprovedForAll(this.owner, this.operator)).to.be.false; }); }); - context('when the operator was already approved', function () { + describe('when the operator was already approved', function () { beforeEach(async function () { - await this.token.setApprovalForAll(operator, true, { from: owner }); + await this.token.connect(this.owner).setApprovalForAll(this.operator, true); }); it('keeps the approval to the given address', async function () { - await this.token.setApprovalForAll(operator, true, { from: owner }); + await this.token.connect(this.owner).setApprovalForAll(this.operator, true); - expect(await this.token.isApprovedForAll(owner, operator)).to.equal(true); + expect(await this.token.isApprovedForAll(this.owner, this.operator)).to.be.true; }); it('emits an approval event', async function () { - const receipt = await this.token.setApprovalForAll(operator, true, { from: owner }); - - expectEvent(receipt, 'ApprovalForAll', { - owner: owner, - operator: operator, - approved: true, - }); + await expect(this.token.connect(this.owner).setApprovalForAll(this.operator, true)) + .to.emit(this.token, 'ApprovalForAll') + .withArgs(this.owner.address, this.operator.address, true); }); }); }); - context('when the operator is address zero', function () { + describe('when the operator is address zero', function () { it('reverts', async function () { - await expectRevertCustomError( - this.token.setApprovalForAll(constants.ZERO_ADDRESS, true, { from: owner }), - 'ERC721InvalidOperator', - [constants.ZERO_ADDRESS], - ); + await expect(this.token.connect(this.owner).setApprovalForAll(ethers.ZeroAddress, true)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidOperator') + .withArgs(ethers.ZeroAddress); }); }); }); describe('getApproved', async function () { - context('when token is not minted', async function () { + describe('when token is not minted', async function () { it('reverts', async function () { - await expectRevertCustomError(this.token.getApproved(nonExistentTokenId), 'ERC721NonexistentToken', [ - nonExistentTokenId, - ]); + await expect(this.token.getApproved(nonExistentTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(nonExistentTokenId); }); }); - context('when token has been minted ', async function () { + describe('when token has been minted ', async function () { it('should return the zero address', async function () { - expect(await this.token.getApproved(firstTokenId)).to.be.equal(ZERO_ADDRESS); + expect(await this.token.getApproved(firstTokenId)).to.equal(ethers.ZeroAddress); }); - context('when account has been approved', async function () { + describe('when account has been approved', async function () { beforeEach(async function () { - await this.token.approve(approved, firstTokenId, { from: owner }); + await this.token.connect(this.owner).approve(this.approved, firstTokenId); }); it('returns approved account', async function () { - expect(await this.token.getApproved(firstTokenId)).to.be.equal(approved); + expect(await this.token.getApproved(firstTokenId)).to.equal(this.approved.address); }); }); }); @@ -709,243 +690,268 @@ function shouldBehaveLikeERC721(owner, newOwner, approved, anotherApproved, oper describe('_mint(address, uint256)', function () { it('reverts with a null destination address', async function () { - await expectRevertCustomError(this.token.$_mint(ZERO_ADDRESS, firstTokenId), 'ERC721InvalidReceiver', [ - ZERO_ADDRESS, - ]); + await expect(this.token.$_mint(ethers.ZeroAddress, firstTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') + .withArgs(ethers.ZeroAddress); }); - context('with minted token', async function () { + describe('with minted token', async function () { beforeEach(async function () { - this.receipt = await this.token.$_mint(owner, firstTokenId); + this.tx = await this.token.$_mint(this.owner, firstTokenId); }); - it('emits a Transfer event', function () { - expectEvent(this.receipt, 'Transfer', { from: ZERO_ADDRESS, to: owner, tokenId: firstTokenId }); + it('emits a Transfer event', async function () { + await expect(this.tx) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.owner.address, firstTokenId); }); it('creates the token', async function () { - expect(await this.token.balanceOf(owner)).to.be.bignumber.equal('1'); - expect(await this.token.ownerOf(firstTokenId)).to.equal(owner); + expect(await this.token.balanceOf(this.owner)).to.equal(1n); + expect(await this.token.ownerOf(firstTokenId)).to.equal(this.owner.address); }); it('reverts when adding a token id that already exists', async function () { - await expectRevertCustomError(this.token.$_mint(owner, firstTokenId), 'ERC721InvalidSender', [ZERO_ADDRESS]); + await expect(this.token.$_mint(this.owner, firstTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidSender') + .withArgs(ethers.ZeroAddress); }); }); }); describe('_burn', function () { it('reverts when burning a non-existent token id', async function () { - await expectRevertCustomError(this.token.$_burn(nonExistentTokenId), 'ERC721NonexistentToken', [ - nonExistentTokenId, - ]); + await expect(this.token.$_burn(nonExistentTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(nonExistentTokenId); }); - context('with minted tokens', function () { + describe('with minted tokens', function () { beforeEach(async function () { - await this.token.$_mint(owner, firstTokenId); - await this.token.$_mint(owner, secondTokenId); + await this.token.$_mint(this.owner, firstTokenId); + await this.token.$_mint(this.owner, secondTokenId); }); - context('with burnt token', function () { + describe('with burnt token', function () { beforeEach(async function () { - this.receipt = await this.token.$_burn(firstTokenId); + this.tx = await this.token.$_burn(firstTokenId); }); - it('emits a Transfer event', function () { - expectEvent(this.receipt, 'Transfer', { from: owner, to: ZERO_ADDRESS, tokenId: firstTokenId }); + it('emits a Transfer event', async function () { + await expect(this.tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, ethers.ZeroAddress, firstTokenId); }); it('deletes the token', async function () { - expect(await this.token.balanceOf(owner)).to.be.bignumber.equal('1'); - await expectRevertCustomError(this.token.ownerOf(firstTokenId), 'ERC721NonexistentToken', [firstTokenId]); + expect(await this.token.balanceOf(this.owner)).to.equal(1n); + await expect(this.token.ownerOf(firstTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(firstTokenId); }); it('reverts when burning a token id that has been deleted', async function () { - await expectRevertCustomError(this.token.$_burn(firstTokenId), 'ERC721NonexistentToken', [firstTokenId]); + await expect(this.token.$_burn(firstTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(firstTokenId); }); }); }); }); } -function shouldBehaveLikeERC721Enumerable(owner, newOwner, approved, anotherApproved, operator, other) { +function shouldBehaveLikeERC721Enumerable() { + beforeEach(async function () { + const [owner, newOwner, approved, operator, other] = this.accounts; + Object.assign(this, { owner, newOwner, approved, operator, other }); + }); + shouldSupportInterfaces(['ERC721Enumerable']); - context('with minted tokens', function () { + describe('with minted tokens', function () { beforeEach(async function () { - await this.token.$_mint(owner, firstTokenId); - await this.token.$_mint(owner, secondTokenId); - this.toWhom = other; // default to other for toWhom in context-dependent tests + await this.token.$_mint(this.owner, firstTokenId); + await this.token.$_mint(this.owner, secondTokenId); + this.to = this.other; }); describe('totalSupply', function () { it('returns total token supply', async function () { - expect(await this.token.totalSupply()).to.be.bignumber.equal('2'); + expect(await this.token.totalSupply()).to.equal(2n); }); }); describe('tokenOfOwnerByIndex', function () { describe('when the given index is lower than the amount of tokens owned by the given address', function () { it('returns the token ID placed at the given index', async function () { - expect(await this.token.tokenOfOwnerByIndex(owner, 0)).to.be.bignumber.equal(firstTokenId); + expect(await this.token.tokenOfOwnerByIndex(this.owner, 0n)).to.equal(firstTokenId); }); }); describe('when the index is greater than or equal to the total tokens owned by the given address', function () { it('reverts', async function () { - await expectRevertCustomError(this.token.tokenOfOwnerByIndex(owner, 2), 'ERC721OutOfBoundsIndex', [owner, 2]); + await expect(this.token.tokenOfOwnerByIndex(this.owner, 2n)) + .to.be.revertedWithCustomError(this.token, 'ERC721OutOfBoundsIndex') + .withArgs(this.owner.address, 2n); }); }); describe('when the given address does not own any token', function () { it('reverts', async function () { - await expectRevertCustomError(this.token.tokenOfOwnerByIndex(other, 0), 'ERC721OutOfBoundsIndex', [other, 0]); + await expect(this.token.tokenOfOwnerByIndex(this.other, 0n)) + .to.be.revertedWithCustomError(this.token, 'ERC721OutOfBoundsIndex') + .withArgs(this.other.address, 0n); }); }); describe('after transferring all tokens to another user', function () { beforeEach(async function () { - await this.token.transferFrom(owner, other, firstTokenId, { from: owner }); - await this.token.transferFrom(owner, other, secondTokenId, { from: owner }); + await this.token.connect(this.owner).transferFrom(this.owner, this.other, firstTokenId); + await this.token.connect(this.owner).transferFrom(this.owner, this.other, secondTokenId); }); it('returns correct token IDs for target', async function () { - expect(await this.token.balanceOf(other)).to.be.bignumber.equal('2'); - const tokensListed = await Promise.all([0, 1].map(i => this.token.tokenOfOwnerByIndex(other, i))); - expect(tokensListed.map(t => t.toNumber())).to.have.members([ - firstTokenId.toNumber(), - secondTokenId.toNumber(), + expect(await this.token.balanceOf(this.other)).to.equal(2n); + + expect(await Promise.all([0n, 1n].map(i => this.token.tokenOfOwnerByIndex(this.other, i)))).to.have.members([ + firstTokenId, + secondTokenId, ]); }); it('returns empty collection for original owner', async function () { - expect(await this.token.balanceOf(owner)).to.be.bignumber.equal('0'); - await expectRevertCustomError(this.token.tokenOfOwnerByIndex(owner, 0), 'ERC721OutOfBoundsIndex', [owner, 0]); + expect(await this.token.balanceOf(this.owner)).to.equal(0n); + await expect(this.token.tokenOfOwnerByIndex(this.owner, 0n)) + .to.be.revertedWithCustomError(this.token, 'ERC721OutOfBoundsIndex') + .withArgs(this.owner.address, 0n); }); }); }); describe('tokenByIndex', function () { it('returns all tokens', async function () { - const tokensListed = await Promise.all([0, 1].map(i => this.token.tokenByIndex(i))); - expect(tokensListed.map(t => t.toNumber())).to.have.members([ - firstTokenId.toNumber(), - secondTokenId.toNumber(), + expect(await Promise.all([0n, 1n].map(i => this.token.tokenByIndex(i)))).to.have.members([ + firstTokenId, + secondTokenId, ]); }); it('reverts if index is greater than supply', async function () { - await expectRevertCustomError(this.token.tokenByIndex(2), 'ERC721OutOfBoundsIndex', [ZERO_ADDRESS, 2]); + await expect(this.token.tokenByIndex(2n)) + .to.be.revertedWithCustomError(this.token, 'ERC721OutOfBoundsIndex') + .withArgs(ethers.ZeroAddress, 2n); }); - [firstTokenId, secondTokenId].forEach(function (tokenId) { + for (const tokenId of [firstTokenId, secondTokenId]) { it(`returns all tokens after burning token ${tokenId} and minting new tokens`, async function () { - const newTokenId = new BN(300); - const anotherNewTokenId = new BN(400); + const newTokenId = 300n; + const anotherNewTokenId = 400n; await this.token.$_burn(tokenId); - await this.token.$_mint(newOwner, newTokenId); - await this.token.$_mint(newOwner, anotherNewTokenId); + await this.token.$_mint(this.newOwner, newTokenId); + await this.token.$_mint(this.newOwner, anotherNewTokenId); - expect(await this.token.totalSupply()).to.be.bignumber.equal('3'); + expect(await this.token.totalSupply()).to.equal(3n); - const tokensListed = await Promise.all([0, 1, 2].map(i => this.token.tokenByIndex(i))); - const expectedTokens = [firstTokenId, secondTokenId, newTokenId, anotherNewTokenId].filter( - x => x !== tokenId, - ); - expect(tokensListed.map(t => t.toNumber())).to.have.members(expectedTokens.map(t => t.toNumber())); + expect(await Promise.all([0n, 1n, 2n].map(i => this.token.tokenByIndex(i)))) + .to.have.members([firstTokenId, secondTokenId, newTokenId, anotherNewTokenId].filter(x => x !== tokenId)) + .to.not.include(tokenId); }); - }); + } }); }); describe('_mint(address, uint256)', function () { it('reverts with a null destination address', async function () { - await expectRevertCustomError(this.token.$_mint(ZERO_ADDRESS, firstTokenId), 'ERC721InvalidReceiver', [ - ZERO_ADDRESS, - ]); + await expect(this.token.$_mint(ethers.ZeroAddress, firstTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') + .withArgs(ethers.ZeroAddress); }); - context('with minted token', async function () { + describe('with minted token', async function () { beforeEach(async function () { - this.receipt = await this.token.$_mint(owner, firstTokenId); + await this.token.$_mint(this.owner, firstTokenId); }); it('adjusts owner tokens by index', async function () { - expect(await this.token.tokenOfOwnerByIndex(owner, 0)).to.be.bignumber.equal(firstTokenId); + expect(await this.token.tokenOfOwnerByIndex(this.owner, 0n)).to.equal(firstTokenId); }); it('adjusts all tokens list', async function () { - expect(await this.token.tokenByIndex(0)).to.be.bignumber.equal(firstTokenId); + expect(await this.token.tokenByIndex(0n)).to.equal(firstTokenId); }); }); }); describe('_burn', function () { it('reverts when burning a non-existent token id', async function () { - await expectRevertCustomError(this.token.$_burn(firstTokenId), 'ERC721NonexistentToken', [firstTokenId]); + await expect(this.token.$_burn(firstTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(firstTokenId); }); - context('with minted tokens', function () { + describe('with minted tokens', function () { beforeEach(async function () { - await this.token.$_mint(owner, firstTokenId); - await this.token.$_mint(owner, secondTokenId); + await this.token.$_mint(this.owner, firstTokenId); + await this.token.$_mint(this.owner, secondTokenId); }); - context('with burnt token', function () { + describe('with burnt token', function () { beforeEach(async function () { - this.receipt = await this.token.$_burn(firstTokenId); + await this.token.$_burn(firstTokenId); }); it('removes that token from the token list of the owner', async function () { - expect(await this.token.tokenOfOwnerByIndex(owner, 0)).to.be.bignumber.equal(secondTokenId); + expect(await this.token.tokenOfOwnerByIndex(this.owner, 0n)).to.equal(secondTokenId); }); it('adjusts all tokens list', async function () { - expect(await this.token.tokenByIndex(0)).to.be.bignumber.equal(secondTokenId); + expect(await this.token.tokenByIndex(0n)).to.equal(secondTokenId); }); it('burns all tokens', async function () { - await this.token.$_burn(secondTokenId, { from: owner }); - expect(await this.token.totalSupply()).to.be.bignumber.equal('0'); - await expectRevertCustomError(this.token.tokenByIndex(0), 'ERC721OutOfBoundsIndex', [ZERO_ADDRESS, 0]); + await this.token.$_burn(secondTokenId); + expect(await this.token.totalSupply()).to.equal(0n); + + await expect(this.token.tokenByIndex(0n)) + .to.be.revertedWithCustomError(this.token, 'ERC721OutOfBoundsIndex') + .withArgs(ethers.ZeroAddress, 0n); }); }); }); }); } -function shouldBehaveLikeERC721Metadata(name, symbol, owner) { +function shouldBehaveLikeERC721Metadata(name, symbol) { shouldSupportInterfaces(['ERC721Metadata']); describe('metadata', function () { it('has a name', async function () { - expect(await this.token.name()).to.be.equal(name); + expect(await this.token.name()).to.equal(name); }); it('has a symbol', async function () { - expect(await this.token.symbol()).to.be.equal(symbol); + expect(await this.token.symbol()).to.equal(symbol); }); describe('token URI', function () { beforeEach(async function () { - await this.token.$_mint(owner, firstTokenId); + await this.token.$_mint(this.owner, firstTokenId); }); it('return empty string by default', async function () { - expect(await this.token.tokenURI(firstTokenId)).to.be.equal(''); + expect(await this.token.tokenURI(firstTokenId)).to.equal(''); }); it('reverts when queried for non existent token id', async function () { - await expectRevertCustomError(this.token.tokenURI(nonExistentTokenId), 'ERC721NonexistentToken', [ - nonExistentTokenId, - ]); + await expect(this.token.tokenURI(nonExistentTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(nonExistentTokenId); }); describe('base URI', function () { beforeEach(function () { - if (this.token.setBaseURI === undefined) { + if (!this.token.interface.hasFunction('setBaseURI')) { this.skip(); } }); @@ -957,14 +963,14 @@ function shouldBehaveLikeERC721Metadata(name, symbol, owner) { it('base URI is added as a prefix to the token URI', async function () { await this.token.setBaseURI(baseURI); - expect(await this.token.tokenURI(firstTokenId)).to.be.equal(baseURI + firstTokenId.toString()); + expect(await this.token.tokenURI(firstTokenId)).to.equal(baseURI + firstTokenId.toString()); }); it('token URI can be changed by changing the base URI', async function () { await this.token.setBaseURI(baseURI); const newBaseURI = 'https://api.example.com/v2/'; await this.token.setBaseURI(newBaseURI); - expect(await this.token.tokenURI(firstTokenId)).to.be.equal(newBaseURI + firstTokenId.toString()); + expect(await this.token.tokenURI(firstTokenId)).to.equal(newBaseURI + firstTokenId.toString()); }); }); }); diff --git a/test/token/ERC721/ERC721.test.js b/test/token/ERC721/ERC721.test.js index 372dd5069..1454cb057 100644 --- a/test/token/ERC721/ERC721.test.js +++ b/test/token/ERC721/ERC721.test.js @@ -1,15 +1,23 @@ +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { shouldBehaveLikeERC721, shouldBehaveLikeERC721Metadata } = require('./ERC721.behavior'); -const ERC721 = artifacts.require('$ERC721'); +const name = 'Non Fungible Token'; +const symbol = 'NFT'; -contract('ERC721', function (accounts) { - const name = 'Non Fungible Token'; - const symbol = 'NFT'; +async function fixture() { + return { + accounts: await ethers.getSigners(), + token: await ethers.deployContract('$ERC721', [name, symbol]), + }; +} +describe('ERC721', function () { beforeEach(async function () { - this.token = await ERC721.new(name, symbol); + Object.assign(this, await loadFixture(fixture)); }); - shouldBehaveLikeERC721(...accounts); - shouldBehaveLikeERC721Metadata(name, symbol, ...accounts); + shouldBehaveLikeERC721(); + shouldBehaveLikeERC721Metadata(name, symbol); }); diff --git a/test/token/ERC721/ERC721Enumerable.test.js b/test/token/ERC721/ERC721Enumerable.test.js index 31c28d177..a3bdea73f 100644 --- a/test/token/ERC721/ERC721Enumerable.test.js +++ b/test/token/ERC721/ERC721Enumerable.test.js @@ -1,20 +1,28 @@ +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { shouldBehaveLikeERC721, shouldBehaveLikeERC721Metadata, shouldBehaveLikeERC721Enumerable, } = require('./ERC721.behavior'); -const ERC721Enumerable = artifacts.require('$ERC721Enumerable'); +const name = 'Non Fungible Token'; +const symbol = 'NFT'; -contract('ERC721Enumerable', function (accounts) { - const name = 'Non Fungible Token'; - const symbol = 'NFT'; +async function fixture() { + return { + accounts: await ethers.getSigners(), + token: await ethers.deployContract('$ERC721Enumerable', [name, symbol]), + }; +} +describe('ERC721', function () { beforeEach(async function () { - this.token = await ERC721Enumerable.new(name, symbol); + Object.assign(this, await loadFixture(fixture)); }); - shouldBehaveLikeERC721(...accounts); - shouldBehaveLikeERC721Metadata(name, symbol, ...accounts); - shouldBehaveLikeERC721Enumerable(...accounts); + shouldBehaveLikeERC721(); + shouldBehaveLikeERC721Metadata(name, symbol); + shouldBehaveLikeERC721Enumerable(); }); diff --git a/test/token/ERC721/extensions/ERC721Burnable.test.js b/test/token/ERC721/extensions/ERC721Burnable.test.js index df059e090..0a5e838fe 100644 --- a/test/token/ERC721/extensions/ERC721Burnable.test.js +++ b/test/token/ERC721/extensions/ERC721Burnable.test.js @@ -1,80 +1,75 @@ -const { BN, constants, expectEvent } = require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../../../helpers/customError'); - -const ERC721Burnable = artifacts.require('$ERC721Burnable'); - -contract('ERC721Burnable', function (accounts) { - const [owner, approved, another] = accounts; +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); - const firstTokenId = new BN(1); - const secondTokenId = new BN(2); - const unknownTokenId = new BN(3); +const name = 'Non Fungible Token'; +const symbol = 'NFT'; +const tokenId = 1n; +const otherTokenId = 2n; +const unknownTokenId = 3n; - const name = 'Non Fungible Token'; - const symbol = 'NFT'; +async function fixture() { + const [owner, approved, another] = await ethers.getSigners(); + const token = await ethers.deployContract('$ERC721Burnable', [name, symbol]); + return { owner, approved, another, token }; +} +describe('ERC721Burnable', function () { beforeEach(async function () { - this.token = await ERC721Burnable.new(name, symbol); + Object.assign(this, await loadFixture(fixture)); }); describe('like a burnable ERC721', function () { beforeEach(async function () { - await this.token.$_mint(owner, firstTokenId); - await this.token.$_mint(owner, secondTokenId); + await this.token.$_mint(this.owner, tokenId); + await this.token.$_mint(this.owner, otherTokenId); }); describe('burn', function () { - const tokenId = firstTokenId; - let receipt = null; - describe('when successful', function () { - beforeEach(async function () { - receipt = await this.token.burn(tokenId, { from: owner }); - }); + it('emits a burn event, burns the given token ID and adjusts the balance of the owner', async function () { + const balanceBefore = await this.token.balanceOf(this.owner); - it('burns the given token ID and adjusts the balance of the owner', async function () { - await expectRevertCustomError(this.token.ownerOf(tokenId), 'ERC721NonexistentToken', [tokenId]); - expect(await this.token.balanceOf(owner)).to.be.bignumber.equal('1'); - }); + await expect(this.token.connect(this.owner).burn(tokenId)) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); - it('emits a burn event', async function () { - expectEvent(receipt, 'Transfer', { - from: owner, - to: constants.ZERO_ADDRESS, - tokenId: tokenId, - }); + await expect(this.token.ownerOf(tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(tokenId); + + expect(await this.token.balanceOf(this.owner)).to.equal(balanceBefore - 1n); }); }); describe('when there is a previous approval burned', function () { beforeEach(async function () { - await this.token.approve(approved, tokenId, { from: owner }); - receipt = await this.token.burn(tokenId, { from: owner }); + await this.token.connect(this.owner).approve(this.approved, tokenId); + await this.token.connect(this.owner).burn(tokenId); }); context('getApproved', function () { it('reverts', async function () { - await expectRevertCustomError(this.token.getApproved(tokenId), 'ERC721NonexistentToken', [tokenId]); + await expect(this.token.getApproved(tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(tokenId); }); }); }); describe('when there is no previous approval burned', function () { it('reverts', async function () { - await expectRevertCustomError(this.token.burn(tokenId, { from: another }), 'ERC721InsufficientApproval', [ - another, - tokenId, - ]); + await expect(this.token.connect(this.another).burn(tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') + .withArgs(this.another.address, tokenId); }); }); describe('when the given token ID was not tracked by this contract', function () { it('reverts', async function () { - await expectRevertCustomError(this.token.burn(unknownTokenId, { from: owner }), 'ERC721NonexistentToken', [ - unknownTokenId, - ]); + await expect(this.token.connect(this.owner).burn(unknownTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(unknownTokenId); }); }); }); diff --git a/test/token/ERC721/extensions/ERC721Consecutive.test.js b/test/token/ERC721/extensions/ERC721Consecutive.test.js index e4ee3196d..b83e2feb4 100644 --- a/test/token/ERC721/extensions/ERC721Consecutive.test.js +++ b/test/token/ERC721/extensions/ERC721Consecutive.test.js @@ -1,55 +1,60 @@ -const { constants, expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { sum } = require('../../../helpers/math'); -const { expectRevertCustomError } = require('../../../helpers/customError'); -const { ZERO_ADDRESS } = require('@openzeppelin/test-helpers/src/constants'); - -const ERC721ConsecutiveMock = artifacts.require('$ERC721ConsecutiveMock'); -const ERC721ConsecutiveEnumerableMock = artifacts.require('$ERC721ConsecutiveEnumerableMock'); -const ERC721ConsecutiveNoConstructorMintMock = artifacts.require('$ERC721ConsecutiveNoConstructorMintMock'); - -contract('ERC721Consecutive', function (accounts) { - const [user1, user2, user3, receiver] = accounts; - - const name = 'Non Fungible Token'; - const symbol = 'NFT'; - const batches = [ - { receiver: user1, amount: 0 }, - { receiver: user1, amount: 1 }, - { receiver: user1, amount: 2 }, - { receiver: user2, amount: 5 }, - { receiver: user3, amount: 0 }, - { receiver: user1, amount: 7 }, - ]; - const delegates = [user1, user3]; - - for (const offset of [0, 1, 42]) { + +const name = 'Non Fungible Token'; +const symbol = 'NFT'; + +describe('ERC721Consecutive', function () { + for (const offset of [0n, 1n, 42n]) { describe(`with offset ${offset}`, function () { - beforeEach(async function () { - this.token = await ERC721ConsecutiveMock.new( + async function fixture() { + const accounts = await ethers.getSigners(); + const [alice, bruce, chris, receiver] = accounts; + + const batches = [ + { receiver: alice, amount: 0n }, + { receiver: alice, amount: 1n }, + { receiver: alice, amount: 2n }, + { receiver: bruce, amount: 5n }, + { receiver: chris, amount: 0n }, + { receiver: alice, amount: 7n }, + ]; + const delegates = [alice, chris]; + + const token = await ethers.deployContract('$ERC721ConsecutiveMock', [ name, symbol, offset, delegates, batches.map(({ receiver }) => receiver), batches.map(({ amount }) => amount), - ); + ]); + + return { accounts, alice, bruce, chris, receiver, batches, delegates, token }; + } + + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); describe('minting during construction', function () { it('events are emitted at construction', async function () { let first = offset; - - for (const batch of batches) { + for (const batch of this.batches) { if (batch.amount > 0) { - await expectEvent.inConstruction(this.token, 'ConsecutiveTransfer', { - fromTokenId: web3.utils.toBN(first), - toTokenId: web3.utils.toBN(first + batch.amount - 1), - fromAddress: constants.ZERO_ADDRESS, - toAddress: batch.receiver, - }); + await expect(this.token.deploymentTransaction()) + .to.emit(this.token, 'ConsecutiveTransfer') + .withArgs( + first /* fromTokenId */, + first + batch.amount - 1n /* toTokenId */, + ethers.ZeroAddress /* fromAddress */, + batch.receiver.address /* toAddress */, + ); } else { - // expectEvent.notEmitted.inConstruction only looks at event name, and doesn't check the parameters + // ".to.not.emit" only looks at event name, and doesn't check the parameters } first += batch.amount; } @@ -57,166 +62,175 @@ contract('ERC721Consecutive', function (accounts) { it('ownership is set', async function () { const owners = [ - ...Array(offset).fill(constants.ZERO_ADDRESS), - ...batches.flatMap(({ receiver, amount }) => Array(amount).fill(receiver)), + ...Array(Number(offset)).fill(ethers.ZeroAddress), + ...this.batches.flatMap(({ receiver, amount }) => Array(Number(amount)).fill(receiver.address)), ]; for (const tokenId in owners) { - if (owners[tokenId] != constants.ZERO_ADDRESS) { - expect(await this.token.ownerOf(tokenId)).to.be.equal(owners[tokenId]); + if (owners[tokenId] != ethers.ZeroAddress) { + expect(await this.token.ownerOf(tokenId)).to.equal(owners[tokenId]); } } }); it('balance & voting power are set', async function () { - for (const account of accounts) { + for (const account of this.accounts) { const balance = - sum(...batches.filter(({ receiver }) => receiver === account).map(({ amount }) => amount)) ?? 0; + sum(...this.batches.filter(({ receiver }) => receiver === account).map(({ amount }) => amount)) ?? 0n; - expect(await this.token.balanceOf(account)).to.be.bignumber.equal(web3.utils.toBN(balance)); + expect(await this.token.balanceOf(account)).to.equal(balance); // If not delegated at construction, check before + do delegation - if (!delegates.includes(account)) { - expect(await this.token.getVotes(account)).to.be.bignumber.equal(web3.utils.toBN(0)); + if (!this.delegates.includes(account)) { + expect(await this.token.getVotes(account)).to.equal(0n); - await this.token.delegate(account, { from: account }); + await this.token.connect(account).delegate(account); } // At this point all accounts should have delegated - expect(await this.token.getVotes(account)).to.be.bignumber.equal(web3.utils.toBN(balance)); + expect(await this.token.getVotes(account)).to.equal(balance); } }); it('reverts on consecutive minting to the zero address', async function () { - await expectRevertCustomError( - ERC721ConsecutiveMock.new(name, symbol, offset, delegates, [ZERO_ADDRESS], [10]), - 'ERC721InvalidReceiver', - [ZERO_ADDRESS], - ); + await expect( + ethers.deployContract('$ERC721ConsecutiveMock', [ + name, + symbol, + offset, + this.delegates, + [ethers.ZeroAddress], + [10], + ]), + ) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') + .withArgs(ethers.ZeroAddress); }); }); describe('minting after construction', function () { it('consecutive minting is not possible after construction', async function () { - await expectRevertCustomError(this.token.$_mintConsecutive(user1, 10), 'ERC721ForbiddenBatchMint', []); + await expect(this.token.$_mintConsecutive(this.alice, 10)).to.be.revertedWithCustomError( + this.token, + 'ERC721ForbiddenBatchMint', + ); }); it('simple minting is possible after construction', async function () { - const tokenId = sum(...batches.map(b => b.amount)) + offset; + const tokenId = sum(...this.batches.map(b => b.amount)) + offset; - await expectRevertCustomError(this.token.ownerOf(tokenId), 'ERC721NonexistentToken', [tokenId]); + await expect(this.token.ownerOf(tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(tokenId); - expectEvent(await this.token.$_mint(user1, tokenId), 'Transfer', { - from: constants.ZERO_ADDRESS, - to: user1, - tokenId: tokenId.toString(), - }); + await expect(this.token.$_mint(this.alice, tokenId)) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.alice.address, tokenId); }); it('cannot mint a token that has been batched minted', async function () { - const tokenId = sum(...batches.map(b => b.amount)) + offset - 1; + const tokenId = sum(...this.batches.map(b => b.amount)) + offset - 1n; - expect(await this.token.ownerOf(tokenId)).to.be.not.equal(constants.ZERO_ADDRESS); + expect(await this.token.ownerOf(tokenId)).to.not.equal(ethers.ZeroAddress); - await expectRevertCustomError(this.token.$_mint(user1, tokenId), 'ERC721InvalidSender', [ZERO_ADDRESS]); + await expect(this.token.$_mint(this.alice, tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721InvalidSender') + .withArgs(ethers.ZeroAddress); }); }); describe('ERC721 behavior', function () { - const tokenId = web3.utils.toBN(offset + 1); + const tokenId = offset + 1n; it('core takes over ownership on transfer', async function () { - await this.token.transferFrom(user1, receiver, tokenId, { from: user1 }); + await this.token.connect(this.alice).transferFrom(this.alice, this.receiver, tokenId); - expect(await this.token.ownerOf(tokenId)).to.be.equal(receiver); + expect(await this.token.ownerOf(tokenId)).to.equal(this.receiver.address); }); it('tokens can be burned and re-minted #1', async function () { - expectEvent(await this.token.$_burn(tokenId, { from: user1 }), 'Transfer', { - from: user1, - to: constants.ZERO_ADDRESS, - tokenId, - }); + await expect(this.token.connect(this.alice).$_burn(tokenId)) + .to.emit(this.token, 'Transfer') + .withArgs(this.alice.address, ethers.ZeroAddress, tokenId); - await expectRevertCustomError(this.token.ownerOf(tokenId), 'ERC721NonexistentToken', [tokenId]); + await expect(this.token.ownerOf(tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(tokenId); - expectEvent(await this.token.$_mint(user2, tokenId), 'Transfer', { - from: constants.ZERO_ADDRESS, - to: user2, - tokenId, - }); + await expect(this.token.$_mint(this.bruce, tokenId)) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.bruce.address, tokenId); - expect(await this.token.ownerOf(tokenId)).to.be.equal(user2); + expect(await this.token.ownerOf(tokenId)).to.equal(this.bruce.address); }); it('tokens can be burned and re-minted #2', async function () { - const tokenId = web3.utils.toBN(sum(...batches.map(({ amount }) => amount)) + offset); + const tokenId = sum(...this.batches.map(({ amount }) => amount)) + offset; - await expectRevertCustomError(this.token.ownerOf(tokenId), 'ERC721NonexistentToken', [tokenId]); + await expect(this.token.ownerOf(tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(tokenId); // mint - await this.token.$_mint(user1, tokenId); + await expect(this.token.$_mint(this.alice, tokenId)) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.alice.address, tokenId); - expect(await this.token.ownerOf(tokenId), user1); + expect(await this.token.ownerOf(tokenId)).to.equal(this.alice.address); // burn - expectEvent(await this.token.$_burn(tokenId, { from: user1 }), 'Transfer', { - from: user1, - to: constants.ZERO_ADDRESS, - tokenId, - }); + await expect(await this.token.$_burn(tokenId)) + .to.emit(this.token, 'Transfer') + .withArgs(this.alice.address, ethers.ZeroAddress, tokenId); - await expectRevertCustomError(this.token.ownerOf(tokenId), 'ERC721NonexistentToken', [tokenId]); + await expect(this.token.ownerOf(tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(tokenId); // re-mint - expectEvent(await this.token.$_mint(user2, tokenId), 'Transfer', { - from: constants.ZERO_ADDRESS, - to: user2, - tokenId, - }); + await expect(this.token.$_mint(this.bruce, tokenId)) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.bruce.address, tokenId); - expect(await this.token.ownerOf(tokenId), user2); + expect(await this.token.ownerOf(tokenId)).to.equal(this.bruce.address); }); }); }); } describe('invalid use', function () { + const receiver = ethers.Wallet.createRandom(); + it('cannot mint a batch larger than 5000', async function () { - await expectRevertCustomError( - ERC721ConsecutiveMock.new(name, symbol, 0, [], [user1], ['5001']), - 'ERC721ExceededMaxBatchMint', - [5000, 5001], - ); + const { interface } = await ethers.getContractFactory('$ERC721ConsecutiveMock'); + + await expect(ethers.deployContract('$ERC721ConsecutiveMock', [name, symbol, 0, [], [receiver], [5001n]])) + .to.be.revertedWithCustomError({ interface }, 'ERC721ExceededMaxBatchMint') + .withArgs(5001n, 5000n); }); it('cannot use single minting during construction', async function () { - await expectRevertCustomError( - ERC721ConsecutiveNoConstructorMintMock.new(name, symbol), - 'ERC721ForbiddenMint', - [], - ); + const { interface } = await ethers.getContractFactory('$ERC721ConsecutiveNoConstructorMintMock'); + + await expect( + ethers.deployContract('$ERC721ConsecutiveNoConstructorMintMock', [name, symbol]), + ).to.be.revertedWithCustomError({ interface }, 'ERC721ForbiddenMint'); }); it('cannot use single minting during construction', async function () { - await expectRevertCustomError( - ERC721ConsecutiveNoConstructorMintMock.new(name, symbol), - 'ERC721ForbiddenMint', - [], - ); + const { interface } = await ethers.getContractFactory('$ERC721ConsecutiveNoConstructorMintMock'); + + await expect( + ethers.deployContract('$ERC721ConsecutiveNoConstructorMintMock', [name, symbol]), + ).to.be.revertedWithCustomError({ interface }, 'ERC721ForbiddenMint'); }); it('consecutive mint not compatible with enumerability', async function () { - await expectRevertCustomError( - ERC721ConsecutiveEnumerableMock.new( - name, - symbol, - batches.map(({ receiver }) => receiver), - batches.map(({ amount }) => amount), - ), - 'ERC721EnumerableForbiddenBatchMint', - [], - ); + const { interface } = await ethers.getContractFactory('$ERC721ConsecutiveEnumerableMock'); + + await expect( + ethers.deployContract('$ERC721ConsecutiveEnumerableMock', [name, symbol, [receiver], [100n]]), + ).to.be.revertedWithCustomError({ interface }, 'ERC721EnumerableForbiddenBatchMint'); }); }); }); diff --git a/test/token/ERC721/extensions/ERC721Pausable.test.js b/test/token/ERC721/extensions/ERC721Pausable.test.js index 5d77149f2..2be0c902d 100644 --- a/test/token/ERC721/extensions/ERC721Pausable.test.js +++ b/test/token/ERC721/extensions/ERC721Pausable.test.js @@ -1,89 +1,80 @@ -const { BN, constants } = require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../../../helpers/customError'); - -const ERC721Pausable = artifacts.require('$ERC721Pausable'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -contract('ERC721Pausable', function (accounts) { - const [owner, receiver, operator] = accounts; +const name = 'Non Fungible Token'; +const symbol = 'NFT'; +const tokenId = 1n; +const otherTokenId = 2n; +const data = ethers.Typed.bytes('0x42'); - const name = 'Non Fungible Token'; - const symbol = 'NFT'; +async function fixture() { + const [owner, receiver, operator] = await ethers.getSigners(); + const token = await ethers.deployContract('$ERC721Pausable', [name, symbol]); + return { owner, receiver, operator, token }; +} +describe('ERC721Pausable', function () { beforeEach(async function () { - this.token = await ERC721Pausable.new(name, symbol); + Object.assign(this, await loadFixture(fixture)); }); context('when token is paused', function () { - const firstTokenId = new BN(1); - const secondTokenId = new BN(1337); - - const mockData = '0x42'; - beforeEach(async function () { - await this.token.$_mint(owner, firstTokenId, { from: owner }); + await this.token.$_mint(this.owner, tokenId); await this.token.$_pause(); }); it('reverts when trying to transferFrom', async function () { - await expectRevertCustomError( - this.token.transferFrom(owner, receiver, firstTokenId, { from: owner }), - 'EnforcedPause', - [], - ); + await expect( + this.token.connect(this.owner).transferFrom(this.owner, this.receiver, tokenId), + ).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); it('reverts when trying to safeTransferFrom', async function () { - await expectRevertCustomError( - this.token.safeTransferFrom(owner, receiver, firstTokenId, { from: owner }), - 'EnforcedPause', - [], - ); + await expect( + this.token.connect(this.owner).safeTransferFrom(this.owner, this.receiver, tokenId), + ).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); it('reverts when trying to safeTransferFrom with data', async function () { - await expectRevertCustomError( - this.token.methods['safeTransferFrom(address,address,uint256,bytes)'](owner, receiver, firstTokenId, mockData, { - from: owner, - }), - 'EnforcedPause', - [], - ); + await expect( + this.token.connect(this.owner).safeTransferFrom(this.owner, this.receiver, tokenId, data), + ).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); it('reverts when trying to mint', async function () { - await expectRevertCustomError(this.token.$_mint(receiver, secondTokenId), 'EnforcedPause', []); + await expect(this.token.$_mint(this.receiver, otherTokenId)).to.be.revertedWithCustomError( + this.token, + 'EnforcedPause', + ); }); it('reverts when trying to burn', async function () { - await expectRevertCustomError(this.token.$_burn(firstTokenId), 'EnforcedPause', []); + await expect(this.token.$_burn(tokenId)).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); describe('getApproved', function () { it('returns approved address', async function () { - const approvedAccount = await this.token.getApproved(firstTokenId); - expect(approvedAccount).to.equal(constants.ZERO_ADDRESS); + expect(await this.token.getApproved(tokenId)).to.equal(ethers.ZeroAddress); }); }); describe('balanceOf', function () { it('returns the amount of tokens owned by the given address', async function () { - const balance = await this.token.balanceOf(owner); - expect(balance).to.be.bignumber.equal('1'); + expect(await this.token.balanceOf(this.owner)).to.equal(1n); }); }); describe('ownerOf', function () { it('returns the amount of tokens owned by the given address', async function () { - const ownerOfToken = await this.token.ownerOf(firstTokenId); - expect(ownerOfToken).to.equal(owner); + expect(await this.token.ownerOf(tokenId)).to.equal(this.owner.address); }); }); describe('isApprovedForAll', function () { it('returns the approval of the operator', async function () { - expect(await this.token.isApprovedForAll(owner, operator)).to.equal(false); + expect(await this.token.isApprovedForAll(this.owner, this.operator)).to.be.false; }); }); }); diff --git a/test/token/ERC721/extensions/ERC721Royalty.test.js b/test/token/ERC721/extensions/ERC721Royalty.test.js index 78cba9858..e11954ae7 100644 --- a/test/token/ERC721/extensions/ERC721Royalty.test.js +++ b/test/token/ERC721/extensions/ERC721Royalty.test.js @@ -1,45 +1,55 @@ -require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { shouldBehaveLikeERC2981 } = require('../../common/ERC2981.behavior'); -const ERC721Royalty = artifacts.require('$ERC721Royalty'); +const name = 'Non Fungible Token'; +const symbol = 'NFT'; -contract('ERC721Royalty', function (accounts) { - const [account1, account2, recipient] = accounts; - const tokenId1 = web3.utils.toBN('1'); - const tokenId2 = web3.utils.toBN('2'); - const royalty = web3.utils.toBN('200'); - const salePrice = web3.utils.toBN('1000'); +const tokenId1 = 1n; +const tokenId2 = 2n; +const royalty = 200n; +const salePrice = 1000n; +async function fixture() { + const [account1, account2, recipient] = await ethers.getSigners(); + + const token = await ethers.deployContract('$ERC721Royalty', [name, symbol]); + await token.$_mint(account1, tokenId1); + await token.$_mint(account1, tokenId2); + + return { account1, account2, recipient, token }; +} + +describe('ERC721Royalty', function () { beforeEach(async function () { - this.token = await ERC721Royalty.new('My Token', 'TKN'); - - await this.token.$_mint(account1, tokenId1); - await this.token.$_mint(account1, tokenId2); - this.account1 = account1; - this.account2 = account2; - this.tokenId1 = tokenId1; - this.tokenId2 = tokenId2; - this.salePrice = salePrice; + Object.assign( + this, + await loadFixture(fixture), + { tokenId1, tokenId2, royalty, salePrice }, // set for behavior tests + ); }); describe('token specific functions', function () { beforeEach(async function () { - await this.token.$_setTokenRoyalty(tokenId1, recipient, royalty); + await this.token.$_setTokenRoyalty(tokenId1, this.recipient, royalty); }); it('royalty information are kept during burn and re-mint', async function () { await this.token.$_burn(tokenId1); - const tokenInfoA = await this.token.royaltyInfo(tokenId1, salePrice); - expect(tokenInfoA[0]).to.be.equal(recipient); - expect(tokenInfoA[1]).to.be.bignumber.equal(salePrice.mul(royalty).divn(1e4)); + expect(await this.token.royaltyInfo(tokenId1, salePrice)).to.deep.equal([ + this.recipient.address, + (salePrice * royalty) / 10000n, + ]); - await this.token.$_mint(account2, tokenId1); + await this.token.$_mint(this.account2, tokenId1); - const tokenInfoB = await this.token.royaltyInfo(tokenId1, salePrice); - expect(tokenInfoB[0]).to.be.equal(recipient); - expect(tokenInfoB[1]).to.be.bignumber.equal(salePrice.mul(royalty).divn(1e4)); + expect(await this.token.royaltyInfo(tokenId1, salePrice)).to.deep.equal([ + this.recipient.address, + (salePrice * royalty) / 10000n, + ]); }); }); diff --git a/test/token/ERC721/extensions/ERC721URIStorage.test.js b/test/token/ERC721/extensions/ERC721URIStorage.test.js index 8c882fab0..3a74f55ca 100644 --- a/test/token/ERC721/extensions/ERC721URIStorage.test.js +++ b/test/token/ERC721/extensions/ERC721URIStorage.test.js @@ -1,63 +1,64 @@ -const { BN, expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { shouldSupportInterfaces } = require('../../../utils/introspection/SupportsInterface.behavior'); -const { expectRevertCustomError } = require('../../../helpers/customError'); - -const ERC721URIStorageMock = artifacts.require('$ERC721URIStorageMock'); - -contract('ERC721URIStorage', function (accounts) { - const [owner] = accounts; - - const name = 'Non Fungible Token'; - const symbol = 'NFT'; - - const firstTokenId = new BN('5042'); - const nonExistentTokenId = new BN('13'); +const name = 'Non Fungible Token'; +const symbol = 'NFT'; +const baseURI = 'https://api.example.com/v1/'; +const otherBaseURI = 'https://api.example.com/v2/'; +const sampleUri = 'mock://mytoken'; +const tokenId = 1n; +const nonExistentTokenId = 2n; + +async function fixture() { + const [owner] = await ethers.getSigners(); + const token = await ethers.deployContract('$ERC721URIStorageMock', [name, symbol]); + return { owner, token }; +} + +contract('ERC721URIStorage', function () { beforeEach(async function () { - this.token = await ERC721URIStorageMock.new(name, symbol); + Object.assign(this, await loadFixture(fixture)); }); shouldSupportInterfaces(['0x49064906']); describe('token URI', function () { beforeEach(async function () { - await this.token.$_mint(owner, firstTokenId); + await this.token.$_mint(this.owner, tokenId); }); - const baseURI = 'https://api.example.com/v1/'; - const sampleUri = 'mock://mytoken'; - it('it is empty by default', async function () { - expect(await this.token.tokenURI(firstTokenId)).to.be.equal(''); + expect(await this.token.tokenURI(tokenId)).to.equal(''); }); it('reverts when queried for non existent token id', async function () { - await expectRevertCustomError(this.token.tokenURI(nonExistentTokenId), 'ERC721NonexistentToken', [ - nonExistentTokenId, - ]); + await expect(this.token.tokenURI(nonExistentTokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(nonExistentTokenId); }); it('can be set for a token id', async function () { - await this.token.$_setTokenURI(firstTokenId, sampleUri); - expect(await this.token.tokenURI(firstTokenId)).to.be.equal(sampleUri); + await this.token.$_setTokenURI(tokenId, sampleUri); + expect(await this.token.tokenURI(tokenId)).to.equal(sampleUri); }); it('setting the uri emits an event', async function () { - expectEvent(await this.token.$_setTokenURI(firstTokenId, sampleUri), 'MetadataUpdate', { - _tokenId: firstTokenId, - }); + await expect(this.token.$_setTokenURI(tokenId, sampleUri)) + .to.emit(this.token, 'MetadataUpdate') + .withArgs(tokenId); }); it('setting the uri for non existent token id is allowed', async function () { - expectEvent(await this.token.$_setTokenURI(nonExistentTokenId, sampleUri), 'MetadataUpdate', { - _tokenId: nonExistentTokenId, - }); + await expect(await this.token.$_setTokenURI(nonExistentTokenId, sampleUri)) + .to.emit(this.token, 'MetadataUpdate') + .withArgs(nonExistentTokenId); // value will be accessible after mint - await this.token.$_mint(owner, nonExistentTokenId); - expect(await this.token.tokenURI(nonExistentTokenId)).to.be.equal(sampleUri); + await this.token.$_mint(this.owner, nonExistentTokenId); + expect(await this.token.tokenURI(nonExistentTokenId)).to.equal(sampleUri); }); it('base URI can be set', async function () { @@ -67,48 +68,54 @@ contract('ERC721URIStorage', function (accounts) { it('base URI is added as a prefix to the token URI', async function () { await this.token.setBaseURI(baseURI); - await this.token.$_setTokenURI(firstTokenId, sampleUri); + await this.token.$_setTokenURI(tokenId, sampleUri); - expect(await this.token.tokenURI(firstTokenId)).to.be.equal(baseURI + sampleUri); + expect(await this.token.tokenURI(tokenId)).to.equal(baseURI + sampleUri); }); it('token URI can be changed by changing the base URI', async function () { await this.token.setBaseURI(baseURI); - await this.token.$_setTokenURI(firstTokenId, sampleUri); + await this.token.$_setTokenURI(tokenId, sampleUri); - const newBaseURI = 'https://api.example.com/v2/'; - await this.token.setBaseURI(newBaseURI); - expect(await this.token.tokenURI(firstTokenId)).to.be.equal(newBaseURI + sampleUri); + await this.token.setBaseURI(otherBaseURI); + expect(await this.token.tokenURI(tokenId)).to.equal(otherBaseURI + sampleUri); }); it('tokenId is appended to base URI for tokens with no URI', async function () { await this.token.setBaseURI(baseURI); - expect(await this.token.tokenURI(firstTokenId)).to.be.equal(baseURI + firstTokenId); + expect(await this.token.tokenURI(tokenId)).to.equal(baseURI + tokenId); }); it('tokens without URI can be burnt ', async function () { - await this.token.$_burn(firstTokenId); + await this.token.$_burn(tokenId); - await expectRevertCustomError(this.token.tokenURI(firstTokenId), 'ERC721NonexistentToken', [firstTokenId]); + await expect(this.token.tokenURI(tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(tokenId); }); it('tokens with URI can be burnt ', async function () { - await this.token.$_setTokenURI(firstTokenId, sampleUri); + await this.token.$_setTokenURI(tokenId, sampleUri); - await this.token.$_burn(firstTokenId); + await this.token.$_burn(tokenId); - await expectRevertCustomError(this.token.tokenURI(firstTokenId), 'ERC721NonexistentToken', [firstTokenId]); + await expect(this.token.tokenURI(tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(tokenId); }); it('tokens URI is kept if token is burnt and reminted ', async function () { - await this.token.$_setTokenURI(firstTokenId, sampleUri); + await this.token.$_setTokenURI(tokenId, sampleUri); + + await this.token.$_burn(tokenId); - await this.token.$_burn(firstTokenId); - await expectRevertCustomError(this.token.tokenURI(firstTokenId), 'ERC721NonexistentToken', [firstTokenId]); + await expect(this.token.tokenURI(tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') + .withArgs(tokenId); - await this.token.$_mint(owner, firstTokenId); - expect(await this.token.tokenURI(firstTokenId)).to.be.equal(sampleUri); + await this.token.$_mint(this.owner, tokenId); + expect(await this.token.tokenURI(tokenId)).to.equal(sampleUri); }); }); }); diff --git a/test/token/ERC721/extensions/ERC721Wrapper.test.js b/test/token/ERC721/extensions/ERC721Wrapper.test.js index 683997744..2c093a087 100644 --- a/test/token/ERC721/extensions/ERC721Wrapper.test.js +++ b/test/token/ERC721/extensions/ERC721Wrapper.test.js @@ -1,26 +1,29 @@ -const { BN, expectEvent, constants } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { shouldBehaveLikeERC721 } = require('../ERC721.behavior'); -const { expectRevertCustomError } = require('../../../helpers/customError'); -const ERC721 = artifacts.require('$ERC721'); -const ERC721Wrapper = artifacts.require('$ERC721Wrapper'); +const name = 'Non Fungible Token'; +const symbol = 'NFT'; +const tokenId = 1n; +const otherTokenId = 2n; -contract('ERC721Wrapper', function (accounts) { - const [initialHolder, anotherAccount, approvedAccount] = accounts; +async function fixture() { + const accounts = await ethers.getSigners(); + const [owner, approved, other] = accounts; - const name = 'My Token'; - const symbol = 'MTKN'; - const firstTokenId = new BN(1); - const secondTokenId = new BN(2); + const underlying = await ethers.deployContract('$ERC721', [name, symbol]); + await underlying.$_safeMint(owner, tokenId); + await underlying.$_safeMint(owner, otherTokenId); + const token = await ethers.deployContract('$ERC721Wrapper', [`Wrapped ${name}`, `W${symbol}`, underlying]); - beforeEach(async function () { - this.underlying = await ERC721.new(name, symbol); - this.token = await ERC721Wrapper.new(`Wrapped ${name}`, `W${symbol}`, this.underlying.address); + return { accounts, owner, approved, other, underlying, token }; +} - await this.underlying.$_safeMint(initialHolder, firstTokenId); - await this.underlying.$_safeMint(initialHolder, secondTokenId); +describe('ERC721Wrapper', function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); it('has a name', async function () { @@ -32,258 +35,167 @@ contract('ERC721Wrapper', function (accounts) { }); it('has underlying', async function () { - expect(await this.token.underlying()).to.be.bignumber.equal(this.underlying.address); + expect(await this.token.underlying()).to.equal(this.underlying.target); }); describe('depositFor', function () { it('works with token approval', async function () { - await this.underlying.approve(this.token.address, firstTokenId, { from: initialHolder }); - - const { tx } = await this.token.depositFor(initialHolder, [firstTokenId], { from: initialHolder }); - - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: initialHolder, - to: this.token.address, - tokenId: firstTokenId, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: initialHolder, - tokenId: firstTokenId, - }); + await this.underlying.connect(this.owner).approve(this.token, tokenId); + + await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId])) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.owner.address, this.token.target, tokenId) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.owner.address, tokenId); }); it('works with approval for all', async function () { - await this.underlying.setApprovalForAll(this.token.address, true, { from: initialHolder }); - - const { tx } = await this.token.depositFor(initialHolder, [firstTokenId], { from: initialHolder }); - - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: initialHolder, - to: this.token.address, - tokenId: firstTokenId, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: initialHolder, - tokenId: firstTokenId, - }); + await this.underlying.connect(this.owner).setApprovalForAll(this.token, true); + + await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId])) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.owner.address, this.token.target, tokenId) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.owner.address, tokenId); }); it('works sending to another account', async function () { - await this.underlying.approve(this.token.address, firstTokenId, { from: initialHolder }); - - const { tx } = await this.token.depositFor(anotherAccount, [firstTokenId], { from: initialHolder }); - - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: initialHolder, - to: this.token.address, - tokenId: firstTokenId, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: anotherAccount, - tokenId: firstTokenId, - }); + await this.underlying.connect(this.owner).approve(this.token, tokenId); + + await expect(this.token.connect(this.owner).depositFor(this.other, [tokenId])) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.owner.address, this.token.target, tokenId) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.other.address, tokenId); }); it('works with multiple tokens', async function () { - await this.underlying.approve(this.token.address, firstTokenId, { from: initialHolder }); - await this.underlying.approve(this.token.address, secondTokenId, { from: initialHolder }); - - const { tx } = await this.token.depositFor(initialHolder, [firstTokenId, secondTokenId], { from: initialHolder }); - - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: initialHolder, - to: this.token.address, - tokenId: firstTokenId, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: initialHolder, - tokenId: firstTokenId, - }); - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: initialHolder, - to: this.token.address, - tokenId: secondTokenId, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: initialHolder, - tokenId: secondTokenId, - }); + await this.underlying.connect(this.owner).approve(this.token, tokenId); + await this.underlying.connect(this.owner).approve(this.token, otherTokenId); + + await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId, otherTokenId])) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.owner.address, this.token.target, tokenId) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.owner.address, tokenId) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.owner.address, this.token.target, otherTokenId) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.owner.address, otherTokenId); }); it('reverts with missing approval', async function () { - await expectRevertCustomError( - this.token.depositFor(initialHolder, [firstTokenId], { from: initialHolder }), - 'ERC721InsufficientApproval', - [this.token.address, firstTokenId], - ); + await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId])) + .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') + .withArgs(this.token.target, tokenId); }); }); describe('withdrawTo', function () { beforeEach(async function () { - await this.underlying.approve(this.token.address, firstTokenId, { from: initialHolder }); - await this.token.depositFor(initialHolder, [firstTokenId], { from: initialHolder }); + await this.underlying.connect(this.owner).approve(this.token, tokenId); + await this.token.connect(this.owner).depositFor(this.owner, [tokenId]); }); it('works for an owner', async function () { - const { tx } = await this.token.withdrawTo(initialHolder, [firstTokenId], { from: initialHolder }); - - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: this.token.address, - to: initialHolder, - tokenId: firstTokenId, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: initialHolder, - to: constants.ZERO_ADDRESS, - tokenId: firstTokenId, - }); + await expect(this.token.connect(this.owner).withdrawTo(this.owner, [tokenId])) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.token.target, this.owner.address, tokenId) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); }); it('works for an approved', async function () { - await this.token.approve(approvedAccount, firstTokenId, { from: initialHolder }); - - const { tx } = await this.token.withdrawTo(initialHolder, [firstTokenId], { from: approvedAccount }); - - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: this.token.address, - to: initialHolder, - tokenId: firstTokenId, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: initialHolder, - to: constants.ZERO_ADDRESS, - tokenId: firstTokenId, - }); + await this.token.connect(this.owner).approve(this.approved, tokenId); + + await expect(this.token.connect(this.approved).withdrawTo(this.owner, [tokenId])) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.token.target, this.owner.address, tokenId) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); }); it('works for an approved for all', async function () { - await this.token.setApprovalForAll(approvedAccount, true, { from: initialHolder }); - - const { tx } = await this.token.withdrawTo(initialHolder, [firstTokenId], { from: approvedAccount }); - - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: this.token.address, - to: initialHolder, - tokenId: firstTokenId, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: initialHolder, - to: constants.ZERO_ADDRESS, - tokenId: firstTokenId, - }); + await this.token.connect(this.owner).setApprovalForAll(this.approved, true); + + await expect(this.token.connect(this.approved).withdrawTo(this.owner, [tokenId])) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.token.target, this.owner.address, tokenId) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); }); it("doesn't work for a non-owner nor approved", async function () { - await expectRevertCustomError( - this.token.withdrawTo(initialHolder, [firstTokenId], { from: anotherAccount }), - 'ERC721InsufficientApproval', - [anotherAccount, firstTokenId], - ); + await expect(this.token.connect(this.other).withdrawTo(this.owner, [tokenId])) + .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') + .withArgs(this.other.address, tokenId); }); it('works with multiple tokens', async function () { - await this.underlying.approve(this.token.address, secondTokenId, { from: initialHolder }); - await this.token.depositFor(initialHolder, [secondTokenId], { from: initialHolder }); - - const { tx } = await this.token.withdrawTo(initialHolder, [firstTokenId, secondTokenId], { from: initialHolder }); - - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: this.token.address, - to: initialHolder, - tokenId: firstTokenId, - }); - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: this.token.address, - to: initialHolder, - tokenId: secondTokenId, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: initialHolder, - to: constants.ZERO_ADDRESS, - tokenId: firstTokenId, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: initialHolder, - to: constants.ZERO_ADDRESS, - tokenId: secondTokenId, - }); + await this.underlying.connect(this.owner).approve(this.token, otherTokenId); + await this.token.connect(this.owner).depositFor(this.owner, [otherTokenId]); + + await expect(this.token.connect(this.owner).withdrawTo(this.owner, [tokenId, otherTokenId])) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.token.target, this.owner.address, tokenId) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.token.target, this.owner.address, tokenId) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, ethers.ZeroAddress, tokenId) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); }); it('works to another account', async function () { - const { tx } = await this.token.withdrawTo(anotherAccount, [firstTokenId], { from: initialHolder }); - - await expectEvent.inTransaction(tx, this.underlying, 'Transfer', { - from: this.token.address, - to: anotherAccount, - tokenId: firstTokenId, - }); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: initialHolder, - to: constants.ZERO_ADDRESS, - tokenId: firstTokenId, - }); + await expect(this.token.connect(this.owner).withdrawTo(this.other, [tokenId])) + .to.emit(this.underlying, 'Transfer') + .withArgs(this.token.target, this.other.address, tokenId) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); }); }); describe('onERC721Received', function () { it('only allows calls from underlying', async function () { - await expectRevertCustomError( - this.token.onERC721Received( - initialHolder, - this.token.address, - firstTokenId, - anotherAccount, // Correct data - { from: anotherAccount }, + await expect( + this.token.connect(this.other).onERC721Received( + this.owner, + this.token, + tokenId, + this.other.address, // Correct data ), - 'ERC721UnsupportedToken', - [anotherAccount], - ); + ) + .to.be.revertedWithCustomError(this.token, 'ERC721UnsupportedToken') + .withArgs(this.other.address); }); it('mints a token to from', async function () { - const { tx } = await this.underlying.safeTransferFrom(initialHolder, this.token.address, firstTokenId, { - from: initialHolder, - }); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: initialHolder, - tokenId: firstTokenId, - }); + await expect(this.underlying.connect(this.owner).safeTransferFrom(this.owner, this.token, tokenId)) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.owner.address, tokenId); }); }); describe('_recover', function () { it('works if there is something to recover', async function () { // Should use `transferFrom` to avoid `onERC721Received` minting - await this.underlying.transferFrom(initialHolder, this.token.address, firstTokenId, { from: initialHolder }); + await this.underlying.connect(this.owner).transferFrom(this.owner, this.token, tokenId); - const { tx } = await this.token.$_recover(anotherAccount, firstTokenId); - - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: constants.ZERO_ADDRESS, - to: anotherAccount, - tokenId: firstTokenId, - }); + await expect(this.token.$_recover(this.other, tokenId)) + .to.emit(this.token, 'Transfer') + .withArgs(ethers.ZeroAddress, this.other.address, tokenId); }); it('reverts if there is nothing to recover', async function () { - const owner = await this.underlying.ownerOf(firstTokenId); - await expectRevertCustomError(this.token.$_recover(initialHolder, firstTokenId), 'ERC721IncorrectOwner', [ - this.token.address, - firstTokenId, - owner, - ]); + const holder = await this.underlying.ownerOf(tokenId); + + await expect(this.token.$_recover(holder, tokenId)) + .to.be.revertedWithCustomError(this.token, 'ERC721IncorrectOwner') + .withArgs(this.token.target, tokenId, holder); }); }); describe('ERC712 behavior', function () { - shouldBehaveLikeERC721(...accounts); + shouldBehaveLikeERC721(); }); }); diff --git a/test/token/ERC721/utils/ERC721Holder.test.js b/test/token/ERC721/utils/ERC721Holder.test.js index 4aa2b7948..01b774930 100644 --- a/test/token/ERC721/utils/ERC721Holder.test.js +++ b/test/token/ERC721/utils/ERC721Holder.test.js @@ -1,22 +1,20 @@ +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const ERC721Holder = artifacts.require('$ERC721Holder'); -const ERC721 = artifacts.require('$ERC721'); - -contract('ERC721Holder', function (accounts) { - const [owner] = accounts; - - const name = 'Non Fungible Token'; - const symbol = 'NFT'; - const tokenId = web3.utils.toBN(1); +const name = 'Non Fungible Token'; +const symbol = 'NFT'; +const tokenId = 1n; +describe('ERC721Holder', function () { it('receives an ERC721 token', async function () { - const token = await ERC721.new(name, symbol); + const [owner] = await ethers.getSigners(); + + const token = await ethers.deployContract('$ERC721', [name, symbol]); await token.$_mint(owner, tokenId); - const receiver = await ERC721Holder.new(); - await token.safeTransferFrom(owner, receiver.address, tokenId, { from: owner }); + const receiver = await ethers.deployContract('$ERC721Holder'); + await token.connect(owner).safeTransferFrom(owner, receiver, tokenId); - expect(await token.ownerOf(tokenId)).to.be.equal(receiver.address); + expect(await token.ownerOf(tokenId)).to.equal(receiver.target); }); }); diff --git a/test/token/common/ERC2981.behavior.js b/test/token/common/ERC2981.behavior.js index 1c062b052..ae6abccae 100644 --- a/test/token/common/ERC2981.behavior.js +++ b/test/token/common/ERC2981.behavior.js @@ -1,12 +1,10 @@ -const { BN, constants } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { ZERO_ADDRESS } = constants; const { shouldSupportInterfaces } = require('../../utils/introspection/SupportsInterface.behavior'); -const { expectRevertCustomError } = require('../../helpers/customError'); function shouldBehaveLikeERC2981() { - const royaltyFraction = new BN('10'); + const royaltyFraction = 10n; shouldSupportInterfaces(['ERC2981']); @@ -16,64 +14,54 @@ function shouldBehaveLikeERC2981() { }); it('checks royalty is set', async function () { - const royalty = new BN((this.salePrice * royaltyFraction) / 10000); - - const initInfo = await this.token.royaltyInfo(this.tokenId1, this.salePrice); - - expect(initInfo[0]).to.be.equal(this.account1); - expect(initInfo[1]).to.be.bignumber.equal(royalty); + expect(await this.token.royaltyInfo(this.tokenId1, this.salePrice)).to.deep.equal([ + this.account1.address, + (this.salePrice * royaltyFraction) / 10_000n, + ]); }); it('updates royalty amount', async function () { - const newPercentage = new BN('25'); + const newFraction = 25n; - // Updated royalty check - await this.token.$_setDefaultRoyalty(this.account1, newPercentage); - const royalty = new BN((this.salePrice * newPercentage) / 10000); - const newInfo = await this.token.royaltyInfo(this.tokenId1, this.salePrice); + await this.token.$_setDefaultRoyalty(this.account1, newFraction); - expect(newInfo[0]).to.be.equal(this.account1); - expect(newInfo[1]).to.be.bignumber.equal(royalty); + expect(await this.token.royaltyInfo(this.tokenId1, this.salePrice)).to.deep.equal([ + this.account1.address, + (this.salePrice * newFraction) / 10_000n, + ]); }); it('holds same royalty value for different tokens', async function () { - const newPercentage = new BN('20'); - await this.token.$_setDefaultRoyalty(this.account1, newPercentage); + const newFraction = 20n; - const token1Info = await this.token.royaltyInfo(this.tokenId1, this.salePrice); - const token2Info = await this.token.royaltyInfo(this.tokenId2, this.salePrice); + await this.token.$_setDefaultRoyalty(this.account1, newFraction); - expect(token1Info[1]).to.be.bignumber.equal(token2Info[1]); + expect(await this.token.royaltyInfo(this.tokenId1, this.salePrice)).to.deep.equal( + await this.token.royaltyInfo(this.tokenId2, this.salePrice), + ); }); it('Remove royalty information', async function () { - const newValue = new BN('0'); + const newValue = 0n; await this.token.$_deleteDefaultRoyalty(); - const token1Info = await this.token.royaltyInfo(this.tokenId1, this.salePrice); - const token2Info = await this.token.royaltyInfo(this.tokenId2, this.salePrice); - // Test royalty info is still persistent across all tokens - expect(token1Info[0]).to.be.bignumber.equal(token2Info[0]); - expect(token1Info[1]).to.be.bignumber.equal(token2Info[1]); - // Test information was deleted - expect(token1Info[0]).to.be.equal(ZERO_ADDRESS); - expect(token1Info[1]).to.be.bignumber.equal(newValue); + expect(await this.token.royaltyInfo(this.tokenId1, this.salePrice)).to.deep.equal([ethers.ZeroAddress, newValue]); + + expect(await this.token.royaltyInfo(this.tokenId2, this.salePrice)).to.deep.equal([ethers.ZeroAddress, newValue]); }); it('reverts if invalid parameters', async function () { const royaltyDenominator = await this.token.$_feeDenominator(); - await expectRevertCustomError( - this.token.$_setDefaultRoyalty(ZERO_ADDRESS, royaltyFraction), - 'ERC2981InvalidDefaultRoyaltyReceiver', - [ZERO_ADDRESS], - ); - const anotherRoyaltyFraction = new BN('11000'); - await expectRevertCustomError( - this.token.$_setDefaultRoyalty(this.account1, anotherRoyaltyFraction), - 'ERC2981InvalidDefaultRoyalty', - [anotherRoyaltyFraction, royaltyDenominator], - ); + await expect(this.token.$_setDefaultRoyalty(ethers.ZeroAddress, royaltyFraction)) + .to.be.revertedWithCustomError(this.token, 'ERC2981InvalidDefaultRoyaltyReceiver') + .withArgs(ethers.ZeroAddress); + + const anotherRoyaltyFraction = 11000n; + + await expect(this.token.$_setDefaultRoyalty(this.account1, anotherRoyaltyFraction)) + .to.be.revertedWithCustomError(this.token, 'ERC2981InvalidDefaultRoyalty') + .withArgs(anotherRoyaltyFraction, royaltyDenominator); }); }); @@ -83,83 +71,78 @@ function shouldBehaveLikeERC2981() { }); it('updates royalty amount', async function () { - const newPercentage = new BN('25'); - let royalty = new BN((this.salePrice * royaltyFraction) / 10000); - // Initial royalty check - const initInfo = await this.token.royaltyInfo(this.tokenId1, this.salePrice); + const newFraction = 25n; - expect(initInfo[0]).to.be.equal(this.account1); - expect(initInfo[1]).to.be.bignumber.equal(royalty); + expect(await this.token.royaltyInfo(this.tokenId1, this.salePrice)).to.deep.equal([ + this.account1.address, + (this.salePrice * royaltyFraction) / 10_000n, + ]); - // Updated royalty check - await this.token.$_setTokenRoyalty(this.tokenId1, this.account1, newPercentage); - royalty = new BN((this.salePrice * newPercentage) / 10000); - const newInfo = await this.token.royaltyInfo(this.tokenId1, this.salePrice); + await this.token.$_setTokenRoyalty(this.tokenId1, this.account1, newFraction); - expect(newInfo[0]).to.be.equal(this.account1); - expect(newInfo[1]).to.be.bignumber.equal(royalty); + expect(await this.token.royaltyInfo(this.tokenId1, this.salePrice)).to.deep.equal([ + this.account1.address, + (this.salePrice * newFraction) / 10_000n, + ]); }); it('holds different values for different tokens', async function () { - const newPercentage = new BN('20'); - await this.token.$_setTokenRoyalty(this.tokenId2, this.account1, newPercentage); + const newFraction = 20n; - const token1Info = await this.token.royaltyInfo(this.tokenId1, this.salePrice); - const token2Info = await this.token.royaltyInfo(this.tokenId2, this.salePrice); + await this.token.$_setTokenRoyalty(this.tokenId2, this.account1, newFraction); - // must be different even at the same this.salePrice - expect(token1Info[1]).to.not.be.bignumber.equal(token2Info[1]); + expect(await this.token.royaltyInfo(this.tokenId1, this.salePrice)).to.not.deep.equal( + await this.token.royaltyInfo(this.tokenId2, this.salePrice), + ); }); it('reverts if invalid parameters', async function () { const royaltyDenominator = await this.token.$_feeDenominator(); - await expectRevertCustomError( - this.token.$_setTokenRoyalty(this.tokenId1, ZERO_ADDRESS, royaltyFraction), - 'ERC2981InvalidTokenRoyaltyReceiver', - [this.tokenId1.toString(), ZERO_ADDRESS], - ); - const anotherRoyaltyFraction = new BN('11000'); - await expectRevertCustomError( - this.token.$_setTokenRoyalty(this.tokenId1, this.account1, anotherRoyaltyFraction), - 'ERC2981InvalidTokenRoyalty', - [this.tokenId1.toString(), anotherRoyaltyFraction, royaltyDenominator], - ); + await expect(this.token.$_setTokenRoyalty(this.tokenId1, ethers.ZeroAddress, royaltyFraction)) + .to.be.revertedWithCustomError(this.token, 'ERC2981InvalidTokenRoyaltyReceiver') + .withArgs(this.tokenId1, ethers.ZeroAddress); + + const anotherRoyaltyFraction = 11000n; + + await expect(this.token.$_setTokenRoyalty(this.tokenId1, this.account1, anotherRoyaltyFraction)) + .to.be.revertedWithCustomError(this.token, 'ERC2981InvalidTokenRoyalty') + .withArgs(this.tokenId1, anotherRoyaltyFraction, royaltyDenominator); }); it('can reset token after setting royalty', async function () { - const newPercentage = new BN('30'); - const royalty = new BN((this.salePrice * newPercentage) / 10000); - await this.token.$_setTokenRoyalty(this.tokenId1, this.account2, newPercentage); + const newFraction = 30n; - const tokenInfo = await this.token.royaltyInfo(this.tokenId1, this.salePrice); + await this.token.$_setTokenRoyalty(this.tokenId1, this.account2, newFraction); // Tokens must have own information - expect(tokenInfo[1]).to.be.bignumber.equal(royalty); - expect(tokenInfo[0]).to.be.equal(this.account2); + expect(await this.token.royaltyInfo(this.tokenId1, this.salePrice)).to.deep.equal([ + this.account2.address, + (this.salePrice * newFraction) / 10_000n, + ]); + + await this.token.$_setTokenRoyalty(this.tokenId2, this.account1, 0n); - await this.token.$_setTokenRoyalty(this.tokenId2, this.account1, new BN('0')); - const result = await this.token.royaltyInfo(this.tokenId2, this.salePrice); // Token must not share default information - expect(result[0]).to.be.equal(this.account1); - expect(result[1]).to.be.bignumber.equal(new BN('0')); + expect(await this.token.royaltyInfo(this.tokenId2, this.salePrice)).to.deep.equal([this.account1.address, 0n]); }); it('can hold default and token royalty information', async function () { - const newPercentage = new BN('30'); - const royalty = new BN((this.salePrice * newPercentage) / 10000); + const newFraction = 30n; - await this.token.$_setTokenRoyalty(this.tokenId2, this.account2, newPercentage); + await this.token.$_setTokenRoyalty(this.tokenId2, this.account2, newFraction); - const token1Info = await this.token.royaltyInfo(this.tokenId1, this.salePrice); - const token2Info = await this.token.royaltyInfo(this.tokenId2, this.salePrice); // Tokens must not have same values - expect(token1Info[1]).to.not.be.bignumber.equal(token2Info[1]); - expect(token1Info[0]).to.not.be.equal(token2Info[0]); + expect(await this.token.royaltyInfo(this.tokenId1, this.salePrice)).to.not.deep.equal([ + this.account2.address, + (this.salePrice * newFraction) / 10_000n, + ]); // Updated token must have new values - expect(token2Info[0]).to.be.equal(this.account2); - expect(token2Info[1]).to.be.bignumber.equal(royalty); + expect(await this.token.royaltyInfo(this.tokenId2, this.salePrice)).to.deep.equal([ + this.account2.address, + (this.salePrice * newFraction) / 10_000n, + ]); }); }); } From d155600d554d28b583a8ab36dee0849215d48a20 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Fri, 15 Dec 2023 17:50:46 +0100 Subject: [PATCH 138/167] Migrate `utils/types/time` tests to ethers.js (#4778) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto García --- test/utils/types/Time.test.js | 98 +++++++++++++++++------------------ 1 file changed, 47 insertions(+), 51 deletions(-) diff --git a/test/utils/types/Time.test.js b/test/utils/types/Time.test.js index d30daffc2..c55a769f9 100644 --- a/test/utils/types/Time.test.js +++ b/test/utils/types/Time.test.js @@ -1,24 +1,22 @@ -require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { clock } = require('../../helpers/time'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { + bigint: { clock }, +} = require('../../helpers/time'); + const { product } = require('../../helpers/iterate'); const { max } = require('../../helpers/math'); -const Time = artifacts.require('$Time'); - const MAX_UINT32 = 1n << (32n - 1n); const MAX_UINT48 = 1n << (48n - 1n); const SOME_VALUES = [0n, 1n, 2n, 15n, 16n, 17n, 42n]; const asUint = (value, size) => { - if (typeof value != 'bigint') { - value = BigInt(value); - } - // chai does not support bigint :/ - if (value < 0 || value >= 1n << BigInt(size)) { - throw new Error(`value is not a valid uint${size}`); - } + value = ethers.toBigInt(value); + size = ethers.toBigInt(size); + expect(value).to.be.greaterThanOrEqual(0n, `value is not a valid uint${size}`); + expect(value).to.be.lessThan(1n << size, `value is not a valid uint${size}`); return value; }; @@ -40,18 +38,23 @@ const effectSamplesForTimepoint = timepoint => [ MAX_UINT48, ]; +async function fixture() { + const mock = await ethers.deployContract('$Time'); + return { mock }; +} + contract('Time', function () { beforeEach(async function () { - this.mock = await Time.new(); + Object.assign(this, await loadFixture(fixture)); }); describe('clocks', function () { it('timestamp', async function () { - expect(await this.mock.$timestamp()).to.be.bignumber.equal(web3.utils.toBN(await clock.timestamp())); + expect(await this.mock.$timestamp()).to.equal(await clock.timestamp()); }); it('block number', async function () { - expect(await this.mock.$blockNumber()).to.be.bignumber.equal(web3.utils.toBN(await clock.blocknumber())); + expect(await this.mock.$blockNumber()).to.equal(await clock.blocknumber()); }); }); @@ -63,28 +66,28 @@ contract('Time', function () { const delay = 1272825341158973505578n; it('pack', async function () { - const packed = await this.mock.$pack(valueBefore, valueAfter, effect); - expect(packed).to.be.bignumber.equal(delay.toString()); - - const packed2 = packDelay({ valueBefore, valueAfter, effect }); - expect(packed2).to.be.equal(delay); + expect(await this.mock.$pack(valueBefore, valueAfter, effect)).to.equal(delay); + expect(packDelay({ valueBefore, valueAfter, effect })).to.equal(delay); }); it('unpack', async function () { - const unpacked = await this.mock.$unpack(delay); - expect(unpacked[0]).to.be.bignumber.equal(valueBefore.toString()); - expect(unpacked[1]).to.be.bignumber.equal(valueAfter.toString()); - expect(unpacked[2]).to.be.bignumber.equal(effect.toString()); + expect(await this.mock.$unpack(delay)).to.deep.equal([valueBefore, valueAfter, effect]); - const unpacked2 = unpackDelay(delay); - expect(unpacked2).to.be.deep.equal({ valueBefore, valueAfter, effect }); + expect(unpackDelay(delay)).to.deep.equal({ + valueBefore, + valueAfter, + effect, + }); }); }); it('toDelay', async function () { for (const value of [...SOME_VALUES, MAX_UINT32]) { - const delay = await this.mock.$toDelay(value).then(unpackDelay); - expect(delay).to.be.deep.equal({ valueBefore: 0n, valueAfter: value, effect: 0n }); + expect(await this.mock.$toDelay(value).then(unpackDelay)).to.deep.equal({ + valueBefore: 0n, + valueAfter: value, + effect: 0n, + }); } }); @@ -95,15 +98,14 @@ contract('Time', function () { for (const effect of effectSamplesForTimepoint(timepoint)) { const isPast = effect <= timepoint; - const delay = packDelay({ valueBefore, valueAfter, effect }); - expect(await this.mock.$get(delay)).to.be.bignumber.equal(String(isPast ? valueAfter : valueBefore)); - - const result = await this.mock.$getFull(delay); - expect(result[0]).to.be.bignumber.equal(String(isPast ? valueAfter : valueBefore)); - expect(result[1]).to.be.bignumber.equal(String(isPast ? 0n : valueAfter)); - expect(result[2]).to.be.bignumber.equal(String(isPast ? 0n : effect)); + expect(await this.mock.$get(delay)).to.equal(isPast ? valueAfter : valueBefore); + expect(await this.mock.$getFull(delay)).to.deep.equal([ + isPast ? valueAfter : valueBefore, + isPast ? 0n : valueAfter, + isPast ? 0n : effect, + ]); } }); @@ -119,22 +121,16 @@ contract('Time', function () { const expectedvalueBefore = isPast ? valueAfter : valueBefore; const expectedSetback = max(minSetback, expectedvalueBefore - newvalueAfter, 0n); - const result = await this.mock.$withUpdate( - packDelay({ valueBefore, valueAfter, effect }), - newvalueAfter, - minSetback, - ); - - expect(result[0]).to.be.bignumber.equal( - String( - packDelay({ - valueBefore: expectedvalueBefore, - valueAfter: newvalueAfter, - effect: timepoint + expectedSetback, - }), - ), - ); - expect(result[1]).to.be.bignumber.equal(String(timepoint + expectedSetback)); + expect( + await this.mock.$withUpdate(packDelay({ valueBefore, valueAfter, effect }), newvalueAfter, minSetback), + ).to.deep.equal([ + packDelay({ + valueBefore: expectedvalueBefore, + valueAfter: newvalueAfter, + effect: timepoint + expectedSetback, + }), + timepoint + expectedSetback, + ]); } }); }); From c3cd70811b0993aab26840034c47e63fb3a2c993 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Mon, 18 Dec 2023 17:09:23 -0300 Subject: [PATCH 139/167] Migrate governance tests to ethers.js (#4728) Co-authored-by: ernestognw Co-authored-by: Hadrien Croubois --- package-lock.json | 20 +- package.json | 1 - test/governance/Governor.test.js | 994 +++++----- test/governance/TimelockController.test.js | 1653 ++++++++--------- .../extensions/GovernorERC721.test.js | 181 +- .../GovernorPreventLateQuorum.test.js | 246 ++- .../extensions/GovernorStorage.test.js | 209 ++- .../extensions/GovernorTimelockAccess.test.js | 858 +++++---- .../GovernorTimelockCompound.test.js | 447 ++--- .../GovernorTimelockControl.test.js | 519 +++--- .../GovernorVotesQuorumFraction.test.js | 164 +- .../extensions/GovernorWithParams.test.js | 327 ++-- test/governance/utils/ERC6372.behavior.js | 10 +- test/governance/utils/Votes.behavior.js | 467 +++-- test/governance/utils/Votes.test.js | 110 +- test/helpers/governance.js | 339 ++-- test/helpers/iterate.js | 7 + test/helpers/time.js | 11 +- test/helpers/txpool.js | 25 +- .../ERC20/extensions/ERC20Permit.test.js | 6 +- .../token/ERC20/extensions/ERC20Votes.test.js | 811 ++++---- .../ERC721/extensions/ERC721Votes.test.js | 261 +-- 22 files changed, 3734 insertions(+), 3932 deletions(-) diff --git a/package-lock.json b/package-lock.json index 922723c43..fc8a1ca7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "openzeppelin-solidity", - "version": "5.0.0", + "version": "5.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "openzeppelin-solidity", - "version": "5.0.0", + "version": "5.0.1", "license": "MIT", "devDependencies": { "@changesets/changelog-github": "^0.5.0", @@ -25,7 +25,6 @@ "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", - "array.prototype.at": "^1.1.1", "chai": "^4.2.0", "eslint": "^8.30.0", "eslint-config-prettier": "^9.0.0", @@ -4908,21 +4907,6 @@ "node": ">=0.10.0" } }, - "node_modules/array.prototype.at": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.at/-/array.prototype.at-1.1.2.tgz", - "integrity": "sha512-TPj626jUZMc2Qbld8uXKZrXM/lSStx2KfbIyF70Ui9RgdgibpTWC6WGCuff6qQ7xYzqXtir60WAHrfmknkF3Vw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/array.prototype.findlast": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.3.tgz", diff --git a/package.json b/package.json index d1005679c..644de03b9 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,6 @@ "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", - "array.prototype.at": "^1.1.1", "chai": "^4.2.0", "eslint": "^8.30.0", "eslint-config-prettier": "^9.0.0", diff --git a/test/governance/Governor.test.js b/test/governance/Governor.test.js index b277d8c12..f27e0d9f2 100644 --- a/test/governance/Governor.test.js +++ b/test/governance/Governor.test.js @@ -1,77 +1,94 @@ -const { constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const ethSigUtil = require('eth-sig-util'); -const Wallet = require('ethereumjs-wallet').default; +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const Enums = require('../helpers/enums'); -const { getDomain, domainType, Ballot } = require('../helpers/eip712'); -const { GovernorHelper, proposalStatesToBitMap } = require('../helpers/governance'); -const { clockFromReceipt } = require('../helpers/time'); -const { expectRevertCustomError } = require('../helpers/customError'); +const { GovernorHelper } = require('../helpers/governance'); +const { getDomain, Ballot } = require('../helpers/eip712'); +const { bigint: Enums } = require('../helpers/enums'); +const { bigint: time } = require('../helpers/time'); const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior'); const { shouldBehaveLikeERC6372 } = require('./utils/ERC6372.behavior'); -const { ZERO_BYTES32 } = require('@openzeppelin/test-helpers/src/constants'); - -const Governor = artifacts.require('$GovernorMock'); -const CallReceiver = artifacts.require('CallReceiverMock'); -const ERC721 = artifacts.require('$ERC721'); -const ERC1155 = artifacts.require('$ERC1155'); -const ERC1271WalletMock = artifacts.require('ERC1271WalletMock'); const TOKENS = [ - { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, - { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' }, - { Token: artifacts.require('$ERC20VotesLegacyMock'), mode: 'blocknumber' }, + { Token: '$ERC20Votes', mode: 'blocknumber' }, + { Token: '$ERC20VotesTimestampMock', mode: 'timestamp' }, + { Token: '$ERC20VotesLegacyMock', mode: 'blocknumber' }, ]; -contract('Governor', function (accounts) { - const [owner, proposer, voter1, voter2, voter3, voter4] = accounts; - - const name = 'OZ-Governor'; - const version = '1'; - const tokenName = 'MockToken'; - const tokenSymbol = 'MTKN'; - const tokenSupply = web3.utils.toWei('100'); - const votingDelay = web3.utils.toBN(4); - const votingPeriod = web3.utils.toBN(16); - const value = web3.utils.toWei('1'); - - for (const { mode, Token } of TOKENS) { - describe(`using ${Token._json.contractName}`, function () { +const name = 'OZ-Governor'; +const version = '1'; +const tokenName = 'MockToken'; +const tokenSymbol = 'MTKN'; +const tokenSupply = ethers.parseEther('100'); +const votingDelay = 4n; +const votingPeriod = 16n; +const value = ethers.parseEther('1'); + +const signBallot = account => (contract, message) => + getDomain(contract).then(domain => account.signTypedData(domain, { Ballot }, message)); + +async function deployToken(contractName) { + try { + return await ethers.deployContract(contractName, [tokenName, tokenSymbol, tokenName, version]); + } catch (error) { + if (error.message == 'incorrect number of arguments to constructor') { + // ERC20VotesLegacyMock has a different construction that uses version='1' by default. + return ethers.deployContract(contractName, [tokenName, tokenSymbol, tokenName]); + } + throw error; + } +} + +describe('Governor', function () { + for (const { Token, mode } of TOKENS) { + const fixture = async () => { + const [owner, proposer, voter1, voter2, voter3, voter4, userEOA] = await ethers.getSigners(); + const receiver = await ethers.deployContract('CallReceiverMock'); + + const token = await deployToken(Token, [tokenName, tokenSymbol, version]); + const mock = await ethers.deployContract('$GovernorMock', [ + name, // name + votingDelay, // initialVotingDelay + votingPeriod, // initialVotingPeriod + 0n, // initialProposalThreshold + token, // tokenAddress + 10n, // quorumNumeratorValue + ]); + + await owner.sendTransaction({ to: mock, value }); + await token.$_mint(owner, tokenSupply); + + const helper = new GovernorHelper(mock, mode); + await helper.connect(owner).delegate({ token: token, to: voter1, value: ethers.parseEther('10') }); + await helper.connect(owner).delegate({ token: token, to: voter2, value: ethers.parseEther('7') }); + await helper.connect(owner).delegate({ token: token, to: voter3, value: ethers.parseEther('5') }); + await helper.connect(owner).delegate({ token: token, to: voter4, value: ethers.parseEther('2') }); + + return { + owner, + proposer, + voter1, + voter2, + voter3, + voter4, + userEOA, + receiver, + token, + mock, + helper, + }; + }; + + describe(`using ${Token}`, function () { beforeEach(async function () { - this.chainId = await web3.eth.getChainId(); - try { - this.token = await Token.new(tokenName, tokenSymbol, tokenName, version); - } catch { - // ERC20VotesLegacyMock has a different construction that uses version='1' by default. - this.token = await Token.new(tokenName, tokenSymbol, tokenName); - } - this.mock = await Governor.new( - name, // name - votingDelay, // initialVotingDelay - votingPeriod, // initialVotingPeriod - 0, // initialProposalThreshold - this.token.address, // tokenAddress - 10, // quorumNumeratorValue - ); - this.receiver = await CallReceiver.new(); - - this.helper = new GovernorHelper(this.mock, mode); - - await web3.eth.sendTransaction({ from: owner, to: this.mock.address, value }); - - await this.token.$_mint(owner, tokenSupply); - await this.helper.delegate({ token: this.token, to: voter1, value: web3.utils.toWei('10') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter2, value: web3.utils.toWei('7') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter3, value: web3.utils.toWei('5') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter4, value: web3.utils.toWei('2') }, { from: owner }); - + Object.assign(this, await loadFixture(fixture)); + // initiate fresh proposal this.proposal = this.helper.setProposal( [ { - target: this.receiver.address, - data: this.receiver.contract.methods.mockFunction().encodeABI(), + target: this.receiver.target, + data: this.receiver.interface.encodeFunctionData('mockFunction'), value, }, ], @@ -83,216 +100,163 @@ contract('Governor', function (accounts) { shouldBehaveLikeERC6372(mode); it('deployment check', async function () { - expect(await this.mock.name()).to.be.equal(name); - expect(await this.mock.token()).to.be.equal(this.token.address); - expect(await this.mock.votingDelay()).to.be.bignumber.equal(votingDelay); - expect(await this.mock.votingPeriod()).to.be.bignumber.equal(votingPeriod); - expect(await this.mock.quorum(0)).to.be.bignumber.equal('0'); - expect(await this.mock.COUNTING_MODE()).to.be.equal('support=bravo&quorum=for,abstain'); + expect(await this.mock.name()).to.equal(name); + expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.votingDelay()).to.equal(votingDelay); + expect(await this.mock.votingPeriod()).to.equal(votingPeriod); + expect(await this.mock.quorum(0)).to.equal(0n); + expect(await this.mock.COUNTING_MODE()).to.equal('support=bravo&quorum=for,abstain'); }); it('nominal workflow', async function () { // Before - expect(await this.mock.proposalProposer(this.proposal.id)).to.be.equal(constants.ZERO_ADDRESS); - expect(await this.mock.hasVoted(this.proposal.id, owner)).to.be.equal(false); - expect(await this.mock.hasVoted(this.proposal.id, voter1)).to.be.equal(false); - expect(await this.mock.hasVoted(this.proposal.id, voter2)).to.be.equal(false); - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal(value); - expect(await web3.eth.getBalance(this.receiver.address)).to.be.bignumber.equal('0'); + expect(await this.mock.proposalProposer(this.proposal.id)).to.equal(ethers.ZeroAddress); + expect(await this.mock.hasVoted(this.proposal.id, this.owner)).to.be.false; + expect(await this.mock.hasVoted(this.proposal.id, this.voter1)).to.be.false; + expect(await this.mock.hasVoted(this.proposal.id, this.voter2)).to.be.false; + expect(await ethers.provider.getBalance(this.mock)).to.equal(value); + expect(await ethers.provider.getBalance(this.receiver)).to.equal(0n); - expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal('0'); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(false); + expect(await this.mock.proposalEta(this.proposal.id)).to.equal(0n); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.false; // Run proposal - const txPropose = await this.helper.propose({ from: proposer }); - - expectEvent(txPropose, 'ProposalCreated', { - proposalId: this.proposal.id, - proposer, - targets: this.proposal.targets, - // values: this.proposal.values, - signatures: this.proposal.signatures, - calldatas: this.proposal.data, - voteStart: web3.utils.toBN(await clockFromReceipt[mode](txPropose.receipt)).add(votingDelay), - voteEnd: web3.utils - .toBN(await clockFromReceipt[mode](txPropose.receipt)) - .add(votingDelay) - .add(votingPeriod), - description: this.proposal.description, - }); + const txPropose = await this.helper.connect(this.proposer).propose(); + const timepoint = await time.clockFromReceipt[mode](txPropose); + + await expect(txPropose) + .to.emit(this.mock, 'ProposalCreated') + .withArgs( + this.proposal.id, + this.proposer.address, + this.proposal.targets, + this.proposal.values, + this.proposal.signatures, + this.proposal.data, + timepoint + votingDelay, + timepoint + votingDelay + votingPeriod, + this.proposal.description, + ); await this.helper.waitForSnapshot(); - expectEvent( - await this.helper.vote({ support: Enums.VoteType.For, reason: 'This is nice' }, { from: voter1 }), - 'VoteCast', - { - voter: voter1, - support: Enums.VoteType.For, - reason: 'This is nice', - weight: web3.utils.toWei('10'), - }, - ); + await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For, reason: 'This is nice' })) + .to.emit(this.mock, 'VoteCast') + .withArgs(this.voter1.address, this.proposal.id, Enums.VoteType.For, ethers.parseEther('10'), 'This is nice'); - expectEvent(await this.helper.vote({ support: Enums.VoteType.For }, { from: voter2 }), 'VoteCast', { - voter: voter2, - support: Enums.VoteType.For, - weight: web3.utils.toWei('7'), - }); + await expect(this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For })) + .to.emit(this.mock, 'VoteCast') + .withArgs(this.voter2.address, this.proposal.id, Enums.VoteType.For, ethers.parseEther('7'), ''); - expectEvent(await this.helper.vote({ support: Enums.VoteType.Against }, { from: voter3 }), 'VoteCast', { - voter: voter3, - support: Enums.VoteType.Against, - weight: web3.utils.toWei('5'), - }); + await expect(this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against })) + .to.emit(this.mock, 'VoteCast') + .withArgs(this.voter3.address, this.proposal.id, Enums.VoteType.Against, ethers.parseEther('5'), ''); - expectEvent(await this.helper.vote({ support: Enums.VoteType.Abstain }, { from: voter4 }), 'VoteCast', { - voter: voter4, - support: Enums.VoteType.Abstain, - weight: web3.utils.toWei('2'), - }); + await expect(this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain })) + .to.emit(this.mock, 'VoteCast') + .withArgs(this.voter4.address, this.proposal.id, Enums.VoteType.Abstain, ethers.parseEther('2'), ''); await this.helper.waitForDeadline(); const txExecute = await this.helper.execute(); - expectEvent(txExecute, 'ProposalExecuted', { proposalId: this.proposal.id }); + await expect(txExecute).to.emit(this.mock, 'ProposalExecuted').withArgs(this.proposal.id); - await expectEvent.inTransaction(txExecute.tx, this.receiver, 'MockFunctionCalled'); + await expect(txExecute).to.emit(this.receiver, 'MockFunctionCalled'); // After - expect(await this.mock.proposalProposer(this.proposal.id)).to.be.equal(proposer); - expect(await this.mock.hasVoted(this.proposal.id, owner)).to.be.equal(false); - expect(await this.mock.hasVoted(this.proposal.id, voter1)).to.be.equal(true); - expect(await this.mock.hasVoted(this.proposal.id, voter2)).to.be.equal(true); - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal('0'); - expect(await web3.eth.getBalance(this.receiver.address)).to.be.bignumber.equal(value); - - expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal('0'); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(false); + expect(await this.mock.proposalProposer(this.proposal.id)).to.equal(this.proposer.address); + expect(await this.mock.hasVoted(this.proposal.id, this.owner)).to.be.false; + expect(await this.mock.hasVoted(this.proposal.id, this.voter1)).to.be.true; + expect(await this.mock.hasVoted(this.proposal.id, this.voter2)).to.be.true; + expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); + expect(await ethers.provider.getBalance(this.receiver)).to.equal(value); + + expect(await this.mock.proposalEta(this.proposal.id)).to.equal(0n); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.false; }); it('send ethers', async function () { - const empty = web3.utils.toChecksumAddress(web3.utils.randomHex(20)); - - this.proposal = this.helper.setProposal( + this.helper.setProposal( [ { - target: empty, + target: this.userEOA.address, value, }, ], '', ); - // Before - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal(value); - expect(await web3.eth.getBalance(empty)).to.be.bignumber.equal('0'); - // Run proposal - await this.helper.propose(); - await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await this.helper.waitForDeadline(); - await this.helper.execute(); - - // After - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal('0'); - expect(await web3.eth.getBalance(empty)).to.be.bignumber.equal(value); + await expect(async () => { + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.waitForDeadline(); + return this.helper.execute(); + }).to.changeEtherBalances([this.mock, this.userEOA], [-value, value]); }); describe('vote with signature', function () { - const sign = privateKey => async (contract, message) => { - const domain = await getDomain(contract); - return ethSigUtil.signTypedMessage(privateKey, { - data: { - primaryType: 'Ballot', - types: { - EIP712Domain: domainType(domain), - Ballot, - }, - domain, - message, - }, - }); - }; - - afterEach('no other votes are cast for proposalId', async function () { - expect(await this.mock.hasVoted(this.proposal.id, owner)).to.be.equal(false); - expect(await this.mock.hasVoted(this.proposal.id, voter1)).to.be.equal(false); - expect(await this.mock.hasVoted(this.proposal.id, voter2)).to.be.equal(false); - }); - it('votes with an EOA signature', async function () { - const voterBySig = Wallet.generate(); - const voterBySigAddress = web3.utils.toChecksumAddress(voterBySig.getAddressString()); - - await this.token.delegate(voterBySigAddress, { from: voter1 }); + await this.token.connect(this.voter1).delegate(this.userEOA); - const nonce = await this.mock.nonces(voterBySigAddress); + const nonce = await this.mock.nonces(this.userEOA); // Run proposal await this.helper.propose(); await this.helper.waitForSnapshot(); - expectEvent( - await this.helper.vote({ + await expect( + this.helper.vote({ support: Enums.VoteType.For, - voter: voterBySigAddress, + voter: this.userEOA.address, nonce, - signature: sign(voterBySig.getPrivateKey()), + signature: signBallot(this.userEOA), }), - 'VoteCast', - { - voter: voterBySigAddress, - support: Enums.VoteType.For, - }, - ); + ) + .to.emit(this.mock, 'VoteCast') + .withArgs(this.userEOA.address, this.proposal.id, Enums.VoteType.For, ethers.parseEther('10'), ''); + await this.helper.waitForDeadline(); await this.helper.execute(); // After - expect(await this.mock.hasVoted(this.proposal.id, voterBySigAddress)).to.be.equal(true); - expect(await this.mock.nonces(voterBySigAddress)).to.be.bignumber.equal(nonce.addn(1)); + expect(await this.mock.hasVoted(this.proposal.id, this.userEOA)).to.be.true; + expect(await this.mock.nonces(this.userEOA)).to.equal(nonce + 1n); }); it('votes with a valid EIP-1271 signature', async function () { - const ERC1271WalletOwner = Wallet.generate(); - ERC1271WalletOwner.address = web3.utils.toChecksumAddress(ERC1271WalletOwner.getAddressString()); - - const wallet = await ERC1271WalletMock.new(ERC1271WalletOwner.address); + const wallet = await ethers.deployContract('ERC1271WalletMock', [this.userEOA]); - await this.token.delegate(wallet.address, { from: voter1 }); + await this.token.connect(this.voter1).delegate(wallet); - const nonce = await this.mock.nonces(wallet.address); + const nonce = await this.mock.nonces(this.userEOA); // Run proposal await this.helper.propose(); await this.helper.waitForSnapshot(); - expectEvent( - await this.helper.vote({ + await expect( + this.helper.vote({ support: Enums.VoteType.For, - voter: wallet.address, + voter: wallet.target, nonce, - signature: sign(ERC1271WalletOwner.getPrivateKey()), + signature: signBallot(this.userEOA), }), - 'VoteCast', - { - voter: wallet.address, - support: Enums.VoteType.For, - }, - ); + ) + .to.emit(this.mock, 'VoteCast') + .withArgs(wallet.target, this.proposal.id, Enums.VoteType.For, ethers.parseEther('10'), ''); await this.helper.waitForDeadline(); await this.helper.execute(); // After - expect(await this.mock.hasVoted(this.proposal.id, wallet.address)).to.be.equal(true); - expect(await this.mock.nonces(wallet.address)).to.be.bignumber.equal(nonce.addn(1)); + expect(await this.mock.hasVoted(this.proposal.id, wallet)).to.be.true; + expect(await this.mock.nonces(wallet)).to.equal(nonce + 1n); }); afterEach('no other votes are cast', async function () { - expect(await this.mock.hasVoted(this.proposal.id, owner)).to.be.equal(false); - expect(await this.mock.hasVoted(this.proposal.id, voter1)).to.be.equal(false); - expect(await this.mock.hasVoted(this.proposal.id, voter2)).to.be.equal(false); + expect(await this.mock.hasVoted(this.proposal.id, this.owner)).to.be.false; + expect(await this.mock.hasVoted(this.proposal.id, this.voter1)).to.be.false; + expect(await this.mock.hasVoted(this.proposal.id, this.voter2)).to.be.false; }); }); @@ -300,97 +264,73 @@ contract('Governor', function (accounts) { describe('on propose', function () { it('if proposal already exists', async function () { await this.helper.propose(); - await expectRevertCustomError(this.helper.propose(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Pending, - ZERO_BYTES32, - ]); + await expect(this.helper.propose()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs(this.proposal.id, Enums.ProposalState.Pending, ethers.ZeroHash); }); it('if proposer has below threshold votes', async function () { - const votes = web3.utils.toWei('10'); - const threshold = web3.utils.toWei('1000'); + const votes = ethers.parseEther('10'); + const threshold = ethers.parseEther('1000'); await this.mock.$_setProposalThreshold(threshold); - await expectRevertCustomError(this.helper.propose({ from: voter1 }), 'GovernorInsufficientProposerVotes', [ - voter1, - votes, - threshold, - ]); + await expect(this.helper.connect(this.voter1).propose()) + .to.be.revertedWithCustomError(this.mock, 'GovernorInsufficientProposerVotes') + .withArgs(this.voter1.address, votes, threshold); }); }); describe('on vote', function () { it('if proposal does not exist', async function () { - await expectRevertCustomError( - this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }), - 'GovernorNonexistentProposal', - [this.proposal.id], - ); + await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + .to.be.revertedWithCustomError(this.mock, 'GovernorNonexistentProposal') + .withArgs(this.proposal.id); }); it('if voting has not started', async function () { await this.helper.propose(); - await expectRevertCustomError( - this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }), - 'GovernorUnexpectedProposalState', - [this.proposal.id, Enums.ProposalState.Pending, proposalStatesToBitMap([Enums.ProposalState.Active])], - ); + await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Pending, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Active]), + ); }); it('if support value is invalid', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await expectRevertCustomError( - this.helper.vote({ support: web3.utils.toBN('255') }), + await expect(this.helper.vote({ support: 255 })).to.be.revertedWithCustomError( + this.mock, 'GovernorInvalidVoteType', - [], ); }); it('if vote was already casted', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await expectRevertCustomError( - this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }), - 'GovernorAlreadyCastVote', - [voter1], - ); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + .to.be.revertedWithCustomError(this.mock, 'GovernorAlreadyCastVote') + .withArgs(this.voter1.address); }); it('if voting is over', async function () { await this.helper.propose(); await this.helper.waitForDeadline(); - await expectRevertCustomError( - this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }), - 'GovernorUnexpectedProposalState', - [this.proposal.id, Enums.ProposalState.Defeated, proposalStatesToBitMap([Enums.ProposalState.Active])], - ); + await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Defeated, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Active]), + ); }); }); describe('on vote by signature', function () { beforeEach(async function () { - this.voterBySig = Wallet.generate(); - this.voterBySig.address = web3.utils.toChecksumAddress(this.voterBySig.getAddressString()); - - this.data = (contract, message) => - getDomain(contract).then(domain => ({ - primaryType: 'Ballot', - types: { - EIP712Domain: domainType(domain), - Ballot, - }, - domain, - message, - })); - - this.signature = (contract, message) => - this.data(contract, message).then(data => - ethSigUtil.signTypedMessage(this.voterBySig.getPrivateKey(), { data }), - ); - - await this.token.delegate(this.voterBySig.address, { from: voter1 }); + await this.token.connect(this.voter1).delegate(this.userEOA); // Run proposal await this.helper.propose(); @@ -398,96 +338,104 @@ contract('Governor', function (accounts) { }); it('if signature does not match signer', async function () { - const nonce = await this.mock.nonces(this.voterBySig.address); + const nonce = await this.mock.nonces(this.userEOA); + + function tamper(str, index, mask) { + const arrayStr = ethers.toBeArray(BigInt(str)); + arrayStr[index] ^= mask; + return ethers.hexlify(arrayStr); + } const voteParams = { support: Enums.VoteType.For, - voter: this.voterBySig.address, + voter: this.userEOA.address, nonce, - signature: async (...params) => { - const sig = await this.signature(...params); - const tamperedSig = web3.utils.hexToBytes(sig); - tamperedSig[42] ^= 0xff; - return web3.utils.bytesToHex(tamperedSig); - }, + signature: (...args) => signBallot(this.userEOA)(...args).then(sig => tamper(sig, 42, 0xff)), }; - await expectRevertCustomError(this.helper.vote(voteParams), 'GovernorInvalidSignature', [voteParams.voter]); + await expect(this.helper.vote(voteParams)) + .to.be.revertedWithCustomError(this.mock, 'GovernorInvalidSignature') + .withArgs(voteParams.voter); }); it('if vote nonce is incorrect', async function () { - const nonce = await this.mock.nonces(this.voterBySig.address); + const nonce = await this.mock.nonces(this.userEOA); const voteParams = { support: Enums.VoteType.For, - voter: this.voterBySig.address, - nonce: nonce.addn(1), - signature: this.signature, + voter: this.userEOA.address, + nonce: nonce + 1n, + signature: signBallot(this.userEOA), }; - await expectRevertCustomError( - this.helper.vote(voteParams), - // The signature check implies the nonce can't be tampered without changing the signer - 'GovernorInvalidSignature', - [voteParams.voter], - ); + await expect(this.helper.vote(voteParams)) + .to.be.revertedWithCustomError(this.mock, 'GovernorInvalidSignature') + .withArgs(voteParams.voter); }); }); describe('on queue', function () { it('always', async function () { - await this.helper.propose({ from: proposer }); + await this.helper.connect(this.proposer).propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - await expectRevertCustomError(this.helper.queue(), 'GovernorQueueNotImplemented', []); + await expect(this.helper.queue()).to.be.revertedWithCustomError(this.mock, 'GovernorQueueNotImplemented'); }); }); describe('on execute', function () { it('if proposal does not exist', async function () { - await expectRevertCustomError(this.helper.execute(), 'GovernorNonexistentProposal', [this.proposal.id]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorNonexistentProposal') + .withArgs(this.proposal.id); }); it('if quorum is not reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter3 }); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Active, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.For }); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('if score not reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.Against }, { from: voter1 }); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Active, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.Against }); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('if voting is not over', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Active, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('if receiver revert without reason', async function () { this.helper.setProposal( [ { - target: this.receiver.address, - data: this.receiver.contract.methods.mockFunctionRevertsNoReason().encodeABI(), + target: this.receiver.target, + data: this.receiver.interface.encodeFunctionData('mockFunctionRevertsNoReason'), }, ], '', @@ -495,17 +443,17 @@ contract('Governor', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - await expectRevertCustomError(this.helper.execute(), 'FailedInnerCall', []); + await expect(this.helper.execute()).to.be.revertedWithCustomError(this.mock, 'FailedInnerCall'); }); it('if receiver revert with reason', async function () { this.helper.setProposal( [ { - target: this.receiver.address, - data: this.receiver.contract.methods.mockFunctionRevertsReason().encodeABI(), + target: this.receiver.target, + data: this.receiver.interface.encodeFunctionData('mockFunctionRevertsReason'), }, ], '', @@ -513,147 +461,157 @@ contract('Governor', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - await expectRevert(this.helper.execute(), 'CallReceiverMock: reverting'); + await expect(this.helper.execute()).to.be.revertedWith('CallReceiverMock: reverting'); }); it('if proposal was already executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Executed, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); }); }); describe('state', function () { it('Unset', async function () { - await expectRevertCustomError(this.mock.state(this.proposal.id), 'GovernorNonexistentProposal', [ - this.proposal.id, - ]); + await expect(this.mock.state(this.proposal.id)) + .to.be.revertedWithCustomError(this.mock, 'GovernorNonexistentProposal') + .withArgs(this.proposal.id); }); it('Pending & Active', async function () { await this.helper.propose(); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Pending); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Pending); await this.helper.waitForSnapshot(); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Pending); - await this.helper.waitForSnapshot(+1); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Pending); + await this.helper.waitForSnapshot(1n); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); }); it('Defeated', async function () { await this.helper.propose(); await this.helper.waitForDeadline(); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Active); - await this.helper.waitForDeadline(+1); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Defeated); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + await this.helper.waitForDeadline(1n); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Defeated); }); it('Succeeded', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Active); - await this.helper.waitForDeadline(+1); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Succeeded); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + await this.helper.waitForDeadline(1n); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Succeeded); }); it('Executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Executed); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Executed); }); }); describe('cancel', function () { describe('internal', function () { it('before proposal', async function () { - await expectRevertCustomError(this.helper.cancel('internal'), 'GovernorNonexistentProposal', [ - this.proposal.id, - ]); + await expect(this.helper.cancel('internal')) + .to.be.revertedWithCustomError(this.mock, 'GovernorNonexistentProposal') + .withArgs(this.proposal.id); }); it('after proposal', async function () { await this.helper.propose(); await this.helper.cancel('internal'); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); await this.helper.waitForSnapshot(); - await expectRevertCustomError( - this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }), - 'GovernorUnexpectedProposalState', - [this.proposal.id, Enums.ProposalState.Canceled, proposalStatesToBitMap([Enums.ProposalState.Active])], - ); + await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Active]), + ); }); it('after vote', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.cancel('internal'); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); await this.helper.waitForDeadline(); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Canceled, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('after deadline', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.cancel('internal'); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Canceled); - - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Canceled, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('after execution', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); - await expectRevertCustomError(this.helper.cancel('internal'), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Executed, - proposalStatesToBitMap( - [Enums.ProposalState.Canceled, Enums.ProposalState.Expired, Enums.ProposalState.Executed], - { inverted: true }, - ), - ]); + await expect(this.helper.cancel('internal')) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap( + [Enums.ProposalState.Canceled, Enums.ProposalState.Expired, Enums.ProposalState.Executed], + { inverted: true }, + ), + ); }); }); describe('public', function () { it('before proposal', async function () { - await expectRevertCustomError(this.helper.cancel('external'), 'GovernorNonexistentProposal', [ - this.proposal.id, - ]); + await expect(this.helper.cancel('external')) + .to.be.revertedWithCustomError(this.mock, 'GovernorNonexistentProposal') + .withArgs(this.proposal.id); }); it('after proposal', async function () { @@ -663,61 +621,69 @@ contract('Governor', function (accounts) { }); it('after proposal - restricted to proposer', async function () { - await this.helper.propose(); + await this.helper.connect(this.proposer).propose(); - await expectRevertCustomError(this.helper.cancel('external', { from: owner }), 'GovernorOnlyProposer', [ - owner, - ]); + await expect(this.helper.connect(this.owner).cancel('external')) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyProposer') + .withArgs(this.owner.address); }); it('after vote started', async function () { await this.helper.propose(); - await this.helper.waitForSnapshot(1); // snapshot + 1 block - - await expectRevertCustomError(this.helper.cancel('external'), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Active, - proposalStatesToBitMap([Enums.ProposalState.Pending]), - ]); + await this.helper.waitForSnapshot(1n); // snapshot + 1 block + + await expect(this.helper.cancel('external')) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ); }); it('after vote', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); - - await expectRevertCustomError(this.helper.cancel('external'), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Active, - proposalStatesToBitMap([Enums.ProposalState.Pending]), - ]); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + + await expect(this.helper.cancel('external')) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ); }); it('after deadline', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - await expectRevertCustomError(this.helper.cancel('external'), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Succeeded, - proposalStatesToBitMap([Enums.ProposalState.Pending]), - ]); + await expect(this.helper.cancel('external')) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Succeeded, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ); }); it('after execution', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); - await expectRevertCustomError(this.helper.cancel('external'), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Executed, - proposalStatesToBitMap([Enums.ProposalState.Pending]), - ]); + await expect(this.helper.cancel('external')) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ); }); }); }); @@ -725,88 +691,123 @@ contract('Governor', function (accounts) { describe('proposal length', function () { it('empty', async function () { this.helper.setProposal([], ''); - await expectRevertCustomError(this.helper.propose(), 'GovernorInvalidProposalLength', [0, 0, 0]); + + await expect(this.helper.propose()) + .to.be.revertedWithCustomError(this.mock, 'GovernorInvalidProposalLength') + .withArgs(0, 0, 0); }); it('mismatch #1', async function () { this.helper.setProposal( { targets: [], - values: [web3.utils.toWei('0')], - data: [this.receiver.contract.methods.mockFunction().encodeABI()], + values: [0n], + data: [this.receiver.interface.encodeFunctionData('mockFunction')], }, '', ); - await expectRevertCustomError(this.helper.propose(), 'GovernorInvalidProposalLength', [0, 1, 1]); + await expect(this.helper.propose()) + .to.be.revertedWithCustomError(this.mock, 'GovernorInvalidProposalLength') + .withArgs(0, 1, 1); }); it('mismatch #2', async function () { this.helper.setProposal( { - targets: [this.receiver.address], + targets: [this.receiver.target], values: [], - data: [this.receiver.contract.methods.mockFunction().encodeABI()], + data: [this.receiver.interface.encodeFunctionData('mockFunction')], }, '', ); - await expectRevertCustomError(this.helper.propose(), 'GovernorInvalidProposalLength', [1, 1, 0]); + await expect(this.helper.propose()) + .to.be.revertedWithCustomError(this.mock, 'GovernorInvalidProposalLength') + .withArgs(1, 1, 0); }); it('mismatch #3', async function () { this.helper.setProposal( { - targets: [this.receiver.address], - values: [web3.utils.toWei('0')], + targets: [this.receiver.target], + values: [0n], data: [], }, '', ); - await expectRevertCustomError(this.helper.propose(), 'GovernorInvalidProposalLength', [1, 0, 1]); + await expect(this.helper.propose()) + .to.be.revertedWithCustomError(this.mock, 'GovernorInvalidProposalLength') + .withArgs(1, 0, 1); }); }); describe('frontrun protection using description suffix', function () { + function shouldPropose() { + it('proposer can propose', async function () { + const txPropose = await this.helper.connect(this.proposer).propose(); + + await expect(txPropose) + .to.emit(this.mock, 'ProposalCreated') + .withArgs( + this.proposal.id, + this.proposer.address, + this.proposal.targets, + this.proposal.values, + this.proposal.signatures, + this.proposal.data, + (await time.clockFromReceipt[mode](txPropose)) + votingDelay, + (await time.clockFromReceipt[mode](txPropose)) + votingDelay + votingPeriod, + this.proposal.description, + ); + }); + + it('someone else can propose', async function () { + const txPropose = await this.helper.connect(this.voter1).propose(); + + await expect(txPropose) + .to.emit(this.mock, 'ProposalCreated') + .withArgs( + this.proposal.id, + this.voter1.address, + this.proposal.targets, + this.proposal.values, + this.proposal.signatures, + this.proposal.data, + (await time.clockFromReceipt[mode](txPropose)) + votingDelay, + (await time.clockFromReceipt[mode](txPropose)) + votingDelay + votingPeriod, + this.proposal.description, + ); + }); + } + describe('without protection', function () { describe('without suffix', function () { - it('proposer can propose', async function () { - expectEvent(await this.helper.propose({ from: proposer }), 'ProposalCreated'); - }); - - it('someone else can propose', async function () { - expectEvent(await this.helper.propose({ from: voter1 }), 'ProposalCreated'); - }); + shouldPropose(); }); describe('with different suffix', function () { - beforeEach(async function () { + beforeEach(function () { this.proposal = this.helper.setProposal( [ { - target: this.receiver.address, - data: this.receiver.contract.methods.mockFunction().encodeABI(), + target: this.receiver.target, + data: this.receiver.interface.encodeFunctionData('mockFunction'), value, }, ], - `#wrong-suffix=${proposer}`, + `#wrong-suffix=${this.proposer}`, ); }); - it('proposer can propose', async function () { - expectEvent(await this.helper.propose({ from: proposer }), 'ProposalCreated'); - }); - - it('someone else can propose', async function () { - expectEvent(await this.helper.propose({ from: voter1 }), 'ProposalCreated'); - }); + shouldPropose(); }); describe('with proposer suffix but bad address part', function () { - beforeEach(async function () { + beforeEach(function () { this.proposal = this.helper.setProposal( [ { - target: this.receiver.address, - data: this.receiver.contract.methods.mockFunction().encodeABI(), + target: this.receiver.target, + data: this.receiver.interface.encodeFunctionData('mockFunction'), value, }, ], @@ -814,69 +815,53 @@ contract('Governor', function (accounts) { ); }); - it('propose can propose', async function () { - expectEvent(await this.helper.propose({ from: proposer }), 'ProposalCreated'); - }); - - it('someone else can propose', async function () { - expectEvent(await this.helper.propose({ from: voter1 }), 'ProposalCreated'); - }); + shouldPropose(); }); }); describe('with protection via proposer suffix', function () { - beforeEach(async function () { + beforeEach(function () { this.proposal = this.helper.setProposal( [ { - target: this.receiver.address, - data: this.receiver.contract.methods.mockFunction().encodeABI(), + target: this.receiver.target, + data: this.receiver.interface.encodeFunctionData('mockFunction'), value, }, ], - `#proposer=${proposer}`, + `#proposer=${this.proposer}`, ); }); - it('proposer can propose', async function () { - expectEvent(await this.helper.propose({ from: proposer }), 'ProposalCreated'); - }); - - it('someone else cannot propose', async function () { - await expectRevertCustomError(this.helper.propose({ from: voter1 }), 'GovernorRestrictedProposer', [ - voter1, - ]); - }); + shouldPropose(); }); }); describe('onlyGovernance updates', function () { it('setVotingDelay is protected', async function () { - await expectRevertCustomError(this.mock.setVotingDelay('0', { from: owner }), 'GovernorOnlyExecutor', [ - owner, - ]); + await expect(this.mock.connect(this.owner).setVotingDelay(0n)) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') + .withArgs(this.owner.address); }); it('setVotingPeriod is protected', async function () { - await expectRevertCustomError(this.mock.setVotingPeriod('32', { from: owner }), 'GovernorOnlyExecutor', [ - owner, - ]); + await expect(this.mock.connect(this.owner).setVotingPeriod(32n)) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') + .withArgs(this.owner.address); }); it('setProposalThreshold is protected', async function () { - await expectRevertCustomError( - this.mock.setProposalThreshold('1000000000000000000', { from: owner }), - 'GovernorOnlyExecutor', - [owner], - ); + await expect(this.mock.connect(this.owner).setProposalThreshold(1_000_000_000_000_000_000n)) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') + .withArgs(this.owner.address); }); it('can setVotingDelay through governance', async function () { this.helper.setProposal( [ { - target: this.mock.address, - data: this.mock.contract.methods.setVotingDelay('0').encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('setVotingDelay', [0n]), }, ], '', @@ -884,20 +869,20 @@ contract('Governor', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - expectEvent(await this.helper.execute(), 'VotingDelaySet', { oldVotingDelay: '4', newVotingDelay: '0' }); + await expect(this.helper.execute()).to.emit(this.mock, 'VotingDelaySet').withArgs(4n, 0n); - expect(await this.mock.votingDelay()).to.be.bignumber.equal('0'); + expect(await this.mock.votingDelay()).to.equal(0n); }); it('can setVotingPeriod through governance', async function () { this.helper.setProposal( [ { - target: this.mock.address, - data: this.mock.contract.methods.setVotingPeriod('32').encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('setVotingPeriod', [32n]), }, ], '', @@ -905,21 +890,22 @@ contract('Governor', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - expectEvent(await this.helper.execute(), 'VotingPeriodSet', { oldVotingPeriod: '16', newVotingPeriod: '32' }); + await expect(this.helper.execute()).to.emit(this.mock, 'VotingPeriodSet').withArgs(16n, 32n); - expect(await this.mock.votingPeriod()).to.be.bignumber.equal('32'); + expect(await this.mock.votingPeriod()).to.equal(32n); }); it('cannot setVotingPeriod to 0 through governance', async function () { - const votingPeriod = 0; + const votingPeriod = 0n; + this.helper.setProposal( [ { - target: this.mock.address, - data: this.mock.contract.methods.setVotingPeriod(votingPeriod).encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('setVotingPeriod', [votingPeriod]), }, ], '', @@ -927,18 +913,20 @@ contract('Governor', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - await expectRevertCustomError(this.helper.execute(), 'GovernorInvalidVotingPeriod', [votingPeriod]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorInvalidVotingPeriod') + .withArgs(votingPeriod); }); it('can setProposalThreshold to 0 through governance', async function () { this.helper.setProposal( [ { - target: this.mock.address, - data: this.mock.contract.methods.setProposalThreshold('1000000000000000000').encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('setProposalThreshold', [1_000_000_000_000_000_000n]), }, ], '', @@ -946,66 +934,62 @@ contract('Governor', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - expectEvent(await this.helper.execute(), 'ProposalThresholdSet', { - oldProposalThreshold: '0', - newProposalThreshold: '1000000000000000000', - }); + await expect(this.helper.execute()) + .to.emit(this.mock, 'ProposalThresholdSet') + .withArgs(0n, 1_000_000_000_000_000_000n); - expect(await this.mock.proposalThreshold()).to.be.bignumber.equal('1000000000000000000'); + expect(await this.mock.proposalThreshold()).to.equal(1_000_000_000_000_000_000n); }); }); describe('safe receive', function () { describe('ERC721', function () { - const name = 'Non Fungible Token'; - const symbol = 'NFT'; - const tokenId = web3.utils.toBN(1); + const tokenId = 1n; beforeEach(async function () { - this.token = await ERC721.new(name, symbol); - await this.token.$_mint(owner, tokenId); + this.token = await ethers.deployContract('$ERC721', ['Non Fungible Token', 'NFT']); + await this.token.$_mint(this.owner, tokenId); }); it('can receive an ERC721 safeTransfer', async function () { - await this.token.safeTransferFrom(owner, this.mock.address, tokenId, { from: owner }); + await this.token.connect(this.owner).safeTransferFrom(this.owner, this.mock.target, tokenId); }); }); describe('ERC1155', function () { - const uri = 'https://token-cdn-domain/{id}.json'; const tokenIds = { - 1: web3.utils.toBN(1000), - 2: web3.utils.toBN(2000), - 3: web3.utils.toBN(3000), + 1: 1000n, + 2: 2000n, + 3: 3000n, }; beforeEach(async function () { - this.token = await ERC1155.new(uri); - await this.token.$_mintBatch(owner, Object.keys(tokenIds), Object.values(tokenIds), '0x'); + this.token = await ethers.deployContract('$ERC1155', ['https://token-cdn-domain/{id}.json']); + await this.token.$_mintBatch(this.owner, Object.keys(tokenIds), Object.values(tokenIds), '0x'); }); it('can receive ERC1155 safeTransfer', async function () { - await this.token.safeTransferFrom( - owner, - this.mock.address, + await this.token.connect(this.owner).safeTransferFrom( + this.owner, + this.mock.target, ...Object.entries(tokenIds)[0], // id + amount '0x', - { from: owner }, ); }); it('can receive ERC1155 safeBatchTransfer', async function () { - await this.token.safeBatchTransferFrom( - owner, - this.mock.address, - Object.keys(tokenIds), - Object.values(tokenIds), - '0x', - { from: owner }, - ); + await this.token + .connect(this.owner) + .safeBatchTransferFrom( + this.owner, + this.mock.target, + Object.keys(tokenIds), + Object.values(tokenIds), + '0x', + ); }); }); }); diff --git a/test/governance/TimelockController.test.js b/test/governance/TimelockController.test.js index ce051e787..9d3f5188b 100644 --- a/test/governance/TimelockController.test.js +++ b/test/governance/TimelockController.test.js @@ -1,93 +1,112 @@ -const { BN, constants, expectEvent, expectRevert, time } = require('@openzeppelin/test-helpers'); -const { ZERO_ADDRESS, ZERO_BYTES32 } = constants; -const { proposalStatesToBitMap } = require('../helpers/governance'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); + +const { GovernorHelper } = require('../helpers/governance'); +const { bigint: time } = require('../helpers/time'); +const { + bigint: { OperationState }, +} = require('../helpers/enums'); const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior'); -const { expectRevertCustomError } = require('../helpers/customError'); -const { OperationState } = require('../helpers/enums'); -const TimelockController = artifacts.require('TimelockController'); -const CallReceiverMock = artifacts.require('CallReceiverMock'); -const Implementation2 = artifacts.require('Implementation2'); -const ERC721 = artifacts.require('$ERC721'); -const ERC1155 = artifacts.require('$ERC1155'); -const TimelockReentrant = artifacts.require('$TimelockReentrant'); +const salt = '0x025e7b0be353a74631ad648c667493c0e1cd31caa4cc2d3520fdc171ea0cc726'; // a random value const MINDELAY = time.duration.days(1); +const DEFAULT_ADMIN_ROLE = ethers.ZeroHash; +const PROPOSER_ROLE = ethers.id('PROPOSER_ROLE'); +const EXECUTOR_ROLE = ethers.id('EXECUTOR_ROLE'); +const CANCELLER_ROLE = ethers.id('CANCELLER_ROLE'); -const salt = '0x025e7b0be353a74631ad648c667493c0e1cd31caa4cc2d3520fdc171ea0cc726'; // a random value +const getAddress = obj => obj.address ?? obj.target ?? obj; function genOperation(target, value, data, predecessor, salt) { - const id = web3.utils.keccak256( - web3.eth.abi.encodeParameters( + const id = ethers.keccak256( + ethers.AbiCoder.defaultAbiCoder().encode( ['address', 'uint256', 'bytes', 'uint256', 'bytes32'], - [target, value, data, predecessor, salt], + [getAddress(target), value, data, predecessor, salt], ), ); return { id, target, value, data, predecessor, salt }; } function genOperationBatch(targets, values, payloads, predecessor, salt) { - const id = web3.utils.keccak256( - web3.eth.abi.encodeParameters( + const id = ethers.keccak256( + ethers.AbiCoder.defaultAbiCoder().encode( ['address[]', 'uint256[]', 'bytes[]', 'uint256', 'bytes32'], - [targets, values, payloads, predecessor, salt], + [targets.map(getAddress), values, payloads, predecessor, salt], ), ); return { id, targets, values, payloads, predecessor, salt }; } -contract('TimelockController', function (accounts) { - const [, admin, proposer, canceller, executor, other] = accounts; - - const DEFAULT_ADMIN_ROLE = '0x0000000000000000000000000000000000000000000000000000000000000000'; - const PROPOSER_ROLE = web3.utils.soliditySha3('PROPOSER_ROLE'); - const EXECUTOR_ROLE = web3.utils.soliditySha3('EXECUTOR_ROLE'); - const CANCELLER_ROLE = web3.utils.soliditySha3('CANCELLER_ROLE'); +async function fixture() { + const [admin, proposer, canceller, executor, other] = await ethers.getSigners(); + + const mock = await ethers.deployContract('TimelockController', [MINDELAY, [proposer], [executor], admin]); + const callreceivermock = await ethers.deployContract('CallReceiverMock'); + const implementation2 = await ethers.deployContract('Implementation2'); + + expect(await mock.hasRole(CANCELLER_ROLE, proposer)).to.be.true; + await mock.connect(admin).revokeRole(CANCELLER_ROLE, proposer); + await mock.connect(admin).grantRole(CANCELLER_ROLE, canceller); + + return { + admin, + proposer, + canceller, + executor, + other, + mock, + callreceivermock, + implementation2, + }; +} +describe('TimelockController', function () { beforeEach(async function () { - // Deploy new timelock - this.mock = await TimelockController.new(MINDELAY, [proposer], [executor], admin); - - expect(await this.mock.hasRole(CANCELLER_ROLE, proposer)).to.be.equal(true); - await this.mock.revokeRole(CANCELLER_ROLE, proposer, { from: admin }); - await this.mock.grantRole(CANCELLER_ROLE, canceller, { from: admin }); - - // Mocks - this.callreceivermock = await CallReceiverMock.new({ from: admin }); - this.implementation2 = await Implementation2.new({ from: admin }); + Object.assign(this, await loadFixture(fixture)); }); shouldSupportInterfaces(['ERC1155Receiver']); it('initial state', async function () { - expect(await this.mock.getMinDelay()).to.be.bignumber.equal(MINDELAY); + expect(await this.mock.getMinDelay()).to.equal(MINDELAY); - expect(await this.mock.DEFAULT_ADMIN_ROLE()).to.be.equal(DEFAULT_ADMIN_ROLE); - expect(await this.mock.PROPOSER_ROLE()).to.be.equal(PROPOSER_ROLE); - expect(await this.mock.EXECUTOR_ROLE()).to.be.equal(EXECUTOR_ROLE); - expect(await this.mock.CANCELLER_ROLE()).to.be.equal(CANCELLER_ROLE); + expect(await this.mock.DEFAULT_ADMIN_ROLE()).to.equal(DEFAULT_ADMIN_ROLE); + expect(await this.mock.PROPOSER_ROLE()).to.equal(PROPOSER_ROLE); + expect(await this.mock.EXECUTOR_ROLE()).to.equal(EXECUTOR_ROLE); + expect(await this.mock.CANCELLER_ROLE()).to.equal(CANCELLER_ROLE); expect( - await Promise.all([PROPOSER_ROLE, CANCELLER_ROLE, EXECUTOR_ROLE].map(role => this.mock.hasRole(role, proposer))), - ).to.be.deep.equal([true, false, false]); + await Promise.all( + [PROPOSER_ROLE, CANCELLER_ROLE, EXECUTOR_ROLE].map(role => this.mock.hasRole(role, this.proposer)), + ), + ).to.deep.equal([true, false, false]); expect( - await Promise.all([PROPOSER_ROLE, CANCELLER_ROLE, EXECUTOR_ROLE].map(role => this.mock.hasRole(role, canceller))), - ).to.be.deep.equal([false, true, false]); + await Promise.all( + [PROPOSER_ROLE, CANCELLER_ROLE, EXECUTOR_ROLE].map(role => this.mock.hasRole(role, this.canceller)), + ), + ).to.deep.equal([false, true, false]); expect( - await Promise.all([PROPOSER_ROLE, CANCELLER_ROLE, EXECUTOR_ROLE].map(role => this.mock.hasRole(role, executor))), - ).to.be.deep.equal([false, false, true]); + await Promise.all( + [PROPOSER_ROLE, CANCELLER_ROLE, EXECUTOR_ROLE].map(role => this.mock.hasRole(role, this.executor)), + ), + ).to.deep.equal([false, false, true]); }); it('optional admin', async function () { - const mock = await TimelockController.new(MINDELAY, [proposer], [executor], ZERO_ADDRESS, { from: other }); - - expect(await mock.hasRole(DEFAULT_ADMIN_ROLE, admin)).to.be.equal(false); - expect(await mock.hasRole(DEFAULT_ADMIN_ROLE, mock.address)).to.be.equal(true); + const mock = await ethers.deployContract('TimelockController', [ + MINDELAY, + [this.proposer], + [this.executor], + ethers.ZeroAddress, + ]); + expect(await mock.hasRole(DEFAULT_ADMIN_ROLE, this.admin)).to.be.false; + expect(await mock.hasRole(DEFAULT_ADMIN_ROLE, mock.target)).to.be.true; }); describe('methods', function () { @@ -108,7 +127,7 @@ contract('TimelockController', function (accounts) { this.operation.predecessor, this.operation.salt, ), - ).to.be.equal(this.operation.id); + ).to.equal(this.operation.id); }); it('hashOperationBatch', async function () { @@ -127,7 +146,7 @@ contract('TimelockController', function (accounts) { this.operation.predecessor, this.operation.salt, ), - ).to.be.equal(this.operation.id); + ).to.equal(this.operation.id); }); }); describe('simple', function () { @@ -135,114 +154,119 @@ contract('TimelockController', function (accounts) { beforeEach(async function () { this.operation = genOperation( '0x31754f590B97fD975Eb86938f18Cc304E264D2F2', - 0, + 0n, '0x3bf92ccc', - ZERO_BYTES32, + ethers.ZeroHash, salt, ); }); it('proposer can schedule', async function () { - const receipt = await this.mock.schedule( - this.operation.target, - this.operation.value, - this.operation.data, - this.operation.predecessor, - this.operation.salt, - MINDELAY, - { from: proposer }, - ); - expectEvent(receipt, 'CallScheduled', { - id: this.operation.id, - index: web3.utils.toBN(0), - target: this.operation.target, - value: web3.utils.toBN(this.operation.value), - data: this.operation.data, - predecessor: this.operation.predecessor, - delay: MINDELAY, - }); - - expectEvent(receipt, 'CallSalt', { - id: this.operation.id, - salt: this.operation.salt, - }); - - const block = await web3.eth.getBlock(receipt.receipt.blockHash); - - expect(await this.mock.getTimestamp(this.operation.id)).to.be.bignumber.equal( - web3.utils.toBN(block.timestamp).add(MINDELAY), - ); - }); - - it('prevent overwriting active operation', async function () { - await this.mock.schedule( - this.operation.target, - this.operation.value, - this.operation.data, - this.operation.predecessor, - this.operation.salt, - MINDELAY, - { from: proposer }, - ); - - await expectRevertCustomError( - this.mock.schedule( + const tx = await this.mock + .connect(this.proposer) + .schedule( this.operation.target, this.operation.value, this.operation.data, this.operation.predecessor, this.operation.salt, MINDELAY, - { from: proposer }, - ), - 'TimelockUnexpectedOperationState', - [this.operation.id, proposalStatesToBitMap(OperationState.Unset)], - ); - }); + ); - it('prevent non-proposer from committing', async function () { - await expectRevertCustomError( - this.mock.schedule( + expect(tx) + .to.emit(this.mock, 'CallScheduled') + .withArgs( + this.operation.id, + 0n, this.operation.target, this.operation.value, this.operation.data, this.operation.predecessor, - this.operation.salt, MINDELAY, - { from: other }, - ), - `AccessControlUnauthorizedAccount`, - [other, PROPOSER_ROLE], + ) + .to.emit(this.mock, 'CallSalt') + .withArgs(this.operation.id, this.operation.salt); + + expect(await this.mock.getTimestamp(this.operation.id)).to.equal( + (await time.clockFromReceipt.timestamp(tx)) + MINDELAY, ); }); - it('enforce minimum delay', async function () { - await expectRevertCustomError( - this.mock.schedule( + it('prevent overwriting active operation', async function () { + await this.mock + .connect(this.proposer) + .schedule( this.operation.target, this.operation.value, this.operation.data, this.operation.predecessor, this.operation.salt, - MINDELAY - 1, - { from: proposer }, - ), - 'TimelockInsufficientDelay', - [MINDELAY, MINDELAY - 1], - ); + MINDELAY, + ); + + await expect( + this.mock + .connect(this.proposer) + .schedule( + this.operation.target, + this.operation.value, + this.operation.data, + this.operation.predecessor, + this.operation.salt, + MINDELAY, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexpectedOperationState') + .withArgs(this.operation.id, GovernorHelper.proposalStatesToBitMap(OperationState.Unset)); + }); + + it('prevent non-proposer from committing', async function () { + await expect( + this.mock + .connect(this.other) + .schedule( + this.operation.target, + this.operation.value, + this.operation.data, + this.operation.predecessor, + this.operation.salt, + MINDELAY, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, PROPOSER_ROLE); + }); + + it('enforce minimum delay', async function () { + await expect( + this.mock + .connect(this.proposer) + .schedule( + this.operation.target, + this.operation.value, + this.operation.data, + this.operation.predecessor, + this.operation.salt, + MINDELAY - 1n, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockInsufficientDelay') + .withArgs(MINDELAY - 1n, MINDELAY); }); it('schedule operation with salt zero', async function () { - const { receipt } = await this.mock.schedule( - this.operation.target, - this.operation.value, - this.operation.data, - this.operation.predecessor, - ZERO_BYTES32, - MINDELAY, - { from: proposer }, - ); - expectEvent.notEmitted(receipt, 'CallSalt'); + await expect( + this.mock + .connect(this.proposer) + .schedule( + this.operation.target, + this.operation.value, + this.operation.data, + this.operation.predecessor, + ethers.ZeroHash, + MINDELAY, + ), + ).to.not.emit(this.mock, 'CallSalt'); }); }); @@ -250,188 +274,193 @@ contract('TimelockController', function (accounts) { beforeEach(async function () { this.operation = genOperation( '0xAe22104DCD970750610E6FE15E623468A98b15f7', - 0, + 0n, '0x13e414de', - ZERO_BYTES32, + ethers.ZeroHash, '0xc1059ed2dc130227aa1d1d539ac94c641306905c020436c636e19e3fab56fc7f', ); }); it('revert if operation is not scheduled', async function () { - await expectRevertCustomError( - this.mock.execute( - this.operation.target, - this.operation.value, - this.operation.data, - this.operation.predecessor, - this.operation.salt, - { from: executor }, - ), - 'TimelockUnexpectedOperationState', - [this.operation.id, proposalStatesToBitMap(OperationState.Ready)], - ); + await expect( + this.mock + .connect(this.executor) + .execute( + this.operation.target, + this.operation.value, + this.operation.data, + this.operation.predecessor, + this.operation.salt, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexpectedOperationState') + .withArgs(this.operation.id, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); }); describe('with scheduled operation', function () { beforeEach(async function () { - ({ receipt: this.receipt, logs: this.logs } = await this.mock.schedule( - this.operation.target, - this.operation.value, - this.operation.data, - this.operation.predecessor, - this.operation.salt, - MINDELAY, - { from: proposer }, - )); - }); - - it('revert if execution comes too early 1/2', async function () { - await expectRevertCustomError( - this.mock.execute( + await this.mock + .connect(this.proposer) + .schedule( this.operation.target, this.operation.value, this.operation.data, this.operation.predecessor, this.operation.salt, - { from: executor }, - ), - 'TimelockUnexpectedOperationState', - [this.operation.id, proposalStatesToBitMap(OperationState.Ready)], - ); + MINDELAY, + ); + }); + + it('revert if execution comes too early 1/2', async function () { + await expect( + this.mock + .connect(this.executor) + .execute( + this.operation.target, + this.operation.value, + this.operation.data, + this.operation.predecessor, + this.operation.salt, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexpectedOperationState') + .withArgs(this.operation.id, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); }); it('revert if execution comes too early 2/2', async function () { - const timestamp = await this.mock.getTimestamp(this.operation.id); - await time.increaseTo(timestamp - 5); // -1 is too tight, test sometime fails + // -1 is too tight, test sometime fails + await this.mock.getTimestamp(this.operation.id).then(clock => time.forward.timestamp(clock - 5n)); - await expectRevertCustomError( - this.mock.execute( - this.operation.target, - this.operation.value, - this.operation.data, - this.operation.predecessor, - this.operation.salt, - { from: executor }, - ), - 'TimelockUnexpectedOperationState', - [this.operation.id, proposalStatesToBitMap(OperationState.Ready)], - ); + await expect( + this.mock + .connect(this.executor) + .execute( + this.operation.target, + this.operation.value, + this.operation.data, + this.operation.predecessor, + this.operation.salt, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexpectedOperationState') + .withArgs(this.operation.id, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); }); describe('on time', function () { beforeEach(async function () { - const timestamp = await this.mock.getTimestamp(this.operation.id); - await time.increaseTo(timestamp); + await this.mock.getTimestamp(this.operation.id).then(clock => time.forward.timestamp(clock)); }); it('executor can reveal', async function () { - const receipt = await this.mock.execute( - this.operation.target, - this.operation.value, - this.operation.data, - this.operation.predecessor, - this.operation.salt, - { from: executor }, - ); - expectEvent(receipt, 'CallExecuted', { - id: this.operation.id, - index: web3.utils.toBN(0), - target: this.operation.target, - value: web3.utils.toBN(this.operation.value), - data: this.operation.data, - }); + await expect( + this.mock + .connect(this.executor) + .execute( + this.operation.target, + this.operation.value, + this.operation.data, + this.operation.predecessor, + this.operation.salt, + ), + ) + .to.emit(this.mock, 'CallExecuted') + .withArgs(this.operation.id, 0n, this.operation.target, this.operation.value, this.operation.data); }); it('prevent non-executor from revealing', async function () { - await expectRevertCustomError( - this.mock.execute( - this.operation.target, - this.operation.value, - this.operation.data, - this.operation.predecessor, - this.operation.salt, - { from: other }, - ), - `AccessControlUnauthorizedAccount`, - [other, EXECUTOR_ROLE], - ); + await expect( + this.mock + .connect(this.other) + .execute( + this.operation.target, + this.operation.value, + this.operation.data, + this.operation.predecessor, + this.operation.salt, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, EXECUTOR_ROLE); }); it('prevents reentrancy execution', async function () { // Create operation - const reentrant = await TimelockReentrant.new(); + const reentrant = await ethers.deployContract('$TimelockReentrant'); const reentrantOperation = genOperation( - reentrant.address, - 0, - reentrant.contract.methods.reenter().encodeABI(), - ZERO_BYTES32, + reentrant, + 0n, + reentrant.interface.encodeFunctionData('reenter'), + ethers.ZeroHash, salt, ); // Schedule so it can be executed - await this.mock.schedule( - reentrantOperation.target, - reentrantOperation.value, - reentrantOperation.data, - reentrantOperation.predecessor, - reentrantOperation.salt, - MINDELAY, - { from: proposer }, - ); + await this.mock + .connect(this.proposer) + .schedule( + reentrantOperation.target, + reentrantOperation.value, + reentrantOperation.data, + reentrantOperation.predecessor, + reentrantOperation.salt, + MINDELAY, + ); // Advance on time to make the operation executable - const timestamp = await this.mock.getTimestamp(reentrantOperation.id); - await time.increaseTo(timestamp); + await this.mock.getTimestamp(reentrantOperation.id).then(clock => time.forward.timestamp(clock)); // Grant executor role to the reentrant contract - await this.mock.grantRole(EXECUTOR_ROLE, reentrant.address, { from: admin }); + await this.mock.connect(this.admin).grantRole(EXECUTOR_ROLE, reentrant); // Prepare reenter - const data = this.mock.contract.methods - .execute( - reentrantOperation.target, - reentrantOperation.value, - reentrantOperation.data, - reentrantOperation.predecessor, - reentrantOperation.salt, - ) - .encodeABI(); - await reentrant.enableRentrancy(this.mock.address, data); + const data = this.mock.interface.encodeFunctionData('execute', [ + getAddress(reentrantOperation.target), + reentrantOperation.value, + reentrantOperation.data, + reentrantOperation.predecessor, + reentrantOperation.salt, + ]); + await reentrant.enableRentrancy(this.mock, data); // Expect to fail - await expectRevertCustomError( - this.mock.execute( - reentrantOperation.target, - reentrantOperation.value, - reentrantOperation.data, - reentrantOperation.predecessor, - reentrantOperation.salt, - { from: executor }, - ), - 'TimelockUnexpectedOperationState', - [reentrantOperation.id, proposalStatesToBitMap(OperationState.Ready)], - ); + await expect( + this.mock + .connect(this.executor) + .execute( + reentrantOperation.target, + reentrantOperation.value, + reentrantOperation.data, + reentrantOperation.predecessor, + reentrantOperation.salt, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexpectedOperationState') + .withArgs(reentrantOperation.id, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); // Disable reentrancy await reentrant.disableReentrancy(); const nonReentrantOperation = reentrantOperation; // Not anymore // Try again successfully - const receipt = await this.mock.execute( - nonReentrantOperation.target, - nonReentrantOperation.value, - nonReentrantOperation.data, - nonReentrantOperation.predecessor, - nonReentrantOperation.salt, - { from: executor }, - ); - expectEvent(receipt, 'CallExecuted', { - id: nonReentrantOperation.id, - index: web3.utils.toBN(0), - target: nonReentrantOperation.target, - value: web3.utils.toBN(nonReentrantOperation.value), - data: nonReentrantOperation.data, - }); + await expect( + this.mock + .connect(this.executor) + .execute( + nonReentrantOperation.target, + nonReentrantOperation.value, + nonReentrantOperation.data, + nonReentrantOperation.predecessor, + nonReentrantOperation.salt, + ), + ) + .to.emit(this.mock, 'CallExecuted') + .withArgs( + nonReentrantOperation.id, + 0n, + getAddress(nonReentrantOperation.target), + nonReentrantOperation.value, + nonReentrantOperation.data, + ); }); }); }); @@ -443,135 +472,139 @@ contract('TimelockController', function (accounts) { beforeEach(async function () { this.operation = genOperationBatch( Array(8).fill('0xEd912250835c812D4516BBD80BdaEA1bB63a293C'), - Array(8).fill(0), + Array(8).fill(0n), Array(8).fill('0x2fcb7a88'), - ZERO_BYTES32, + ethers.ZeroHash, '0x6cf9d042ade5de78bed9ffd075eb4b2a4f6b1736932c2dc8af517d6e066f51f5', ); }); it('proposer can schedule', async function () { - const receipt = await this.mock.scheduleBatch( - this.operation.targets, - this.operation.values, - this.operation.payloads, - this.operation.predecessor, - this.operation.salt, - MINDELAY, - { from: proposer }, - ); + const tx = this.mock + .connect(this.proposer) + .scheduleBatch( + this.operation.targets, + this.operation.values, + this.operation.payloads, + this.operation.predecessor, + this.operation.salt, + MINDELAY, + ); for (const i in this.operation.targets) { - expectEvent(receipt, 'CallScheduled', { - id: this.operation.id, - index: web3.utils.toBN(i), - target: this.operation.targets[i], - value: web3.utils.toBN(this.operation.values[i]), - data: this.operation.payloads[i], - predecessor: this.operation.predecessor, - delay: MINDELAY, - }); - - expectEvent(receipt, 'CallSalt', { - id: this.operation.id, - salt: this.operation.salt, - }); + await expect(tx) + .to.emit(this.mock, 'CallScheduled') + .withArgs( + this.operation.id, + i, + getAddress(this.operation.targets[i]), + this.operation.values[i], + this.operation.payloads[i], + this.operation.predecessor, + MINDELAY, + ) + .to.emit(this.mock, 'CallSalt') + .withArgs(this.operation.id, this.operation.salt); } - const block = await web3.eth.getBlock(receipt.receipt.blockHash); - - expect(await this.mock.getTimestamp(this.operation.id)).to.be.bignumber.equal( - web3.utils.toBN(block.timestamp).add(MINDELAY), + expect(await this.mock.getTimestamp(this.operation.id)).to.equal( + (await time.clockFromReceipt.timestamp(tx)) + MINDELAY, ); }); it('prevent overwriting active operation', async function () { - await this.mock.scheduleBatch( - this.operation.targets, - this.operation.values, - this.operation.payloads, - this.operation.predecessor, - this.operation.salt, - MINDELAY, - { from: proposer }, - ); - - await expectRevertCustomError( - this.mock.scheduleBatch( + await this.mock + .connect(this.proposer) + .scheduleBatch( this.operation.targets, this.operation.values, this.operation.payloads, this.operation.predecessor, this.operation.salt, MINDELAY, - { from: proposer }, - ), - 'TimelockUnexpectedOperationState', - [this.operation.id, proposalStatesToBitMap(OperationState.Unset)], - ); + ); + + await expect( + this.mock + .connect(this.proposer) + .scheduleBatch( + this.operation.targets, + this.operation.values, + this.operation.payloads, + this.operation.predecessor, + this.operation.salt, + MINDELAY, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexpectedOperationState') + .withArgs(this.operation.id, GovernorHelper.proposalStatesToBitMap(OperationState.Unset)); }); it('length of batch parameter must match #1', async function () { - await expectRevertCustomError( - this.mock.scheduleBatch( - this.operation.targets, - [], - this.operation.payloads, - this.operation.predecessor, - this.operation.salt, - MINDELAY, - { from: proposer }, - ), - 'TimelockInvalidOperationLength', - [this.operation.targets.length, this.operation.payloads.length, 0], - ); + await expect( + this.mock + .connect(this.proposer) + .scheduleBatch( + this.operation.targets, + [], + this.operation.payloads, + this.operation.predecessor, + this.operation.salt, + MINDELAY, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockInvalidOperationLength') + .withArgs(this.operation.targets.length, this.operation.payloads.length, 0n); }); it('length of batch parameter must match #1', async function () { - await expectRevertCustomError( - this.mock.scheduleBatch( - this.operation.targets, - this.operation.values, - [], - this.operation.predecessor, - this.operation.salt, - MINDELAY, - { from: proposer }, - ), - 'TimelockInvalidOperationLength', - [this.operation.targets.length, 0, this.operation.payloads.length], - ); + await expect( + this.mock + .connect(this.proposer) + .scheduleBatch( + this.operation.targets, + this.operation.values, + [], + this.operation.predecessor, + this.operation.salt, + MINDELAY, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockInvalidOperationLength') + .withArgs(this.operation.targets.length, 0n, this.operation.payloads.length); }); it('prevent non-proposer from committing', async function () { - await expectRevertCustomError( - this.mock.scheduleBatch( - this.operation.targets, - this.operation.values, - this.operation.payloads, - this.operation.predecessor, - this.operation.salt, - MINDELAY, - { from: other }, - ), - `AccessControlUnauthorizedAccount`, - [other, PROPOSER_ROLE], - ); + await expect( + this.mock + .connect(this.other) + .scheduleBatch( + this.operation.targets, + this.operation.values, + this.operation.payloads, + this.operation.predecessor, + this.operation.salt, + MINDELAY, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, PROPOSER_ROLE); }); it('enforce minimum delay', async function () { - await expectRevertCustomError( - this.mock.scheduleBatch( - this.operation.targets, - this.operation.values, - this.operation.payloads, - this.operation.predecessor, - this.operation.salt, - MINDELAY - 1, - { from: proposer }, - ), - 'TimelockInsufficientDelay', - [MINDELAY, MINDELAY - 1], - ); + await expect( + this.mock + .connect(this.proposer) + .scheduleBatch( + this.operation.targets, + this.operation.values, + this.operation.payloads, + this.operation.predecessor, + this.operation.salt, + MINDELAY - 1n, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockInsufficientDelay') + .withArgs(MINDELAY - 1n, MINDELAY); }); }); @@ -579,236 +612,248 @@ contract('TimelockController', function (accounts) { beforeEach(async function () { this.operation = genOperationBatch( Array(8).fill('0x76E53CcEb05131Ef5248553bEBDb8F70536830b1'), - Array(8).fill(0), + Array(8).fill(0n), Array(8).fill('0x58a60f63'), - ZERO_BYTES32, + ethers.ZeroHash, '0x9545eeabc7a7586689191f78a5532443698538e54211b5bd4d7dc0fc0102b5c7', ); }); it('revert if operation is not scheduled', async function () { - await expectRevertCustomError( - this.mock.executeBatch( - this.operation.targets, - this.operation.values, - this.operation.payloads, - this.operation.predecessor, - this.operation.salt, - { from: executor }, - ), - 'TimelockUnexpectedOperationState', - [this.operation.id, proposalStatesToBitMap(OperationState.Ready)], - ); - }); - - describe('with scheduled operation', function () { - beforeEach(async function () { - ({ receipt: this.receipt, logs: this.logs } = await this.mock.scheduleBatch( - this.operation.targets, - this.operation.values, - this.operation.payloads, - this.operation.predecessor, - this.operation.salt, - MINDELAY, - { from: proposer }, - )); - }); - - it('revert if execution comes too early 1/2', async function () { - await expectRevertCustomError( - this.mock.executeBatch( + await expect( + this.mock + .connect(this.executor) + .executeBatch( this.operation.targets, this.operation.values, this.operation.payloads, this.operation.predecessor, this.operation.salt, - { from: executor }, ), - 'TimelockUnexpectedOperationState', - [this.operation.id, proposalStatesToBitMap(OperationState.Ready)], - ); - }); - - it('revert if execution comes too early 2/2', async function () { - const timestamp = await this.mock.getTimestamp(this.operation.id); - await time.increaseTo(timestamp - 5); // -1 is to tight, test sometime fails - - await expectRevertCustomError( - this.mock.executeBatch( - this.operation.targets, - this.operation.values, - this.operation.payloads, - this.operation.predecessor, - this.operation.salt, - { from: executor }, - ), - 'TimelockUnexpectedOperationState', - [this.operation.id, proposalStatesToBitMap(OperationState.Ready)], - ); - }); - - describe('on time', function () { - beforeEach(async function () { - const timestamp = await this.mock.getTimestamp(this.operation.id); - await time.increaseTo(timestamp); - }); + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexpectedOperationState') + .withArgs(this.operation.id, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); + }); - it('executor can reveal', async function () { - const receipt = await this.mock.executeBatch( + describe('with scheduled operation', function () { + beforeEach(async function () { + await this.mock + .connect(this.proposer) + .scheduleBatch( this.operation.targets, this.operation.values, this.operation.payloads, this.operation.predecessor, this.operation.salt, - { from: executor }, + MINDELAY, ); - for (const i in this.operation.targets) { - expectEvent(receipt, 'CallExecuted', { - id: this.operation.id, - index: web3.utils.toBN(i), - target: this.operation.targets[i], - value: web3.utils.toBN(this.operation.values[i]), - data: this.operation.payloads[i], - }); - } - }); + }); - it('prevent non-executor from revealing', async function () { - await expectRevertCustomError( - this.mock.executeBatch( + it('revert if execution comes too early 1/2', async function () { + await expect( + this.mock + .connect(this.executor) + .executeBatch( this.operation.targets, this.operation.values, this.operation.payloads, this.operation.predecessor, this.operation.salt, - { from: other }, ), - `AccessControlUnauthorizedAccount`, - [other, EXECUTOR_ROLE], - ); - }); + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexpectedOperationState') + .withArgs(this.operation.id, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); + }); - it('length mismatch #1', async function () { - await expectRevertCustomError( - this.mock.executeBatch( - [], + it('revert if execution comes too early 2/2', async function () { + // -1 is to tight, test sometime fails + await this.mock.getTimestamp(this.operation.id).then(clock => time.forward.timestamp(clock - 5n)); + + await expect( + this.mock + .connect(this.executor) + .executeBatch( + this.operation.targets, this.operation.values, this.operation.payloads, this.operation.predecessor, this.operation.salt, - { from: executor }, ), - 'TimelockInvalidOperationLength', - [0, this.operation.payloads.length, this.operation.values.length], - ); + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexpectedOperationState') + .withArgs(this.operation.id, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); + }); + + describe('on time', function () { + beforeEach(async function () { + await this.mock.getTimestamp(this.operation.id).then(clock => time.forward.timestamp(clock)); }); - it('length mismatch #2', async function () { - await expectRevertCustomError( - this.mock.executeBatch( + it('executor can reveal', async function () { + const tx = this.mock + .connect(this.executor) + .executeBatch( this.operation.targets, - [], + this.operation.values, this.operation.payloads, this.operation.predecessor, this.operation.salt, - { from: executor }, - ), - 'TimelockInvalidOperationLength', - [this.operation.targets.length, this.operation.payloads.length, 0], - ); + ); + for (const i in this.operation.targets) { + expect(tx) + .to.emit(this.mock, 'CallExecuted') + .withArgs( + this.operation.id, + i, + this.operation.targets[i], + this.operation.values[i], + this.operation.payloads[i], + ); + } + }); + + it('prevent non-executor from revealing', async function () { + await expect( + this.mock + .connect(this.other) + .executeBatch( + this.operation.targets, + this.operation.values, + this.operation.payloads, + this.operation.predecessor, + this.operation.salt, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, EXECUTOR_ROLE); + }); + + it('length mismatch #1', async function () { + await expect( + this.mock + .connect(this.executor) + .executeBatch( + [], + this.operation.values, + this.operation.payloads, + this.operation.predecessor, + this.operation.salt, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockInvalidOperationLength') + .withArgs(0, this.operation.payloads.length, this.operation.values.length); + }); + + it('length mismatch #2', async function () { + await expect( + this.mock + .connect(this.executor) + .executeBatch( + this.operation.targets, + [], + this.operation.payloads, + this.operation.predecessor, + this.operation.salt, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockInvalidOperationLength') + .withArgs(this.operation.targets.length, this.operation.payloads.length, 0n); }); it('length mismatch #3', async function () { - await expectRevertCustomError( - this.mock.executeBatch( - this.operation.targets, - this.operation.values, - [], - this.operation.predecessor, - this.operation.salt, - { from: executor }, - ), - 'TimelockInvalidOperationLength', - [this.operation.targets.length, 0, this.operation.values.length], - ); + await expect( + this.mock + .connect(this.executor) + .executeBatch( + this.operation.targets, + this.operation.values, + [], + this.operation.predecessor, + this.operation.salt, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockInvalidOperationLength') + .withArgs(this.operation.targets.length, 0n, this.operation.values.length); }); it('prevents reentrancy execution', async function () { // Create operation - const reentrant = await TimelockReentrant.new(); + const reentrant = await ethers.deployContract('$TimelockReentrant'); const reentrantBatchOperation = genOperationBatch( - [reentrant.address], - [0], - [reentrant.contract.methods.reenter().encodeABI()], - ZERO_BYTES32, + [reentrant], + [0n], + [reentrant.interface.encodeFunctionData('reenter')], + ethers.ZeroHash, salt, ); // Schedule so it can be executed - await this.mock.scheduleBatch( - reentrantBatchOperation.targets, - reentrantBatchOperation.values, - reentrantBatchOperation.payloads, - reentrantBatchOperation.predecessor, - reentrantBatchOperation.salt, - MINDELAY, - { from: proposer }, - ); + await this.mock + .connect(this.proposer) + .scheduleBatch( + reentrantBatchOperation.targets, + reentrantBatchOperation.values, + reentrantBatchOperation.payloads, + reentrantBatchOperation.predecessor, + reentrantBatchOperation.salt, + MINDELAY, + ); // Advance on time to make the operation executable - const timestamp = await this.mock.getTimestamp(reentrantBatchOperation.id); - await time.increaseTo(timestamp); + await this.mock.getTimestamp(reentrantBatchOperation.id).then(clock => time.forward.timestamp(clock)); // Grant executor role to the reentrant contract - await this.mock.grantRole(EXECUTOR_ROLE, reentrant.address, { from: admin }); + await this.mock.connect(this.admin).grantRole(EXECUTOR_ROLE, reentrant); // Prepare reenter - const data = this.mock.contract.methods - .executeBatch( - reentrantBatchOperation.targets, - reentrantBatchOperation.values, - reentrantBatchOperation.payloads, - reentrantBatchOperation.predecessor, - reentrantBatchOperation.salt, - ) - .encodeABI(); - await reentrant.enableRentrancy(this.mock.address, data); + const data = this.mock.interface.encodeFunctionData('executeBatch', [ + reentrantBatchOperation.targets.map(getAddress), + reentrantBatchOperation.values, + reentrantBatchOperation.payloads, + reentrantBatchOperation.predecessor, + reentrantBatchOperation.salt, + ]); + await reentrant.enableRentrancy(this.mock, data); // Expect to fail - await expectRevertCustomError( - this.mock.executeBatch( - reentrantBatchOperation.targets, - reentrantBatchOperation.values, - reentrantBatchOperation.payloads, - reentrantBatchOperation.predecessor, - reentrantBatchOperation.salt, - { from: executor }, - ), - 'TimelockUnexpectedOperationState', - [reentrantBatchOperation.id, proposalStatesToBitMap(OperationState.Ready)], - ); + await expect( + this.mock + .connect(this.executor) + .executeBatch( + reentrantBatchOperation.targets, + reentrantBatchOperation.values, + reentrantBatchOperation.payloads, + reentrantBatchOperation.predecessor, + reentrantBatchOperation.salt, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexpectedOperationState') + .withArgs(reentrantBatchOperation.id, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); // Disable reentrancy await reentrant.disableReentrancy(); const nonReentrantBatchOperation = reentrantBatchOperation; // Not anymore // Try again successfully - const receipt = await this.mock.executeBatch( - nonReentrantBatchOperation.targets, - nonReentrantBatchOperation.values, - nonReentrantBatchOperation.payloads, - nonReentrantBatchOperation.predecessor, - nonReentrantBatchOperation.salt, - { from: executor }, - ); + const tx = this.mock + .connect(this.executor) + .executeBatch( + nonReentrantBatchOperation.targets, + nonReentrantBatchOperation.values, + nonReentrantBatchOperation.payloads, + nonReentrantBatchOperation.predecessor, + nonReentrantBatchOperation.salt, + ); for (const i in nonReentrantBatchOperation.targets) { - expectEvent(receipt, 'CallExecuted', { - id: nonReentrantBatchOperation.id, - index: web3.utils.toBN(i), - target: nonReentrantBatchOperation.targets[i], - value: web3.utils.toBN(nonReentrantBatchOperation.values[i]), - data: nonReentrantBatchOperation.payloads[i], - }); + expect(tx) + .to.emit(this.mock, 'CallExecuted') + .withArgs( + nonReentrantBatchOperation.id, + i, + nonReentrantBatchOperation.targets[i], + nonReentrantBatchOperation.values[i], + nonReentrantBatchOperation.payloads[i], + ); } }); }); @@ -816,39 +861,41 @@ contract('TimelockController', function (accounts) { it('partial execution', async function () { const operation = genOperationBatch( - [this.callreceivermock.address, this.callreceivermock.address, this.callreceivermock.address], - [0, 0, 0], + [this.callreceivermock, this.callreceivermock, this.callreceivermock], + [0n, 0n, 0n], [ - this.callreceivermock.contract.methods.mockFunction().encodeABI(), - this.callreceivermock.contract.methods.mockFunctionRevertsNoReason().encodeABI(), - this.callreceivermock.contract.methods.mockFunction().encodeABI(), + this.callreceivermock.interface.encodeFunctionData('mockFunction'), + this.callreceivermock.interface.encodeFunctionData('mockFunctionRevertsNoReason'), + this.callreceivermock.interface.encodeFunctionData('mockFunction'), ], - ZERO_BYTES32, + ethers.ZeroHash, '0x8ac04aa0d6d66b8812fb41d39638d37af0a9ab11da507afd65c509f8ed079d3e', ); - await this.mock.scheduleBatch( - operation.targets, - operation.values, - operation.payloads, - operation.predecessor, - operation.salt, - MINDELAY, - { from: proposer }, - ); - await time.increase(MINDELAY); - await expectRevertCustomError( - this.mock.executeBatch( + await this.mock + .connect(this.proposer) + .scheduleBatch( operation.targets, operation.values, operation.payloads, operation.predecessor, operation.salt, - { from: executor }, - ), - 'FailedInnerCall', - [], - ); + MINDELAY, + ); + + await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + + await expect( + this.mock + .connect(this.executor) + .executeBatch( + operation.targets, + operation.values, + operation.payloads, + operation.predecessor, + operation.salt, + ), + ).to.be.revertedWithCustomError(this.mock, 'FailedInnerCall'); }); }); }); @@ -857,81 +904,78 @@ contract('TimelockController', function (accounts) { beforeEach(async function () { this.operation = genOperation( '0xC6837c44AA376dbe1d2709F13879E040CAb653ca', - 0, + 0n, '0x296e58dd', - ZERO_BYTES32, + ethers.ZeroHash, '0xa2485763600634800df9fc9646fb2c112cf98649c55f63dd1d9c7d13a64399d9', ); - ({ receipt: this.receipt, logs: this.logs } = await this.mock.schedule( - this.operation.target, - this.operation.value, - this.operation.data, - this.operation.predecessor, - this.operation.salt, - MINDELAY, - { from: proposer }, - )); + await this.mock + .connect(this.proposer) + .schedule( + this.operation.target, + this.operation.value, + this.operation.data, + this.operation.predecessor, + this.operation.salt, + MINDELAY, + ); }); it('canceller can cancel', async function () { - const receipt = await this.mock.cancel(this.operation.id, { from: canceller }); - expectEvent(receipt, 'Cancelled', { id: this.operation.id }); + await expect(this.mock.connect(this.canceller).cancel(this.operation.id)) + .to.emit(this.mock, 'Cancelled') + .withArgs(this.operation.id); }); it('cannot cancel invalid operation', async function () { - await expectRevertCustomError( - this.mock.cancel(constants.ZERO_BYTES32, { from: canceller }), - 'TimelockUnexpectedOperationState', - [constants.ZERO_BYTES32, proposalStatesToBitMap([OperationState.Waiting, OperationState.Ready])], - ); + await expect(this.mock.connect(this.canceller).cancel(ethers.ZeroHash)) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexpectedOperationState') + .withArgs( + ethers.ZeroHash, + GovernorHelper.proposalStatesToBitMap([OperationState.Waiting, OperationState.Ready]), + ); }); it('prevent non-canceller from canceling', async function () { - await expectRevertCustomError( - this.mock.cancel(this.operation.id, { from: other }), - `AccessControlUnauthorizedAccount`, - [other, CANCELLER_ROLE], - ); + await expect(this.mock.connect(this.other).cancel(this.operation.id)) + .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') + .withArgs(this.other.address, CANCELLER_ROLE); }); }); }); describe('maintenance', function () { it('prevent unauthorized maintenance', async function () { - await expectRevertCustomError(this.mock.updateDelay(0, { from: other }), 'TimelockUnauthorizedCaller', [other]); + await expect(this.mock.connect(this.other).updateDelay(0n)) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnauthorizedCaller') + .withArgs(this.other.address); }); it('timelock scheduled maintenance', async function () { const newDelay = time.duration.hours(6); const operation = genOperation( - this.mock.address, - 0, - this.mock.contract.methods.updateDelay(newDelay.toString()).encodeABI(), - ZERO_BYTES32, + this.mock, + 0n, + this.mock.interface.encodeFunctionData('updateDelay', [newDelay]), + ethers.ZeroHash, '0xf8e775b2c5f4d66fb5c7fa800f35ef518c262b6014b3c0aee6ea21bff157f108', ); - await this.mock.schedule( - operation.target, - operation.value, - operation.data, - operation.predecessor, - operation.salt, - MINDELAY, - { from: proposer }, - ); - await time.increase(MINDELAY); - const receipt = await this.mock.execute( - operation.target, - operation.value, - operation.data, - operation.predecessor, - operation.salt, - { from: executor }, - ); - expectEvent(receipt, 'MinDelayChange', { newDuration: newDelay.toString(), oldDuration: MINDELAY }); + await this.mock + .connect(this.proposer) + .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - expect(await this.mock.getMinDelay()).to.be.bignumber.equal(newDelay); + await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + + await expect( + this.mock + .connect(this.executor) + .execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt), + ) + .to.emit(this.mock, 'MinDelayChange') + .withArgs(MINDELAY, newDelay); + + expect(await this.mock.getMinDelay()).to.equal(newDelay); }); }); @@ -939,71 +983,77 @@ contract('TimelockController', function (accounts) { beforeEach(async function () { this.operation1 = genOperation( '0xdE66bD4c97304200A95aE0AadA32d6d01A867E39', - 0, + 0n, '0x01dc731a', - ZERO_BYTES32, + ethers.ZeroHash, '0x64e932133c7677402ead2926f86205e2ca4686aebecf5a8077627092b9bb2feb', ); this.operation2 = genOperation( '0x3c7944a3F1ee7fc8c5A5134ba7c79D11c3A1FCa3', - 0, + 0n, '0x8f531849', this.operation1.id, '0x036e1311cac523f9548e6461e29fb1f8f9196b91910a41711ea22f5de48df07d', ); - await this.mock.schedule( - this.operation1.target, - this.operation1.value, - this.operation1.data, - this.operation1.predecessor, - this.operation1.salt, - MINDELAY, - { from: proposer }, - ); - await this.mock.schedule( - this.operation2.target, - this.operation2.value, - this.operation2.data, - this.operation2.predecessor, - this.operation2.salt, - MINDELAY, - { from: proposer }, - ); - await time.increase(MINDELAY); - }); - - it('cannot execute before dependency', async function () { - await expectRevertCustomError( - this.mock.execute( + await this.mock + .connect(this.proposer) + .schedule( + this.operation1.target, + this.operation1.value, + this.operation1.data, + this.operation1.predecessor, + this.operation1.salt, + MINDELAY, + ); + await this.mock + .connect(this.proposer) + .schedule( this.operation2.target, this.operation2.value, this.operation2.data, this.operation2.predecessor, this.operation2.salt, - { from: executor }, - ), - 'TimelockUnexecutedPredecessor', - [this.operation1.id], - ); + MINDELAY, + ); + + await this.mock.getTimestamp(this.operation2.id).then(clock => time.forward.timestamp(clock)); + }); + + it('cannot execute before dependency', async function () { + await expect( + this.mock + .connect(this.executor) + .execute( + this.operation2.target, + this.operation2.value, + this.operation2.data, + this.operation2.predecessor, + this.operation2.salt, + ), + ) + .to.be.revertedWithCustomError(this.mock, 'TimelockUnexecutedPredecessor') + .withArgs(this.operation1.id); }); it('can execute after dependency', async function () { - await this.mock.execute( - this.operation1.target, - this.operation1.value, - this.operation1.data, - this.operation1.predecessor, - this.operation1.salt, - { from: executor }, - ); - await this.mock.execute( - this.operation2.target, - this.operation2.value, - this.operation2.data, - this.operation2.predecessor, - this.operation2.salt, - { from: executor }, - ); + await this.mock + .connect(this.executor) + .execute( + this.operation1.target, + this.operation1.value, + this.operation1.data, + this.operation1.predecessor, + this.operation1.salt, + ); + await this.mock + .connect(this.executor) + .execute( + this.operation2.target, + this.operation2.value, + this.operation2.data, + this.operation2.predecessor, + this.operation2.salt, + ); }); }); @@ -1012,274 +1062,219 @@ contract('TimelockController', function (accounts) { it('call', async function () { const operation = genOperation( - this.implementation2.address, - 0, - this.implementation2.contract.methods.setValue(42).encodeABI(), - ZERO_BYTES32, + this.implementation2, + 0n, + this.implementation2.interface.encodeFunctionData('setValue', [42n]), + ethers.ZeroHash, '0x8043596363daefc89977b25f9d9b4d06c3910959ef0c4d213557a903e1b555e2', ); - await this.mock.schedule( - operation.target, - operation.value, - operation.data, - operation.predecessor, - operation.salt, - MINDELAY, - { from: proposer }, - ); - await time.increase(MINDELAY); - await this.mock.execute( - operation.target, - operation.value, - operation.data, - operation.predecessor, - operation.salt, - { from: executor }, - ); + await this.mock + .connect(this.proposer) + .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - expect(await this.implementation2.getValue()).to.be.bignumber.equal(web3.utils.toBN(42)); + await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + + await this.mock + .connect(this.executor) + .execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt); + + expect(await this.implementation2.getValue()).to.equal(42n); }); it('call reverting', async function () { const operation = genOperation( - this.callreceivermock.address, - 0, - this.callreceivermock.contract.methods.mockFunctionRevertsNoReason().encodeABI(), - ZERO_BYTES32, + this.callreceivermock, + 0n, + this.callreceivermock.interface.encodeFunctionData('mockFunctionRevertsNoReason'), + ethers.ZeroHash, '0xb1b1b276fdf1a28d1e00537ea73b04d56639128b08063c1a2f70a52e38cba693', ); - await this.mock.schedule( - operation.target, - operation.value, - operation.data, - operation.predecessor, - operation.salt, - MINDELAY, - { from: proposer }, - ); - await time.increase(MINDELAY); - await expectRevertCustomError( - this.mock.execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, { - from: executor, - }), - 'FailedInnerCall', - [], - ); + await this.mock + .connect(this.proposer) + .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); + + await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + + await expect( + this.mock + .connect(this.executor) + .execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt), + ).to.be.revertedWithCustomError(this.mock, 'FailedInnerCall'); }); it('call throw', async function () { const operation = genOperation( - this.callreceivermock.address, - 0, - this.callreceivermock.contract.methods.mockFunctionThrows().encodeABI(), - ZERO_BYTES32, + this.callreceivermock, + 0n, + this.callreceivermock.interface.encodeFunctionData('mockFunctionThrows'), + ethers.ZeroHash, '0xe5ca79f295fc8327ee8a765fe19afb58f4a0cbc5053642bfdd7e73bc68e0fc67', ); - await this.mock.schedule( - operation.target, - operation.value, - operation.data, - operation.predecessor, - operation.salt, - MINDELAY, - { from: proposer }, - ); - await time.increase(MINDELAY); + await this.mock + .connect(this.proposer) + .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); + + await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + // Targeted function reverts with a panic code (0x1) + the timelock bubble the panic code - await expectRevert.unspecified( - this.mock.execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, { - from: executor, - }), - ); + await expect( + this.mock + .connect(this.executor) + .execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt), + ).to.be.revertedWithPanic(PANIC_CODES.ASSERTION_ERROR); }); it('call out of gas', async function () { const operation = genOperation( - this.callreceivermock.address, - 0, - this.callreceivermock.contract.methods.mockFunctionOutOfGas().encodeABI(), - ZERO_BYTES32, + this.callreceivermock, + 0n, + this.callreceivermock.interface.encodeFunctionData('mockFunctionOutOfGas'), + ethers.ZeroHash, '0xf3274ce7c394c5b629d5215723563a744b817e1730cca5587c567099a14578fd', ); - await this.mock.schedule( - operation.target, - operation.value, - operation.data, - operation.predecessor, - operation.salt, - MINDELAY, - { from: proposer }, - ); - await time.increase(MINDELAY); - await expectRevertCustomError( - this.mock.execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, { - from: executor, - gas: '100000', - }), - 'FailedInnerCall', - [], - ); + await this.mock + .connect(this.proposer) + .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); + + await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + + await expect( + this.mock + .connect(this.executor) + .execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, { + gasLimit: '100000', + }), + ).to.be.revertedWithCustomError(this.mock, 'FailedInnerCall'); }); it('call payable with eth', async function () { const operation = genOperation( - this.callreceivermock.address, + this.callreceivermock, 1, - this.callreceivermock.contract.methods.mockFunction().encodeABI(), - ZERO_BYTES32, + this.callreceivermock.interface.encodeFunctionData('mockFunction'), + ethers.ZeroHash, '0x5ab73cd33477dcd36c1e05e28362719d0ed59a7b9ff14939de63a43073dc1f44', ); - await this.mock.schedule( - operation.target, - operation.value, - operation.data, - operation.predecessor, - operation.salt, - MINDELAY, - { from: proposer }, - ); - await time.increase(MINDELAY); - - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); - expect(await web3.eth.getBalance(this.callreceivermock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); - - await this.mock.execute( - operation.target, - operation.value, - operation.data, - operation.predecessor, - operation.salt, - { from: executor, value: 1 }, - ); + await this.mock + .connect(this.proposer) + .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); + + await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + + expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); + expect(await ethers.provider.getBalance(this.callreceivermock)).to.equal(0n); - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); - expect(await web3.eth.getBalance(this.callreceivermock.address)).to.be.bignumber.equal(web3.utils.toBN(1)); + await this.mock + .connect(this.executor) + .execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, { + value: 1, + }); + + expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); + expect(await ethers.provider.getBalance(this.callreceivermock)).to.equal(1n); }); it('call nonpayable with eth', async function () { const operation = genOperation( - this.callreceivermock.address, + this.callreceivermock, 1, - this.callreceivermock.contract.methods.mockFunctionNonPayable().encodeABI(), - ZERO_BYTES32, + this.callreceivermock.interface.encodeFunctionData('mockFunctionNonPayable'), + ethers.ZeroHash, '0xb78edbd920c7867f187e5aa6294ae5a656cfbf0dea1ccdca3751b740d0f2bdf8', ); - await this.mock.schedule( - operation.target, - operation.value, - operation.data, - operation.predecessor, - operation.salt, - MINDELAY, - { from: proposer }, - ); - await time.increase(MINDELAY); + await this.mock + .connect(this.proposer) + .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); - expect(await web3.eth.getBalance(this.callreceivermock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); + await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); - await expectRevertCustomError( - this.mock.execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, { - from: executor, - }), - 'FailedInnerCall', - [], - ); + expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); + expect(await ethers.provider.getBalance(this.callreceivermock)).to.equal(0n); + + await expect( + this.mock + .connect(this.executor) + .execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt), + ).to.be.revertedWithCustomError(this.mock, 'FailedInnerCall'); - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); - expect(await web3.eth.getBalance(this.callreceivermock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); + expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); + expect(await ethers.provider.getBalance(this.callreceivermock)).to.equal(0n); }); it('call reverting with eth', async function () { const operation = genOperation( - this.callreceivermock.address, + this.callreceivermock, 1, - this.callreceivermock.contract.methods.mockFunctionRevertsNoReason().encodeABI(), - ZERO_BYTES32, + this.callreceivermock.interface.encodeFunctionData('mockFunctionRevertsNoReason'), + ethers.ZeroHash, '0xdedb4563ef0095db01d81d3f2decf57cf83e4a72aa792af14c43a792b56f4de6', ); - await this.mock.schedule( - operation.target, - operation.value, - operation.data, - operation.predecessor, - operation.salt, - MINDELAY, - { from: proposer }, - ); - await time.increase(MINDELAY); + await this.mock + .connect(this.proposer) + .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); - expect(await web3.eth.getBalance(this.callreceivermock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); + await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); - await expectRevertCustomError( - this.mock.execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, { - from: executor, - }), - 'FailedInnerCall', - [], - ); + expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); + expect(await ethers.provider.getBalance(this.callreceivermock)).to.equal(0n); - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); - expect(await web3.eth.getBalance(this.callreceivermock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); + await expect( + this.mock + .connect(this.executor) + .execute(operation.target, operation.value, operation.data, operation.predecessor, operation.salt), + ).to.be.revertedWithCustomError(this.mock, 'FailedInnerCall'); + + expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); + expect(await ethers.provider.getBalance(this.callreceivermock)).to.equal(0n); }); }); describe('safe receive', function () { describe('ERC721', function () { - const name = 'Non Fungible Token'; - const symbol = 'NFT'; - const tokenId = new BN(1); + const tokenId = 1n; beforeEach(async function () { - this.token = await ERC721.new(name, symbol); - await this.token.$_mint(other, tokenId); + this.token = await ethers.deployContract('$ERC721', ['Non Fungible Token', 'NFT']); + await this.token.$_mint(this.other, tokenId); }); it('can receive an ERC721 safeTransfer', async function () { - await this.token.safeTransferFrom(other, this.mock.address, tokenId, { from: other }); + await this.token.connect(this.other).safeTransferFrom(this.other, this.mock, tokenId); }); }); describe('ERC1155', function () { - const uri = 'https://token-cdn-domain/{id}.json'; const tokenIds = { - 1: new BN(1000), - 2: new BN(2000), - 3: new BN(3000), + 1: 1000n, + 2: 2000n, + 3: 3000n, }; beforeEach(async function () { - this.token = await ERC1155.new(uri); - await this.token.$_mintBatch(other, Object.keys(tokenIds), Object.values(tokenIds), '0x'); + this.token = await ethers.deployContract('$ERC1155', ['https://token-cdn-domain/{id}.json']); + await this.token.$_mintBatch(this.other, Object.keys(tokenIds), Object.values(tokenIds), '0x'); }); it('can receive ERC1155 safeTransfer', async function () { - await this.token.safeTransferFrom( - other, - this.mock.address, - ...Object.entries(tokenIds)[0], // id + amount + await this.token.connect(this.other).safeTransferFrom( + this.other, + this.mock, + ...Object.entries(tokenIds)[0n], // id + amount '0x', - { from: other }, ); }); it('can receive ERC1155 safeBatchTransfer', async function () { - await this.token.safeBatchTransferFrom( - other, - this.mock.address, - Object.keys(tokenIds), - Object.values(tokenIds), - '0x', - { from: other }, - ); + await this.token + .connect(this.other) + .safeBatchTransferFrom(this.other, this.mock, Object.keys(tokenIds), Object.values(tokenIds), '0x'); }); }); }); diff --git a/test/governance/extensions/GovernorERC721.test.js b/test/governance/extensions/GovernorERC721.test.js index 22265cc25..0d2a33c73 100644 --- a/test/governance/extensions/GovernorERC721.test.js +++ b/test/governance/extensions/GovernorERC721.test.js @@ -1,59 +1,77 @@ -const { expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const Enums = require('../../helpers/enums'); const { GovernorHelper } = require('../../helpers/governance'); - -const Governor = artifacts.require('$GovernorVoteMocks'); -const CallReceiver = artifacts.require('CallReceiverMock'); +const { bigint: Enums } = require('../../helpers/enums'); const TOKENS = [ - { Token: artifacts.require('$ERC721Votes'), mode: 'blocknumber' }, - { Token: artifacts.require('$ERC721VotesTimestampMock'), mode: 'timestamp' }, + { Token: '$ERC721Votes', mode: 'blocknumber' }, + { Token: '$ERC721VotesTimestampMock', mode: 'timestamp' }, ]; -contract('GovernorERC721', function (accounts) { - const [owner, voter1, voter2, voter3, voter4] = accounts; - - const name = 'OZ-Governor'; - const version = '1'; - const tokenName = 'MockNFToken'; - const tokenSymbol = 'MTKN'; - const NFT0 = web3.utils.toBN(0); - const NFT1 = web3.utils.toBN(1); - const NFT2 = web3.utils.toBN(2); - const NFT3 = web3.utils.toBN(3); - const NFT4 = web3.utils.toBN(4); - const votingDelay = web3.utils.toBN(4); - const votingPeriod = web3.utils.toBN(16); - const value = web3.utils.toWei('1'); - - for (const { mode, Token } of TOKENS) { - describe(`using ${Token._json.contractName}`, function () { +const name = 'OZ-Governor'; +const version = '1'; +const tokenName = 'MockNFToken'; +const tokenSymbol = 'MTKN'; +const NFT0 = 0n; +const NFT1 = 1n; +const NFT2 = 2n; +const NFT3 = 3n; +const NFT4 = 4n; +const votingDelay = 4n; +const votingPeriod = 16n; +const value = ethers.parseEther('1'); + +describe('GovernorERC721', function () { + for (const { Token, mode } of TOKENS) { + const fixture = async () => { + const [owner, voter1, voter2, voter3, voter4] = await ethers.getSigners(); + const receiver = await ethers.deployContract('CallReceiverMock'); + + const token = await ethers.deployContract(Token, [tokenName, tokenSymbol, version]); + const mock = await ethers.deployContract('$GovernorMock', [ + name, // name + votingDelay, // initialVotingDelay + votingPeriod, // initialVotingPeriod + 0n, // initialProposalThreshold + token, // tokenAddress + 10n, // quorumNumeratorValue + ]); + + await owner.sendTransaction({ to: mock, value }); + await Promise.all([NFT0, NFT1, NFT2, NFT3, NFT4].map(tokenId => token.$_mint(owner, tokenId))); + + const helper = new GovernorHelper(mock, mode); + await helper.connect(owner).delegate({ token, to: voter1, tokenId: NFT0 }); + await helper.connect(owner).delegate({ token, to: voter2, tokenId: NFT1 }); + await helper.connect(owner).delegate({ token, to: voter2, tokenId: NFT2 }); + await helper.connect(owner).delegate({ token, to: voter3, tokenId: NFT3 }); + await helper.connect(owner).delegate({ token, to: voter4, tokenId: NFT4 }); + + return { + owner, + voter1, + voter2, + voter3, + voter4, + receiver, + token, + mock, + helper, + }; + }; + + describe(`using ${Token}`, function () { beforeEach(async function () { - this.owner = owner; - this.token = await Token.new(tokenName, tokenSymbol, tokenName, version); - this.mock = await Governor.new(name, this.token.address); - this.receiver = await CallReceiver.new(); - - this.helper = new GovernorHelper(this.mock, mode); - - await web3.eth.sendTransaction({ from: owner, to: this.mock.address, value }); - - await Promise.all([NFT0, NFT1, NFT2, NFT3, NFT4].map(tokenId => this.token.$_mint(owner, tokenId))); - await this.helper.delegate({ token: this.token, to: voter1, tokenId: NFT0 }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter2, tokenId: NFT1 }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter2, tokenId: NFT2 }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter3, tokenId: NFT3 }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter4, tokenId: NFT4 }, { from: owner }); - - // default proposal + Object.assign(this, await loadFixture(fixture)); + // initiate fresh proposal this.proposal = this.helper.setProposal( [ { - target: this.receiver.address, + target: this.receiver.target, + data: this.receiver.interface.encodeFunctionData('mockFunction'), value, - data: this.receiver.contract.methods.mockFunction().encodeABI(), }, ], '', @@ -61,55 +79,52 @@ contract('GovernorERC721', function (accounts) { }); it('deployment check', async function () { - expect(await this.mock.name()).to.be.equal(name); - expect(await this.mock.token()).to.be.equal(this.token.address); - expect(await this.mock.votingDelay()).to.be.bignumber.equal(votingDelay); - expect(await this.mock.votingPeriod()).to.be.bignumber.equal(votingPeriod); - expect(await this.mock.quorum(0)).to.be.bignumber.equal('0'); + expect(await this.mock.name()).to.equal(name); + expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.votingDelay()).to.equal(votingDelay); + expect(await this.mock.votingPeriod()).to.equal(votingPeriod); + expect(await this.mock.quorum(0n)).to.equal(0n); + + expect(await this.token.getVotes(this.voter1)).to.equal(1n); // NFT0 + expect(await this.token.getVotes(this.voter2)).to.equal(2n); // NFT1 & NFT2 + expect(await this.token.getVotes(this.voter3)).to.equal(1n); // NFT3 + expect(await this.token.getVotes(this.voter4)).to.equal(1n); // NFT4 }); it('voting with ERC721 token', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - expectEvent(await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }), 'VoteCast', { - voter: voter1, - support: Enums.VoteType.For, - weight: '1', - }); - - expectEvent(await this.helper.vote({ support: Enums.VoteType.For }, { from: voter2 }), 'VoteCast', { - voter: voter2, - support: Enums.VoteType.For, - weight: '2', - }); - - expectEvent(await this.helper.vote({ support: Enums.VoteType.Against }, { from: voter3 }), 'VoteCast', { - voter: voter3, - support: Enums.VoteType.Against, - weight: '1', - }); - - expectEvent(await this.helper.vote({ support: Enums.VoteType.Abstain }, { from: voter4 }), 'VoteCast', { - voter: voter4, - support: Enums.VoteType.Abstain, - weight: '1', - }); + await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + .to.emit(this.mock, 'VoteCast') + .withArgs(this.voter1.address, this.proposal.id, Enums.VoteType.For, 1n, ''); + + await expect(this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For })) + .to.emit(this.mock, 'VoteCast') + .withArgs(this.voter2.address, this.proposal.id, Enums.VoteType.For, 2n, ''); + + await expect(this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against })) + .to.emit(this.mock, 'VoteCast') + .withArgs(this.voter3.address, this.proposal.id, Enums.VoteType.Against, 1n, ''); + + await expect(this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain })) + .to.emit(this.mock, 'VoteCast') + .withArgs(this.voter4.address, this.proposal.id, Enums.VoteType.Abstain, 1n, ''); await this.helper.waitForDeadline(); await this.helper.execute(); - expect(await this.mock.hasVoted(this.proposal.id, owner)).to.be.equal(false); - expect(await this.mock.hasVoted(this.proposal.id, voter1)).to.be.equal(true); - expect(await this.mock.hasVoted(this.proposal.id, voter2)).to.be.equal(true); - expect(await this.mock.hasVoted(this.proposal.id, voter3)).to.be.equal(true); - expect(await this.mock.hasVoted(this.proposal.id, voter4)).to.be.equal(true); - - await this.mock.proposalVotes(this.proposal.id).then(results => { - expect(results.forVotes).to.be.bignumber.equal('3'); - expect(results.againstVotes).to.be.bignumber.equal('1'); - expect(results.abstainVotes).to.be.bignumber.equal('1'); - }); + expect(await this.mock.hasVoted(this.proposal.id, this.owner)).to.be.false; + expect(await this.mock.hasVoted(this.proposal.id, this.voter1)).to.be.true; + expect(await this.mock.hasVoted(this.proposal.id, this.voter2)).to.be.true; + expect(await this.mock.hasVoted(this.proposal.id, this.voter3)).to.be.true; + expect(await this.mock.hasVoted(this.proposal.id, this.voter4)).to.be.true; + + expect(await this.mock.proposalVotes(this.proposal.id)).to.deep.equal([ + 1n, // againstVotes + 3n, // forVotes + 1n, // abstainVotes + ]); }); }); } diff --git a/test/governance/extensions/GovernorPreventLateQuorum.test.js b/test/governance/extensions/GovernorPreventLateQuorum.test.js index 17ae05a73..8defa7014 100644 --- a/test/governance/extensions/GovernorPreventLateQuorum.test.js +++ b/test/governance/extensions/GovernorPreventLateQuorum.test.js @@ -1,66 +1,66 @@ -const { expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const Enums = require('../../helpers/enums'); const { GovernorHelper } = require('../../helpers/governance'); -const { clockFromReceipt } = require('../../helpers/time'); -const { expectRevertCustomError } = require('../../helpers/customError'); - -const Governor = artifacts.require('$GovernorPreventLateQuorumMock'); -const CallReceiver = artifacts.require('CallReceiverMock'); +const { bigint: Enums } = require('../../helpers/enums'); +const { bigint: time } = require('../../helpers/time'); const TOKENS = [ - { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, - { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' }, + { Token: '$ERC20Votes', mode: 'blocknumber' }, + { Token: '$ERC20VotesTimestampMock', mode: 'timestamp' }, ]; -contract('GovernorPreventLateQuorum', function (accounts) { - const [owner, proposer, voter1, voter2, voter3, voter4] = accounts; - - const name = 'OZ-Governor'; - const version = '1'; - const tokenName = 'MockToken'; - const tokenSymbol = 'MTKN'; - const tokenSupply = web3.utils.toWei('100'); - const votingDelay = web3.utils.toBN(4); - const votingPeriod = web3.utils.toBN(16); - const lateQuorumVoteExtension = web3.utils.toBN(8); - const quorum = web3.utils.toWei('1'); - const value = web3.utils.toWei('1'); - - for (const { mode, Token } of TOKENS) { - describe(`using ${Token._json.contractName}`, function () { +const name = 'OZ-Governor'; +const version = '1'; +const tokenName = 'MockToken'; +const tokenSymbol = 'MTKN'; +const tokenSupply = ethers.parseEther('100'); +const votingDelay = 4n; +const votingPeriod = 16n; +const lateQuorumVoteExtension = 8n; +const quorum = ethers.parseEther('1'); +const value = ethers.parseEther('1'); + +describe('GovernorPreventLateQuorum', function () { + for (const { Token, mode } of TOKENS) { + const fixture = async () => { + const [owner, proposer, voter1, voter2, voter3, voter4] = await ethers.getSigners(); + const receiver = await ethers.deployContract('CallReceiverMock'); + + const token = await ethers.deployContract(Token, [tokenName, tokenSymbol, version]); + const mock = await ethers.deployContract('$GovernorPreventLateQuorumMock', [ + name, // name + votingDelay, // initialVotingDelay + votingPeriod, // initialVotingPeriod + 0n, // initialProposalThreshold + token, // tokenAddress + lateQuorumVoteExtension, + quorum, + ]); + + await owner.sendTransaction({ to: mock, value }); + await token.$_mint(owner, tokenSupply); + + const helper = new GovernorHelper(mock, mode); + await helper.connect(owner).delegate({ token, to: voter1, value: ethers.parseEther('10') }); + await helper.connect(owner).delegate({ token, to: voter2, value: ethers.parseEther('7') }); + await helper.connect(owner).delegate({ token, to: voter3, value: ethers.parseEther('5') }); + await helper.connect(owner).delegate({ token, to: voter4, value: ethers.parseEther('2') }); + + return { owner, proposer, voter1, voter2, voter3, voter4, receiver, token, mock, helper }; + }; + + describe(`using ${Token}`, function () { beforeEach(async function () { - this.owner = owner; - this.token = await Token.new(tokenName, tokenSymbol, tokenName, version); - this.mock = await Governor.new( - name, - votingDelay, - votingPeriod, - 0, - this.token.address, - lateQuorumVoteExtension, - quorum, - ); - this.receiver = await CallReceiver.new(); - - this.helper = new GovernorHelper(this.mock, mode); - - await web3.eth.sendTransaction({ from: owner, to: this.mock.address, value }); - - await this.token.$_mint(owner, tokenSupply); - await this.helper.delegate({ token: this.token, to: voter1, value: web3.utils.toWei('10') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter2, value: web3.utils.toWei('7') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter3, value: web3.utils.toWei('5') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter4, value: web3.utils.toWei('2') }, { from: owner }); - - // default proposal + Object.assign(this, await loadFixture(fixture)); + // initiate fresh proposal this.proposal = this.helper.setProposal( [ { - target: this.receiver.address, + target: this.receiver.target, + data: this.receiver.interface.encodeFunctionData('mockFunction'), value, - data: this.receiver.contract.methods.mockFunction().encodeABI(), }, ], '', @@ -68,110 +68,101 @@ contract('GovernorPreventLateQuorum', function (accounts) { }); it('deployment check', async function () { - expect(await this.mock.name()).to.be.equal(name); - expect(await this.mock.token()).to.be.equal(this.token.address); - expect(await this.mock.votingDelay()).to.be.bignumber.equal(votingDelay); - expect(await this.mock.votingPeriod()).to.be.bignumber.equal(votingPeriod); - expect(await this.mock.quorum(0)).to.be.bignumber.equal(quorum); - expect(await this.mock.lateQuorumVoteExtension()).to.be.bignumber.equal(lateQuorumVoteExtension); + expect(await this.mock.name()).to.equal(name); + expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.votingDelay()).to.equal(votingDelay); + expect(await this.mock.votingPeriod()).to.equal(votingPeriod); + expect(await this.mock.quorum(0)).to.equal(quorum); + expect(await this.mock.lateQuorumVoteExtension()).to.equal(lateQuorumVoteExtension); }); it('nominal workflow unaffected', async function () { - const txPropose = await this.helper.propose({ from: proposer }); + const txPropose = await this.helper.connect(this.proposer).propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter2 }); - await this.helper.vote({ support: Enums.VoteType.Against }, { from: voter3 }); - await this.helper.vote({ support: Enums.VoteType.Abstain }, { from: voter4 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); await this.helper.waitForDeadline(); await this.helper.execute(); - expect(await this.mock.hasVoted(this.proposal.id, owner)).to.be.equal(false); - expect(await this.mock.hasVoted(this.proposal.id, voter1)).to.be.equal(true); - expect(await this.mock.hasVoted(this.proposal.id, voter2)).to.be.equal(true); - expect(await this.mock.hasVoted(this.proposal.id, voter3)).to.be.equal(true); - expect(await this.mock.hasVoted(this.proposal.id, voter4)).to.be.equal(true); - - await this.mock.proposalVotes(this.proposal.id).then(results => { - expect(results.forVotes).to.be.bignumber.equal(web3.utils.toWei('17')); - expect(results.againstVotes).to.be.bignumber.equal(web3.utils.toWei('5')); - expect(results.abstainVotes).to.be.bignumber.equal(web3.utils.toWei('2')); - }); - - const voteStart = web3.utils.toBN(await clockFromReceipt[mode](txPropose.receipt)).add(votingDelay); - const voteEnd = web3.utils - .toBN(await clockFromReceipt[mode](txPropose.receipt)) - .add(votingDelay) - .add(votingPeriod); - expect(await this.mock.proposalSnapshot(this.proposal.id)).to.be.bignumber.equal(voteStart); - expect(await this.mock.proposalDeadline(this.proposal.id)).to.be.bignumber.equal(voteEnd); - - expectEvent(txPropose, 'ProposalCreated', { - proposalId: this.proposal.id, - proposer, - targets: this.proposal.targets, - // values: this.proposal.values.map(value => web3.utils.toBN(value)), - signatures: this.proposal.signatures, - calldatas: this.proposal.data, - voteStart, - voteEnd, - description: this.proposal.description, - }); + expect(await this.mock.hasVoted(this.proposal.id, this.owner)).to.be.false; + expect(await this.mock.hasVoted(this.proposal.id, this.voter1)).to.be.true; + expect(await this.mock.hasVoted(this.proposal.id, this.voter2)).to.be.true; + expect(await this.mock.hasVoted(this.proposal.id, this.voter3)).to.be.true; + expect(await this.mock.hasVoted(this.proposal.id, this.voter4)).to.be.true; + + expect(await this.mock.proposalVotes(this.proposal.id)).to.deep.equal([ + ethers.parseEther('5'), // againstVotes + ethers.parseEther('17'), // forVotes + ethers.parseEther('2'), // abstainVotes + ]); + + const voteStart = (await time.clockFromReceipt[mode](txPropose)) + votingDelay; + const voteEnd = (await time.clockFromReceipt[mode](txPropose)) + votingDelay + votingPeriod; + expect(await this.mock.proposalSnapshot(this.proposal.id)).to.equal(voteStart); + expect(await this.mock.proposalDeadline(this.proposal.id)).to.equal(voteEnd); + + await expect(txPropose) + .to.emit(this.mock, 'ProposalCreated') + .withArgs( + this.proposal.id, + this.proposer.address, + this.proposal.targets, + this.proposal.values, + this.proposal.signatures, + this.proposal.data, + voteStart, + voteEnd, + this.proposal.description, + ); }); it('Delay is extended to prevent last minute take-over', async function () { - const txPropose = await this.helper.propose({ from: proposer }); + const txPropose = await this.helper.connect(this.proposer).propose(); // compute original schedule - const startBlock = web3.utils.toBN(await clockFromReceipt[mode](txPropose.receipt)).add(votingDelay); - const endBlock = web3.utils - .toBN(await clockFromReceipt[mode](txPropose.receipt)) - .add(votingDelay) - .add(votingPeriod); - expect(await this.mock.proposalSnapshot(this.proposal.id)).to.be.bignumber.equal(startBlock); - expect(await this.mock.proposalDeadline(this.proposal.id)).to.be.bignumber.equal(endBlock); - + const snapshotTimepoint = (await time.clockFromReceipt[mode](txPropose)) + votingDelay; + const deadlineTimepoint = (await time.clockFromReceipt[mode](txPropose)) + votingDelay + votingPeriod; + expect(await this.mock.proposalSnapshot(this.proposal.id)).to.equal(snapshotTimepoint); + expect(await this.mock.proposalDeadline(this.proposal.id)).to.equal(deadlineTimepoint); // wait for the last minute to vote - await this.helper.waitForDeadline(-1); - const txVote = await this.helper.vote({ support: Enums.VoteType.For }, { from: voter2 }); + await this.helper.waitForDeadline(-1n); + const txVote = await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); // cannot execute yet - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); // compute new extended schedule - const extendedDeadline = web3.utils - .toBN(await clockFromReceipt[mode](txVote.receipt)) - .add(lateQuorumVoteExtension); - expect(await this.mock.proposalSnapshot(this.proposal.id)).to.be.bignumber.equal(startBlock); - expect(await this.mock.proposalDeadline(this.proposal.id)).to.be.bignumber.equal(extendedDeadline); + const extendedDeadline = (await time.clockFromReceipt[mode](txVote)) + lateQuorumVoteExtension; + expect(await this.mock.proposalSnapshot(this.proposal.id)).to.equal(snapshotTimepoint); + expect(await this.mock.proposalDeadline(this.proposal.id)).to.equal(extendedDeadline); // still possible to vote - await this.helper.vote({ support: Enums.VoteType.Against }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.Against }); await this.helper.waitForDeadline(); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Active); - await this.helper.waitForDeadline(+1); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Defeated); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + await this.helper.waitForDeadline(1n); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Defeated); // check extension event - expectEvent(txVote, 'ProposalExtended', { proposalId: this.proposal.id, extendedDeadline }); + await expect(txVote).to.emit(this.mock, 'ProposalExtended').withArgs(this.proposal.id, extendedDeadline); }); describe('onlyGovernance updates', function () { it('setLateQuorumVoteExtension is protected', async function () { - await expectRevertCustomError( - this.mock.setLateQuorumVoteExtension(0, { from: owner }), - 'GovernorOnlyExecutor', - [owner], - ); + await expect(this.mock.connect(this.owner).setLateQuorumVoteExtension(0n)) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') + .withArgs(this.owner.address); }); it('can setLateQuorumVoteExtension through governance', async function () { this.helper.setProposal( [ { - target: this.mock.address, - data: this.mock.contract.methods.setLateQuorumVoteExtension('0').encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('setLateQuorumVoteExtension', [0n]), }, ], '', @@ -179,15 +170,14 @@ contract('GovernorPreventLateQuorum', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - expectEvent(await this.helper.execute(), 'LateQuorumVoteExtensionSet', { - oldVoteExtension: lateQuorumVoteExtension, - newVoteExtension: '0', - }); + await expect(this.helper.execute()) + .to.emit(this.mock, 'LateQuorumVoteExtensionSet') + .withArgs(lateQuorumVoteExtension, 0n); - expect(await this.mock.lateQuorumVoteExtension()).to.be.bignumber.equal('0'); + expect(await this.mock.lateQuorumVoteExtension()).to.equal(0n); }); }); }); diff --git a/test/governance/extensions/GovernorStorage.test.js b/test/governance/extensions/GovernorStorage.test.js index 99a97886c..911c32440 100644 --- a/test/governance/extensions/GovernorStorage.test.js +++ b/test/governance/extensions/GovernorStorage.test.js @@ -1,149 +1,154 @@ -const { constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); +const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const Enums = require('../../helpers/enums'); const { GovernorHelper, timelockSalt } = require('../../helpers/governance'); - -const Timelock = artifacts.require('TimelockController'); -const Governor = artifacts.require('$GovernorStorageMock'); -const CallReceiver = artifacts.require('CallReceiverMock'); +const { bigint: Enums } = require('../../helpers/enums'); const TOKENS = [ - { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, - { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' }, + { Token: '$ERC20Votes', mode: 'blocknumber' }, + { Token: '$ERC20VotesTimestampMock', mode: 'timestamp' }, ]; -contract('GovernorStorage', function (accounts) { - const [owner, voter1, voter2, voter3, voter4] = accounts; - - const DEFAULT_ADMIN_ROLE = '0x0000000000000000000000000000000000000000000000000000000000000000'; - const PROPOSER_ROLE = web3.utils.soliditySha3('PROPOSER_ROLE'); - const EXECUTOR_ROLE = web3.utils.soliditySha3('EXECUTOR_ROLE'); - const CANCELLER_ROLE = web3.utils.soliditySha3('CANCELLER_ROLE'); - - const name = 'OZ-Governor'; - const version = '1'; - const tokenName = 'MockToken'; - const tokenSymbol = 'MTKN'; - const tokenSupply = web3.utils.toWei('100'); - const votingDelay = web3.utils.toBN(4); - const votingPeriod = web3.utils.toBN(16); - const value = web3.utils.toWei('1'); - - for (const { mode, Token } of TOKENS) { - describe(`using ${Token._json.contractName}`, function () { +const DEFAULT_ADMIN_ROLE = ethers.ZeroHash; +const PROPOSER_ROLE = ethers.id('PROPOSER_ROLE'); +const EXECUTOR_ROLE = ethers.id('EXECUTOR_ROLE'); +const CANCELLER_ROLE = ethers.id('CANCELLER_ROLE'); + +const name = 'OZ-Governor'; +const version = '1'; +const tokenName = 'MockToken'; +const tokenSymbol = 'MTKN'; +const tokenSupply = ethers.parseEther('100'); +const votingDelay = 4n; +const votingPeriod = 16n; +const value = ethers.parseEther('1'); +const delay = 3600n; + +describe('GovernorStorage', function () { + for (const { Token, mode } of TOKENS) { + const fixture = async () => { + const [deployer, owner, proposer, voter1, voter2, voter3, voter4] = await ethers.getSigners(); + const receiver = await ethers.deployContract('CallReceiverMock'); + + const token = await ethers.deployContract(Token, [tokenName, tokenSymbol, version]); + const timelock = await ethers.deployContract('TimelockController', [delay, [], [], deployer]); + const mock = await ethers.deployContract('$GovernorStorageMock', [ + name, + votingDelay, + votingPeriod, + 0n, + timelock, + token, + 0n, + ]); + + await owner.sendTransaction({ to: timelock, value }); + await token.$_mint(owner, tokenSupply); + await timelock.grantRole(PROPOSER_ROLE, mock); + await timelock.grantRole(PROPOSER_ROLE, owner); + await timelock.grantRole(CANCELLER_ROLE, mock); + await timelock.grantRole(CANCELLER_ROLE, owner); + await timelock.grantRole(EXECUTOR_ROLE, ethers.ZeroAddress); + await timelock.revokeRole(DEFAULT_ADMIN_ROLE, deployer); + + const helper = new GovernorHelper(mock, mode); + await helper.connect(owner).delegate({ token, to: voter1, value: ethers.parseEther('10') }); + await helper.connect(owner).delegate({ token, to: voter2, value: ethers.parseEther('7') }); + await helper.connect(owner).delegate({ token, to: voter3, value: ethers.parseEther('5') }); + await helper.connect(owner).delegate({ token, to: voter4, value: ethers.parseEther('2') }); + + return { deployer, owner, proposer, voter1, voter2, voter3, voter4, receiver, token, timelock, mock, helper }; + }; + + describe(`using ${Token}`, function () { beforeEach(async function () { - const [deployer] = await web3.eth.getAccounts(); - - this.token = await Token.new(tokenName, tokenSymbol, tokenName, version); - this.timelock = await Timelock.new(3600, [], [], deployer); - this.mock = await Governor.new( - name, - votingDelay, - votingPeriod, - 0, - this.timelock.address, - this.token.address, - 0, - ); - this.receiver = await CallReceiver.new(); - - this.helper = new GovernorHelper(this.mock, mode); - - await web3.eth.sendTransaction({ from: owner, to: this.timelock.address, value }); - - // normal setup: governor is proposer, everyone is executor, timelock is its own admin - await this.timelock.grantRole(PROPOSER_ROLE, this.mock.address); - await this.timelock.grantRole(PROPOSER_ROLE, owner); - await this.timelock.grantRole(CANCELLER_ROLE, this.mock.address); - await this.timelock.grantRole(CANCELLER_ROLE, owner); - await this.timelock.grantRole(EXECUTOR_ROLE, constants.ZERO_ADDRESS); - await this.timelock.revokeRole(DEFAULT_ADMIN_ROLE, deployer); - - await this.token.$_mint(owner, tokenSupply); - await this.helper.delegate({ token: this.token, to: voter1, value: web3.utils.toWei('10') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter2, value: web3.utils.toWei('7') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter3, value: web3.utils.toWei('5') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter4, value: web3.utils.toWei('2') }, { from: owner }); - - // default proposal + Object.assign(this, await loadFixture(fixture)); + // initiate fresh proposal this.proposal = this.helper.setProposal( [ { - target: this.receiver.address, + target: this.receiver.target, + data: this.receiver.interface.encodeFunctionData('mockFunction'), value, - data: this.receiver.contract.methods.mockFunction().encodeABI(), }, ], '', ); this.proposal.timelockid = await this.timelock.hashOperationBatch( ...this.proposal.shortProposal.slice(0, 3), - '0x0', - timelockSalt(this.mock.address, this.proposal.shortProposal[3]), + ethers.ZeroHash, + timelockSalt(this.mock.target, this.proposal.shortProposal[3]), ); }); describe('proposal indexing', function () { it('before propose', async function () { - expect(await this.mock.proposalCount()).to.be.bignumber.equal('0'); + expect(await this.mock.proposalCount()).to.equal(0n); - // panic code 0x32 (out-of-bound) - await expectRevert.unspecified(this.mock.proposalDetailsAt(0)); + await expect(this.mock.proposalDetailsAt(0n)).to.be.revertedWithPanic(PANIC_CODES.ARRAY_ACCESS_OUT_OF_BOUNDS); - await expectRevertCustomError(this.mock.proposalDetails(this.proposal.id), 'GovernorNonexistentProposal', [ - this.proposal.id, - ]); + await expect(this.mock.proposalDetails(this.proposal.id)) + .to.be.revertedWithCustomError(this.mock, 'GovernorNonexistentProposal') + .withArgs(this.proposal.id); }); it('after propose', async function () { await this.helper.propose(); - expect(await this.mock.proposalCount()).to.be.bignumber.equal('1'); + expect(await this.mock.proposalCount()).to.equal(1n); - const proposalDetailsAt0 = await this.mock.proposalDetailsAt(0); - expect(proposalDetailsAt0[0]).to.be.bignumber.equal(this.proposal.id); - expect(proposalDetailsAt0[1]).to.be.deep.equal(this.proposal.targets); - expect(proposalDetailsAt0[2].map(x => x.toString())).to.be.deep.equal(this.proposal.values); - expect(proposalDetailsAt0[3]).to.be.deep.equal(this.proposal.fulldata); - expect(proposalDetailsAt0[4]).to.be.equal(this.proposal.descriptionHash); + expect(await this.mock.proposalDetailsAt(0n)).to.deep.equal([ + this.proposal.id, + this.proposal.targets, + this.proposal.values, + this.proposal.data, + this.proposal.descriptionHash, + ]); - const proposalDetailsForId = await this.mock.proposalDetails(this.proposal.id); - expect(proposalDetailsForId[0]).to.be.deep.equal(this.proposal.targets); - expect(proposalDetailsForId[1].map(x => x.toString())).to.be.deep.equal(this.proposal.values); - expect(proposalDetailsForId[2]).to.be.deep.equal(this.proposal.fulldata); - expect(proposalDetailsForId[3]).to.be.equal(this.proposal.descriptionHash); + expect(await this.mock.proposalDetails(this.proposal.id)).to.deep.equal([ + this.proposal.targets, + this.proposal.values, + this.proposal.data, + this.proposal.descriptionHash, + ]); }); }); it('queue and execute by id', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter2 }); - await this.helper.vote({ support: Enums.VoteType.Against }, { from: voter3 }); - await this.helper.vote({ support: Enums.VoteType.Abstain }, { from: voter4 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); await this.helper.waitForDeadline(); - const txQueue = await this.mock.queue(this.proposal.id); - await this.helper.waitForEta(); - const txExecute = await this.mock.execute(this.proposal.id); - expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txQueue.tx, this.timelock, 'CallScheduled', { id: this.proposal.timelockid }); - await expectEvent.inTransaction(txQueue.tx, this.timelock, 'CallSalt', { - id: this.proposal.timelockid, - }); + await expect(this.mock.queue(this.proposal.id)) + .to.emit(this.mock, 'ProposalQueued') + .withArgs(this.proposal.id, anyValue) + .to.emit(this.timelock, 'CallScheduled') + .withArgs(this.proposal.timelockid, ...Array(6).fill(anyValue)) + .to.emit(this.timelock, 'CallSalt') + .withArgs(this.proposal.timelockid, anyValue); + + await this.helper.waitForEta(); - expectEvent(txExecute, 'ProposalExecuted', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txExecute.tx, this.timelock, 'CallExecuted', { id: this.proposal.timelockid }); - await expectEvent.inTransaction(txExecute.tx, this.receiver, 'MockFunctionCalled'); + await expect(this.mock.execute(this.proposal.id)) + .to.emit(this.mock, 'ProposalExecuted') + .withArgs(this.proposal.id) + .to.emit(this.timelock, 'CallExecuted') + .withArgs(this.proposal.timelockid, ...Array(4).fill(anyValue)) + .to.emit(this.receiver, 'MockFunctionCalled'); }); it('cancel by id', async function () { - await this.helper.propose(); - const txCancel = await this.mock.cancel(this.proposal.id); - expectEvent(txCancel, 'ProposalCanceled', { proposalId: this.proposal.id }); + await this.helper.connect(this.proposer).propose(); + await expect(this.mock.connect(this.proposer).cancel(this.proposal.id)) + .to.emit(this.mock, 'ProposalCanceled') + .withArgs(this.proposal.id); }); }); } diff --git a/test/governance/extensions/GovernorTimelockAccess.test.js b/test/governance/extensions/GovernorTimelockAccess.test.js index 252a3d52e..2f16d1b99 100644 --- a/test/governance/extensions/GovernorTimelockAccess.test.js +++ b/test/governance/extensions/GovernorTimelockAccess.test.js @@ -1,132 +1,120 @@ -const { expectEvent, time } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); -const Enums = require('../../helpers/enums'); -const { GovernorHelper, proposalStatesToBitMap } = require('../../helpers/governance'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const { clockFromReceipt } = require('../../helpers/time'); +const { GovernorHelper } = require('../../helpers/governance'); +const { bigint: Enums } = require('../../helpers/enums'); +const { bigint: time } = require('../../helpers/time'); +const { max } = require('../../helpers/math'); const { selector } = require('../../helpers/methods'); const { hashOperation } = require('../../helpers/access-manager'); -const AccessManager = artifacts.require('$AccessManager'); -const Governor = artifacts.require('$GovernorTimelockAccessMock'); -const AccessManagedTarget = artifacts.require('$AccessManagedTarget'); -const Ownable = artifacts.require('$Ownable'); +function prepareOperation({ sender, target, value = 0n, data = '0x' }) { + return { + id: hashOperation(sender, target, data), + operation: { target, value, data }, + selector: data.slice(0, 10).padEnd(10, '0'), + }; +} const TOKENS = [ - { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, - { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' }, + { Token: '$ERC20Votes', mode: 'blocknumber' }, + { Token: '$ERC20VotesTimestampMock', mode: 'timestamp' }, ]; -contract('GovernorTimelockAccess', function (accounts) { - const [admin, voter1, voter2, voter3, voter4, other] = accounts; - - const name = 'OZ-Governor'; - const version = '1'; - const tokenName = 'MockToken'; - const tokenSymbol = 'MTKN'; - const tokenSupply = web3.utils.toWei('100'); - const votingDelay = web3.utils.toBN(4); - const votingPeriod = web3.utils.toBN(16); - const value = web3.utils.toWei('1'); - - for (const { mode, Token } of TOKENS) { - describe(`using ${Token._json.contractName}`, function () { +const name = 'OZ-Governor'; +const version = '1'; +const tokenName = 'MockToken'; +const tokenSymbol = 'MTKN'; +const tokenSupply = ethers.parseEther('100'); +const votingDelay = 4n; +const votingPeriod = 16n; +const value = ethers.parseEther('1'); + +describe('GovernorTimelockAccess', function () { + for (const { Token, mode } of TOKENS) { + const fixture = async () => { + const [admin, voter1, voter2, voter3, voter4, other] = await ethers.getSigners(); + + const manager = await ethers.deployContract('$AccessManager', [admin]); + const receiver = await ethers.deployContract('$AccessManagedTarget', [manager]); + + const token = await ethers.deployContract(Token, [tokenName, tokenSymbol, version]); + const mock = await ethers.deployContract('$GovernorTimelockAccessMock', [ + name, + votingDelay, + votingPeriod, + 0n, + manager, + 0n, + token, + 0n, + ]); + + await admin.sendTransaction({ to: mock, value }); + await token.$_mint(admin, tokenSupply); + + const helper = new GovernorHelper(mock, mode); + await helper.connect(admin).delegate({ token, to: voter1, value: ethers.parseEther('10') }); + await helper.connect(admin).delegate({ token, to: voter2, value: ethers.parseEther('7') }); + await helper.connect(admin).delegate({ token, to: voter3, value: ethers.parseEther('5') }); + await helper.connect(admin).delegate({ token, to: voter4, value: ethers.parseEther('2') }); + + return { admin, voter1, voter2, voter3, voter4, other, manager, receiver, token, mock, helper }; + }; + + describe(`using ${Token}`, function () { beforeEach(async function () { - this.token = await Token.new(tokenName, tokenSymbol, tokenName, version); - this.manager = await AccessManager.new(admin); - this.mock = await Governor.new( - name, - votingDelay, - votingPeriod, - 0, // proposal threshold - this.manager.address, - 0, // base delay - this.token.address, - 0, // quorum - ); - this.receiver = await AccessManagedTarget.new(this.manager.address); - - this.helper = new GovernorHelper(this.mock, mode); - - await web3.eth.sendTransaction({ from: admin, to: this.mock.address, value }); - - await this.token.$_mint(admin, tokenSupply); - await this.helper.delegate({ token: this.token, to: voter1, value: web3.utils.toWei('10') }, { from: admin }); - await this.helper.delegate({ token: this.token, to: voter2, value: web3.utils.toWei('7') }, { from: admin }); - await this.helper.delegate({ token: this.token, to: voter3, value: web3.utils.toWei('5') }, { from: admin }); - await this.helper.delegate({ token: this.token, to: voter4, value: web3.utils.toWei('2') }, { from: admin }); - - // default proposals - this.restricted = {}; - this.restricted.selector = this.receiver.contract.methods.fnRestricted().encodeABI(); - this.restricted.operation = { - target: this.receiver.address, - value: '0', - data: this.restricted.selector, - }; - this.restricted.operationId = hashOperation( - this.mock.address, - this.restricted.operation.target, - this.restricted.operation.data, - ); + Object.assign(this, await loadFixture(fixture)); - this.unrestricted = {}; - this.unrestricted.selector = this.receiver.contract.methods.fnUnrestricted().encodeABI(); - this.unrestricted.operation = { - target: this.receiver.address, - value: '0', - data: this.unrestricted.selector, - }; - this.unrestricted.operationId = hashOperation( - this.mock.address, - this.unrestricted.operation.target, - this.unrestricted.operation.data, - ); + // restricted proposal + this.restricted = prepareOperation({ + sender: this.mock.target, + target: this.receiver.target, + data: this.receiver.interface.encodeFunctionData('fnRestricted'), + }); - this.fallback = {}; - this.fallback.operation = { - target: this.receiver.address, - value: '0', + this.unrestricted = prepareOperation({ + sender: this.mock.target, + target: this.receiver.target, + data: this.receiver.interface.encodeFunctionData('fnUnrestricted'), + }); + + this.fallback = prepareOperation({ + sender: this.mock.target, + target: this.receiver.target, data: '0x1234', - }; - this.fallback.operationId = hashOperation( - this.mock.address, - this.fallback.operation.target, - this.fallback.operation.data, - ); + }); }); it('accepts ether transfers', async function () { - await web3.eth.sendTransaction({ from: admin, to: this.mock.address, value: 1 }); + await this.admin.sendTransaction({ to: this.mock, value: 1n }); }); it('post deployment check', async function () { - expect(await this.mock.name()).to.be.equal(name); - expect(await this.mock.token()).to.be.equal(this.token.address); - expect(await this.mock.votingDelay()).to.be.bignumber.equal(votingDelay); - expect(await this.mock.votingPeriod()).to.be.bignumber.equal(votingPeriod); - expect(await this.mock.quorum(0)).to.be.bignumber.equal('0'); + expect(await this.mock.name()).to.equal(name); + expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.votingDelay()).to.equal(votingDelay); + expect(await this.mock.votingPeriod()).to.equal(votingPeriod); + expect(await this.mock.quorum(0n)).to.equal(0n); - expect(await this.mock.accessManager()).to.be.equal(this.manager.address); + expect(await this.mock.accessManager()).to.equal(this.manager.target); }); it('sets base delay (seconds)', async function () { - const baseDelay = time.duration.hours(10); + const baseDelay = time.duration.hours(10n); // Only through governance - await expectRevertCustomError( - this.mock.setBaseDelaySeconds(baseDelay, { from: voter1 }), - 'GovernorOnlyExecutor', - [voter1], - ); + await expect(this.mock.connect(this.voter1).setBaseDelaySeconds(baseDelay)) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') + .withArgs(this.voter1.address); this.proposal = await this.helper.setProposal( [ { - target: this.mock.address, - value: '0', - data: this.mock.contract.methods.setBaseDelaySeconds(baseDelay).encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('setBaseDelaySeconds', [baseDelay]), }, ], 'descr', @@ -134,95 +122,90 @@ contract('GovernorTimelockAccess', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - const receipt = await this.helper.execute(); - expectEvent(receipt, 'BaseDelaySet', { - oldBaseDelaySeconds: '0', - newBaseDelaySeconds: baseDelay, - }); + await expect(this.helper.execute()).to.emit(this.mock, 'BaseDelaySet').withArgs(0n, baseDelay); - expect(await this.mock.baseDelaySeconds()).to.be.bignumber.eq(baseDelay); + expect(await this.mock.baseDelaySeconds()).to.equal(baseDelay); }); it('sets access manager ignored', async function () { const selectors = ['0x12345678', '0x87654321', '0xabcdef01']; // Only through governance - await expectRevertCustomError( - this.mock.setAccessManagerIgnored(other, selectors, true, { from: voter1 }), - 'GovernorOnlyExecutor', - [voter1], - ); + await expect(this.mock.connect(this.voter1).setAccessManagerIgnored(this.other, selectors, true)) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') + .withArgs(this.voter1.address); // Ignore - const helperIgnore = new GovernorHelper(this.mock, mode); - await helperIgnore.setProposal( + await this.helper.setProposal( [ { - target: this.mock.address, - value: '0', - data: this.mock.contract.methods.setAccessManagerIgnored(other, selectors, true).encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('setAccessManagerIgnored', [ + this.other.address, + selectors, + true, + ]), }, ], 'descr', ); + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.waitForDeadline(); - await helperIgnore.propose(); - await helperIgnore.waitForSnapshot(); - await helperIgnore.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await helperIgnore.waitForDeadline(); - const ignoreReceipt = await helperIgnore.execute(); - + const ignoreReceipt = this.helper.execute(); for (const selector of selectors) { - expectEvent(ignoreReceipt, 'AccessManagerIgnoredSet', { - target: other, - selector, - ignored: true, - }); - expect(await this.mock.isAccessManagerIgnored(other, selector)).to.be.true; + await expect(ignoreReceipt) + .to.emit(this.mock, 'AccessManagerIgnoredSet') + .withArgs(this.other.address, selector, true); + expect(await this.mock.isAccessManagerIgnored(this.other, selector)).to.be.true; } // Unignore - const helperUnignore = new GovernorHelper(this.mock, mode); - await helperUnignore.setProposal( + await this.helper.setProposal( [ { - target: this.mock.address, - value: '0', - data: this.mock.contract.methods.setAccessManagerIgnored(other, selectors, false).encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('setAccessManagerIgnored', [ + this.other.address, + selectors, + false, + ]), }, ], 'descr', ); - await helperUnignore.propose(); - await helperUnignore.waitForSnapshot(); - await helperUnignore.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await helperUnignore.waitForDeadline(); - const unignoreReceipt = await helperUnignore.execute(); + await this.helper.propose(); + await this.helper.waitForSnapshot(); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.waitForDeadline(); + const unignoreReceipt = this.helper.execute(); for (const selector of selectors) { - expectEvent(unignoreReceipt, 'AccessManagerIgnoredSet', { - target: other, - selector, - ignored: false, - }); - expect(await this.mock.isAccessManagerIgnored(other, selector)).to.be.false; + await expect(unignoreReceipt) + .to.emit(this.mock, 'AccessManagerIgnoredSet') + .withArgs(this.other.address, selector, false); + expect(await this.mock.isAccessManagerIgnored(this.other, selector)).to.be.false; } }); it('sets access manager ignored when target is the governor', async function () { - const other = this.mock.address; const selectors = ['0x12345678', '0x87654321', '0xabcdef01']; await this.helper.setProposal( [ { - target: this.mock.address, - value: '0', - data: this.mock.contract.methods.setAccessManagerIgnored(other, selectors, true).encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('setAccessManagerIgnored', [ + this.mock.target, + selectors, + true, + ]), }, ], 'descr', @@ -230,154 +213,141 @@ contract('GovernorTimelockAccess', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - const receipt = await this.helper.execute(); + const tx = this.helper.execute(); for (const selector of selectors) { - expectEvent(receipt, 'AccessManagerIgnoredSet', { - target: other, - selector, - ignored: true, - }); - expect(await this.mock.isAccessManagerIgnored(other, selector)).to.be.true; + await expect(tx).to.emit(this.mock, 'AccessManagerIgnoredSet').withArgs(this.mock.target, selector, true); + expect(await this.mock.isAccessManagerIgnored(this.mock, selector)).to.be.true; } }); it('does not need to queue proposals with no delay', async function () { - const roleId = '1'; - - const executionDelay = web3.utils.toBN(0); - const baseDelay = web3.utils.toBN(0); + const roleId = 1n; + const executionDelay = 0n; + const baseDelay = 0n; // Set execution delay - await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { - from: admin, - }); - await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + await this.manager.connect(this.admin).setTargetFunctionRole(this.receiver, [this.restricted.selector], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, executionDelay); // Set base delay await this.mock.$_setBaseDelaySeconds(baseDelay); - this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); + await this.helper.setProposal([this.restricted.operation], 'descr'); await this.helper.propose(); expect(await this.mock.proposalNeedsQueuing(this.helper.currentProposal.id)).to.be.false; }); it('needs to queue proposals with any delay', async function () { - const roleId = '1'; - + const roleId = 1n; const delays = [ - [time.duration.hours(1), time.duration.hours(2)], - [time.duration.hours(2), time.duration.hours(1)], + [time.duration.hours(1n), time.duration.hours(2n)], + [time.duration.hours(2n), time.duration.hours(1n)], ]; for (const [executionDelay, baseDelay] of delays) { // Set execution delay - await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { - from: admin, - }); - await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + await this.manager + .connect(this.admin) + .setTargetFunctionRole(this.receiver, [this.restricted.selector], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, executionDelay); // Set base delay await this.mock.$_setBaseDelaySeconds(baseDelay); - const helper = new GovernorHelper(this.mock, mode); - this.proposal = await helper.setProposal( + await this.helper.setProposal( [this.restricted.operation], `executionDelay=${executionDelay.toString()}}baseDelay=${baseDelay.toString()}}`, ); - await helper.propose(); - expect(await this.mock.proposalNeedsQueuing(helper.currentProposal.id)).to.be.true; + await this.helper.propose(); + expect(await this.mock.proposalNeedsQueuing(this.helper.currentProposal.id)).to.be.true; } }); describe('execution plan', function () { it('returns plan for delayed operations', async function () { - const roleId = '1'; - + const roleId = 1n; const delays = [ - [time.duration.hours(1), time.duration.hours(2)], - [time.duration.hours(2), time.duration.hours(1)], + [time.duration.hours(1n), time.duration.hours(2n)], + [time.duration.hours(2n), time.duration.hours(1n)], ]; for (const [executionDelay, baseDelay] of delays) { // Set execution delay - await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { - from: admin, - }); - await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + await this.manager + .connect(this.admin) + .setTargetFunctionRole(this.receiver, [this.restricted.selector], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, executionDelay); // Set base delay await this.mock.$_setBaseDelaySeconds(baseDelay); - const helper = new GovernorHelper(this.mock, mode); - this.proposal = await helper.setProposal( + this.proposal = await this.helper.setProposal( [this.restricted.operation], `executionDelay=${executionDelay.toString()}}baseDelay=${baseDelay.toString()}}`, ); - await helper.propose(); - const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); - const maxDelay = web3.utils.toBN(Math.max(baseDelay.toNumber(), executionDelay.toNumber())); - expect(planDelay).to.be.bignumber.eq(maxDelay); - expect(indirect).to.deep.eq([true]); - expect(withDelay).to.deep.eq([true]); + await this.helper.propose(); + + expect(await this.mock.proposalExecutionPlan(this.proposal.id)).to.deep.equal([ + max(baseDelay, executionDelay), + [true], + [true], + ]); } }); it('returns plan for not delayed operations', async function () { - const roleId = '1'; - - const executionDelay = web3.utils.toBN(0); - const baseDelay = web3.utils.toBN(0); + const roleId = 1n; + const executionDelay = 0n; + const baseDelay = 0n; // Set execution delay - await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { - from: admin, - }); - await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + await this.manager + .connect(this.admin) + .setTargetFunctionRole(this.receiver, [this.restricted.selector], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, executionDelay); // Set base delay await this.mock.$_setBaseDelaySeconds(baseDelay); this.proposal = await this.helper.setProposal([this.restricted.operation], `descr`); await this.helper.propose(); - const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); - expect(planDelay).to.be.bignumber.eq(web3.utils.toBN(0)); - expect(indirect).to.deep.eq([true]); - expect(withDelay).to.deep.eq([false]); + + expect(await this.mock.proposalExecutionPlan(this.proposal.id)).to.deep.equal([0n, [true], [false]]); }); it('returns plan for an operation ignoring the manager', async function () { - await this.mock.$_setAccessManagerIgnored(this.receiver.address, this.restricted.selector, true); - - const roleId = '1'; + await this.mock.$_setAccessManagerIgnored(this.receiver, this.restricted.selector, true); + const roleId = 1n; const delays = [ - [time.duration.hours(1), time.duration.hours(2)], - [time.duration.hours(2), time.duration.hours(1)], + [time.duration.hours(1n), time.duration.hours(2n)], + [time.duration.hours(2n), time.duration.hours(1n)], ]; for (const [executionDelay, baseDelay] of delays) { // Set execution delay - await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { - from: admin, - }); - await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + await this.manager + .connect(this.admin) + .setTargetFunctionRole(this.receiver, [this.restricted.selector], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, executionDelay); // Set base delay await this.mock.$_setBaseDelaySeconds(baseDelay); - const helper = new GovernorHelper(this.mock, mode); - this.proposal = await helper.setProposal( + this.proposal = await this.helper.setProposal( [this.restricted.operation], `executionDelay=${executionDelay.toString()}}baseDelay=${baseDelay.toString()}}`, ); - await helper.propose(); - const { delay: planDelay, indirect, withDelay } = await this.mock.proposalExecutionPlan(this.proposal.id); - expect(planDelay).to.be.bignumber.eq(baseDelay); - expect(indirect).to.deep.eq([false]); - expect(withDelay).to.deep.eq([false]); + await this.helper.propose(); + + expect(await this.mock.proposalExecutionPlan(this.proposal.id)).to.deep.equal([ + baseDelay, + [false], + [false], + ]); } }); }); @@ -394,49 +364,47 @@ contract('GovernorTimelockAccess', function (accounts) { this.proposal = await this.helper.setProposal([this.unrestricted.operation], 'descr'); await this.helper.propose(); - await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); if (await this.mock.proposalNeedsQueuing(this.proposal.id)) { - const txQueue = await this.helper.queue(); - expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id }); + expect(await this.helper.queue()) + .to.emit(this.mock, 'ProposalQueued') + .withArgs(this.proposal.id); } if (delay > 0) { await this.helper.waitForEta(); } - const txExecute = await this.helper.execute(); - expectEvent(txExecute, 'ProposalExecuted', { proposalId: this.proposal.id }); - expectEvent.inTransaction(txExecute, this.receiver, 'CalledUnrestricted'); + expect(await this.helper.execute()) + .to.emit(this.mock, 'ProposalExecuted') + .withArgs(this.proposal.id) + .to.not.emit(this.receiver, 'CalledUnrestricted'); }); } }); it('reverts when an operation is executed before eta', async function () { - const delay = time.duration.hours(2); + const delay = time.duration.hours(2n); await this.mock.$_setBaseDelaySeconds(delay); this.proposal = await this.helper.setProposal([this.unrestricted.operation], 'descr'); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnmetDelay', [ - this.proposal.id, - await this.mock.proposalEta(this.proposal.id), - ]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnmetDelay') + .withArgs(this.proposal.id, await this.mock.proposalEta(this.proposal.id)); }); it('reverts with a proposal including multiple operations but one of those was cancelled in the manager', async function () { - const delay = time.duration.hours(2); - const roleId = '1'; + const delay = time.duration.hours(2n); + const roleId = 1n; - await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { - from: admin, - }); - await this.manager.grantRole(roleId, this.mock.address, delay, { from: admin }); + await this.manager.connect(this.admin).setTargetFunctionRole(this.receiver, [this.restricted.selector], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, delay); // Set proposals const original = new GovernorHelper(this.mock, mode); @@ -445,83 +413,79 @@ contract('GovernorTimelockAccess', function (accounts) { // Go through all the governance process await original.propose(); await original.waitForSnapshot(); - await original.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await original.connect(this.voter1).vote({ support: Enums.VoteType.For }); await original.waitForDeadline(); await original.queue(); await original.waitForEta(); // Suddenly cancel one of the proposed operations in the manager - await this.manager.cancel(this.mock.address, this.restricted.operation.target, this.restricted.operation.data, { - from: admin, - }); + await this.manager + .connect(this.admin) + .cancel(this.mock, this.restricted.operation.target, this.restricted.operation.data); // Reschedule the same operation in a different proposal to avoid "AccessManagerNotScheduled" error const rescheduled = new GovernorHelper(this.mock, mode); await rescheduled.setProposal([this.restricted.operation], 'descr'); await rescheduled.propose(); await rescheduled.waitForSnapshot(); - await rescheduled.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await rescheduled.connect(this.voter1).vote({ support: Enums.VoteType.For }); await rescheduled.waitForDeadline(); await rescheduled.queue(); // This will schedule it again in the manager await rescheduled.waitForEta(); // Attempt to execute - await expectRevertCustomError(original.execute(), 'GovernorMismatchedNonce', [ - original.currentProposal.id, - 1, - 2, - ]); + await expect(original.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorMismatchedNonce') + .withArgs(original.currentProposal.id, 1, 2); }); it('single operation with access manager delay', async function () { - const delay = 1000; - const roleId = '1'; + const delay = 1000n; + const roleId = 1n; - await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { - from: admin, - }); - await this.manager.grantRole(roleId, this.mock.address, delay, { from: admin }); + await this.manager.connect(this.admin).setTargetFunctionRole(this.receiver, [this.restricted.selector], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, delay); this.proposal = await this.helper.setProposal([this.restricted.operation], 'descr'); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); const txQueue = await this.helper.queue(); await this.helper.waitForEta(); const txExecute = await this.helper.execute(); - expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txQueue.tx, this.manager, 'OperationScheduled', { - operationId: this.restricted.operationId, - nonce: '1', - schedule: web3.utils.toBN(await clockFromReceipt.timestamp(txQueue.receipt)).addn(delay), - caller: this.mock.address, - target: this.restricted.operation.target, - data: this.restricted.operation.data, - }); + await expect(txQueue) + .to.emit(this.mock, 'ProposalQueued') + .withArgs(this.proposal.id, anyValue) + .to.emit(this.manager, 'OperationScheduled') + .withArgs( + this.restricted.id, + 1n, + (await time.clockFromReceipt.timestamp(txQueue)) + delay, + this.mock.target, + this.restricted.operation.target, + this.restricted.operation.data, + ); - expectEvent(txExecute, 'ProposalExecuted', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txExecute.tx, this.manager, 'OperationExecuted', { - operationId: this.restricted.operationId, - nonce: '1', - }); - await expectEvent.inTransaction(txExecute.tx, this.receiver, 'CalledRestricted'); + await expect(txExecute) + .to.emit(this.mock, 'ProposalExecuted') + .withArgs(this.proposal.id) + .to.emit(this.manager, 'OperationExecuted') + .withArgs(this.restricted.id, 1n) + .to.emit(this.receiver, 'CalledRestricted'); }); it('bundle of varied operations', async function () { - const managerDelay = 1000; - const roleId = '1'; - - const baseDelay = managerDelay * 2; + const managerDelay = 1000n; + const roleId = 1n; + const baseDelay = managerDelay * 2n; await this.mock.$_setBaseDelaySeconds(baseDelay); - await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { - from: admin, - }); - await this.manager.grantRole(roleId, this.mock.address, managerDelay, { from: admin }); + await this.manager.connect(this.admin).setTargetFunctionRole(this.receiver, [this.restricted.selector], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, managerDelay); this.proposal = await this.helper.setProposal( [this.restricted.operation, this.unrestricted.operation, this.fallback.operation], @@ -530,41 +494,44 @@ contract('GovernorTimelockAccess', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); const txQueue = await this.helper.queue(); await this.helper.waitForEta(); const txExecute = await this.helper.execute(); - expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txQueue.tx, this.manager, 'OperationScheduled', { - operationId: this.restricted.operationId, - nonce: '1', - schedule: web3.utils.toBN(await clockFromReceipt.timestamp(txQueue.receipt)).addn(baseDelay), - caller: this.mock.address, - target: this.restricted.operation.target, - data: this.restricted.operation.data, - }); + await expect(txQueue) + .to.emit(this.mock, 'ProposalQueued') + .withArgs(this.proposal.id, anyValue) + .to.emit(this.manager, 'OperationScheduled') + .withArgs( + this.restricted.id, + 1n, + (await time.clockFromReceipt.timestamp(txQueue)) + baseDelay, + this.mock.target, + this.restricted.operation.target, + this.restricted.operation.data, + ); - expectEvent(txExecute, 'ProposalExecuted', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txExecute.tx, this.manager, 'OperationExecuted', { - operationId: this.restricted.operationId, - nonce: '1', - }); - await expectEvent.inTransaction(txExecute.tx, this.receiver, 'CalledRestricted'); - await expectEvent.inTransaction(txExecute.tx, this.receiver, 'CalledUnrestricted'); - await expectEvent.inTransaction(txExecute.tx, this.receiver, 'CalledFallback'); + await expect(txExecute) + .to.emit(this.mock, 'ProposalExecuted') + .withArgs(this.proposal.id) + .to.emit(this.manager, 'OperationExecuted') + .withArgs(this.restricted.id, 1n) + .to.emit(this.receiver, 'CalledRestricted') + .to.emit(this.receiver, 'CalledUnrestricted') + .to.emit(this.receiver, 'CalledFallback'); }); describe('cancel', function () { - const delay = 1000; - const roleId = '1'; + const delay = 1000n; + const roleId = 1n; beforeEach(async function () { - await this.manager.setTargetFunctionRole(this.receiver.address, [this.restricted.selector], roleId, { - from: admin, - }); - await this.manager.grantRole(roleId, this.mock.address, delay, { from: admin }); + await this.manager + .connect(this.admin) + .setTargetFunctionRole(this.receiver, [this.restricted.selector], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, delay); }); it('cancels restricted with delay after queue (internal)', async function () { @@ -572,23 +539,25 @@ contract('GovernorTimelockAccess', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - const txCancel = await this.helper.cancel('internal'); - expectEvent(txCancel, 'ProposalCanceled', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txCancel.tx, this.manager, 'OperationCanceled', { - operationId: this.restricted.operationId, - nonce: '1', - }); + await expect(this.helper.cancel('internal')) + .to.emit(this.mock, 'ProposalCanceled') + .withArgs(this.proposal.id) + .to.emit(this.manager, 'OperationCanceled') + .withArgs(this.restricted.id, 1n); await this.helper.waitForEta(); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Canceled, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('cancels restricted with queueing if the same operation is part of a more recent proposal (internal)', async function () { @@ -599,17 +568,14 @@ contract('GovernorTimelockAccess', function (accounts) { // Go through all the governance process await original.propose(); await original.waitForSnapshot(); - await original.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await original.connect(this.voter1).vote({ support: Enums.VoteType.For }); await original.waitForDeadline(); await original.queue(); // Cancel the operation in the manager - await this.manager.cancel( - this.mock.address, - this.restricted.operation.target, - this.restricted.operation.data, - { from: admin }, - ); + await this.manager + .connect(this.admin) + .cancel(this.mock, this.restricted.operation.target, this.restricted.operation.data); // Another proposal is added with the same operation const rescheduled = new GovernorHelper(this.mock, mode); @@ -618,21 +584,26 @@ contract('GovernorTimelockAccess', function (accounts) { // Queue the new proposal await rescheduled.propose(); await rescheduled.waitForSnapshot(); - await rescheduled.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await rescheduled.connect(this.voter1).vote({ support: Enums.VoteType.For }); await rescheduled.waitForDeadline(); await rescheduled.queue(); // This will schedule it again in the manager // Cancel const eta = await this.mock.proposalEta(rescheduled.currentProposal.id); - const txCancel = await original.cancel('internal'); - expectEvent(txCancel, 'ProposalCanceled', { proposalId: original.currentProposal.id }); - - await time.increase(eta); // waitForEta() - await expectRevertCustomError(original.execute(), 'GovernorUnexpectedProposalState', [ - original.currentProposal.id, - Enums.ProposalState.Canceled, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + + await expect(original.cancel('internal')) + .to.emit(this.mock, 'ProposalCanceled') + .withArgs(original.currentProposal.id); + + await time.clock.timestamp().then(clock => time.forward.timestamp(max(clock + 1n, eta))); + + await expect(original.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + original.currentProposal.id, + Enums.ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('cancels unrestricted with queueing (internal)', async function () { @@ -640,20 +611,25 @@ contract('GovernorTimelockAccess', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); const eta = await this.mock.proposalEta(this.proposal.id); - const txCancel = await this.helper.cancel('internal'); - expectEvent(txCancel, 'ProposalCanceled', { proposalId: this.proposal.id }); - - await time.increase(eta); // waitForEta() - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Canceled, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + + await expect(this.helper.cancel('internal')) + .to.emit(this.mock, 'ProposalCanceled') + .withArgs(this.proposal.id); + + await time.clock.timestamp().then(clock => time.forward.timestamp(max(clock + 1n, eta))); + + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('cancels unrestricted without queueing (internal)', async function () { @@ -661,28 +637,31 @@ contract('GovernorTimelockAccess', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); // await this.helper.queue(); // const eta = await this.mock.proposalEta(this.proposal.id); - const txCancel = await this.helper.cancel('internal'); - expectEvent(txCancel, 'ProposalCanceled', { proposalId: this.proposal.id }); - - // await time.increase(eta); // waitForEta() - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Canceled, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + await expect(this.helper.cancel('internal')) + .to.emit(this.mock, 'ProposalCanceled') + .withArgs(this.proposal.id); + + // await time.forward.timestamp(eta); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('cancels calls already canceled by guardian', async function () { - const operationA = { target: this.receiver.address, data: this.restricted.selector + '00' }; - const operationB = { target: this.receiver.address, data: this.restricted.selector + '01' }; - const operationC = { target: this.receiver.address, data: this.restricted.selector + '02' }; - const operationAId = hashOperation(this.mock.address, operationA.target, operationA.data); - const operationBId = hashOperation(this.mock.address, operationB.target, operationB.data); + const operationA = { target: this.receiver.target, data: this.restricted.selector + '00' }; + const operationB = { target: this.receiver.target, data: this.restricted.selector + '01' }; + const operationC = { target: this.receiver.target, data: this.restricted.selector + '02' }; + const operationAId = hashOperation(this.mock.target, operationA.target, operationA.data); + const operationBId = hashOperation(this.mock.target, operationB.target, operationB.data); const proposal1 = new GovernorHelper(this.mock, mode); const proposal2 = new GovernorHelper(this.mock, mode); @@ -692,7 +671,7 @@ contract('GovernorTimelockAccess', function (accounts) { for (const p of [proposal1, proposal2]) { await p.propose(); await p.waitForSnapshot(); - await p.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await p.connect(this.voter1).vote({ support: Enums.VoteType.For }); await p.waitForDeadline(); } @@ -700,18 +679,24 @@ contract('GovernorTimelockAccess', function (accounts) { await proposal1.queue(); // Cannot queue the second proposal: operation A already scheduled with delay - await expectRevertCustomError(proposal2.queue(), 'AccessManagerAlreadyScheduled', [operationAId]); + await expect(proposal2.queue()) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerAlreadyScheduled') + .withArgs(operationAId); // Admin cancels operation B on the manager - await this.manager.cancel(this.mock.address, operationB.target, operationB.data, { from: admin }); + await this.manager.connect(this.admin).cancel(this.mock, operationB.target, operationB.data); // Still cannot queue the second proposal: operation A already scheduled with delay - await expectRevertCustomError(proposal2.queue(), 'AccessManagerAlreadyScheduled', [operationAId]); + await expect(proposal2.queue()) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerAlreadyScheduled') + .withArgs(operationAId); await proposal1.waitForEta(); // Cannot execute first proposal: operation B has been canceled - await expectRevertCustomError(proposal1.execute(), 'AccessManagerNotScheduled', [operationBId]); + await expect(proposal1.execute()) + .to.be.revertedWithCustomError(this.manager, 'AccessManagerNotScheduled') + .withArgs(operationBId); // Cancel the first proposal to release operation A await proposal1.cancel('internal'); @@ -728,43 +713,41 @@ contract('GovernorTimelockAccess', function (accounts) { describe('ignore AccessManager', function () { it('defaults', async function () { - expect(await this.mock.isAccessManagerIgnored(this.receiver.address, this.restricted.selector)).to.equal( - false, - ); - expect(await this.mock.isAccessManagerIgnored(this.mock.address, '0x12341234')).to.equal(true); + expect(await this.mock.isAccessManagerIgnored(this.receiver, this.restricted.selector)).to.be.false; + expect(await this.mock.isAccessManagerIgnored(this.mock, '0x12341234')).to.be.true; }); it('internal setter', async function () { - const p1 = { target: this.receiver.address, selector: this.restricted.selector, ignored: true }; - const tx1 = await this.mock.$_setAccessManagerIgnored(p1.target, p1.selector, p1.ignored); - expect(await this.mock.isAccessManagerIgnored(p1.target, p1.selector)).to.equal(p1.ignored); - expectEvent(tx1, 'AccessManagerIgnoredSet', p1); - - const p2 = { target: this.mock.address, selector: '0x12341234', ignored: false }; - const tx2 = await this.mock.$_setAccessManagerIgnored(p2.target, p2.selector, p2.ignored); - expect(await this.mock.isAccessManagerIgnored(p2.target, p2.selector)).to.equal(p2.ignored); - expectEvent(tx2, 'AccessManagerIgnoredSet', p2); + await expect(this.mock.$_setAccessManagerIgnored(this.receiver, this.restricted.selector, true)) + .to.emit(this.mock, 'AccessManagerIgnoredSet') + .withArgs(this.receiver.target, this.restricted.selector, true); + + expect(await this.mock.isAccessManagerIgnored(this.receiver, this.restricted.selector)).to.be.true; + + await expect(this.mock.$_setAccessManagerIgnored(this.mock, '0x12341234', false)) + .to.emit(this.mock, 'AccessManagerIgnoredSet') + .withArgs(this.mock.target, '0x12341234', false); + + expect(await this.mock.isAccessManagerIgnored(this.mock, '0x12341234')).to.be.false; }); it('external setter', async function () { const setAccessManagerIgnored = (...args) => - this.mock.contract.methods.setAccessManagerIgnored(...args).encodeABI(); + this.mock.interface.encodeFunctionData('setAccessManagerIgnored', args); await this.helper.setProposal( [ { - target: this.mock.address, + target: this.mock.target, data: setAccessManagerIgnored( - this.receiver.address, + this.receiver.target, [this.restricted.selector, this.unrestricted.selector], true, ), - value: '0', }, { - target: this.mock.address, - data: setAccessManagerIgnored(this.mock.address, ['0x12341234', '0x67896789'], false), - value: '0', + target: this.mock.target, + data: setAccessManagerIgnored(this.mock.target, ['0x12341234', '0x67896789'], false), }, ], 'descr', @@ -772,65 +755,59 @@ contract('GovernorTimelockAccess', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - const tx = await this.helper.execute(); - expectEvent(tx, 'AccessManagerIgnoredSet'); + await expect(this.helper.execute()).to.emit(this.mock, 'AccessManagerIgnoredSet'); - expect(await this.mock.isAccessManagerIgnored(this.receiver.address, this.restricted.selector)).to.equal( - true, - ); - expect(await this.mock.isAccessManagerIgnored(this.receiver.address, this.unrestricted.selector)).to.equal( - true, - ); - - expect(await this.mock.isAccessManagerIgnored(this.mock.address, '0x12341234')).to.equal(false); - expect(await this.mock.isAccessManagerIgnored(this.mock.address, '0x67896789')).to.equal(false); + expect(await this.mock.isAccessManagerIgnored(this.receiver, this.restricted.selector)).to.be.true; + expect(await this.mock.isAccessManagerIgnored(this.receiver, this.unrestricted.selector)).to.be.true; + expect(await this.mock.isAccessManagerIgnored(this.mock, '0x12341234')).to.be.false; + expect(await this.mock.isAccessManagerIgnored(this.mock, '0x67896789')).to.be.false; }); it('locked function', async function () { const setAccessManagerIgnored = selector('setAccessManagerIgnored(address,bytes4[],bool)'); - await expectRevertCustomError( - this.mock.$_setAccessManagerIgnored(this.mock.address, setAccessManagerIgnored, true), - 'GovernorLockedIgnore', - [], - ); - await this.mock.$_setAccessManagerIgnored(this.receiver.address, setAccessManagerIgnored, true); + + await expect( + this.mock.$_setAccessManagerIgnored(this.mock, setAccessManagerIgnored, true), + ).to.be.revertedWithCustomError(this.mock, 'GovernorLockedIgnore'); + + await this.mock.$_setAccessManagerIgnored(this.receiver, setAccessManagerIgnored, true); }); it('ignores access manager', async function () { - const amount = 100; - - const target = this.token.address; - const data = this.token.contract.methods.transfer(voter4, amount).encodeABI(); + const amount = 100n; + const target = this.token.target; + const data = this.token.interface.encodeFunctionData('transfer', [this.voter4.address, amount]); const selector = data.slice(0, 10); - await this.token.$_mint(this.mock.address, amount); + await this.token.$_mint(this.mock, amount); - const roleId = '1'; - await this.manager.setTargetFunctionRole(target, [selector], roleId, { from: admin }); - await this.manager.grantRole(roleId, this.mock.address, 0, { from: admin }); + const roleId = 1n; + await this.manager.connect(this.admin).setTargetFunctionRole(target, [selector], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, 0); - this.proposal = await this.helper.setProposal([{ target, data, value: '0' }], '1'); + await this.helper.setProposal([{ target, data }], 'descr #1'); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - await expectRevertCustomError(this.helper.execute(), 'ERC20InsufficientBalance', [ - this.manager.address, - 0, - amount, - ]); + + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') + .withArgs(this.manager.target, 0n, amount); await this.mock.$_setAccessManagerIgnored(target, selector, true); - await this.helper.setProposal([{ target, data, value: '0' }], '2'); + await this.helper.setProposal([{ target, data }], 'descr #2'); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - const tx = await this.helper.execute(); - expectEvent.inTransaction(tx, this.token, 'Transfer', { from: this.mock.address }); + + await expect(this.helper.execute()) + .to.emit(this.token, 'Transfer') + .withArgs(this.mock.target, this.voter4.address, amount); }); }); @@ -838,32 +815,29 @@ contract('GovernorTimelockAccess', function (accounts) { const method = selector('$_checkOwner()'); beforeEach(async function () { - this.ownable = await Ownable.new(this.manager.address); + this.ownable = await ethers.deployContract('$Ownable', [this.manager]); this.operation = { - target: this.ownable.address, - value: '0', - data: this.ownable.contract.methods.$_checkOwner().encodeABI(), + target: this.ownable.target, + data: this.ownable.interface.encodeFunctionData('$_checkOwner'), }; }); it('succeeds with delay', async function () { - const roleId = '1'; - const executionDelay = time.duration.hours(2); - const baseDelay = time.duration.hours(1); + const roleId = 1n; + const executionDelay = time.duration.hours(2n); + const baseDelay = time.duration.hours(1n); // Set execution delay - await this.manager.setTargetFunctionRole(this.ownable.address, [method], roleId, { - from: admin, - }); - await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + await this.manager.connect(this.admin).setTargetFunctionRole(this.ownable, [method], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, executionDelay); // Set base delay await this.mock.$_setBaseDelaySeconds(baseDelay); - this.proposal = await this.helper.setProposal([this.operation], `descr`); + await this.helper.setProposal([this.operation], `descr`); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -871,23 +845,21 @@ contract('GovernorTimelockAccess', function (accounts) { }); it('succeeds without delay', async function () { - const roleId = '1'; - const executionDelay = web3.utils.toBN(0); - const baseDelay = web3.utils.toBN(0); + const roleId = 1n; + const executionDelay = 0n; + const baseDelay = 0n; // Set execution delay - await this.manager.setTargetFunctionRole(this.ownable.address, [method], roleId, { - from: admin, - }); - await this.manager.grantRole(roleId, this.mock.address, executionDelay, { from: admin }); + await this.manager.connect(this.admin).setTargetFunctionRole(this.ownable, [method], roleId); + await this.manager.connect(this.admin).grantRole(roleId, this.mock, executionDelay); // Set base delay await this.mock.$_setBaseDelaySeconds(baseDelay); - this.proposal = await this.helper.setProposal([this.operation], `descr`); + await this.helper.setProposal([this.operation], `descr`); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); // Don't revert }); diff --git a/test/governance/extensions/GovernorTimelockCompound.test.js b/test/governance/extensions/GovernorTimelockCompound.test.js index 56191eb50..ecc71dc09 100644 --- a/test/governance/extensions/GovernorTimelockCompound.test.js +++ b/test/governance/extensions/GovernorTimelockCompound.test.js @@ -1,77 +1,71 @@ -const { ethers } = require('ethers'); -const { constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); -const Enums = require('../../helpers/enums'); -const { GovernorHelper, proposalStatesToBitMap } = require('../../helpers/governance'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const { clockFromReceipt } = require('../../helpers/time'); - -const Timelock = artifacts.require('CompTimelock'); -const Governor = artifacts.require('$GovernorTimelockCompoundMock'); -const CallReceiver = artifacts.require('CallReceiverMock'); -const ERC721 = artifacts.require('$ERC721'); -const ERC1155 = artifacts.require('$ERC1155'); +const { GovernorHelper } = require('../../helpers/governance'); +const { bigint: Enums } = require('../../helpers/enums'); +const { bigint: time } = require('../../helpers/time'); const TOKENS = [ - { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, - { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' }, + { Token: '$ERC20Votes', mode: 'blocknumber' }, + { Token: '$ERC20VotesTimestampMock', mode: 'timestamp' }, ]; -contract('GovernorTimelockCompound', function (accounts) { - const [owner, voter1, voter2, voter3, voter4, other] = accounts; - - const name = 'OZ-Governor'; - const version = '1'; - const tokenName = 'MockToken'; - const tokenSymbol = 'MTKN'; - const tokenSupply = web3.utils.toWei('100'); - const votingDelay = web3.utils.toBN(4); - const votingPeriod = web3.utils.toBN(16); - const value = web3.utils.toWei('1'); - - const defaultDelay = 2 * 86400; - - for (const { mode, Token } of TOKENS) { - describe(`using ${Token._json.contractName}`, function () { +const name = 'OZ-Governor'; +const version = '1'; +const tokenName = 'MockToken'; +const tokenSymbol = 'MTKN'; +const tokenSupply = ethers.parseEther('100'); +const votingDelay = 4n; +const votingPeriod = 16n; +const value = ethers.parseEther('1'); +const defaultDelay = time.duration.days(2n); + +describe('GovernorTimelockCompound', function () { + for (const { Token, mode } of TOKENS) { + const fixture = async () => { + const [deployer, owner, voter1, voter2, voter3, voter4, other] = await ethers.getSigners(); + const receiver = await ethers.deployContract('CallReceiverMock'); + + const token = await ethers.deployContract(Token, [tokenName, tokenSymbol, version]); + const predictGovernor = await deployer + .getNonce() + .then(nonce => ethers.getCreateAddress({ from: deployer.address, nonce: nonce + 1 })); + const timelock = await ethers.deployContract('CompTimelock', [predictGovernor, defaultDelay]); + const mock = await ethers.deployContract('$GovernorTimelockCompoundMock', [ + name, + votingDelay, + votingPeriod, + 0n, + timelock, + token, + 0n, + ]); + + await owner.sendTransaction({ to: timelock, value }); + await token.$_mint(owner, tokenSupply); + + const helper = new GovernorHelper(mock, mode); + await helper.connect(owner).delegate({ token, to: voter1, value: ethers.parseEther('10') }); + await helper.connect(owner).delegate({ token, to: voter2, value: ethers.parseEther('7') }); + await helper.connect(owner).delegate({ token, to: voter3, value: ethers.parseEther('5') }); + await helper.connect(owner).delegate({ token, to: voter4, value: ethers.parseEther('2') }); + + return { deployer, owner, voter1, voter2, voter3, voter4, other, receiver, token, mock, timelock, helper }; + }; + + describe(`using ${Token}`, function () { beforeEach(async function () { - const [deployer] = await web3.eth.getAccounts(); - - this.token = await Token.new(tokenName, tokenSymbol, tokenName, version); - - // Need to predict governance address to set it as timelock admin with a delayed transfer - const nonce = await web3.eth.getTransactionCount(deployer); - const predictGovernor = ethers.getCreateAddress({ from: deployer, nonce: nonce + 1 }); - - this.timelock = await Timelock.new(predictGovernor, defaultDelay); - this.mock = await Governor.new( - name, - votingDelay, - votingPeriod, - 0, - this.timelock.address, - this.token.address, - 0, - ); - this.receiver = await CallReceiver.new(); - - this.helper = new GovernorHelper(this.mock, mode); - - await web3.eth.sendTransaction({ from: owner, to: this.timelock.address, value }); - - await this.token.$_mint(owner, tokenSupply); - await this.helper.delegate({ token: this.token, to: voter1, value: web3.utils.toWei('10') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter2, value: web3.utils.toWei('7') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter3, value: web3.utils.toWei('5') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter4, value: web3.utils.toWei('2') }, { from: owner }); + Object.assign(this, await loadFixture(fixture)); // default proposal this.proposal = this.helper.setProposal( [ { - target: this.receiver.address, + target: this.receiver.target, value, - data: this.receiver.contract.methods.mockFunction().encodeABI(), + data: this.receiver.interface.encodeFunctionData('mockFunction'), }, ], '', @@ -79,46 +73,55 @@ contract('GovernorTimelockCompound', function (accounts) { }); it("doesn't accept ether transfers", async function () { - await expectRevert.unspecified(web3.eth.sendTransaction({ from: owner, to: this.mock.address, value: 1 })); + await expect(this.owner.sendTransaction({ to: this.mock, value: 1n })).to.be.revertedWithCustomError( + this.mock, + 'GovernorDisabledDeposit', + ); }); it('post deployment check', async function () { - expect(await this.mock.name()).to.be.equal(name); - expect(await this.mock.token()).to.be.equal(this.token.address); - expect(await this.mock.votingDelay()).to.be.bignumber.equal(votingDelay); - expect(await this.mock.votingPeriod()).to.be.bignumber.equal(votingPeriod); - expect(await this.mock.quorum(0)).to.be.bignumber.equal('0'); - - expect(await this.mock.timelock()).to.be.equal(this.timelock.address); - expect(await this.timelock.admin()).to.be.equal(this.mock.address); + expect(await this.mock.name()).to.equal(name); + expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.votingDelay()).to.equal(votingDelay); + expect(await this.mock.votingPeriod()).to.equal(votingPeriod); + expect(await this.mock.quorum(0n)).to.equal(0n); + + expect(await this.mock.timelock()).to.equal(this.timelock.target); + expect(await this.timelock.admin()).to.equal(this.mock.target); }); it('nominal', async function () { - expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal('0'); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(true); + expect(await this.mock.proposalEta(this.proposal.id)).to.equal(0n); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.true; await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter2 }); - await this.helper.vote({ support: Enums.VoteType.Against }, { from: voter3 }); - await this.helper.vote({ support: Enums.VoteType.Abstain }, { from: voter4 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); await this.helper.waitForDeadline(); const txQueue = await this.helper.queue(); - const eta = web3.utils.toBN(await clockFromReceipt.timestamp(txQueue.receipt)).addn(defaultDelay); - expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal(eta); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(true); + const eta = (await time.clockFromReceipt.timestamp(txQueue)) + defaultDelay; + expect(await this.mock.proposalEta(this.proposal.id)).to.equal(eta); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.true; await this.helper.waitForEta(); const txExecute = await this.helper.execute(); - expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txQueue.tx, this.timelock, 'QueueTransaction', { eta }); - - expectEvent(txExecute, 'ProposalExecuted', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txExecute.tx, this.timelock, 'ExecuteTransaction', { eta }); - await expectEvent.inTransaction(txExecute.tx, this.receiver, 'MockFunctionCalled'); + await expect(txQueue) + .to.emit(this.mock, 'ProposalQueued') + .withArgs(this.proposal.id, eta) + .to.emit(this.timelock, 'QueueTransaction') + .withArgs(...Array(5).fill(anyValue), eta); + + await expect(txExecute) + .to.emit(this.mock, 'ProposalExecuted') + .withArgs(this.proposal.id) + .to.emit(this.timelock, 'ExecuteTransaction') + .withArgs(...Array(5).fill(anyValue), eta) + .to.emit(this.receiver, 'MockFunctionCalled'); }); describe('should revert', function () { @@ -126,29 +129,35 @@ contract('GovernorTimelockCompound', function (accounts) { it('if already queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - await expectRevertCustomError(this.helper.queue(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Queued, - proposalStatesToBitMap([Enums.ProposalState.Succeeded]), - ]); + await expect(this.helper.queue()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Queued, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ); }); it('if proposal contains duplicate calls', async function () { const action = { - target: this.token.address, - data: this.token.contract.methods.approve(this.receiver.address, constants.MAX_UINT256).encodeABI(), + target: this.token.target, + data: this.token.interface.encodeFunctionData('approve', [this.receiver.target, ethers.MaxUint256]), }; const { id } = this.helper.setProposal([action, action], ''); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - await expectRevertCustomError(this.helper.queue(), 'GovernorAlreadyQueuedProposal', [id]); - await expectRevertCustomError(this.helper.execute(), 'GovernorNotQueuedProposal', [id]); + await expect(this.helper.queue()) + .to.be.revertedWithCustomError(this.mock, 'GovernorAlreadyQueuedProposal') + .withArgs(id); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorNotQueuedProposal') + .withArgs(id); }); }); @@ -156,25 +165,26 @@ contract('GovernorTimelockCompound', function (accounts) { it('if not queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await this.helper.waitForDeadline(+1); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Succeeded); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Succeeded); - await expectRevertCustomError(this.helper.execute(), 'GovernorNotQueuedProposal', [this.proposal.id]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorNotQueuedProposal') + .withArgs(this.proposal.id); }); it('if too early', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Queued); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Queued); - await expectRevert( - this.helper.execute(), + await expect(this.helper.execute()).to.be.rejectedWith( "Timelock::executeTransaction: Transaction hasn't surpassed time lock", ); }); @@ -182,96 +192,86 @@ contract('GovernorTimelockCompound', function (accounts) { it('if too late', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - await this.helper.waitForEta(+30 * 86400); + await this.helper.waitForEta(time.duration.days(30)); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Expired); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Expired); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Expired, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Expired, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('if already executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); await this.helper.execute(); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Executed, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); }); describe('on safe receive', function () { describe('ERC721', function () { - const name = 'Non Fungible Token'; - const symbol = 'NFT'; - const tokenId = web3.utils.toBN(1); + const tokenId = 1n; beforeEach(async function () { - this.token = await ERC721.new(name, symbol); - await this.token.$_mint(owner, tokenId); + this.token = await ethers.deployContract('$ERC721', ['Non Fungible Token', 'NFT']); + await this.token.$_mint(this.owner, tokenId); }); it("can't receive an ERC721 safeTransfer", async function () { - await expectRevertCustomError( - this.token.safeTransferFrom(owner, this.mock.address, tokenId, { from: owner }), - 'GovernorDisabledDeposit', - [], - ); + await expect( + this.token.connect(this.owner).safeTransferFrom(this.owner, this.mock, tokenId), + ).to.be.revertedWithCustomError(this.mock, 'GovernorDisabledDeposit'); }); }); describe('ERC1155', function () { - const uri = 'https://token-cdn-domain/{id}.json'; const tokenIds = { - 1: web3.utils.toBN(1000), - 2: web3.utils.toBN(2000), - 3: web3.utils.toBN(3000), + 1: 1000n, + 2: 2000n, + 3: 3000n, }; beforeEach(async function () { - this.token = await ERC1155.new(uri); - await this.token.$_mintBatch(owner, Object.keys(tokenIds), Object.values(tokenIds), '0x'); + this.token = await ethers.deployContract('$ERC1155', ['https://token-cdn-domain/{id}.json']); + await this.token.$_mintBatch(this.owner, Object.keys(tokenIds), Object.values(tokenIds), '0x'); }); it("can't receive ERC1155 safeTransfer", async function () { - await expectRevertCustomError( - this.token.safeTransferFrom( - owner, - this.mock.address, + await expect( + this.token.connect(this.owner).safeTransferFrom( + this.owner, + this.mock, ...Object.entries(tokenIds)[0], // id + amount '0x', - { from: owner }, ), - 'GovernorDisabledDeposit', - [], - ); + ).to.be.revertedWithCustomError(this.mock, 'GovernorDisabledDeposit'); }); it("can't receive ERC1155 safeBatchTransfer", async function () { - await expectRevertCustomError( - this.token.safeBatchTransferFrom( - owner, - this.mock.address, - Object.keys(tokenIds), - Object.values(tokenIds), - '0x', - { from: owner }, - ), - 'GovernorDisabledDeposit', - [], - ); + await expect( + this.token + .connect(this.owner) + .safeBatchTransferFrom(this.owner, this.mock, Object.keys(tokenIds), Object.values(tokenIds), '0x'), + ).to.be.revertedWithCustomError(this.mock, 'GovernorDisabledDeposit'); }); }); }); @@ -281,111 +281,114 @@ contract('GovernorTimelockCompound', function (accounts) { it('cancel before queue prevents scheduling', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - expectEvent(await this.helper.cancel('internal'), 'ProposalCanceled', { proposalId: this.proposal.id }); + await expect(this.helper.cancel('internal')) + .to.emit(this.mock, 'ProposalCanceled') + .withArgs(this.proposal.id); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Canceled); - await expectRevertCustomError(this.helper.queue(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Canceled, - proposalStatesToBitMap([Enums.ProposalState.Succeeded]), - ]); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + + await expect(this.helper.queue()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ); }); it('cancel after queue prevents executing', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - expectEvent(await this.helper.cancel('internal'), 'ProposalCanceled', { proposalId: this.proposal.id }); + await expect(this.helper.cancel('internal')) + .to.emit(this.mock, 'ProposalCanceled') + .withArgs(this.proposal.id); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Canceled); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Canceled, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); }); describe('onlyGovernance', function () { describe('relay', function () { beforeEach(async function () { - await this.token.$_mint(this.mock.address, 1); + await this.token.$_mint(this.mock, 1); }); it('is protected', async function () { - await expectRevertCustomError( - this.mock.relay(this.token.address, 0, this.token.contract.methods.transfer(other, 1).encodeABI(), { - from: owner, - }), - 'GovernorOnlyExecutor', - [owner], - ); + await expect( + this.mock + .connect(this.owner) + .relay(this.token, 0, this.token.interface.encodeFunctionData('transfer', [this.other.address, 1n])), + ) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') + .withArgs(this.owner.address); }); it('can be executed through governance', async function () { this.helper.setProposal( [ { - target: this.mock.address, - data: this.mock.contract.methods - .relay(this.token.address, 0, this.token.contract.methods.transfer(other, 1).encodeABI()) - .encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('relay', [ + this.token.target, + 0n, + this.token.interface.encodeFunctionData('transfer', [this.other.address, 1n]), + ]), }, ], '', ); - expect(await this.token.balanceOf(this.mock.address), 1); - expect(await this.token.balanceOf(other), 0); - await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); - const txExecute = await this.helper.execute(); - expect(await this.token.balanceOf(this.mock.address), 0); - expect(await this.token.balanceOf(other), 1); + const txExecute = this.helper.execute(); - await expectEvent.inTransaction(txExecute.tx, this.token, 'Transfer', { - from: this.mock.address, - to: other, - value: '1', - }); + await expect(txExecute).to.changeTokenBalances(this.token, [this.mock, this.other], [-1n, 1n]); + + await expect(txExecute).to.emit(this.token, 'Transfer').withArgs(this.mock.target, this.other.address, 1n); }); }); describe('updateTimelock', function () { beforeEach(async function () { - this.newTimelock = await Timelock.new(this.mock.address, 7 * 86400); + this.newTimelock = await ethers.deployContract('CompTimelock', [this.mock, time.duration.days(7n)]); }); it('is protected', async function () { - await expectRevertCustomError( - this.mock.updateTimelock(this.newTimelock.address, { from: owner }), - 'GovernorOnlyExecutor', - [owner], - ); + await expect(this.mock.connect(this.owner).updateTimelock(this.newTimelock)) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') + .withArgs(this.owner.address); }); it('can be executed through governance to', async function () { this.helper.setProposal( [ { - target: this.timelock.address, - data: this.timelock.contract.methods.setPendingAdmin(owner).encodeABI(), + target: this.timelock.target, + data: this.timelock.interface.encodeFunctionData('setPendingAdmin', [this.owner.address]), }, { - target: this.mock.address, - data: this.mock.contract.methods.updateTimelock(this.newTimelock.address).encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('updateTimelock', [this.newTimelock.target]), }, ], '', @@ -393,28 +396,35 @@ contract('GovernorTimelockCompound', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); - const txExecute = await this.helper.execute(); - expectEvent(txExecute, 'TimelockChange', { - oldTimelock: this.timelock.address, - newTimelock: this.newTimelock.address, - }); + await expect(this.helper.execute()) + .to.emit(this.mock, 'TimelockChange') + .withArgs(this.timelock.target, this.newTimelock.target); - expect(await this.mock.timelock()).to.be.bignumber.equal(this.newTimelock.address); + expect(await this.mock.timelock()).to.equal(this.newTimelock.target); }); }); it('can transfer timelock to new governor', async function () { - const newGovernor = await Governor.new(name, 8, 32, 0, this.timelock.address, this.token.address, 0); + const newGovernor = await ethers.deployContract('$GovernorTimelockCompoundMock', [ + name, + 8n, + 32n, + 0n, + this.timelock, + this.token, + 0n, + ]); + this.helper.setProposal( [ { - target: this.timelock.address, - data: this.timelock.contract.methods.setPendingAdmin(newGovernor.address).encodeABI(), + target: this.timelock.target, + data: this.timelock.interface.encodeFunctionData('setPendingAdmin', [newGovernor.target]), }, ], '', @@ -422,18 +432,15 @@ contract('GovernorTimelockCompound', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); - const txExecute = await this.helper.execute(); - await expectEvent.inTransaction(txExecute.tx, this.timelock, 'NewPendingAdmin', { - newPendingAdmin: newGovernor.address, - }); + await expect(this.helper.execute()).to.emit(this.timelock, 'NewPendingAdmin').withArgs(newGovernor.target); await newGovernor.__acceptAdmin(); - expect(await this.timelock.admin()).to.be.bignumber.equal(newGovernor.address); + expect(await this.timelock.admin()).to.equal(newGovernor.target); }); }); }); diff --git a/test/governance/extensions/GovernorTimelockControl.test.js b/test/governance/extensions/GovernorTimelockControl.test.js index ec03d6144..9f6bceb5b 100644 --- a/test/governance/extensions/GovernorTimelockControl.test.js +++ b/test/governance/extensions/GovernorTimelockControl.test.js @@ -1,88 +1,79 @@ -const { constants, expectEvent, expectRevert, time } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); -const Enums = require('../../helpers/enums'); -const { GovernorHelper, proposalStatesToBitMap, timelockSalt } = require('../../helpers/governance'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const { clockFromReceipt } = require('../../helpers/time'); - -const Timelock = artifacts.require('TimelockController'); -const Governor = artifacts.require('$GovernorTimelockControlMock'); -const CallReceiver = artifacts.require('CallReceiverMock'); -const ERC721 = artifacts.require('$ERC721'); -const ERC1155 = artifacts.require('$ERC1155'); +const { GovernorHelper, timelockSalt } = require('../../helpers/governance'); +const { bigint: Enums } = require('../../helpers/enums'); +const { bigint: time } = require('../../helpers/time'); const TOKENS = [ - { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, - { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' }, + { Token: '$ERC20Votes', mode: 'blocknumber' }, + { Token: '$ERC20VotesTimestampMock', mode: 'timestamp' }, ]; -contract('GovernorTimelockControl', function (accounts) { - const [owner, voter1, voter2, voter3, voter4, other] = accounts; - - const DEFAULT_ADMIN_ROLE = '0x0000000000000000000000000000000000000000000000000000000000000000'; - const PROPOSER_ROLE = web3.utils.soliditySha3('PROPOSER_ROLE'); - const EXECUTOR_ROLE = web3.utils.soliditySha3('EXECUTOR_ROLE'); - const CANCELLER_ROLE = web3.utils.soliditySha3('CANCELLER_ROLE'); - - const name = 'OZ-Governor'; - const version = '1'; - const tokenName = 'MockToken'; - const tokenSymbol = 'MTKN'; - const tokenSupply = web3.utils.toWei('100'); - const votingDelay = web3.utils.toBN(4); - const votingPeriod = web3.utils.toBN(16); - const value = web3.utils.toWei('1'); - - const delay = 3600; - - for (const { mode, Token } of TOKENS) { - describe(`using ${Token._json.contractName}`, function () { +const DEFAULT_ADMIN_ROLE = ethers.ZeroHash; +const PROPOSER_ROLE = ethers.id('PROPOSER_ROLE'); +const EXECUTOR_ROLE = ethers.id('EXECUTOR_ROLE'); +const CANCELLER_ROLE = ethers.id('CANCELLER_ROLE'); + +const name = 'OZ-Governor'; +const version = '1'; +const tokenName = 'MockToken'; +const tokenSymbol = 'MTKN'; +const tokenSupply = ethers.parseEther('100'); +const votingDelay = 4n; +const votingPeriod = 16n; +const value = ethers.parseEther('1'); +const delay = time.duration.hours(1n); + +describe('GovernorTimelockControl', function () { + for (const { Token, mode } of TOKENS) { + const fixture = async () => { + const [deployer, owner, voter1, voter2, voter3, voter4, other] = await ethers.getSigners(); + const receiver = await ethers.deployContract('CallReceiverMock'); + + const token = await ethers.deployContract(Token, [tokenName, tokenSymbol, version]); + const timelock = await ethers.deployContract('TimelockController', [delay, [], [], deployer]); + const mock = await ethers.deployContract('$GovernorTimelockControlMock', [ + name, + votingDelay, + votingPeriod, + 0n, + timelock, + token, + 0n, + ]); + + await owner.sendTransaction({ to: timelock, value }); + await token.$_mint(owner, tokenSupply); + await timelock.grantRole(PROPOSER_ROLE, mock); + await timelock.grantRole(PROPOSER_ROLE, owner); + await timelock.grantRole(CANCELLER_ROLE, mock); + await timelock.grantRole(CANCELLER_ROLE, owner); + await timelock.grantRole(EXECUTOR_ROLE, ethers.ZeroAddress); + await timelock.revokeRole(DEFAULT_ADMIN_ROLE, deployer); + + const helper = new GovernorHelper(mock, mode); + await helper.connect(owner).delegate({ token, to: voter1, value: ethers.parseEther('10') }); + await helper.connect(owner).delegate({ token, to: voter2, value: ethers.parseEther('7') }); + await helper.connect(owner).delegate({ token, to: voter3, value: ethers.parseEther('5') }); + await helper.connect(owner).delegate({ token, to: voter4, value: ethers.parseEther('2') }); + + return { deployer, owner, voter1, voter2, voter3, voter4, other, receiver, token, mock, timelock, helper }; + }; + + describe(`using ${Token}`, function () { beforeEach(async function () { - const [deployer] = await web3.eth.getAccounts(); - - this.token = await Token.new(tokenName, tokenSymbol, tokenName, version); - this.timelock = await Timelock.new(delay, [], [], deployer); - this.mock = await Governor.new( - name, - votingDelay, - votingPeriod, - 0, - this.timelock.address, - this.token.address, - 0, - ); - this.receiver = await CallReceiver.new(); - - this.helper = new GovernorHelper(this.mock, mode); - - this.PROPOSER_ROLE = await this.timelock.PROPOSER_ROLE(); - this.EXECUTOR_ROLE = await this.timelock.EXECUTOR_ROLE(); - this.CANCELLER_ROLE = await this.timelock.CANCELLER_ROLE(); - - await web3.eth.sendTransaction({ from: owner, to: this.timelock.address, value }); - - // normal setup: governor is proposer, everyone is executor, timelock is its own admin - await this.timelock.grantRole(PROPOSER_ROLE, this.mock.address); - await this.timelock.grantRole(PROPOSER_ROLE, owner); - await this.timelock.grantRole(CANCELLER_ROLE, this.mock.address); - await this.timelock.grantRole(CANCELLER_ROLE, owner); - await this.timelock.grantRole(EXECUTOR_ROLE, constants.ZERO_ADDRESS); - await this.timelock.revokeRole(DEFAULT_ADMIN_ROLE, deployer); - - await this.token.$_mint(owner, tokenSupply); - await this.helper.delegate({ token: this.token, to: voter1, value: web3.utils.toWei('10') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter2, value: web3.utils.toWei('7') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter3, value: web3.utils.toWei('5') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter4, value: web3.utils.toWei('2') }, { from: owner }); + Object.assign(this, await loadFixture(fixture)); // default proposal this.proposal = this.helper.setProposal( [ { - target: this.receiver.address, + target: this.receiver.target, value, - data: this.receiver.contract.methods.mockFunction().encodeABI(), + data: this.receiver.interface.encodeFunctionData('mockFunction'), }, ], '', @@ -90,54 +81,63 @@ contract('GovernorTimelockControl', function (accounts) { this.proposal.timelockid = await this.timelock.hashOperationBatch( ...this.proposal.shortProposal.slice(0, 3), - '0x0', - timelockSalt(this.mock.address, this.proposal.shortProposal[3]), + ethers.ZeroHash, + timelockSalt(this.mock.target, this.proposal.shortProposal[3]), ); }); it("doesn't accept ether transfers", async function () { - await expectRevert.unspecified(web3.eth.sendTransaction({ from: owner, to: this.mock.address, value: 1 })); + await expect(this.owner.sendTransaction({ to: this.mock, value: 1n })).to.be.revertedWithCustomError( + this.mock, + 'GovernorDisabledDeposit', + ); }); it('post deployment check', async function () { - expect(await this.mock.name()).to.be.equal(name); - expect(await this.mock.token()).to.be.equal(this.token.address); - expect(await this.mock.votingDelay()).to.be.bignumber.equal(votingDelay); - expect(await this.mock.votingPeriod()).to.be.bignumber.equal(votingPeriod); - expect(await this.mock.quorum(0)).to.be.bignumber.equal('0'); + expect(await this.mock.name()).to.equal(name); + expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.votingDelay()).to.equal(votingDelay); + expect(await this.mock.votingPeriod()).to.equal(votingPeriod); + expect(await this.mock.quorum(0n)).to.equal(0n); - expect(await this.mock.timelock()).to.be.equal(this.timelock.address); + expect(await this.mock.timelock()).to.equal(this.timelock.target); }); it('nominal', async function () { - expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal('0'); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(true); + expect(await this.mock.proposalEta(this.proposal.id)).to.equal(0n); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.true; await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter2 }); - await this.helper.vote({ support: Enums.VoteType.Against }, { from: voter3 }); - await this.helper.vote({ support: Enums.VoteType.Abstain }, { from: voter4 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); await this.helper.waitForDeadline(); - const txQueue = await this.helper.queue(); - await this.helper.waitForEta(); - - const eta = web3.utils.toBN(await clockFromReceipt.timestamp(txQueue.receipt)).addn(delay); - expect(await this.mock.proposalEta(this.proposal.id)).to.be.bignumber.equal(eta); - expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.equal(true); - const txExecute = await this.helper.execute(); + expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.true; + const txQueue = await this.helper.queue(); - expectEvent(txQueue, 'ProposalQueued', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txQueue.tx, this.timelock, 'CallScheduled', { id: this.proposal.timelockid }); - await expectEvent.inTransaction(txQueue.tx, this.timelock, 'CallSalt', { - id: this.proposal.timelockid, - }); + const eta = (await time.clockFromReceipt.timestamp(txQueue)) + delay; + expect(await this.mock.proposalEta(this.proposal.id)).to.equal(eta); + await this.helper.waitForEta(); - expectEvent(txExecute, 'ProposalExecuted', { proposalId: this.proposal.id }); - await expectEvent.inTransaction(txExecute.tx, this.timelock, 'CallExecuted', { id: this.proposal.timelockid }); - await expectEvent.inTransaction(txExecute.tx, this.receiver, 'MockFunctionCalled'); + const txExecute = this.helper.execute(); + + await expect(txQueue) + .to.emit(this.mock, 'ProposalQueued') + .withArgs(this.proposal.id, anyValue) + .to.emit(this.timelock, 'CallScheduled') + .withArgs(this.proposal.timelockid, ...Array(6).fill(anyValue)) + .to.emit(this.timelock, 'CallSalt') + .withArgs(this.proposal.timelockid, anyValue); + + await expect(txExecute) + .to.emit(this.mock, 'ProposalExecuted') + .withArgs(this.proposal.id) + .to.emit(this.timelock, 'CallExecuted') + .withArgs(this.proposal.timelockid, ...Array(4).fill(anyValue)) + .to.emit(this.receiver, 'MockFunctionCalled'); }); describe('should revert', function () { @@ -145,14 +145,16 @@ contract('GovernorTimelockControl', function (accounts) { it('if already queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - await expectRevertCustomError(this.helper.queue(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Queued, - proposalStatesToBitMap([Enums.ProposalState.Succeeded]), - ]); + await expect(this.helper.queue()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Queued, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ); }); }); @@ -160,66 +162,69 @@ contract('GovernorTimelockControl', function (accounts) { it('if not queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); - await this.helper.waitForDeadline(+1); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Succeeded); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Succeeded); - await expectRevertCustomError(this.helper.execute(), 'TimelockUnexpectedOperationState', [ - this.proposal.timelockid, - proposalStatesToBitMap(Enums.OperationState.Ready), - ]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.timelock, 'TimelockUnexpectedOperationState') + .withArgs(this.proposal.timelockid, GovernorHelper.proposalStatesToBitMap(Enums.OperationState.Ready)); }); it('if too early', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Queued); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Queued); - await expectRevertCustomError(this.helper.execute(), 'TimelockUnexpectedOperationState', [ - this.proposal.timelockid, - proposalStatesToBitMap(Enums.OperationState.Ready), - ]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.timelock, 'TimelockUnexpectedOperationState') + .withArgs(this.proposal.timelockid, GovernorHelper.proposalStatesToBitMap(Enums.OperationState.Ready)); }); it('if already executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); await this.helper.execute(); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Executed, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('if already executed by another proposer', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); await this.timelock.executeBatch( ...this.proposal.shortProposal.slice(0, 3), - '0x0', - timelockSalt(this.mock.address, this.proposal.shortProposal[3]), + ethers.ZeroHash, + timelockSalt(this.mock.target, this.proposal.shortProposal[3]), ); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Executed, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); }); }); @@ -228,178 +233,179 @@ contract('GovernorTimelockControl', function (accounts) { it('cancel before queue prevents scheduling', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - expectEvent(await this.helper.cancel('internal'), 'ProposalCanceled', { proposalId: this.proposal.id }); + await expect(this.helper.cancel('internal')) + .to.emit(this.mock, 'ProposalCanceled') + .withArgs(this.proposal.id); + + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Canceled); - await expectRevertCustomError(this.helper.queue(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Canceled, - proposalStatesToBitMap([Enums.ProposalState.Succeeded]), - ]); + await expect(this.helper.queue()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ); }); it('cancel after queue prevents executing', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - expectEvent(await this.helper.cancel('internal'), 'ProposalCanceled', { proposalId: this.proposal.id }); + await expect(this.helper.cancel('internal')) + .to.emit(this.mock, 'ProposalCanceled') + .withArgs(this.proposal.id); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Canceled); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Canceled, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); it('cancel on timelock is reflected on governor', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Queued); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Queued); - expectEvent(await this.timelock.cancel(this.proposal.timelockid, { from: owner }), 'Cancelled', { - id: this.proposal.timelockid, - }); + await expect(this.timelock.connect(this.owner).cancel(this.proposal.timelockid)) + .to.emit(this.timelock, 'Cancelled') + .withArgs(this.proposal.timelockid); - expect(await this.mock.state(this.proposal.id)).to.be.bignumber.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); }); }); describe('onlyGovernance', function () { describe('relay', function () { beforeEach(async function () { - await this.token.$_mint(this.mock.address, 1); + await this.token.$_mint(this.mock, 1); }); it('is protected', async function () { - await expectRevertCustomError( - this.mock.relay(this.token.address, 0, this.token.contract.methods.transfer(other, 1).encodeABI(), { - from: owner, - }), - 'GovernorOnlyExecutor', - [owner], - ); + await expect( + this.mock + .connect(this.owner) + .relay(this.token, 0n, this.token.interface.encodeFunctionData('transfer', [this.other.address, 1n])), + ) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') + .withArgs(this.owner.address); }); it('can be executed through governance', async function () { this.helper.setProposal( [ { - target: this.mock.address, - data: this.mock.contract.methods - .relay(this.token.address, 0, this.token.contract.methods.transfer(other, 1).encodeABI()) - .encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('relay', [ + this.token.target, + 0n, + this.token.interface.encodeFunctionData('transfer', [this.other.address, 1n]), + ]), }, ], '', ); - expect(await this.token.balanceOf(this.mock.address), 1); - expect(await this.token.balanceOf(other), 0); - await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); + const txExecute = await this.helper.execute(); - expect(await this.token.balanceOf(this.mock.address), 0); - expect(await this.token.balanceOf(other), 1); + await expect(txExecute).to.changeTokenBalances(this.token, [this.mock, this.other], [-1n, 1n]); - await expectEvent.inTransaction(txExecute.tx, this.token, 'Transfer', { - from: this.mock.address, - to: other, - value: '1', - }); + await expect(txExecute).to.emit(this.token, 'Transfer').withArgs(this.mock.target, this.other.address, 1n); }); it('is payable and can transfer eth to EOA', async function () { - const t2g = web3.utils.toBN(128); // timelock to governor - const g2o = web3.utils.toBN(100); // governor to eoa (other) + const t2g = 128n; // timelock to governor + const g2o = 100n; // governor to eoa (other) this.helper.setProposal( [ { - target: this.mock.address, + target: this.mock.target, value: t2g, - data: this.mock.contract.methods.relay(other, g2o, '0x').encodeABI(), + data: this.mock.interface.encodeFunctionData('relay', [this.other.address, g2o, '0x']), }, ], '', ); - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal(web3.utils.toBN(0)); - const timelockBalance = await web3.eth.getBalance(this.timelock.address).then(web3.utils.toBN); - const otherBalance = await web3.eth.getBalance(other).then(web3.utils.toBN); - await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); - await this.helper.execute(); - expect(await web3.eth.getBalance(this.timelock.address)).to.be.bignumber.equal(timelockBalance.sub(t2g)); - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal(t2g.sub(g2o)); - expect(await web3.eth.getBalance(other)).to.be.bignumber.equal(otherBalance.add(g2o)); + await expect(this.helper.execute()).to.changeEtherBalances( + [this.timelock, this.mock, this.other], + [-t2g, t2g - g2o, g2o], + ); }); it('protected against other proposers', async function () { - const target = this.mock.address; - const value = web3.utils.toWei('0'); - const data = this.mock.contract.methods.relay(constants.ZERO_ADDRESS, 0, '0x').encodeABI(); - const predecessor = constants.ZERO_BYTES32; - const salt = constants.ZERO_BYTES32; - - await this.timelock.schedule(target, value, data, predecessor, salt, delay, { from: owner }); - - await time.increase(delay); - - await expectRevertCustomError( - this.timelock.execute(target, value, data, predecessor, salt, { from: owner }), - 'QueueEmpty', // Bubbled up from Governor - [], + const call = [ + this.mock, + 0n, + this.mock.interface.encodeFunctionData('relay', [ethers.ZeroAddress, 0n, '0x']), + ethers.ZeroHash, + ethers.ZeroHash, + ]; + + await this.timelock.connect(this.owner).schedule(...call, delay); + + await time.clock.timestamp().then(clock => time.forward.timestamp(clock + delay)); + + // Error bubbled up from Governor + await expect(this.timelock.connect(this.owner).execute(...call)).to.be.revertedWithCustomError( + this.mock, + 'QueueEmpty', ); }); }); describe('updateTimelock', function () { beforeEach(async function () { - this.newTimelock = await Timelock.new( + this.newTimelock = await ethers.deployContract('TimelockController', [ delay, - [this.mock.address], - [this.mock.address], - constants.ZERO_ADDRESS, - ); + [this.mock], + [this.mock], + ethers.ZeroAddress, + ]); }); it('is protected', async function () { - await expectRevertCustomError( - this.mock.updateTimelock(this.newTimelock.address, { from: owner }), - 'GovernorOnlyExecutor', - [owner], - ); + await expect(this.mock.connect(this.owner).updateTimelock(this.newTimelock)) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') + .withArgs(this.owner.address); }); it('can be executed through governance to', async function () { this.helper.setProposal( [ { - target: this.mock.address, - data: this.mock.contract.methods.updateTimelock(this.newTimelock.address).encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('updateTimelock', [this.newTimelock.target]), }, ], '', @@ -407,81 +413,64 @@ contract('GovernorTimelockControl', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); - const txExecute = await this.helper.execute(); - expectEvent(txExecute, 'TimelockChange', { - oldTimelock: this.timelock.address, - newTimelock: this.newTimelock.address, - }); + await expect(this.helper.execute()) + .to.emit(this.mock, 'TimelockChange') + .withArgs(this.timelock.target, this.newTimelock.target); - expect(await this.mock.timelock()).to.be.bignumber.equal(this.newTimelock.address); + expect(await this.mock.timelock()).to.equal(this.newTimelock.target); }); }); describe('on safe receive', function () { describe('ERC721', function () { - const name = 'Non Fungible Token'; - const symbol = 'NFT'; - const tokenId = web3.utils.toBN(1); + const tokenId = 1n; beforeEach(async function () { - this.token = await ERC721.new(name, symbol); - await this.token.$_mint(owner, tokenId); + this.token = await ethers.deployContract('$ERC721', ['Non Fungible Token', 'NFT']); + await this.token.$_mint(this.owner, tokenId); }); it("can't receive an ERC721 safeTransfer", async function () { - await expectRevertCustomError( - this.token.safeTransferFrom(owner, this.mock.address, tokenId, { from: owner }), - 'GovernorDisabledDeposit', - [], - ); + await expect( + this.token.connect(this.owner).safeTransferFrom(this.owner, this.mock, tokenId), + ).to.be.revertedWithCustomError(this.mock, 'GovernorDisabledDeposit'); }); }); describe('ERC1155', function () { - const uri = 'https://token-cdn-domain/{id}.json'; const tokenIds = { - 1: web3.utils.toBN(1000), - 2: web3.utils.toBN(2000), - 3: web3.utils.toBN(3000), + 1: 1000n, + 2: 2000n, + 3: 3000n, }; beforeEach(async function () { - this.token = await ERC1155.new(uri); - await this.token.$_mintBatch(owner, Object.keys(tokenIds), Object.values(tokenIds), '0x'); + this.token = await ethers.deployContract('$ERC1155', ['https://token-cdn-domain/{id}.json']); + await this.token.$_mintBatch(this.owner, Object.keys(tokenIds), Object.values(tokenIds), '0x'); }); it("can't receive ERC1155 safeTransfer", async function () { - await expectRevertCustomError( - this.token.safeTransferFrom( - owner, - this.mock.address, + await expect( + this.token.connect(this.owner).safeTransferFrom( + this.owner, + this.mock, ...Object.entries(tokenIds)[0], // id + amount '0x', - { from: owner }, ), - 'GovernorDisabledDeposit', - [], - ); + ).to.be.revertedWithCustomError(this.mock, 'GovernorDisabledDeposit'); }); it("can't receive ERC1155 safeBatchTransfer", async function () { - await expectRevertCustomError( - this.token.safeBatchTransferFrom( - owner, - this.mock.address, - Object.keys(tokenIds), - Object.values(tokenIds), - '0x', - { from: owner }, - ), - 'GovernorDisabledDeposit', - [], - ); + await expect( + this.token + .connect(this.owner) + .safeBatchTransferFrom(this.owner, this.mock, Object.keys(tokenIds), Object.values(tokenIds), '0x'), + ).to.be.revertedWithCustomError(this.mock, 'GovernorDisabledDeposit'); }); }); }); @@ -491,8 +480,8 @@ contract('GovernorTimelockControl', function (accounts) { this.helper.setProposal( [ { - target: this.mock.address, - data: this.mock.contract.methods.nonGovernanceFunction().encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('nonGovernanceFunction'), }, ], '', @@ -500,7 +489,7 @@ contract('GovernorTimelockControl', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); diff --git a/test/governance/extensions/GovernorVotesQuorumFraction.test.js b/test/governance/extensions/GovernorVotesQuorumFraction.test.js index ece9c78d6..cae4c76f0 100644 --- a/test/governance/extensions/GovernorVotesQuorumFraction.test.js +++ b/test/governance/extensions/GovernorVotesQuorumFraction.test.js @@ -1,58 +1,60 @@ -const { expectEvent, time } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture, mine } = require('@nomicfoundation/hardhat-network-helpers'); -const Enums = require('../../helpers/enums'); -const { GovernorHelper, proposalStatesToBitMap } = require('../../helpers/governance'); -const { clock } = require('../../helpers/time'); -const { expectRevertCustomError } = require('../../helpers/customError'); - -const Governor = artifacts.require('$GovernorMock'); -const CallReceiver = artifacts.require('CallReceiverMock'); +const { GovernorHelper } = require('../../helpers/governance'); +const { bigint: Enums } = require('../../helpers/enums'); +const { bigint: time } = require('../../helpers/time'); const TOKENS = [ - { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, - { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' }, + { Token: '$ERC20Votes', mode: 'blocknumber' }, + { Token: '$ERC20VotesTimestampMock', mode: 'timestamp' }, ]; -contract('GovernorVotesQuorumFraction', function (accounts) { - const [owner, voter1, voter2, voter3, voter4] = accounts; - - const name = 'OZ-Governor'; - const version = '1'; - const tokenName = 'MockToken'; - const tokenSymbol = 'MTKN'; - const tokenSupply = web3.utils.toBN(web3.utils.toWei('100')); - const ratio = web3.utils.toBN(8); // percents - const newRatio = web3.utils.toBN(6); // percents - const votingDelay = web3.utils.toBN(4); - const votingPeriod = web3.utils.toBN(16); - const value = web3.utils.toWei('1'); - - for (const { mode, Token } of TOKENS) { - describe(`using ${Token._json.contractName}`, function () { - beforeEach(async function () { - this.owner = owner; - this.token = await Token.new(tokenName, tokenSymbol, tokenName, version); - this.mock = await Governor.new(name, votingDelay, votingPeriod, 0, this.token.address, ratio); - this.receiver = await CallReceiver.new(); +const name = 'OZ-Governor'; +const version = '1'; +const tokenName = 'MockToken'; +const tokenSymbol = 'MTKN'; +const tokenSupply = ethers.parseEther('100'); +const ratio = 8n; // percents +const newRatio = 6n; // percents +const votingDelay = 4n; +const votingPeriod = 16n; +const value = ethers.parseEther('1'); + +describe('GovernorVotesQuorumFraction', function () { + for (const { Token, mode } of TOKENS) { + const fixture = async () => { + const [owner, voter1, voter2, voter3, voter4] = await ethers.getSigners(); + + const receiver = await ethers.deployContract('CallReceiverMock'); + + const token = await ethers.deployContract(Token, [tokenName, tokenSymbol, version]); + const mock = await ethers.deployContract('$GovernorMock', [name, votingDelay, votingPeriod, 0n, token, ratio]); - this.helper = new GovernorHelper(this.mock, mode); + await owner.sendTransaction({ to: mock, value }); + await token.$_mint(owner, tokenSupply); - await web3.eth.sendTransaction({ from: owner, to: this.mock.address, value }); + const helper = new GovernorHelper(mock, mode); + await helper.connect(owner).delegate({ token, to: voter1, value: ethers.parseEther('10') }); + await helper.connect(owner).delegate({ token, to: voter2, value: ethers.parseEther('7') }); + await helper.connect(owner).delegate({ token, to: voter3, value: ethers.parseEther('5') }); + await helper.connect(owner).delegate({ token, to: voter4, value: ethers.parseEther('2') }); - await this.token.$_mint(owner, tokenSupply); - await this.helper.delegate({ token: this.token, to: voter1, value: web3.utils.toWei('10') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter2, value: web3.utils.toWei('7') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter3, value: web3.utils.toWei('5') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter4, value: web3.utils.toWei('2') }, { from: owner }); + return { owner, voter1, voter2, voter3, voter4, receiver, token, mock, helper }; + }; + + describe(`using ${Token}`, function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); // default proposal this.proposal = this.helper.setProposal( [ { - target: this.receiver.address, + target: this.receiver.target, value, - data: this.receiver.contract.methods.mockFunction().encodeABI(), + data: this.receiver.interface.encodeFunctionData('mockFunction'), }, ], '', @@ -60,22 +62,22 @@ contract('GovernorVotesQuorumFraction', function (accounts) { }); it('deployment check', async function () { - expect(await this.mock.name()).to.be.equal(name); - expect(await this.mock.token()).to.be.equal(this.token.address); - expect(await this.mock.votingDelay()).to.be.bignumber.equal(votingDelay); - expect(await this.mock.votingPeriod()).to.be.bignumber.equal(votingPeriod); - expect(await this.mock.quorum(0)).to.be.bignumber.equal('0'); - expect(await this.mock.quorumNumerator()).to.be.bignumber.equal(ratio); - expect(await this.mock.quorumDenominator()).to.be.bignumber.equal('100'); - expect(await clock[mode]().then(timepoint => this.mock.quorum(timepoint - 1))).to.be.bignumber.equal( - tokenSupply.mul(ratio).divn(100), + expect(await this.mock.name()).to.equal(name); + expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.votingDelay()).to.equal(votingDelay); + expect(await this.mock.votingPeriod()).to.equal(votingPeriod); + expect(await this.mock.quorum(0)).to.equal(0n); + expect(await this.mock.quorumNumerator()).to.equal(ratio); + expect(await this.mock.quorumDenominator()).to.equal(100n); + expect(await time.clock[mode]().then(clock => this.mock.quorum(clock - 1n))).to.equal( + (tokenSupply * ratio) / 100n, ); }); it('quroum reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); }); @@ -83,30 +85,30 @@ contract('GovernorVotesQuorumFraction', function (accounts) { it('quroum not reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter2 }); + await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - await expectRevertCustomError(this.helper.execute(), 'GovernorUnexpectedProposalState', [ - this.proposal.id, - Enums.ProposalState.Defeated, - proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), - ]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') + .withArgs( + this.proposal.id, + Enums.ProposalState.Defeated, + GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ); }); describe('onlyGovernance updates', function () { it('updateQuorumNumerator is protected', async function () { - await expectRevertCustomError( - this.mock.updateQuorumNumerator(newRatio, { from: owner }), - 'GovernorOnlyExecutor', - [owner], - ); + await expect(this.mock.connect(this.owner).updateQuorumNumerator(newRatio)) + .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') + .withArgs(this.owner.address); }); it('can updateQuorumNumerator through governance', async function () { this.helper.setProposal( [ { - target: this.mock.address, - data: this.mock.contract.methods.updateQuorumNumerator(newRatio).encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('updateQuorumNumerator', [newRatio]), }, ], '', @@ -114,36 +116,33 @@ contract('GovernorVotesQuorumFraction', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - expectEvent(await this.helper.execute(), 'QuorumNumeratorUpdated', { - oldQuorumNumerator: ratio, - newQuorumNumerator: newRatio, - }); + await expect(this.helper.execute()).to.emit(this.mock, 'QuorumNumeratorUpdated').withArgs(ratio, newRatio); - expect(await this.mock.quorumNumerator()).to.be.bignumber.equal(newRatio); - expect(await this.mock.quorumDenominator()).to.be.bignumber.equal('100'); + expect(await this.mock.quorumNumerator()).to.equal(newRatio); + expect(await this.mock.quorumDenominator()).to.equal(100n); // it takes one block for the new quorum to take effect - expect(await clock[mode]().then(blockNumber => this.mock.quorum(blockNumber - 1))).to.be.bignumber.equal( - tokenSupply.mul(ratio).divn(100), + expect(await time.clock[mode]().then(blockNumber => this.mock.quorum(blockNumber - 1n))).to.equal( + (tokenSupply * ratio) / 100n, ); - await time.advanceBlock(); + await mine(); - expect(await clock[mode]().then(blockNumber => this.mock.quorum(blockNumber - 1))).to.be.bignumber.equal( - tokenSupply.mul(newRatio).divn(100), + expect(await time.clock[mode]().then(blockNumber => this.mock.quorum(blockNumber - 1n))).to.equal( + (tokenSupply * newRatio) / 100n, ); }); it('cannot updateQuorumNumerator over the maximum', async function () { - const quorumNumerator = 101; + const quorumNumerator = 101n; this.helper.setProposal( [ { - target: this.mock.address, - data: this.mock.contract.methods.updateQuorumNumerator(quorumNumerator).encodeABI(), + target: this.mock.target, + data: this.mock.interface.encodeFunctionData('updateQuorumNumerator', [quorumNumerator]), }, ], '', @@ -151,15 +150,14 @@ contract('GovernorVotesQuorumFraction', function (accounts) { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter1 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); const quorumDenominator = await this.mock.quorumDenominator(); - await expectRevertCustomError(this.helper.execute(), 'GovernorInvalidQuorumFraction', [ - quorumNumerator, - quorumDenominator, - ]); + await expect(this.helper.execute()) + .to.be.revertedWithCustomError(this.mock, 'GovernorInvalidQuorumFraction') + .withArgs(quorumNumerator, quorumDenominator); }); }); }); diff --git a/test/governance/extensions/GovernorWithParams.test.js b/test/governance/extensions/GovernorWithParams.test.js index bbac688a2..194a8aa6f 100644 --- a/test/governance/extensions/GovernorWithParams.test.js +++ b/test/governance/extensions/GovernorWithParams.test.js @@ -1,66 +1,62 @@ -const { expectEvent } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const ethSigUtil = require('eth-sig-util'); -const Wallet = require('ethereumjs-wallet').default; +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const Enums = require('../../helpers/enums'); -const { getDomain, domainType, ExtendedBallot } = require('../../helpers/eip712'); const { GovernorHelper } = require('../../helpers/governance'); -const { expectRevertCustomError } = require('../../helpers/customError'); - -const Governor = artifacts.require('$GovernorWithParamsMock'); -const CallReceiver = artifacts.require('CallReceiverMock'); -const ERC1271WalletMock = artifacts.require('ERC1271WalletMock'); - -const rawParams = { - uintParam: web3.utils.toBN('42'), - strParam: 'These are my params', -}; - -const encodedParams = web3.eth.abi.encodeParameters(['uint256', 'string'], Object.values(rawParams)); +const { bigint: Enums } = require('../../helpers/enums'); +const { getDomain, ExtendedBallot } = require('../../helpers/eip712'); const TOKENS = [ - { Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' }, - { Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' }, + { Token: '$ERC20Votes', mode: 'blocknumber' }, + { Token: '$ERC20VotesTimestampMock', mode: 'timestamp' }, ]; -contract('GovernorWithParams', function (accounts) { - const [owner, proposer, voter1, voter2, voter3, voter4] = accounts; +const name = 'OZ-Governor'; +const version = '1'; +const tokenName = 'MockToken'; +const tokenSymbol = 'MTKN'; +const tokenSupply = ethers.parseEther('100'); +const votingDelay = 4n; +const votingPeriod = 16n; +const value = ethers.parseEther('1'); + +const params = { + decoded: [42n, 'These are my params'], + encoded: ethers.AbiCoder.defaultAbiCoder().encode(['uint256', 'string'], [42n, 'These are my params']), +}; - const name = 'OZ-Governor'; - const version = '1'; - const tokenName = 'MockToken'; - const tokenSymbol = 'MTKN'; - const tokenSupply = web3.utils.toWei('100'); - const votingDelay = web3.utils.toBN(4); - const votingPeriod = web3.utils.toBN(16); - const value = web3.utils.toWei('1'); +describe('GovernorWithParams', function () { + for (const { Token, mode } of TOKENS) { + const fixture = async () => { + const [owner, proposer, voter1, voter2, voter3, voter4, other] = await ethers.getSigners(); + const receiver = await ethers.deployContract('CallReceiverMock'); - for (const { mode, Token } of TOKENS) { - describe(`using ${Token._json.contractName}`, function () { - beforeEach(async function () { - this.chainId = await web3.eth.getChainId(); - this.token = await Token.new(tokenName, tokenSymbol, tokenName, version); - this.mock = await Governor.new(name, this.token.address); - this.receiver = await CallReceiver.new(); + const token = await ethers.deployContract(Token, [tokenName, tokenSymbol, version]); + const mock = await ethers.deployContract('$GovernorWithParamsMock', [name, token]); - this.helper = new GovernorHelper(this.mock, mode); + await owner.sendTransaction({ to: mock, value }); + await token.$_mint(owner, tokenSupply); - await web3.eth.sendTransaction({ from: owner, to: this.mock.address, value }); + const helper = new GovernorHelper(mock, mode); + await helper.connect(owner).delegate({ token, to: voter1, value: ethers.parseEther('10') }); + await helper.connect(owner).delegate({ token, to: voter2, value: ethers.parseEther('7') }); + await helper.connect(owner).delegate({ token, to: voter3, value: ethers.parseEther('5') }); + await helper.connect(owner).delegate({ token, to: voter4, value: ethers.parseEther('2') }); - await this.token.$_mint(owner, tokenSupply); - await this.helper.delegate({ token: this.token, to: voter1, value: web3.utils.toWei('10') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter2, value: web3.utils.toWei('7') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter3, value: web3.utils.toWei('5') }, { from: owner }); - await this.helper.delegate({ token: this.token, to: voter4, value: web3.utils.toWei('2') }, { from: owner }); + return { owner, proposer, voter1, voter2, voter3, voter4, other, receiver, token, mock, helper }; + }; + + describe(`using ${Token}`, function () { + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); // default proposal this.proposal = this.helper.setProposal( [ { - target: this.receiver.address, + target: this.receiver.target, value, - data: this.receiver.contract.methods.mockFunction().encodeABI(), + data: this.receiver.interface.encodeFunctionData('mockFunction'), }, ], '', @@ -68,201 +64,180 @@ contract('GovernorWithParams', function (accounts) { }); it('deployment check', async function () { - expect(await this.mock.name()).to.be.equal(name); - expect(await this.mock.token()).to.be.equal(this.token.address); - expect(await this.mock.votingDelay()).to.be.bignumber.equal(votingDelay); - expect(await this.mock.votingPeriod()).to.be.bignumber.equal(votingPeriod); + expect(await this.mock.name()).to.equal(name); + expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.votingDelay()).to.equal(votingDelay); + expect(await this.mock.votingPeriod()).to.equal(votingPeriod); }); it('nominal is unaffected', async function () { - await this.helper.propose({ from: proposer }); + await this.helper.connect(this.proposer).propose(); await this.helper.waitForSnapshot(); - await this.helper.vote({ support: Enums.VoteType.For, reason: 'This is nice' }, { from: voter1 }); - await this.helper.vote({ support: Enums.VoteType.For }, { from: voter2 }); - await this.helper.vote({ support: Enums.VoteType.Against }, { from: voter3 }); - await this.helper.vote({ support: Enums.VoteType.Abstain }, { from: voter4 }); + await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For, reason: 'This is nice' }); + await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); await this.helper.waitForDeadline(); await this.helper.execute(); - expect(await this.mock.hasVoted(this.proposal.id, owner)).to.be.equal(false); - expect(await this.mock.hasVoted(this.proposal.id, voter1)).to.be.equal(true); - expect(await this.mock.hasVoted(this.proposal.id, voter2)).to.be.equal(true); - expect(await web3.eth.getBalance(this.mock.address)).to.be.bignumber.equal('0'); - expect(await web3.eth.getBalance(this.receiver.address)).to.be.bignumber.equal(value); + expect(await this.mock.hasVoted(this.proposal.id, this.owner)).to.be.false; + expect(await this.mock.hasVoted(this.proposal.id, this.voter1)).to.be.true; + expect(await this.mock.hasVoted(this.proposal.id, this.voter2)).to.be.true; + expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); + expect(await ethers.provider.getBalance(this.receiver)).to.equal(value); }); it('Voting with params is properly supported', async function () { - await this.helper.propose({ from: proposer }); + await this.helper.connect(this.proposer).propose(); await this.helper.waitForSnapshot(); - const weight = web3.utils.toBN(web3.utils.toWei('7')).sub(rawParams.uintParam); + const weight = ethers.parseEther('7') - params.decoded[0]; - const tx = await this.helper.vote( - { + await expect( + this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For, reason: 'no particular reason', - params: encodedParams, - }, - { from: voter2 }, - ); - - expectEvent(tx, 'CountParams', { ...rawParams }); - expectEvent(tx, 'VoteCastWithParams', { - voter: voter2, - proposalId: this.proposal.id, - support: Enums.VoteType.For, - weight, - reason: 'no particular reason', - params: encodedParams, - }); + params: params.encoded, + }), + ) + .to.emit(this.mock, 'CountParams') + .withArgs(...params.decoded) + .to.emit(this.mock, 'VoteCastWithParams') + .withArgs( + this.voter2.address, + this.proposal.id, + Enums.VoteType.For, + weight, + 'no particular reason', + params.encoded, + ); - const votes = await this.mock.proposalVotes(this.proposal.id); - expect(votes.forVotes).to.be.bignumber.equal(weight); + expect(await this.mock.proposalVotes(this.proposal.id)).to.deep.equal([0n, weight, 0n]); }); describe('voting by signature', function () { - beforeEach(async function () { - this.voterBySig = Wallet.generate(); - this.voterBySig.address = web3.utils.toChecksumAddress(this.voterBySig.getAddressString()); - - this.data = (contract, message) => - getDomain(contract).then(domain => ({ - primaryType: 'ExtendedBallot', - types: { - EIP712Domain: domainType(domain), - ExtendedBallot, - }, - domain, - message, - })); - - this.sign = privateKey => async (contract, message) => - ethSigUtil.signTypedMessage(privateKey, { data: await this.data(contract, message) }); - }); - it('supports EOA signatures', async function () { - await this.token.delegate(this.voterBySig.address, { from: voter2 }); - - const weight = web3.utils.toBN(web3.utils.toWei('7')).sub(rawParams.uintParam); - - const nonce = await this.mock.nonces(this.voterBySig.address); + await this.token.connect(this.voter2).delegate(this.other); // Run proposal await this.helper.propose(); await this.helper.waitForSnapshot(); - const tx = await this.helper.vote({ - support: Enums.VoteType.For, - voter: this.voterBySig.address, - nonce, - reason: 'no particular reason', - params: encodedParams, - signature: this.sign(this.voterBySig.getPrivateKey()), - }); - expectEvent(tx, 'CountParams', { ...rawParams }); - expectEvent(tx, 'VoteCastWithParams', { - voter: this.voterBySig.address, + // Prepare vote + const weight = ethers.parseEther('7') - params.decoded[0]; + const nonce = await this.mock.nonces(this.other); + const data = { proposalId: this.proposal.id, support: Enums.VoteType.For, - weight, + voter: this.other.address, + nonce, reason: 'no particular reason', - params: encodedParams, - }); + params: params.encoded, + signature: (contract, message) => + getDomain(contract).then(domain => this.other.signTypedData(domain, { ExtendedBallot }, message)), + }; + + // Vote + await expect(this.helper.vote(data)) + .to.emit(this.mock, 'CountParams') + .withArgs(...params.decoded) + .to.emit(this.mock, 'VoteCastWithParams') + .withArgs(data.voter, data.proposalId, data.support, weight, data.reason, data.params); - const votes = await this.mock.proposalVotes(this.proposal.id); - expect(votes.forVotes).to.be.bignumber.equal(weight); - expect(await this.mock.nonces(this.voterBySig.address)).to.be.bignumber.equal(nonce.addn(1)); + expect(await this.mock.proposalVotes(this.proposal.id)).to.deep.equal([0n, weight, 0n]); + expect(await this.mock.nonces(this.other)).to.equal(nonce + 1n); }); it('supports EIP-1271 signature signatures', async function () { - const ERC1271WalletOwner = Wallet.generate(); - ERC1271WalletOwner.address = web3.utils.toChecksumAddress(ERC1271WalletOwner.getAddressString()); - - const wallet = await ERC1271WalletMock.new(ERC1271WalletOwner.address); - - await this.token.delegate(wallet.address, { from: voter2 }); - - const weight = web3.utils.toBN(web3.utils.toWei('7')).sub(rawParams.uintParam); - - const nonce = await this.mock.nonces(wallet.address); + const wallet = await ethers.deployContract('ERC1271WalletMock', [this.other]); + await this.token.connect(this.voter2).delegate(wallet); // Run proposal await this.helper.propose(); await this.helper.waitForSnapshot(); - const tx = await this.helper.vote({ - support: Enums.VoteType.For, - voter: wallet.address, - nonce, - reason: 'no particular reason', - params: encodedParams, - signature: this.sign(ERC1271WalletOwner.getPrivateKey()), - }); - expectEvent(tx, 'CountParams', { ...rawParams }); - expectEvent(tx, 'VoteCastWithParams', { - voter: wallet.address, + // Prepare vote + const weight = ethers.parseEther('7') - params.decoded[0]; + const nonce = await this.mock.nonces(this.other); + const data = { proposalId: this.proposal.id, support: Enums.VoteType.For, - weight, + voter: wallet.target, + nonce, reason: 'no particular reason', - params: encodedParams, - }); + params: params.encoded, + signature: (contract, message) => + getDomain(contract).then(domain => this.other.signTypedData(domain, { ExtendedBallot }, message)), + }; + + // Vote + await expect(this.helper.vote(data)) + .to.emit(this.mock, 'CountParams') + .withArgs(...params.decoded) + .to.emit(this.mock, 'VoteCastWithParams') + .withArgs(data.voter, data.proposalId, data.support, weight, data.reason, data.params); - const votes = await this.mock.proposalVotes(this.proposal.id); - expect(votes.forVotes).to.be.bignumber.equal(weight); - expect(await this.mock.nonces(wallet.address)).to.be.bignumber.equal(nonce.addn(1)); + expect(await this.mock.proposalVotes(this.proposal.id)).to.deep.equal([0n, weight, 0n]); + expect(await this.mock.nonces(wallet)).to.equal(nonce + 1n); }); it('reverts if signature does not match signer', async function () { - await this.token.delegate(this.voterBySig.address, { from: voter2 }); - - const nonce = await this.mock.nonces(this.voterBySig.address); - - const signature = this.sign(this.voterBySig.getPrivateKey()); + await this.token.connect(this.voter2).delegate(this.other); // Run proposal await this.helper.propose(); await this.helper.waitForSnapshot(); - const voteParams = { + + // Prepare vote + const nonce = await this.mock.nonces(this.other); + const data = { + proposalId: this.proposal.id, support: Enums.VoteType.For, - voter: this.voterBySig.address, + voter: this.other.address, nonce, - signature: async (...params) => { - const sig = await signature(...params); - const tamperedSig = web3.utils.hexToBytes(sig); - tamperedSig[42] ^= 0xff; - return web3.utils.bytesToHex(tamperedSig); - }, reason: 'no particular reason', - params: encodedParams, + params: params.encoded, + // tampered signature + signature: (contract, message) => + getDomain(contract) + .then(domain => this.other.signTypedData(domain, { ExtendedBallot }, message)) + .then(signature => { + const tamperedSig = ethers.toBeArray(signature); + tamperedSig[42] ^= 0xff; + return ethers.hexlify(tamperedSig); + }), }; - await expectRevertCustomError(this.helper.vote(voteParams), 'GovernorInvalidSignature', [voteParams.voter]); + // Vote + await expect(this.helper.vote(data)) + .to.be.revertedWithCustomError(this.mock, 'GovernorInvalidSignature') + .withArgs(data.voter); }); it('reverts if vote nonce is incorrect', async function () { - await this.token.delegate(this.voterBySig.address, { from: voter2 }); - - const nonce = await this.mock.nonces(this.voterBySig.address); + await this.token.connect(this.voter2).delegate(this.other); // Run proposal await this.helper.propose(); await this.helper.waitForSnapshot(); - const voteParams = { + + // Prepare vote + const nonce = await this.mock.nonces(this.other); + const data = { + proposalId: this.proposal.id, support: Enums.VoteType.For, - voter: this.voterBySig.address, - nonce: nonce.addn(1), - signature: this.sign(this.voterBySig.getPrivateKey()), + voter: this.other.address, + nonce: nonce + 1n, reason: 'no particular reason', - params: encodedParams, + params: params.encoded, + signature: (contract, message) => + getDomain(contract).then(domain => this.other.signTypedData(domain, { ExtendedBallot }, message)), }; - await expectRevertCustomError( - this.helper.vote(voteParams), - // The signature check implies the nonce can't be tampered without changing the signer - 'GovernorInvalidSignature', - [voteParams.voter], - ); + // Vote + await expect(this.helper.vote(data)) + .to.be.revertedWithCustomError(this.mock, 'GovernorInvalidSignature') + .withArgs(data.voter); }); }); }); diff --git a/test/governance/utils/ERC6372.behavior.js b/test/governance/utils/ERC6372.behavior.js index 5e8633f01..b5a6cb13c 100644 --- a/test/governance/utils/ERC6372.behavior.js +++ b/test/governance/utils/ERC6372.behavior.js @@ -1,19 +1,19 @@ -const { clock } = require('../../helpers/time'); +const { bigint: time } = require('../../helpers/time'); function shouldBehaveLikeERC6372(mode = 'blocknumber') { - describe('should implement ERC6372', function () { + describe('should implement ERC-6372', function () { beforeEach(async function () { this.mock = this.mock ?? this.token ?? this.votes; }); it('clock is correct', async function () { - expect(await this.mock.clock()).to.be.bignumber.equal(await clock[mode]().then(web3.utils.toBN)); + expect(await this.mock.clock()).to.equal(await time.clock[mode]()); }); it('CLOCK_MODE is correct', async function () { const params = new URLSearchParams(await this.mock.CLOCK_MODE()); - expect(params.get('mode')).to.be.equal(mode); - expect(params.get('from')).to.be.equal(mode == 'blocknumber' ? 'default' : null); + expect(params.get('mode')).to.equal(mode); + expect(params.get('from')).to.equal(mode == 'blocknumber' ? 'default' : null); }); }); } diff --git a/test/governance/utils/Votes.behavior.js b/test/governance/utils/Votes.behavior.js index 6243cf4e4..a08f184c8 100644 --- a/test/governance/utils/Votes.behavior.js +++ b/test/governance/utils/Votes.behavior.js @@ -1,303 +1,277 @@ -const { constants, expectEvent, time } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { mine } = require('@nomicfoundation/hardhat-network-helpers'); -const { MAX_UINT256, ZERO_ADDRESS } = constants; - -const { fromRpcSig } = require('ethereumjs-util'); -const ethSigUtil = require('eth-sig-util'); -const Wallet = require('ethereumjs-wallet').default; +const { bigint: time } = require('../../helpers/time'); +const { getDomain, Delegation } = require('../../helpers/eip712'); const { shouldBehaveLikeERC6372 } = require('./ERC6372.behavior'); -const { getDomain, domainType, Delegation } = require('../../helpers/eip712'); -const { clockFromReceipt } = require('../../helpers/time'); -const { expectRevertCustomError } = require('../../helpers/customError'); - -const buildAndSignDelegation = (contract, message, pk) => - getDomain(contract) - .then(domain => ({ - primaryType: 'Delegation', - types: { EIP712Domain: domainType(domain), Delegation }, - domain, - message, - })) - .then(data => fromRpcSig(ethSigUtil.signTypedMessage(pk, { data }))); - -function shouldBehaveLikeVotes(accounts, tokens, { mode = 'blocknumber', fungible = true }) { + +function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true }) { + beforeEach(async function () { + [this.delegator, this.delegatee, this.alice, this.bob, this.other] = this.accounts; + this.domain = await getDomain(this.votes); + }); + shouldBehaveLikeERC6372(mode); - const getWeight = token => web3.utils.toBN(fungible ? token : 1); + const getWeight = token => (fungible ? token : 1n); describe('run votes workflow', function () { it('initial nonce is 0', async function () { - expect(await this.votes.nonces(accounts[0])).to.be.bignumber.equal('0'); + expect(await this.votes.nonces(this.alice)).to.equal(0n); }); describe('delegation with signature', function () { const token = tokens[0]; it('delegation without tokens', async function () { - expect(await this.votes.delegates(accounts[1])).to.be.equal(ZERO_ADDRESS); + expect(await this.votes.delegates(this.alice)).to.equal(ethers.ZeroAddress); - const { receipt } = await this.votes.delegate(accounts[1], { from: accounts[1] }); - expectEvent(receipt, 'DelegateChanged', { - delegator: accounts[1], - fromDelegate: ZERO_ADDRESS, - toDelegate: accounts[1], - }); - expectEvent.notEmitted(receipt, 'DelegateVotesChanged'); + await expect(this.votes.connect(this.alice).delegate(this.alice)) + .to.emit(this.votes, 'DelegateChanged') + .withArgs(this.alice.address, ethers.ZeroAddress, this.alice.address) + .to.not.emit(this.votes, 'DelegateVotesChanged'); - expect(await this.votes.delegates(accounts[1])).to.be.equal(accounts[1]); + expect(await this.votes.delegates(this.alice)).to.equal(this.alice.address); }); it('delegation with tokens', async function () { - await this.votes.$_mint(accounts[1], token); + await this.votes.$_mint(this.alice, token); const weight = getWeight(token); - expect(await this.votes.delegates(accounts[1])).to.be.equal(ZERO_ADDRESS); + expect(await this.votes.delegates(this.alice)).to.equal(ethers.ZeroAddress); - const { receipt } = await this.votes.delegate(accounts[1], { from: accounts[1] }); - const timepoint = await clockFromReceipt[mode](receipt); + const tx = await this.votes.connect(this.alice).delegate(this.alice); + const timepoint = await time.clockFromReceipt[mode](tx); - expectEvent(receipt, 'DelegateChanged', { - delegator: accounts[1], - fromDelegate: ZERO_ADDRESS, - toDelegate: accounts[1], - }); - expectEvent(receipt, 'DelegateVotesChanged', { - delegate: accounts[1], - previousVotes: '0', - newVotes: weight, - }); + await expect(tx) + .to.emit(this.votes, 'DelegateChanged') + .withArgs(this.alice.address, ethers.ZeroAddress, this.alice.address) + .to.emit(this.votes, 'DelegateVotesChanged') + .withArgs(this.alice.address, 0n, weight); - expect(await this.votes.delegates(accounts[1])).to.be.equal(accounts[1]); - expect(await this.votes.getVotes(accounts[1])).to.be.bignumber.equal(weight); - expect(await this.votes.getPastVotes(accounts[1], timepoint - 1)).to.be.bignumber.equal('0'); - await time.advanceBlock(); - expect(await this.votes.getPastVotes(accounts[1], timepoint)).to.be.bignumber.equal(weight); + expect(await this.votes.delegates(this.alice)).to.equal(this.alice.address); + expect(await this.votes.getVotes(this.alice)).to.equal(weight); + expect(await this.votes.getPastVotes(this.alice, timepoint - 1n)).to.equal(0n); + await mine(); + expect(await this.votes.getPastVotes(this.alice, timepoint)).to.equal(weight); }); it('delegation update', async function () { - await this.votes.delegate(accounts[1], { from: accounts[1] }); - await this.votes.$_mint(accounts[1], token); + await this.votes.connect(this.alice).delegate(this.alice); + await this.votes.$_mint(this.alice, token); const weight = getWeight(token); - expect(await this.votes.delegates(accounts[1])).to.be.equal(accounts[1]); - expect(await this.votes.getVotes(accounts[1])).to.be.bignumber.equal(weight); - expect(await this.votes.getVotes(accounts[2])).to.be.bignumber.equal('0'); - - const { receipt } = await this.votes.delegate(accounts[2], { from: accounts[1] }); - const timepoint = await clockFromReceipt[mode](receipt); - - expectEvent(receipt, 'DelegateChanged', { - delegator: accounts[1], - fromDelegate: accounts[1], - toDelegate: accounts[2], - }); - expectEvent(receipt, 'DelegateVotesChanged', { - delegate: accounts[1], - previousVotes: weight, - newVotes: '0', - }); - expectEvent(receipt, 'DelegateVotesChanged', { - delegate: accounts[2], - previousVotes: '0', - newVotes: weight, - }); - - expect(await this.votes.delegates(accounts[1])).to.be.equal(accounts[2]); - expect(await this.votes.getVotes(accounts[1])).to.be.bignumber.equal('0'); - expect(await this.votes.getVotes(accounts[2])).to.be.bignumber.equal(weight); - - expect(await this.votes.getPastVotes(accounts[1], timepoint - 1)).to.be.bignumber.equal(weight); - expect(await this.votes.getPastVotes(accounts[2], timepoint - 1)).to.be.bignumber.equal('0'); - await time.advanceBlock(); - expect(await this.votes.getPastVotes(accounts[1], timepoint)).to.be.bignumber.equal('0'); - expect(await this.votes.getPastVotes(accounts[2], timepoint)).to.be.bignumber.equal(weight); + expect(await this.votes.delegates(this.alice)).to.equal(this.alice.address); + expect(await this.votes.getVotes(this.alice)).to.equal(weight); + expect(await this.votes.getVotes(this.bob)).to.equal(0); + + const tx = await this.votes.connect(this.alice).delegate(this.bob); + const timepoint = await time.clockFromReceipt[mode](tx); + + await expect(tx) + .to.emit(this.votes, 'DelegateChanged') + .withArgs(this.alice.address, this.alice.address, this.bob.address) + .to.emit(this.votes, 'DelegateVotesChanged') + .withArgs(this.alice.address, weight, 0) + .to.emit(this.votes, 'DelegateVotesChanged') + .withArgs(this.bob.address, 0, weight); + + expect(await this.votes.delegates(this.alice)).to.equal(this.bob.address); + expect(await this.votes.getVotes(this.alice)).to.equal(0n); + expect(await this.votes.getVotes(this.bob)).to.equal(weight); + + expect(await this.votes.getPastVotes(this.alice, timepoint - 1n)).to.equal(weight); + expect(await this.votes.getPastVotes(this.bob, timepoint - 1n)).to.equal(0n); + await mine(); + expect(await this.votes.getPastVotes(this.alice, timepoint)).to.equal(0n); + expect(await this.votes.getPastVotes(this.bob, timepoint)).to.equal(weight); }); describe('with signature', function () { - const delegator = Wallet.generate(); - const [delegatee, other] = accounts; - const nonce = 0; - delegator.address = web3.utils.toChecksumAddress(delegator.getAddressString()); + const nonce = 0n; it('accept signed delegation', async function () { - await this.votes.$_mint(delegator.address, token); + await this.votes.$_mint(this.delegator.address, token); const weight = getWeight(token); - const { v, r, s } = await buildAndSignDelegation( - this.votes, - { - delegatee, - nonce, - expiry: MAX_UINT256, - }, - delegator.getPrivateKey(), - ); - - expect(await this.votes.delegates(delegator.address)).to.be.equal(ZERO_ADDRESS); - - const { receipt } = await this.votes.delegateBySig(delegatee, nonce, MAX_UINT256, v, r, s); - const timepoint = await clockFromReceipt[mode](receipt); - - expectEvent(receipt, 'DelegateChanged', { - delegator: delegator.address, - fromDelegate: ZERO_ADDRESS, - toDelegate: delegatee, - }); - expectEvent(receipt, 'DelegateVotesChanged', { - delegate: delegatee, - previousVotes: '0', - newVotes: weight, - }); - - expect(await this.votes.delegates(delegator.address)).to.be.equal(delegatee); - expect(await this.votes.getVotes(delegator.address)).to.be.bignumber.equal('0'); - expect(await this.votes.getVotes(delegatee)).to.be.bignumber.equal(weight); - expect(await this.votes.getPastVotes(delegatee, timepoint - 1)).to.be.bignumber.equal('0'); - await time.advanceBlock(); - expect(await this.votes.getPastVotes(delegatee, timepoint)).to.be.bignumber.equal(weight); + const { r, s, v } = await this.delegator + .signTypedData( + this.domain, + { Delegation }, + { + delegatee: this.delegatee.address, + nonce, + expiry: ethers.MaxUint256, + }, + ) + .then(ethers.Signature.from); + + expect(await this.votes.delegates(this.delegator.address)).to.equal(ethers.ZeroAddress); + + const tx = await this.votes.delegateBySig(this.delegatee, nonce, ethers.MaxUint256, v, r, s); + const timepoint = await time.clockFromReceipt[mode](tx); + + await expect(tx) + .to.emit(this.votes, 'DelegateChanged') + .withArgs(this.delegator.address, ethers.ZeroAddress, this.delegatee.address) + .to.emit(this.votes, 'DelegateVotesChanged') + .withArgs(this.delegatee.address, 0, weight); + + expect(await this.votes.delegates(this.delegator.address)).to.equal(this.delegatee.address); + expect(await this.votes.getVotes(this.delegator.address)).to.equal(0n); + expect(await this.votes.getVotes(this.delegatee)).to.equal(weight); + expect(await this.votes.getPastVotes(this.delegatee, timepoint - 1n)).to.equal(0n); + await mine(); + expect(await this.votes.getPastVotes(this.delegatee, timepoint)).to.equal(weight); }); it('rejects reused signature', async function () { - const { v, r, s } = await buildAndSignDelegation( - this.votes, - { - delegatee, - nonce, - expiry: MAX_UINT256, - }, - delegator.getPrivateKey(), - ); - - await this.votes.delegateBySig(delegatee, nonce, MAX_UINT256, v, r, s); - - await expectRevertCustomError( - this.votes.delegateBySig(delegatee, nonce, MAX_UINT256, v, r, s), - 'InvalidAccountNonce', - [delegator.address, nonce + 1], - ); + const { r, s, v } = await this.delegator + .signTypedData( + this.domain, + { Delegation }, + { + delegatee: this.delegatee.address, + nonce, + expiry: ethers.MaxUint256, + }, + ) + .then(ethers.Signature.from); + + await this.votes.delegateBySig(this.delegatee, nonce, ethers.MaxUint256, v, r, s); + + await expect(this.votes.delegateBySig(this.delegatee, nonce, ethers.MaxUint256, v, r, s)) + .to.be.revertedWithCustomError(this.votes, 'InvalidAccountNonce') + .withArgs(this.delegator.address, nonce + 1n); }); it('rejects bad delegatee', async function () { - const { v, r, s } = await buildAndSignDelegation( - this.votes, - { - delegatee, - nonce, - expiry: MAX_UINT256, - }, - delegator.getPrivateKey(), + const { r, s, v } = await this.delegator + .signTypedData( + this.domain, + { Delegation }, + { + delegatee: this.delegatee.address, + nonce, + expiry: ethers.MaxUint256, + }, + ) + .then(ethers.Signature.from); + + const tx = await this.votes.delegateBySig(this.other, nonce, ethers.MaxUint256, v, r, s); + const receipt = await tx.wait(); + + const [delegateChanged] = receipt.logs.filter( + log => this.votes.interface.parseLog(log)?.name === 'DelegateChanged', ); - - const receipt = await this.votes.delegateBySig(other, nonce, MAX_UINT256, v, r, s); - const { args } = receipt.logs.find(({ event }) => event === 'DelegateChanged'); - expect(args.delegator).to.not.be.equal(delegator.address); - expect(args.fromDelegate).to.be.equal(ZERO_ADDRESS); - expect(args.toDelegate).to.be.equal(other); + const { args } = this.votes.interface.parseLog(delegateChanged); + expect(args.delegator).to.not.be.equal(this.delegator.address); + expect(args.fromDelegate).to.equal(ethers.ZeroAddress); + expect(args.toDelegate).to.equal(this.other.address); }); it('rejects bad nonce', async function () { - const { v, r, s } = await buildAndSignDelegation( - this.votes, - { - delegatee, - nonce: nonce + 1, - expiry: MAX_UINT256, - }, - delegator.getPrivateKey(), - ); - - await expectRevertCustomError( - this.votes.delegateBySig(delegatee, nonce + 1, MAX_UINT256, v, r, s), - 'InvalidAccountNonce', - [delegator.address, 0], - ); + const { r, s, v } = await this.delegator + .signTypedData( + this.domain, + { Delegation }, + { + delegatee: this.delegatee.address, + nonce: nonce + 1n, + expiry: ethers.MaxUint256, + }, + ) + .then(ethers.Signature.from); + + await expect(this.votes.delegateBySig(this.delegatee, nonce + 1n, ethers.MaxUint256, v, r, s)) + .to.be.revertedWithCustomError(this.votes, 'InvalidAccountNonce') + .withArgs(this.delegator.address, 0); }); it('rejects expired permit', async function () { - const expiry = (await time.latest()) - time.duration.weeks(1); - const { v, r, s } = await buildAndSignDelegation( - this.votes, - { - delegatee, - nonce, - expiry, - }, - delegator.getPrivateKey(), - ); - - await expectRevertCustomError( - this.votes.delegateBySig(delegatee, nonce, expiry, v, r, s), - 'VotesExpiredSignature', - [expiry], - ); + const expiry = (await time.clock.timestamp()) - 1n; + const { r, s, v } = await this.delegator + .signTypedData( + this.domain, + { Delegation }, + { + delegatee: this.delegatee.address, + nonce, + expiry, + }, + ) + .then(ethers.Signature.from); + + await expect(this.votes.delegateBySig(this.delegatee, nonce, expiry, v, r, s)) + .to.be.revertedWithCustomError(this.votes, 'VotesExpiredSignature') + .withArgs(expiry); }); }); }); describe('getPastTotalSupply', function () { beforeEach(async function () { - await this.votes.delegate(accounts[1], { from: accounts[1] }); + await this.votes.connect(this.alice).delegate(this.alice); }); it('reverts if block number >= current block', async function () { const timepoint = 5e10; const clock = await this.votes.clock(); - await expectRevertCustomError(this.votes.getPastTotalSupply(timepoint), 'ERC5805FutureLookup', [ - timepoint, - clock, - ]); + await expect(this.votes.getPastTotalSupply(timepoint)) + .to.be.revertedWithCustomError(this.votes, 'ERC5805FutureLookup') + .withArgs(timepoint, clock); }); it('returns 0 if there are no checkpoints', async function () { - expect(await this.votes.getPastTotalSupply(0)).to.be.bignumber.equal('0'); + expect(await this.votes.getPastTotalSupply(0n)).to.equal(0n); }); it('returns the correct checkpointed total supply', async function () { const weight = tokens.map(token => getWeight(token)); // t0 = mint #0 - const t0 = await this.votes.$_mint(accounts[1], tokens[0]); - await time.advanceBlock(); + const t0 = await this.votes.$_mint(this.alice, tokens[0]); + await mine(); // t1 = mint #1 - const t1 = await this.votes.$_mint(accounts[1], tokens[1]); - await time.advanceBlock(); + const t1 = await this.votes.$_mint(this.alice, tokens[1]); + await mine(); // t2 = burn #1 - const t2 = await this.votes.$_burn(...(fungible ? [accounts[1]] : []), tokens[1]); - await time.advanceBlock(); + const t2 = await this.votes.$_burn(...(fungible ? [this.alice] : []), tokens[1]); + await mine(); // t3 = mint #2 - const t3 = await this.votes.$_mint(accounts[1], tokens[2]); - await time.advanceBlock(); + const t3 = await this.votes.$_mint(this.alice, tokens[2]); + await mine(); // t4 = burn #0 - const t4 = await this.votes.$_burn(...(fungible ? [accounts[1]] : []), tokens[0]); - await time.advanceBlock(); + const t4 = await this.votes.$_burn(...(fungible ? [this.alice] : []), tokens[0]); + await mine(); // t5 = burn #2 - const t5 = await this.votes.$_burn(...(fungible ? [accounts[1]] : []), tokens[2]); - await time.advanceBlock(); - - t0.timepoint = await clockFromReceipt[mode](t0.receipt); - t1.timepoint = await clockFromReceipt[mode](t1.receipt); - t2.timepoint = await clockFromReceipt[mode](t2.receipt); - t3.timepoint = await clockFromReceipt[mode](t3.receipt); - t4.timepoint = await clockFromReceipt[mode](t4.receipt); - t5.timepoint = await clockFromReceipt[mode](t5.receipt); - - expect(await this.votes.getPastTotalSupply(t0.timepoint - 1)).to.be.bignumber.equal('0'); - expect(await this.votes.getPastTotalSupply(t0.timepoint)).to.be.bignumber.equal(weight[0]); - expect(await this.votes.getPastTotalSupply(t0.timepoint + 1)).to.be.bignumber.equal(weight[0]); - expect(await this.votes.getPastTotalSupply(t1.timepoint)).to.be.bignumber.equal(weight[0].add(weight[1])); - expect(await this.votes.getPastTotalSupply(t1.timepoint + 1)).to.be.bignumber.equal(weight[0].add(weight[1])); - expect(await this.votes.getPastTotalSupply(t2.timepoint)).to.be.bignumber.equal(weight[0]); - expect(await this.votes.getPastTotalSupply(t2.timepoint + 1)).to.be.bignumber.equal(weight[0]); - expect(await this.votes.getPastTotalSupply(t3.timepoint)).to.be.bignumber.equal(weight[0].add(weight[2])); - expect(await this.votes.getPastTotalSupply(t3.timepoint + 1)).to.be.bignumber.equal(weight[0].add(weight[2])); - expect(await this.votes.getPastTotalSupply(t4.timepoint)).to.be.bignumber.equal(weight[2]); - expect(await this.votes.getPastTotalSupply(t4.timepoint + 1)).to.be.bignumber.equal(weight[2]); - expect(await this.votes.getPastTotalSupply(t5.timepoint)).to.be.bignumber.equal('0'); - await expectRevertCustomError(this.votes.getPastTotalSupply(t5.timepoint + 1), 'ERC5805FutureLookup', [ - t5.timepoint + 1, // timepoint - t5.timepoint + 1, // clock - ]); + const t5 = await this.votes.$_burn(...(fungible ? [this.alice] : []), tokens[2]); + await mine(); + + t0.timepoint = await time.clockFromReceipt[mode](t0); + t1.timepoint = await time.clockFromReceipt[mode](t1); + t2.timepoint = await time.clockFromReceipt[mode](t2); + t3.timepoint = await time.clockFromReceipt[mode](t3); + t4.timepoint = await time.clockFromReceipt[mode](t4); + t5.timepoint = await time.clockFromReceipt[mode](t5); + + expect(await this.votes.getPastTotalSupply(t0.timepoint - 1n)).to.equal(0); + expect(await this.votes.getPastTotalSupply(t0.timepoint)).to.equal(weight[0]); + expect(await this.votes.getPastTotalSupply(t0.timepoint + 1n)).to.equal(weight[0]); + expect(await this.votes.getPastTotalSupply(t1.timepoint)).to.equal(weight[0] + weight[1]); + expect(await this.votes.getPastTotalSupply(t1.timepoint + 1n)).to.equal(weight[0] + weight[1]); + expect(await this.votes.getPastTotalSupply(t2.timepoint)).to.equal(weight[0]); + expect(await this.votes.getPastTotalSupply(t2.timepoint + 1n)).to.equal(weight[0]); + expect(await this.votes.getPastTotalSupply(t3.timepoint)).to.equal(weight[0] + weight[2]); + expect(await this.votes.getPastTotalSupply(t3.timepoint + 1n)).to.equal(weight[0] + weight[2]); + expect(await this.votes.getPastTotalSupply(t4.timepoint)).to.equal(weight[2]); + expect(await this.votes.getPastTotalSupply(t4.timepoint + 1n)).to.equal(weight[2]); + expect(await this.votes.getPastTotalSupply(t5.timepoint)).to.equal(0); + await expect(this.votes.getPastTotalSupply(t5.timepoint + 1n)) + .to.be.revertedWithCustomError(this.votes, 'ERC5805FutureLookup') + .withArgs(t5.timepoint + 1n, t5.timepoint + 1n); }); }); @@ -305,44 +279,41 @@ function shouldBehaveLikeVotes(accounts, tokens, { mode = 'blocknumber', fungibl // https://github.com/compound-finance/compound-protocol/blob/master/tests/Governance/CompTest.js. describe('Compound test suite', function () { beforeEach(async function () { - await this.votes.$_mint(accounts[1], tokens[0]); - await this.votes.$_mint(accounts[1], tokens[1]); - await this.votes.$_mint(accounts[1], tokens[2]); + await this.votes.$_mint(this.alice, tokens[0]); + await this.votes.$_mint(this.alice, tokens[1]); + await this.votes.$_mint(this.alice, tokens[2]); }); describe('getPastVotes', function () { it('reverts if block number >= current block', async function () { const clock = await this.votes.clock(); const timepoint = 5e10; // far in the future - await expectRevertCustomError(this.votes.getPastVotes(accounts[2], timepoint), 'ERC5805FutureLookup', [ - timepoint, - clock, - ]); + await expect(this.votes.getPastVotes(this.bob, timepoint)) + .to.be.revertedWithCustomError(this.votes, 'ERC5805FutureLookup') + .withArgs(timepoint, clock); }); it('returns 0 if there are no checkpoints', async function () { - expect(await this.votes.getPastVotes(accounts[2], 0)).to.be.bignumber.equal('0'); + expect(await this.votes.getPastVotes(this.bob, 0n)).to.equal(0n); }); it('returns the latest block if >= last checkpoint block', async function () { - const { receipt } = await this.votes.delegate(accounts[2], { from: accounts[1] }); - const timepoint = await clockFromReceipt[mode](receipt); - await time.advanceBlock(); - await time.advanceBlock(); - - const latest = await this.votes.getVotes(accounts[2]); - expect(await this.votes.getPastVotes(accounts[2], timepoint)).to.be.bignumber.equal(latest); - expect(await this.votes.getPastVotes(accounts[2], timepoint + 1)).to.be.bignumber.equal(latest); + const delegate = await this.votes.connect(this.alice).delegate(this.bob); + const timepoint = await time.clockFromReceipt[mode](delegate); + await mine(2); + + const latest = await this.votes.getVotes(this.bob); + expect(await this.votes.getPastVotes(this.bob, timepoint)).to.equal(latest); + expect(await this.votes.getPastVotes(this.bob, timepoint + 1n)).to.equal(latest); }); it('returns zero if < first checkpoint block', async function () { - await time.advanceBlock(); - const { receipt } = await this.votes.delegate(accounts[2], { from: accounts[1] }); - const timepoint = await clockFromReceipt[mode](receipt); - await time.advanceBlock(); - await time.advanceBlock(); + await mine(); + const delegate = await this.votes.connect(this.alice).delegate(this.bob); + const timepoint = await time.clockFromReceipt[mode](delegate); + await mine(2); - expect(await this.votes.getPastVotes(accounts[2], timepoint - 1)).to.be.bignumber.equal('0'); + expect(await this.votes.getPastVotes(this.bob, timepoint - 1n)).to.equal(0n); }); }); }); diff --git a/test/governance/utils/Votes.test.js b/test/governance/utils/Votes.test.js index b2b80f9fe..dda5e5c82 100644 --- a/test/governance/utils/Votes.test.js +++ b/test/governance/utils/Votes.test.js @@ -1,90 +1,100 @@ -const { constants } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { clockFromReceipt } = require('../../helpers/time'); -const { BNsum } = require('../../helpers/math'); -const { expectRevertCustomError } = require('../../helpers/customError'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -require('array.prototype.at/auto'); +const { bigint: time } = require('../../helpers/time'); +const { sum } = require('../../helpers/math'); +const { zip } = require('../../helpers/iterate'); const { shouldBehaveLikeVotes } = require('./Votes.behavior'); const MODES = { - blocknumber: artifacts.require('$VotesMock'), - timestamp: artifacts.require('$VotesTimestampMock'), + blocknumber: '$VotesMock', + timestamp: '$VotesTimestampMock', }; -contract('Votes', function (accounts) { - const [account1, account2, account3] = accounts; - const amounts = { - [account1]: web3.utils.toBN('10000000000000000000000000'), - [account2]: web3.utils.toBN('10'), - [account3]: web3.utils.toBN('20'), - }; - - const name = 'My Vote'; - const version = '1'; +const AMOUNTS = [ethers.parseEther('10000000'), 10n, 20n]; +describe('Votes', function () { for (const [mode, artifact] of Object.entries(MODES)) { + const fixture = async () => { + const accounts = await ethers.getSigners(); + + const amounts = Object.fromEntries( + zip( + accounts.slice(0, AMOUNTS.length).map(({ address }) => address), + AMOUNTS, + ), + ); + + const name = 'My Vote'; + const version = '1'; + const votes = await ethers.deployContract(artifact, [name, version]); + + return { accounts, amounts, votes, name, version }; + }; + describe(`vote with ${mode}`, function () { beforeEach(async function () { - this.votes = await artifact.new(name, version); + Object.assign(this, await loadFixture(fixture)); }); - shouldBehaveLikeVotes(accounts, Object.values(amounts), { mode, fungible: true }); + shouldBehaveLikeVotes(AMOUNTS, { mode, fungible: true }); it('starts with zero votes', async function () { - expect(await this.votes.getTotalSupply()).to.be.bignumber.equal('0'); + expect(await this.votes.getTotalSupply()).to.equal(0n); }); describe('performs voting operations', function () { beforeEach(async function () { this.txs = []; - for (const [account, amount] of Object.entries(amounts)) { + for (const [account, amount] of Object.entries(this.amounts)) { this.txs.push(await this.votes.$_mint(account, amount)); } }); it('reverts if block number >= current block', async function () { - const lastTxTimepoint = await clockFromReceipt[mode](this.txs.at(-1).receipt); + const lastTxTimepoint = await time.clockFromReceipt[mode](this.txs.at(-1)); const clock = await this.votes.clock(); - await expectRevertCustomError(this.votes.getPastTotalSupply(lastTxTimepoint + 1), 'ERC5805FutureLookup', [ - lastTxTimepoint + 1, - clock, - ]); + await expect(this.votes.getPastTotalSupply(lastTxTimepoint)) + .to.be.revertedWithCustomError(this.votes, 'ERC5805FutureLookup') + .withArgs(lastTxTimepoint, clock); }); it('delegates', async function () { - expect(await this.votes.getVotes(account1)).to.be.bignumber.equal('0'); - expect(await this.votes.getVotes(account2)).to.be.bignumber.equal('0'); - expect(await this.votes.delegates(account1)).to.be.equal(constants.ZERO_ADDRESS); - expect(await this.votes.delegates(account2)).to.be.equal(constants.ZERO_ADDRESS); - - await this.votes.delegate(account1, account1); - - expect(await this.votes.getVotes(account1)).to.be.bignumber.equal(amounts[account1]); - expect(await this.votes.getVotes(account2)).to.be.bignumber.equal('0'); - expect(await this.votes.delegates(account1)).to.be.equal(account1); - expect(await this.votes.delegates(account2)).to.be.equal(constants.ZERO_ADDRESS); - - await this.votes.delegate(account2, account1); - - expect(await this.votes.getVotes(account1)).to.be.bignumber.equal(amounts[account1].add(amounts[account2])); - expect(await this.votes.getVotes(account2)).to.be.bignumber.equal('0'); - expect(await this.votes.delegates(account1)).to.be.equal(account1); - expect(await this.votes.delegates(account2)).to.be.equal(account1); + expect(await this.votes.getVotes(this.accounts[0])).to.equal(0n); + expect(await this.votes.getVotes(this.accounts[1])).to.equal(0n); + expect(await this.votes.delegates(this.accounts[0])).to.equal(ethers.ZeroAddress); + expect(await this.votes.delegates(this.accounts[1])).to.equal(ethers.ZeroAddress); + + await this.votes.delegate(this.accounts[0], ethers.Typed.address(this.accounts[0])); + + expect(await this.votes.getVotes(this.accounts[0])).to.equal(this.amounts[this.accounts[0].address]); + expect(await this.votes.getVotes(this.accounts[1])).to.equal(0n); + expect(await this.votes.delegates(this.accounts[0])).to.equal(this.accounts[0].address); + expect(await this.votes.delegates(this.accounts[1])).to.equal(ethers.ZeroAddress); + + await this.votes.delegate(this.accounts[1], ethers.Typed.address(this.accounts[0])); + + expect(await this.votes.getVotes(this.accounts[0])).to.equal( + this.amounts[this.accounts[0].address] + this.amounts[this.accounts[1].address], + ); + expect(await this.votes.getVotes(this.accounts[1])).to.equal(0n); + expect(await this.votes.delegates(this.accounts[0])).to.equal(this.accounts[0].address); + expect(await this.votes.delegates(this.accounts[1])).to.equal(this.accounts[0].address); }); it('cross delegates', async function () { - await this.votes.delegate(account1, account2); - await this.votes.delegate(account2, account1); + await this.votes.delegate(this.accounts[0], ethers.Typed.address(this.accounts[1].address)); + await this.votes.delegate(this.accounts[1], ethers.Typed.address(this.accounts[0].address)); - expect(await this.votes.getVotes(account1)).to.be.bignumber.equal(amounts[account2]); - expect(await this.votes.getVotes(account2)).to.be.bignumber.equal(amounts[account1]); + expect(await this.votes.getVotes(this.accounts[0])).to.equal(this.amounts[this.accounts[1].address]); + expect(await this.votes.getVotes(this.accounts[1])).to.equal(this.amounts[this.accounts[0].address]); }); it('returns total amount of votes', async function () { - const totalSupply = BNsum(...Object.values(amounts)); - expect(await this.votes.getTotalSupply()).to.be.bignumber.equal(totalSupply); + const totalSupply = sum(...Object.values(this.amounts)); + expect(await this.votes.getTotalSupply()).to.equal(totalSupply); }); }); }); diff --git a/test/helpers/governance.js b/test/helpers/governance.js index fc4e30095..c2e79461a 100644 --- a/test/helpers/governance.js +++ b/test/helpers/governance.js @@ -1,23 +1,10 @@ -const { web3 } = require('hardhat'); -const { forward } = require('../helpers/time'); +const { ethers } = require('hardhat'); +const { forward } = require('./time'); const { ProposalState } = require('./enums'); - -function zip(...args) { - return Array(Math.max(...args.map(array => array.length))) - .fill() - .map((_, i) => args.map(array => array[i])); -} - -function concatHex(...args) { - return web3.utils.bytesToHex([].concat(...args.map(h => web3.utils.hexToBytes(h || '0x')))); -} - -function concatOpts(args, opts = null) { - return opts ? args.concat(opts) : args; -} +const { unique } = require('./iterate'); const timelockSalt = (address, descriptionHash) => - '0x' + web3.utils.toBN(address).shln(96).xor(web3.utils.toBN(descriptionHash)).toString(16, 64); + ethers.toBeHex((ethers.toBigInt(address) << 96n) ^ ethers.toBigInt(descriptionHash), 32); class GovernorHelper { constructor(governor, mode = 'blocknumber') { @@ -25,229 +12,187 @@ class GovernorHelper { this.mode = mode; } - delegate(delegation = {}, opts = null) { + connect(account) { + this.governor = this.governor.connect(account); + return this; + } + + /// Setter and getters + /** + * Specify a proposal either as + * 1) an array of objects [{ target, value, data }] + * 2) an object of arrays { targets: [], values: [], data: [] } + */ + setProposal(actions, description) { + if (Array.isArray(actions)) { + this.targets = actions.map(a => a.target); + this.values = actions.map(a => a.value || 0n); + this.data = actions.map(a => a.data || '0x'); + } else { + ({ targets: this.targets, values: this.values, data: this.data } = actions); + } + this.description = description; + return this; + } + + get id() { + return ethers.keccak256( + ethers.AbiCoder.defaultAbiCoder().encode(['address[]', 'uint256[]', 'bytes[]', 'bytes32'], this.shortProposal), + ); + } + + // used for checking events + get signatures() { + return this.data.map(() => ''); + } + + get descriptionHash() { + return ethers.id(this.description); + } + + // condensed version for queueing end executing + get shortProposal() { + return [this.targets, this.values, this.data, this.descriptionHash]; + } + + // full version for proposing + get fullProposal() { + return [this.targets, this.values, this.data, this.description]; + } + + get currentProposal() { + return this; + } + + /// Proposal lifecycle + delegate(delegation) { return Promise.all([ - delegation.token.delegate(delegation.to, { from: delegation.to }), - delegation.value && delegation.token.transfer(...concatOpts([delegation.to, delegation.value]), opts), - delegation.tokenId && + delegation.token.connect(delegation.to).delegate(delegation.to), + delegation.value === undefined || + delegation.token.connect(this.governor.runner).transfer(delegation.to, delegation.value), + delegation.tokenId === undefined || delegation.token .ownerOf(delegation.tokenId) .then(owner => - delegation.token.transferFrom(...concatOpts([owner, delegation.to, delegation.tokenId], opts)), + delegation.token.connect(this.governor.runner).transferFrom(owner, delegation.to, delegation.tokenId), ), ]); } - propose(opts = null) { - const proposal = this.currentProposal; - - return this.governor.methods[ - proposal.useCompatibilityInterface - ? 'propose(address[],uint256[],string[],bytes[],string)' - : 'propose(address[],uint256[],bytes[],string)' - ](...concatOpts(proposal.fullProposal, opts)); + propose() { + return this.governor.propose(...this.fullProposal); } - queue(opts = null) { - const proposal = this.currentProposal; - - return proposal.useCompatibilityInterface - ? this.governor.methods['queue(uint256)'](...concatOpts([proposal.id], opts)) - : this.governor.methods['queue(address[],uint256[],bytes[],bytes32)']( - ...concatOpts(proposal.shortProposal, opts), - ); + queue() { + return this.governor.queue(...this.shortProposal); } - execute(opts = null) { - const proposal = this.currentProposal; - - return proposal.useCompatibilityInterface - ? this.governor.methods['execute(uint256)'](...concatOpts([proposal.id], opts)) - : this.governor.methods['execute(address[],uint256[],bytes[],bytes32)']( - ...concatOpts(proposal.shortProposal, opts), - ); + execute() { + return this.governor.execute(...this.shortProposal); } - cancel(visibility = 'external', opts = null) { - const proposal = this.currentProposal; - + cancel(visibility = 'external') { switch (visibility) { case 'external': - if (proposal.useCompatibilityInterface) { - return this.governor.methods['cancel(uint256)'](...concatOpts([proposal.id], opts)); - } else { - return this.governor.methods['cancel(address[],uint256[],bytes[],bytes32)']( - ...concatOpts(proposal.shortProposal, opts), - ); - } + return this.governor.cancel(...this.shortProposal); + case 'internal': - return this.governor.methods['$_cancel(address[],uint256[],bytes[],bytes32)']( - ...concatOpts(proposal.shortProposal, opts), - ); + return this.governor.$_cancel(...this.shortProposal); + default: throw new Error(`unsupported visibility "${visibility}"`); } } - vote(vote = {}, opts = null) { - const proposal = this.currentProposal; - - return vote.signature - ? // if signature, and either params or reason → - vote.params || vote.reason - ? this.sign(vote).then(signature => - this.governor.castVoteWithReasonAndParamsBySig( - ...concatOpts( - [proposal.id, vote.support, vote.voter, vote.reason || '', vote.params || '', signature], - opts, - ), - ), - ) - : this.sign(vote).then(signature => - this.governor.castVoteBySig(...concatOpts([proposal.id, vote.support, vote.voter, signature], opts)), - ) - : vote.params - ? // otherwise if params - this.governor.castVoteWithReasonAndParams( - ...concatOpts([proposal.id, vote.support, vote.reason || '', vote.params], opts), - ) - : vote.reason - ? // otherwise if reason - this.governor.castVoteWithReason(...concatOpts([proposal.id, vote.support, vote.reason], opts)) - : this.governor.castVote(...concatOpts([proposal.id, vote.support], opts)); - } - - sign(vote = {}) { - return vote.signature(this.governor, this.forgeMessage(vote)); - } - - forgeMessage(vote = {}) { - const proposal = this.currentProposal; - - const message = { proposalId: proposal.id, support: vote.support, voter: vote.voter, nonce: vote.nonce }; - - if (vote.params || vote.reason) { - message.reason = vote.reason || ''; - message.params = vote.params || ''; + async vote(vote = {}) { + let method = 'castVote'; // default + let args = [this.id, vote.support]; // base + + if (vote.signature) { + const sign = await vote.signature(this.governor, this.forgeMessage(vote)); + if (vote.params || vote.reason) { + method = 'castVoteWithReasonAndParamsBySig'; + args.push(vote.voter, vote.reason ?? '', vote.params ?? '0x', sign); + } else { + method = 'castVoteBySig'; + args.push(vote.voter, sign); + } + } else if (vote.params) { + method = 'castVoteWithReasonAndParams'; + args.push(vote.reason ?? '', vote.params); + } else if (vote.reason) { + method = 'castVoteWithReason'; + args.push(vote.reason); } - return message; + return await this.governor[method](...args); } - async waitForSnapshot(offset = 0) { - const proposal = this.currentProposal; - const timepoint = await this.governor.proposalSnapshot(proposal.id); - return forward[this.mode](timepoint.addn(offset)); + /// Clock helpers + async waitForSnapshot(offset = 0n) { + const timepoint = await this.governor.proposalSnapshot(this.id); + return forward[this.mode](timepoint + offset); } - async waitForDeadline(offset = 0) { - const proposal = this.currentProposal; - const timepoint = await this.governor.proposalDeadline(proposal.id); - return forward[this.mode](timepoint.addn(offset)); + async waitForDeadline(offset = 0n) { + const timepoint = await this.governor.proposalDeadline(this.id); + return forward[this.mode](timepoint + offset); } - async waitForEta(offset = 0) { - const proposal = this.currentProposal; - const timestamp = await this.governor.proposalEta(proposal.id); - return forward.timestamp(timestamp.addn(offset)); + async waitForEta(offset = 0n) { + const timestamp = await this.governor.proposalEta(this.id); + return forward.timestamp(timestamp + offset); } - /** - * Specify a proposal either as - * 1) an array of objects [{ target, value, data, signature? }] - * 2) an object of arrays { targets: [], values: [], data: [], signatures?: [] } - */ - setProposal(actions, description) { - let targets, values, signatures, data, useCompatibilityInterface; + /// Other helpers + forgeMessage(vote = {}) { + const message = { proposalId: this.id, support: vote.support, voter: vote.voter, nonce: vote.nonce }; - if (Array.isArray(actions)) { - useCompatibilityInterface = actions.some(a => 'signature' in a); - targets = actions.map(a => a.target); - values = actions.map(a => a.value || '0'); - signatures = actions.map(a => a.signature || ''); - data = actions.map(a => a.data || '0x'); - } else { - useCompatibilityInterface = Array.isArray(actions.signatures); - ({ targets, values, signatures = [], data } = actions); + if (vote.params || vote.reason) { + message.reason = vote.reason ?? ''; + message.params = vote.params ?? '0x'; } - const fulldata = zip( - signatures.map(s => s && web3.eth.abi.encodeFunctionSignature(s)), - data, - ).map(hexs => concatHex(...hexs)); - - const descriptionHash = web3.utils.keccak256(description); - - // condensed version for queueing end executing - const shortProposal = [targets, values, fulldata, descriptionHash]; - - // full version for proposing - const fullProposal = [targets, values, ...(useCompatibilityInterface ? [signatures] : []), data, description]; - - // proposal id - const id = web3.utils.toBN( - web3.utils.keccak256( - web3.eth.abi.encodeParameters(['address[]', 'uint256[]', 'bytes[]', 'bytes32'], shortProposal), - ), - ); - - this.currentProposal = { - id, - targets, - values, - signatures, - data, - fulldata, - description, - descriptionHash, - shortProposal, - fullProposal, - useCompatibilityInterface, - }; - - return this.currentProposal; + return message; } -} -/** - * Encodes a list ProposalStates into a bytes32 representation where each bit enabled corresponds to - * the underlying position in the `ProposalState` enum. For example: - * - * 0x000...10000 - * ^^^^^^------ ... - * ^----- Succeeded - * ^---- Defeated - * ^--- Canceled - * ^-- Active - * ^- Pending - */ -function proposalStatesToBitMap(proposalStates, options = {}) { - if (!Array.isArray(proposalStates)) { - proposalStates = [proposalStates]; - } - const statesCount = Object.keys(ProposalState).length; - let result = 0; - - const uniqueProposalStates = new Set(proposalStates.map(bn => bn.toNumber())); // Remove duplicates - for (const state of uniqueProposalStates) { - if (state < 0 || state >= statesCount) { - expect.fail(`ProposalState ${state} out of possible states (0...${statesCount}-1)`); - } else { - result |= 1 << state; + /** + * Encodes a list ProposalStates into a bytes32 representation where each bit enabled corresponds to + * the underlying position in the `ProposalState` enum. For example: + * + * 0x000...10000 + * ^^^^^^------ ... + * ^----- Succeeded + * ^---- Defeated + * ^--- Canceled + * ^-- Active + * ^- Pending + */ + static proposalStatesToBitMap(proposalStates, options = {}) { + if (!Array.isArray(proposalStates)) { + proposalStates = [proposalStates]; + } + const statesCount = BigInt(Object.keys(ProposalState).length); + let result = 0n; + + for (const state of unique(...proposalStates)) { + if (state < 0n || state >= statesCount) { + expect.fail(`ProposalState ${state} out of possible states (0...${statesCount}-1)`); + } else { + result |= 1n << state; + } } - } - if (options.inverted) { - const mask = 2 ** statesCount - 1; - result = result ^ mask; - } + if (options.inverted) { + const mask = 2n ** statesCount - 1n; + result = result ^ mask; + } - const hex = web3.utils.numberToHex(result); - return web3.utils.padLeft(hex, 64); + return ethers.toBeHex(result, 32); + } } module.exports = { GovernorHelper, - proposalStatesToBitMap, timelockSalt, }; diff --git a/test/helpers/iterate.js b/test/helpers/iterate.js index 2a84dfbeb..79d1c8c83 100644 --- a/test/helpers/iterate.js +++ b/test/helpers/iterate.js @@ -3,8 +3,15 @@ const mapValues = (obj, fn) => Object.fromEntries(Object.entries(obj).map(([k, v // Cartesian product of a list of arrays const product = (...arrays) => arrays.reduce((a, b) => a.flatMap(ai => b.map(bi => [...ai, bi])), [[]]); +const unique = (...array) => array.filter((obj, i) => array.indexOf(obj) === i); +const zip = (...args) => + Array(Math.max(...args.map(array => array.length))) + .fill() + .map((_, i) => args.map(array => array[i])); module.exports = { mapValues, product, + unique, + zip, }; diff --git a/test/helpers/time.js b/test/helpers/time.js index 874713ee5..5f85b6915 100644 --- a/test/helpers/time.js +++ b/test/helpers/time.js @@ -1,3 +1,4 @@ +const { ethers } = require('hardhat'); const { time, mineUpTo } = require('@nomicfoundation/hardhat-network-helpers'); const { mapValues } = require('./iterate'); @@ -8,9 +9,7 @@ module.exports = { }, clockFromReceipt: { blocknumber: receipt => Promise.resolve(receipt.blockNumber), - timestamp: receipt => web3.eth.getBlock(receipt.blockNumber).then(block => block.timestamp), - // TODO: update for ethers receipt - // timestamp: receipt => receipt.getBlock().then(block => block.timestamp), + timestamp: receipt => ethers.provider.getBlock(receipt.blockNumber).then(block => block.timestamp), }, forward: { blocknumber: mineUpTo, @@ -21,8 +20,8 @@ module.exports = { // TODO: deprecate the old version in favor of this one module.exports.bigint = { - clock: mapValues(module.exports.clock, fn => () => fn().then(BigInt)), - clockFromReceipt: mapValues(module.exports.clockFromReceipt, fn => receipt => fn(receipt).then(BigInt)), + clock: mapValues(module.exports.clock, fn => () => fn().then(ethers.toBigInt)), + clockFromReceipt: mapValues(module.exports.clockFromReceipt, fn => receipt => fn(receipt).then(ethers.toBigInt)), forward: module.exports.forward, - duration: mapValues(module.exports.duration, fn => n => BigInt(fn(n))), + duration: mapValues(module.exports.duration, fn => n => ethers.toBigInt(fn(ethers.toNumber(n)))), }; diff --git a/test/helpers/txpool.js b/test/helpers/txpool.js index ecdba5462..b6e960c10 100644 --- a/test/helpers/txpool.js +++ b/test/helpers/txpool.js @@ -1,30 +1,20 @@ const { network } = require('hardhat'); -const { promisify } = require('util'); - -const queue = promisify(setImmediate); - -async function countPendingTransactions() { - return parseInt(await network.provider.send('eth_getBlockTransactionCountByNumber', ['pending'])); -} +const { mine } = require('@nomicfoundation/hardhat-network-helpers'); +const { unique } = require('./iterate'); async function batchInBlock(txs) { try { // disable auto-mining await network.provider.send('evm_setAutomine', [false]); // send all transactions - const promises = txs.map(fn => fn()); - // wait for node to have all pending transactions - while (txs.length > (await countPendingTransactions())) { - await queue(); - } + const responses = await Promise.all(txs.map(fn => fn())); // mine one block - await network.provider.send('evm_mine'); + await mine(); // fetch receipts - const receipts = await Promise.all(promises); + const receipts = await Promise.all(responses.map(response => response.wait())); // Sanity check, all tx should be in the same block - const minedBlocks = new Set(receipts.map(({ receipt }) => receipt.blockNumber)); - expect(minedBlocks.size).to.equal(1); - + expect(unique(receipts.map(receipt => receipt.blockNumber))).to.have.lengthOf(1); + // return responses return receipts; } finally { // enable auto-mining @@ -33,6 +23,5 @@ async function batchInBlock(txs) { } module.exports = { - countPendingTransactions, batchInBlock, }; diff --git a/test/token/ERC20/extensions/ERC20Permit.test.js b/test/token/ERC20/extensions/ERC20Permit.test.js index e27a98239..538fa7d7f 100644 --- a/test/token/ERC20/extensions/ERC20Permit.test.js +++ b/test/token/ERC20/extensions/ERC20Permit.test.js @@ -3,9 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { getDomain, domainSeparator, Permit } = require('../../../helpers/eip712'); -const { - bigint: { clock, duration }, -} = require('../../../helpers/time'); +const { bigint: time } = require('../../../helpers/time'); const name = 'My Token'; const symbol = 'MTKN'; @@ -97,7 +95,7 @@ describe('ERC20Permit', function () { }); it('rejects expired permit', async function () { - const deadline = (await clock.timestamp()) - duration.weeks(1); + const deadline = (await time.clock.timestamp()) - time.duration.weeks(1); const { v, r, s } = await this.buildData(this.token, deadline) .then(({ domain, types, message }) => this.owner.signTypedData(domain, types, message)) diff --git a/test/token/ERC20/extensions/ERC20Votes.test.js b/test/token/ERC20/extensions/ERC20Votes.test.js index 9ec1c09e9..165d08a18 100644 --- a/test/token/ERC20/extensions/ERC20Votes.test.js +++ b/test/token/ERC20/extensions/ERC20Votes.test.js @@ -1,585 +1,544 @@ -/* eslint-disable */ - -const { BN, constants, expectEvent, time } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { MAX_UINT256, ZERO_ADDRESS } = constants; +const { loadFixture, mine } = require('@nomicfoundation/hardhat-network-helpers'); + +const { getDomain, Delegation } = require('../../../helpers/eip712'); +const { batchInBlock } = require('../../../helpers/txpool'); +const { bigint: time } = require('../../../helpers/time'); const { shouldBehaveLikeVotes } = require('../../../governance/utils/Votes.behavior'); -const { fromRpcSig } = require('ethereumjs-util'); -const ethSigUtil = require('eth-sig-util'); -const Wallet = require('ethereumjs-wallet').default; -const { batchInBlock } = require('../../../helpers/txpool'); -const { getDomain, domainType, Delegation } = require('../../../helpers/eip712'); -const { clock, clockFromReceipt } = require('../../../helpers/time'); -const { expectRevertCustomError } = require('../../../helpers/customError'); +const TOKENS = [ + { Token: '$ERC20Votes', mode: 'blocknumber' }, + { Token: '$ERC20VotesTimestampMock', mode: 'timestamp' }, +]; + +const name = 'My Token'; +const symbol = 'MTKN'; +const version = '1'; +const supply = ethers.parseEther('10000000'); -const MODES = { - blocknumber: artifacts.require('$ERC20Votes'), - timestamp: artifacts.require('$ERC20VotesTimestampMock'), -}; +describe('ERC20Votes', function () { + for (const { Token, mode } of TOKENS) { + const fixture = async () => { + // accounts is required by shouldBehaveLikeVotes + const accounts = await ethers.getSigners(); + const [holder, recipient, delegatee, other1, other2] = accounts; -contract('ERC20Votes', function (accounts) { - const [holder, recipient, holderDelegatee, other1, other2] = accounts; + const token = await ethers.deployContract(Token, [name, symbol, name, version]); + const domain = await getDomain(token); - const name = 'My Token'; - const symbol = 'MTKN'; - const version = '1'; - const supply = new BN('10000000000000000000000000'); + return { accounts, holder, recipient, delegatee, other1, other2, token, domain }; + }; - for (const [mode, artifact] of Object.entries(MODES)) { describe(`vote with ${mode}`, function () { beforeEach(async function () { - this.token = await artifact.new(name, symbol, name, version); + Object.assign(this, await loadFixture(fixture)); this.votes = this.token; }); // includes ERC6372 behavior check - shouldBehaveLikeVotes(accounts, [1, 17, 42], { mode, fungible: true }); + shouldBehaveLikeVotes([1, 17, 42], { mode, fungible: true }); it('initial nonce is 0', async function () { - expect(await this.token.nonces(holder)).to.be.bignumber.equal('0'); + expect(await this.token.nonces(this.holder)).to.equal(0n); }); it('minting restriction', async function () { - const value = web3.utils.toBN(1).shln(208); - await expectRevertCustomError(this.token.$_mint(holder, value), 'ERC20ExceededSafeSupply', [ - value, - value.subn(1), - ]); + const value = 2n ** 208n; + await expect(this.token.$_mint(this.holder, value)) + .to.be.revertedWithCustomError(this.token, 'ERC20ExceededSafeSupply') + .withArgs(value, value - 1n); }); it('recent checkpoints', async function () { - await this.token.delegate(holder, { from: holder }); + await this.token.connect(this.holder).delegate(this.holder); for (let i = 0; i < 6; i++) { - await this.token.$_mint(holder, 1); + await this.token.$_mint(this.holder, 1n); } - const timepoint = await clock[mode](); - expect(await this.token.numCheckpoints(holder)).to.be.bignumber.equal('6'); + const timepoint = await time.clock[mode](); + expect(await this.token.numCheckpoints(this.holder)).to.equal(6n); // recent - expect(await this.token.getPastVotes(holder, timepoint - 1)).to.be.bignumber.equal('5'); + expect(await this.token.getPastVotes(this.holder, timepoint - 1n)).to.equal(5n); // non-recent - expect(await this.token.getPastVotes(holder, timepoint - 6)).to.be.bignumber.equal('0'); + expect(await this.token.getPastVotes(this.holder, timepoint - 6n)).to.equal(0n); }); describe('set delegation', function () { describe('call', function () { it('delegation with balance', async function () { - await this.token.$_mint(holder, supply); - expect(await this.token.delegates(holder)).to.be.equal(ZERO_ADDRESS); - - const { receipt } = await this.token.delegate(holder, { from: holder }); - const timepoint = await clockFromReceipt[mode](receipt); - - expectEvent(receipt, 'DelegateChanged', { - delegator: holder, - fromDelegate: ZERO_ADDRESS, - toDelegate: holder, - }); - expectEvent(receipt, 'DelegateVotesChanged', { - delegate: holder, - previousVotes: '0', - newVotes: supply, - }); - - expect(await this.token.delegates(holder)).to.be.equal(holder); - - expect(await this.token.getVotes(holder)).to.be.bignumber.equal(supply); - expect(await this.token.getPastVotes(holder, timepoint - 1)).to.be.bignumber.equal('0'); - await time.advanceBlock(); - expect(await this.token.getPastVotes(holder, timepoint)).to.be.bignumber.equal(supply); + await this.token.$_mint(this.holder, supply); + expect(await this.token.delegates(this.holder)).to.equal(ethers.ZeroAddress); + + const tx = await this.token.connect(this.holder).delegate(this.holder); + const timepoint = await time.clockFromReceipt[mode](tx); + + await expect(tx) + .to.emit(this.token, 'DelegateChanged') + .withArgs(this.holder.address, ethers.ZeroAddress, this.holder.address) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.holder.address, 0n, supply); + + expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); + expect(await this.token.getVotes(this.holder)).to.equal(supply); + expect(await this.token.getPastVotes(this.holder, timepoint - 1n)).to.equal(0n); + await mine(); + expect(await this.token.getPastVotes(this.holder, timepoint)).to.equal(supply); }); it('delegation without balance', async function () { - expect(await this.token.delegates(holder)).to.be.equal(ZERO_ADDRESS); + expect(await this.token.delegates(this.holder)).to.equal(ethers.ZeroAddress); - const { receipt } = await this.token.delegate(holder, { from: holder }); - expectEvent(receipt, 'DelegateChanged', { - delegator: holder, - fromDelegate: ZERO_ADDRESS, - toDelegate: holder, - }); - expectEvent.notEmitted(receipt, 'DelegateVotesChanged'); + await expect(this.token.connect(this.holder).delegate(this.holder)) + .to.emit(this.token, 'DelegateChanged') + .withArgs(this.holder.address, ethers.ZeroAddress, this.holder.address) + .to.not.emit(this.token, 'DelegateVotesChanged'); - expect(await this.token.delegates(holder)).to.be.equal(holder); + expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); }); }); describe('with signature', function () { - const delegator = Wallet.generate(); - const delegatorAddress = web3.utils.toChecksumAddress(delegator.getAddressString()); - const nonce = 0; - - const buildData = (contract, message) => - getDomain(contract).then(domain => ({ - primaryType: 'Delegation', - types: { EIP712Domain: domainType(domain), Delegation }, - domain, - message, - })); + const nonce = 0n; beforeEach(async function () { - await this.token.$_mint(delegatorAddress, supply); + await this.token.$_mint(this.holder, supply); }); it('accept signed delegation', async function () { - const { v, r, s } = await buildData(this.token, { - delegatee: delegatorAddress, - nonce, - expiry: MAX_UINT256, - }).then(data => fromRpcSig(ethSigUtil.signTypedMessage(delegator.getPrivateKey(), { data }))); - - expect(await this.token.delegates(delegatorAddress)).to.be.equal(ZERO_ADDRESS); - - const { receipt } = await this.token.delegateBySig(delegatorAddress, nonce, MAX_UINT256, v, r, s); - const timepoint = await clockFromReceipt[mode](receipt); - - expectEvent(receipt, 'DelegateChanged', { - delegator: delegatorAddress, - fromDelegate: ZERO_ADDRESS, - toDelegate: delegatorAddress, - }); - expectEvent(receipt, 'DelegateVotesChanged', { - delegate: delegatorAddress, - previousVotes: '0', - newVotes: supply, - }); - - expect(await this.token.delegates(delegatorAddress)).to.be.equal(delegatorAddress); - - expect(await this.token.getVotes(delegatorAddress)).to.be.bignumber.equal(supply); - expect(await this.token.getPastVotes(delegatorAddress, timepoint - 1)).to.be.bignumber.equal('0'); - await time.advanceBlock(); - expect(await this.token.getPastVotes(delegatorAddress, timepoint)).to.be.bignumber.equal(supply); + const { r, s, v } = await this.holder + .signTypedData( + this.domain, + { Delegation }, + { + delegatee: this.holder.address, + nonce, + expiry: ethers.MaxUint256, + }, + ) + .then(ethers.Signature.from); + + expect(await this.token.delegates(this.holder)).to.equal(ethers.ZeroAddress); + + const tx = await this.token.delegateBySig(this.holder, nonce, ethers.MaxUint256, v, r, s); + const timepoint = await time.clockFromReceipt[mode](tx); + + await expect(tx) + .to.emit(this.token, 'DelegateChanged') + .withArgs(this.holder.address, ethers.ZeroAddress, this.holder.address) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.holder.address, 0n, supply); + + expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); + + expect(await this.token.getVotes(this.holder)).to.equal(supply); + expect(await this.token.getPastVotes(this.holder, timepoint - 1n)).to.equal(0n); + await mine(); + expect(await this.token.getPastVotes(this.holder, timepoint)).to.equal(supply); }); it('rejects reused signature', async function () { - const { v, r, s } = await buildData(this.token, { - delegatee: delegatorAddress, - nonce, - expiry: MAX_UINT256, - }).then(data => fromRpcSig(ethSigUtil.signTypedMessage(delegator.getPrivateKey(), { data }))); - - await this.token.delegateBySig(delegatorAddress, nonce, MAX_UINT256, v, r, s); - - await expectRevertCustomError( - this.token.delegateBySig(delegatorAddress, nonce, MAX_UINT256, v, r, s), - 'InvalidAccountNonce', - [delegatorAddress, nonce + 1], - ); + const { r, s, v } = await this.holder + .signTypedData( + this.domain, + { Delegation }, + { + delegatee: this.holder.address, + nonce, + expiry: ethers.MaxUint256, + }, + ) + .then(ethers.Signature.from); + + await this.token.delegateBySig(this.holder, nonce, ethers.MaxUint256, v, r, s); + + await expect(this.token.delegateBySig(this.holder, nonce, ethers.MaxUint256, v, r, s)) + .to.be.revertedWithCustomError(this.token, 'InvalidAccountNonce') + .withArgs(this.holder.address, nonce + 1n); }); it('rejects bad delegatee', async function () { - const { v, r, s } = await buildData(this.token, { - delegatee: delegatorAddress, - nonce, - expiry: MAX_UINT256, - }).then(data => fromRpcSig(ethSigUtil.signTypedMessage(delegator.getPrivateKey(), { data }))); - - const receipt = await this.token.delegateBySig(holderDelegatee, nonce, MAX_UINT256, v, r, s); - const { args } = receipt.logs.find(({ event }) => event == 'DelegateChanged'); - expect(args.delegator).to.not.be.equal(delegatorAddress); - expect(args.fromDelegate).to.be.equal(ZERO_ADDRESS); - expect(args.toDelegate).to.be.equal(holderDelegatee); + const { r, s, v } = await this.holder + .signTypedData( + this.domain, + { Delegation }, + { + delegatee: this.holder.address, + nonce, + expiry: ethers.MaxUint256, + }, + ) + .then(ethers.Signature.from); + + const tx = await this.token.delegateBySig(this.delegatee, nonce, ethers.MaxUint256, v, r, s); + + const { args } = await tx + .wait() + .then(receipt => receipt.logs.find(event => event.fragment.name == 'DelegateChanged')); + expect(args[0]).to.not.equal(this.holder.address); + expect(args[1]).to.equal(ethers.ZeroAddress); + expect(args[2]).to.equal(this.delegatee.address); }); it('rejects bad nonce', async function () { - const sig = await buildData(this.token, { - delegatee: delegatorAddress, - nonce, - expiry: MAX_UINT256, - }).then(data => ethSigUtil.signTypedMessage(delegator.getPrivateKey(), { data })); - const { r, s, v } = fromRpcSig(sig); - - const domain = await getDomain(this.token); - const typedMessage = { - primaryType: 'Delegation', - types: { EIP712Domain: domainType(domain), Delegation }, - domain, - message: { delegatee: delegatorAddress, nonce: nonce + 1, expiry: MAX_UINT256 }, - }; - - await expectRevertCustomError( - this.token.delegateBySig(delegatorAddress, nonce + 1, MAX_UINT256, v, r, s), - 'InvalidAccountNonce', - [ethSigUtil.recoverTypedSignature({ data: typedMessage, sig }), nonce], + const { r, s, v, serialized } = await this.holder + .signTypedData( + this.domain, + { Delegation }, + { + delegatee: this.holder.address, + nonce, + expiry: ethers.MaxUint256, + }, + ) + .then(ethers.Signature.from); + + const recovered = ethers.verifyTypedData( + this.domain, + { Delegation }, + { + delegatee: this.holder.address, + nonce: nonce + 1n, + expiry: ethers.MaxUint256, + }, + serialized, ); + + await expect(this.token.delegateBySig(this.holder, nonce + 1n, ethers.MaxUint256, v, r, s)) + .to.be.revertedWithCustomError(this.token, 'InvalidAccountNonce') + .withArgs(recovered, nonce); }); it('rejects expired permit', async function () { - const expiry = (await time.latest()) - time.duration.weeks(1); - const { v, r, s } = await buildData(this.token, { - delegatee: delegatorAddress, - nonce, - expiry, - }).then(data => fromRpcSig(ethSigUtil.signTypedMessage(delegator.getPrivateKey(), { data }))); - - await expectRevertCustomError( - this.token.delegateBySig(delegatorAddress, nonce, expiry, v, r, s), - 'VotesExpiredSignature', - [expiry], - ); + const expiry = (await time.clock.timestamp()) - time.duration.weeks(1); + + const { r, s, v } = await this.holder + .signTypedData( + this.domain, + { Delegation }, + { + delegatee: this.holder.address, + nonce, + expiry, + }, + ) + .then(ethers.Signature.from); + + await expect(this.token.delegateBySig(this.holder, nonce, expiry, v, r, s)) + .to.be.revertedWithCustomError(this.token, 'VotesExpiredSignature') + .withArgs(expiry); }); }); }); describe('change delegation', function () { beforeEach(async function () { - await this.token.$_mint(holder, supply); - await this.token.delegate(holder, { from: holder }); + await this.token.$_mint(this.holder, supply); + await this.token.connect(this.holder).delegate(this.holder); }); it('call', async function () { - expect(await this.token.delegates(holder)).to.be.equal(holder); - - const { receipt } = await this.token.delegate(holderDelegatee, { from: holder }); - const timepoint = await clockFromReceipt[mode](receipt); - - expectEvent(receipt, 'DelegateChanged', { - delegator: holder, - fromDelegate: holder, - toDelegate: holderDelegatee, - }); - expectEvent(receipt, 'DelegateVotesChanged', { - delegate: holder, - previousVotes: supply, - newVotes: '0', - }); - expectEvent(receipt, 'DelegateVotesChanged', { - delegate: holderDelegatee, - previousVotes: '0', - newVotes: supply, - }); - - expect(await this.token.delegates(holder)).to.be.equal(holderDelegatee); - - expect(await this.token.getVotes(holder)).to.be.bignumber.equal('0'); - expect(await this.token.getVotes(holderDelegatee)).to.be.bignumber.equal(supply); - expect(await this.token.getPastVotes(holder, timepoint - 1)).to.be.bignumber.equal(supply); - expect(await this.token.getPastVotes(holderDelegatee, timepoint - 1)).to.be.bignumber.equal('0'); - await time.advanceBlock(); - expect(await this.token.getPastVotes(holder, timepoint)).to.be.bignumber.equal('0'); - expect(await this.token.getPastVotes(holderDelegatee, timepoint)).to.be.bignumber.equal(supply); + expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); + + const tx = await this.token.connect(this.holder).delegate(this.delegatee); + const timepoint = await time.clockFromReceipt[mode](tx); + + await expect(tx) + .to.emit(this.token, 'DelegateChanged') + .withArgs(this.holder.address, this.holder.address, this.delegatee.address) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.holder.address, supply, 0n) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.delegatee.address, 0n, supply); + + expect(await this.token.delegates(this.holder)).to.equal(this.delegatee.address); + + expect(await this.token.getVotes(this.holder)).to.equal(0n); + expect(await this.token.getVotes(this.delegatee)).to.equal(supply); + expect(await this.token.getPastVotes(this.holder, timepoint - 1n)).to.equal(supply); + expect(await this.token.getPastVotes(this.delegatee, timepoint - 1n)).to.equal(0n); + await mine(); + expect(await this.token.getPastVotes(this.holder, timepoint)).to.equal(0n); + expect(await this.token.getPastVotes(this.delegatee, timepoint)).to.equal(supply); }); }); describe('transfers', function () { beforeEach(async function () { - await this.token.$_mint(holder, supply); + await this.token.$_mint(this.holder, supply); }); it('no delegation', async function () { - const { receipt } = await this.token.transfer(recipient, 1, { from: holder }); - expectEvent(receipt, 'Transfer', { from: holder, to: recipient, value: '1' }); - expectEvent.notEmitted(receipt, 'DelegateVotesChanged'); + await expect(this.token.connect(this.holder).transfer(this.recipient, 1n)) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.recipient.address, 1n) + .to.not.emit(this.token, 'DelegateVotesChanged'); - this.holderVotes = '0'; - this.recipientVotes = '0'; + this.holderVotes = 0n; + this.recipientVotes = 0n; }); it('sender delegation', async function () { - await this.token.delegate(holder, { from: holder }); - - const { receipt } = await this.token.transfer(recipient, 1, { from: holder }); - expectEvent(receipt, 'Transfer', { from: holder, to: recipient, value: '1' }); - expectEvent(receipt, 'DelegateVotesChanged', { - delegate: holder, - previousVotes: supply, - newVotes: supply.subn(1), - }); - - const { logIndex: transferLogIndex } = receipt.logs.find(({ event }) => event == 'Transfer'); - expect( - receipt.logs - .filter(({ event }) => event == 'DelegateVotesChanged') - .every(({ logIndex }) => transferLogIndex < logIndex), - ).to.be.equal(true); - - this.holderVotes = supply.subn(1); - this.recipientVotes = '0'; + await this.token.connect(this.holder).delegate(this.holder); + + const tx = await this.token.connect(this.holder).transfer(this.recipient, 1n); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.recipient.address, 1n) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.holder.address, supply, supply - 1n); + + const { logs } = await tx.wait(); + const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); + for (const event of logs.filter(event => event.fragment.name == 'Transfer')) { + expect(event.index).to.lt(index); + } + + this.holderVotes = supply - 1n; + this.recipientVotes = 0n; }); it('receiver delegation', async function () { - await this.token.delegate(recipient, { from: recipient }); - - const { receipt } = await this.token.transfer(recipient, 1, { from: holder }); - expectEvent(receipt, 'Transfer', { from: holder, to: recipient, value: '1' }); - expectEvent(receipt, 'DelegateVotesChanged', { delegate: recipient, previousVotes: '0', newVotes: '1' }); - - const { logIndex: transferLogIndex } = receipt.logs.find(({ event }) => event == 'Transfer'); - expect( - receipt.logs - .filter(({ event }) => event == 'DelegateVotesChanged') - .every(({ logIndex }) => transferLogIndex < logIndex), - ).to.be.equal(true); - - this.holderVotes = '0'; - this.recipientVotes = '1'; + await this.token.connect(this.recipient).delegate(this.recipient); + + const tx = await this.token.connect(this.holder).transfer(this.recipient, 1n); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.recipient.address, 1n) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.recipient.address, 0n, 1n); + + const { logs } = await tx.wait(); + const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); + for (const event of logs.filter(event => event.fragment.name == 'Transfer')) { + expect(event.index).to.lt(index); + } + + this.holderVotes = 0n; + this.recipientVotes = 1n; }); it('full delegation', async function () { - await this.token.delegate(holder, { from: holder }); - await this.token.delegate(recipient, { from: recipient }); - - const { receipt } = await this.token.transfer(recipient, 1, { from: holder }); - expectEvent(receipt, 'Transfer', { from: holder, to: recipient, value: '1' }); - expectEvent(receipt, 'DelegateVotesChanged', { - delegate: holder, - previousVotes: supply, - newVotes: supply.subn(1), - }); - expectEvent(receipt, 'DelegateVotesChanged', { delegate: recipient, previousVotes: '0', newVotes: '1' }); - - const { logIndex: transferLogIndex } = receipt.logs.find(({ event }) => event == 'Transfer'); - expect( - receipt.logs - .filter(({ event }) => event == 'DelegateVotesChanged') - .every(({ logIndex }) => transferLogIndex < logIndex), - ).to.be.equal(true); - - this.holderVotes = supply.subn(1); - this.recipientVotes = '1'; + await this.token.connect(this.holder).delegate(this.holder); + await this.token.connect(this.recipient).delegate(this.recipient); + + const tx = await this.token.connect(this.holder).transfer(this.recipient, 1n); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.recipient.address, 1n) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.holder.address, supply, supply - 1n) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.recipient.address, 0n, 1n); + + const { logs } = await tx.wait(); + const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); + for (const event of logs.filter(event => event.fragment.name == 'Transfer')) { + expect(event.index).to.lt(index); + } + + this.holderVotes = supply - 1n; + this.recipientVotes = 1n; }); afterEach(async function () { - expect(await this.token.getVotes(holder)).to.be.bignumber.equal(this.holderVotes); - expect(await this.token.getVotes(recipient)).to.be.bignumber.equal(this.recipientVotes); + expect(await this.token.getVotes(this.holder)).to.equal(this.holderVotes); + expect(await this.token.getVotes(this.recipient)).to.equal(this.recipientVotes); // need to advance 2 blocks to see the effect of a transfer on "getPastVotes" - const timepoint = await clock[mode](); - await time.advanceBlock(); - expect(await this.token.getPastVotes(holder, timepoint)).to.be.bignumber.equal(this.holderVotes); - expect(await this.token.getPastVotes(recipient, timepoint)).to.be.bignumber.equal(this.recipientVotes); + const timepoint = await time.clock[mode](); + await mine(); + expect(await this.token.getPastVotes(this.holder, timepoint)).to.equal(this.holderVotes); + expect(await this.token.getPastVotes(this.recipient, timepoint)).to.equal(this.recipientVotes); }); }); // The following tests are a adaptation of https://github.com/compound-finance/compound-protocol/blob/master/tests/Governance/CompTest.js. describe('Compound test suite', function () { beforeEach(async function () { - await this.token.$_mint(holder, supply); + await this.token.$_mint(this.holder, supply); }); describe('balanceOf', function () { it('grants to initial account', async function () { - expect(await this.token.balanceOf(holder)).to.be.bignumber.equal('10000000000000000000000000'); + expect(await this.token.balanceOf(this.holder)).to.equal(supply); }); }); describe('numCheckpoints', function () { it('returns the number of checkpoints for a delegate', async function () { - await this.token.transfer(recipient, '100', { from: holder }); //give an account a few tokens for readability - expect(await this.token.numCheckpoints(other1)).to.be.bignumber.equal('0'); - - const t1 = await this.token.delegate(other1, { from: recipient }); - t1.timepoint = await clockFromReceipt[mode](t1.receipt); - expect(await this.token.numCheckpoints(other1)).to.be.bignumber.equal('1'); - - const t2 = await this.token.transfer(other2, 10, { from: recipient }); - t2.timepoint = await clockFromReceipt[mode](t2.receipt); - expect(await this.token.numCheckpoints(other1)).to.be.bignumber.equal('2'); - - const t3 = await this.token.transfer(other2, 10, { from: recipient }); - t3.timepoint = await clockFromReceipt[mode](t3.receipt); - expect(await this.token.numCheckpoints(other1)).to.be.bignumber.equal('3'); - - const t4 = await this.token.transfer(recipient, 20, { from: holder }); - t4.timepoint = await clockFromReceipt[mode](t4.receipt); - expect(await this.token.numCheckpoints(other1)).to.be.bignumber.equal('4'); - - expect(await this.token.checkpoints(other1, 0)).to.be.deep.equal([t1.timepoint.toString(), '100']); - expect(await this.token.checkpoints(other1, 1)).to.be.deep.equal([t2.timepoint.toString(), '90']); - expect(await this.token.checkpoints(other1, 2)).to.be.deep.equal([t3.timepoint.toString(), '80']); - expect(await this.token.checkpoints(other1, 3)).to.be.deep.equal([t4.timepoint.toString(), '100']); - - await time.advanceBlock(); - expect(await this.token.getPastVotes(other1, t1.timepoint)).to.be.bignumber.equal('100'); - expect(await this.token.getPastVotes(other1, t2.timepoint)).to.be.bignumber.equal('90'); - expect(await this.token.getPastVotes(other1, t3.timepoint)).to.be.bignumber.equal('80'); - expect(await this.token.getPastVotes(other1, t4.timepoint)).to.be.bignumber.equal('100'); + await this.token.connect(this.holder).transfer(this.recipient, 100n); //give an account a few tokens for readability + expect(await this.token.numCheckpoints(this.other1)).to.equal(0n); + + const t1 = await this.token.connect(this.recipient).delegate(this.other1); + t1.timepoint = await time.clockFromReceipt[mode](t1); + expect(await this.token.numCheckpoints(this.other1)).to.equal(1n); + + const t2 = await this.token.connect(this.recipient).transfer(this.other2, 10); + t2.timepoint = await time.clockFromReceipt[mode](t2); + expect(await this.token.numCheckpoints(this.other1)).to.equal(2n); + + const t3 = await this.token.connect(this.recipient).transfer(this.other2, 10); + t3.timepoint = await time.clockFromReceipt[mode](t3); + expect(await this.token.numCheckpoints(this.other1)).to.equal(3n); + + const t4 = await this.token.connect(this.holder).transfer(this.recipient, 20); + t4.timepoint = await time.clockFromReceipt[mode](t4); + expect(await this.token.numCheckpoints(this.other1)).to.equal(4n); + + expect(await this.token.checkpoints(this.other1, 0n)).to.deep.equal([t1.timepoint, 100n]); + expect(await this.token.checkpoints(this.other1, 1n)).to.deep.equal([t2.timepoint, 90n]); + expect(await this.token.checkpoints(this.other1, 2n)).to.deep.equal([t3.timepoint, 80n]); + expect(await this.token.checkpoints(this.other1, 3n)).to.deep.equal([t4.timepoint, 100n]); + await mine(); + expect(await this.token.getPastVotes(this.other1, t1.timepoint)).to.equal(100n); + expect(await this.token.getPastVotes(this.other1, t2.timepoint)).to.equal(90n); + expect(await this.token.getPastVotes(this.other1, t3.timepoint)).to.equal(80n); + expect(await this.token.getPastVotes(this.other1, t4.timepoint)).to.equal(100n); }); it('does not add more than one checkpoint in a block', async function () { - await this.token.transfer(recipient, '100', { from: holder }); - expect(await this.token.numCheckpoints(other1)).to.be.bignumber.equal('0'); + await this.token.connect(this.holder).transfer(this.recipient, 100n); + expect(await this.token.numCheckpoints(this.other1)).to.equal(0n); const [t1, t2, t3] = await batchInBlock([ - () => this.token.delegate(other1, { from: recipient, gas: 200000 }), - () => this.token.transfer(other2, 10, { from: recipient, gas: 200000 }), - () => this.token.transfer(other2, 10, { from: recipient, gas: 200000 }), + () => this.token.connect(this.recipient).delegate(this.other1, { gasLimit: 200000 }), + () => this.token.connect(this.recipient).transfer(this.other2, 10n, { gasLimit: 200000 }), + () => this.token.connect(this.recipient).transfer(this.other2, 10n, { gasLimit: 200000 }), ]); - t1.timepoint = await clockFromReceipt[mode](t1.receipt); - t2.timepoint = await clockFromReceipt[mode](t2.receipt); - t3.timepoint = await clockFromReceipt[mode](t3.receipt); + t1.timepoint = await time.clockFromReceipt[mode](t1); + t2.timepoint = await time.clockFromReceipt[mode](t2); + t3.timepoint = await time.clockFromReceipt[mode](t3); - expect(await this.token.numCheckpoints(other1)).to.be.bignumber.equal('1'); - expect(await this.token.checkpoints(other1, 0)).to.be.deep.equal([t1.timepoint.toString(), '80']); + expect(await this.token.numCheckpoints(this.other1)).to.equal(1); + expect(await this.token.checkpoints(this.other1, 0n)).to.be.deep.equal([t1.timepoint, 80n]); - const t4 = await this.token.transfer(recipient, 20, { from: holder }); - t4.timepoint = await clockFromReceipt[mode](t4.receipt); + const t4 = await this.token.connect(this.holder).transfer(this.recipient, 20n); + t4.timepoint = await time.clockFromReceipt[mode](t4); - expect(await this.token.numCheckpoints(other1)).to.be.bignumber.equal('2'); - expect(await this.token.checkpoints(other1, 1)).to.be.deep.equal([t4.timepoint.toString(), '100']); + expect(await this.token.numCheckpoints(this.other1)).to.equal(2n); + expect(await this.token.checkpoints(this.other1, 1n)).to.be.deep.equal([t4.timepoint, 100n]); }); }); describe('getPastVotes', function () { it('reverts if block number >= current block', async function () { const clock = await this.token.clock(); - await expectRevertCustomError(this.token.getPastVotes(other1, 5e10), 'ERC5805FutureLookup', [5e10, clock]); + await expect(this.token.getPastVotes(this.other1, 50_000_000_000n)) + .to.be.revertedWithCustomError(this.token, 'ERC5805FutureLookup') + .withArgs(50_000_000_000n, clock); }); it('returns 0 if there are no checkpoints', async function () { - expect(await this.token.getPastVotes(other1, 0)).to.be.bignumber.equal('0'); + expect(await this.token.getPastVotes(this.other1, 0n)).to.equal(0n); }); it('returns the latest block if >= last checkpoint block', async function () { - const { receipt } = await this.token.delegate(other1, { from: holder }); - const timepoint = await clockFromReceipt[mode](receipt); - await time.advanceBlock(); - await time.advanceBlock(); + const tx = await this.token.connect(this.holder).delegate(this.other1); + const timepoint = await time.clockFromReceipt[mode](tx); + await mine(2); - expect(await this.token.getPastVotes(other1, timepoint)).to.be.bignumber.equal( - '10000000000000000000000000', - ); - expect(await this.token.getPastVotes(other1, timepoint + 1)).to.be.bignumber.equal( - '10000000000000000000000000', - ); + expect(await this.token.getPastVotes(this.other1, timepoint)).to.equal(supply); + expect(await this.token.getPastVotes(this.other1, timepoint + 1n)).to.equal(supply); }); it('returns zero if < first checkpoint block', async function () { - await time.advanceBlock(); - const { receipt } = await this.token.delegate(other1, { from: holder }); - const timepoint = await clockFromReceipt[mode](receipt); - await time.advanceBlock(); - await time.advanceBlock(); - - expect(await this.token.getPastVotes(other1, timepoint - 1)).to.be.bignumber.equal('0'); - expect(await this.token.getPastVotes(other1, timepoint + 1)).to.be.bignumber.equal( - '10000000000000000000000000', - ); + await mine(); + const tx = await this.token.connect(this.holder).delegate(this.other1); + const timepoint = await time.clockFromReceipt[mode](tx); + await mine(2); + + expect(await this.token.getPastVotes(this.other1, timepoint - 1n)).to.equal(0n); + expect(await this.token.getPastVotes(this.other1, timepoint + 1n)).to.equal(supply); }); it('generally returns the voting balance at the appropriate checkpoint', async function () { - const t1 = await this.token.delegate(other1, { from: holder }); - await time.advanceBlock(); - await time.advanceBlock(); - const t2 = await this.token.transfer(other2, 10, { from: holder }); - await time.advanceBlock(); - await time.advanceBlock(); - const t3 = await this.token.transfer(other2, 10, { from: holder }); - await time.advanceBlock(); - await time.advanceBlock(); - const t4 = await this.token.transfer(holder, 20, { from: other2 }); - await time.advanceBlock(); - await time.advanceBlock(); - - t1.timepoint = await clockFromReceipt[mode](t1.receipt); - t2.timepoint = await clockFromReceipt[mode](t2.receipt); - t3.timepoint = await clockFromReceipt[mode](t3.receipt); - t4.timepoint = await clockFromReceipt[mode](t4.receipt); - - expect(await this.token.getPastVotes(other1, t1.timepoint - 1)).to.be.bignumber.equal('0'); - expect(await this.token.getPastVotes(other1, t1.timepoint)).to.be.bignumber.equal( - '10000000000000000000000000', - ); - expect(await this.token.getPastVotes(other1, t1.timepoint + 1)).to.be.bignumber.equal( - '10000000000000000000000000', - ); - expect(await this.token.getPastVotes(other1, t2.timepoint)).to.be.bignumber.equal( - '9999999999999999999999990', - ); - expect(await this.token.getPastVotes(other1, t2.timepoint + 1)).to.be.bignumber.equal( - '9999999999999999999999990', - ); - expect(await this.token.getPastVotes(other1, t3.timepoint)).to.be.bignumber.equal( - '9999999999999999999999980', - ); - expect(await this.token.getPastVotes(other1, t3.timepoint + 1)).to.be.bignumber.equal( - '9999999999999999999999980', - ); - expect(await this.token.getPastVotes(other1, t4.timepoint)).to.be.bignumber.equal( - '10000000000000000000000000', - ); - expect(await this.token.getPastVotes(other1, t4.timepoint + 1)).to.be.bignumber.equal( - '10000000000000000000000000', - ); + const t1 = await this.token.connect(this.holder).delegate(this.other1); + await mine(2); + const t2 = await this.token.connect(this.holder).transfer(this.other2, 10); + await mine(2); + const t3 = await this.token.connect(this.holder).transfer(this.other2, 10); + await mine(2); + const t4 = await this.token.connect(this.other2).transfer(this.holder, 20); + await mine(2); + + t1.timepoint = await time.clockFromReceipt[mode](t1); + t2.timepoint = await time.clockFromReceipt[mode](t2); + t3.timepoint = await time.clockFromReceipt[mode](t3); + t4.timepoint = await time.clockFromReceipt[mode](t4); + + expect(await this.token.getPastVotes(this.other1, t1.timepoint - 1n)).to.equal(0n); + expect(await this.token.getPastVotes(this.other1, t1.timepoint)).to.equal(supply); + expect(await this.token.getPastVotes(this.other1, t1.timepoint + 1n)).to.equal(supply); + expect(await this.token.getPastVotes(this.other1, t2.timepoint)).to.equal(supply - 10n); + expect(await this.token.getPastVotes(this.other1, t2.timepoint + 1n)).to.equal(supply - 10n); + expect(await this.token.getPastVotes(this.other1, t3.timepoint)).to.equal(supply - 20n); + expect(await this.token.getPastVotes(this.other1, t3.timepoint + 1n)).to.equal(supply - 20n); + expect(await this.token.getPastVotes(this.other1, t4.timepoint)).to.equal(supply); + expect(await this.token.getPastVotes(this.other1, t4.timepoint + 1n)).to.equal(supply); }); }); }); describe('getPastTotalSupply', function () { beforeEach(async function () { - await this.token.delegate(holder, { from: holder }); + await this.token.connect(this.holder).delegate(this.holder); }); it('reverts if block number >= current block', async function () { const clock = await this.token.clock(); - await expectRevertCustomError(this.token.getPastTotalSupply(5e10), 'ERC5805FutureLookup', [5e10, clock]); + await expect(this.token.getPastTotalSupply(50_000_000_000n)) + .to.be.revertedWithCustomError(this.token, 'ERC5805FutureLookup') + .withArgs(50_000_000_000n, clock); }); it('returns 0 if there are no checkpoints', async function () { - expect(await this.token.getPastTotalSupply(0)).to.be.bignumber.equal('0'); + expect(await this.token.getPastTotalSupply(0n)).to.equal(0n); }); it('returns the latest block if >= last checkpoint block', async function () { - const { receipt } = await this.token.$_mint(holder, supply); - const timepoint = await clockFromReceipt[mode](receipt); - await time.advanceBlock(); - await time.advanceBlock(); + const tx = await this.token.$_mint(this.holder, supply); + const timepoint = await time.clockFromReceipt[mode](tx); + await mine(2); - expect(await this.token.getPastTotalSupply(timepoint)).to.be.bignumber.equal(supply); - expect(await this.token.getPastTotalSupply(timepoint + 1)).to.be.bignumber.equal(supply); + expect(await this.token.getPastTotalSupply(timepoint)).to.equal(supply); + expect(await this.token.getPastTotalSupply(timepoint + 1n)).to.equal(supply); }); it('returns zero if < first checkpoint block', async function () { - await time.advanceBlock(); - const { receipt } = await this.token.$_mint(holder, supply); - const timepoint = await clockFromReceipt[mode](receipt); - await time.advanceBlock(); - await time.advanceBlock(); - - expect(await this.token.getPastTotalSupply(timepoint - 1)).to.be.bignumber.equal('0'); - expect(await this.token.getPastTotalSupply(timepoint + 1)).to.be.bignumber.equal( - '10000000000000000000000000', - ); + await mine(); + const tx = await this.token.$_mint(this.holder, supply); + const timepoint = await time.clockFromReceipt[mode](tx); + await mine(2); + + expect(await this.token.getPastTotalSupply(timepoint - 1n)).to.equal(0n); + expect(await this.token.getPastTotalSupply(timepoint + 1n)).to.equal(supply); }); it('generally returns the voting balance at the appropriate checkpoint', async function () { - const t1 = await this.token.$_mint(holder, supply); - await time.advanceBlock(); - await time.advanceBlock(); - const t2 = await this.token.$_burn(holder, 10); - await time.advanceBlock(); - await time.advanceBlock(); - const t3 = await this.token.$_burn(holder, 10); - await time.advanceBlock(); - await time.advanceBlock(); - const t4 = await this.token.$_mint(holder, 20); - await time.advanceBlock(); - await time.advanceBlock(); - - t1.timepoint = await clockFromReceipt[mode](t1.receipt); - t2.timepoint = await clockFromReceipt[mode](t2.receipt); - t3.timepoint = await clockFromReceipt[mode](t3.receipt); - t4.timepoint = await clockFromReceipt[mode](t4.receipt); - - expect(await this.token.getPastTotalSupply(t1.timepoint - 1)).to.be.bignumber.equal('0'); - expect(await this.token.getPastTotalSupply(t1.timepoint)).to.be.bignumber.equal('10000000000000000000000000'); - expect(await this.token.getPastTotalSupply(t1.timepoint + 1)).to.be.bignumber.equal( - '10000000000000000000000000', - ); - expect(await this.token.getPastTotalSupply(t2.timepoint)).to.be.bignumber.equal('9999999999999999999999990'); - expect(await this.token.getPastTotalSupply(t2.timepoint + 1)).to.be.bignumber.equal( - '9999999999999999999999990', - ); - expect(await this.token.getPastTotalSupply(t3.timepoint)).to.be.bignumber.equal('9999999999999999999999980'); - expect(await this.token.getPastTotalSupply(t3.timepoint + 1)).to.be.bignumber.equal( - '9999999999999999999999980', - ); - expect(await this.token.getPastTotalSupply(t4.timepoint)).to.be.bignumber.equal('10000000000000000000000000'); - expect(await this.token.getPastTotalSupply(t4.timepoint + 1)).to.be.bignumber.equal( - '10000000000000000000000000', - ); + const t1 = await this.token.$_mint(this.holder, supply); + await mine(2); + const t2 = await this.token.$_burn(this.holder, 10n); + await mine(2); + const t3 = await this.token.$_burn(this.holder, 10n); + await mine(2); + const t4 = await this.token.$_mint(this.holder, 20n); + await mine(2); + + t1.timepoint = await time.clockFromReceipt[mode](t1); + t2.timepoint = await time.clockFromReceipt[mode](t2); + t3.timepoint = await time.clockFromReceipt[mode](t3); + t4.timepoint = await time.clockFromReceipt[mode](t4); + + expect(await this.token.getPastTotalSupply(t1.timepoint - 1n)).to.equal(0n); + expect(await this.token.getPastTotalSupply(t1.timepoint)).to.equal(supply); + expect(await this.token.getPastTotalSupply(t1.timepoint + 1n)).to.equal(supply); + expect(await this.token.getPastTotalSupply(t2.timepoint)).to.equal(supply - 10n); + expect(await this.token.getPastTotalSupply(t2.timepoint + 1n)).to.equal(supply - 10n); + expect(await this.token.getPastTotalSupply(t3.timepoint)).to.equal(supply - 20n); + expect(await this.token.getPastTotalSupply(t3.timepoint + 1n)).to.equal(supply - 20n); + expect(await this.token.getPastTotalSupply(t4.timepoint)).to.equal(supply); + expect(await this.token.getPastTotalSupply(t4.timepoint + 1n)).to.equal(supply); }); }); }); diff --git a/test/token/ERC721/extensions/ERC721Votes.test.js b/test/token/ERC721/extensions/ERC721Votes.test.js index ba9a2a8cb..f52e9ca95 100644 --- a/test/token/ERC721/extensions/ERC721Votes.test.js +++ b/test/token/ERC721/extensions/ERC721Votes.test.js @@ -1,181 +1,192 @@ -/* eslint-disable */ - -const { expectEvent, time } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture, mine } = require('@nomicfoundation/hardhat-network-helpers'); -const { clock, clockFromReceipt } = require('../../../helpers/time'); +const { bigint: time } = require('../../../helpers/time'); const { shouldBehaveLikeVotes } = require('../../../governance/utils/Votes.behavior'); -const MODES = { - blocknumber: artifacts.require('$ERC721Votes'), +const TOKENS = [ + { Token: '$ERC721Votes', mode: 'blocknumber' }, // no timestamp mode for ERC721Votes yet -}; +]; + +const name = 'My Vote'; +const symbol = 'MTKN'; +const version = '1'; +const tokens = [ethers.parseEther('10000000'), 10n, 20n, 30n]; + +describe('ERC721Votes', function () { + for (const { Token, mode } of TOKENS) { + const fixture = async () => { + // accounts is required by shouldBehaveLikeVotes + const accounts = await ethers.getSigners(); + const [holder, recipient, other1, other2] = accounts; -contract('ERC721Votes', function (accounts) { - const [account1, account2, other1, other2] = accounts; + const token = await ethers.deployContract(Token, [name, symbol, name, version]); - const name = 'My Vote'; - const symbol = 'MTKN'; - const version = '1'; - const tokens = ['10000000000000000000000000', '10', '20', '30'].map(n => web3.utils.toBN(n)); + return { accounts, holder, recipient, other1, other2, token }; + }; - for (const [mode, artifact] of Object.entries(MODES)) { describe(`vote with ${mode}`, function () { beforeEach(async function () { - this.votes = await artifact.new(name, symbol, name, version); + Object.assign(this, await loadFixture(fixture)); + this.votes = this.token; }); // includes ERC6372 behavior check - shouldBehaveLikeVotes(accounts, tokens, { mode, fungible: false }); + shouldBehaveLikeVotes(tokens, { mode, fungible: false }); describe('balanceOf', function () { beforeEach(async function () { - await this.votes.$_mint(account1, tokens[0]); - await this.votes.$_mint(account1, tokens[1]); - await this.votes.$_mint(account1, tokens[2]); - await this.votes.$_mint(account1, tokens[3]); + await this.votes.$_mint(this.holder, tokens[0]); + await this.votes.$_mint(this.holder, tokens[1]); + await this.votes.$_mint(this.holder, tokens[2]); + await this.votes.$_mint(this.holder, tokens[3]); }); it('grants to initial account', async function () { - expect(await this.votes.balanceOf(account1)).to.be.bignumber.equal('4'); + expect(await this.votes.balanceOf(this.holder)).to.equal(4n); }); }); describe('transfers', function () { beforeEach(async function () { - await this.votes.$_mint(account1, tokens[0]); + await this.votes.$_mint(this.holder, tokens[0]); }); it('no delegation', async function () { - const { receipt } = await this.votes.transferFrom(account1, account2, tokens[0], { from: account1 }); - expectEvent(receipt, 'Transfer', { from: account1, to: account2, tokenId: tokens[0] }); - expectEvent.notEmitted(receipt, 'DelegateVotesChanged'); + await expect(this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0])) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .to.not.emit(this.token, 'DelegateVotesChanged'); - this.account1Votes = '0'; - this.account2Votes = '0'; + this.holderVotes = 0n; + this.recipientVotes = 0n; }); it('sender delegation', async function () { - await this.votes.delegate(account1, { from: account1 }); - - const { receipt } = await this.votes.transferFrom(account1, account2, tokens[0], { from: account1 }); - expectEvent(receipt, 'Transfer', { from: account1, to: account2, tokenId: tokens[0] }); - expectEvent(receipt, 'DelegateVotesChanged', { delegate: account1, previousVotes: '1', newVotes: '0' }); - - const { logIndex: transferLogIndex } = receipt.logs.find(({ event }) => event == 'Transfer'); - expect( - receipt.logs - .filter(({ event }) => event == 'DelegateVotesChanged') - .every(({ logIndex }) => transferLogIndex < logIndex), - ).to.be.equal(true); - - this.account1Votes = '0'; - this.account2Votes = '0'; + await this.votes.connect(this.holder).delegate(this.holder); + + const tx = await this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0]); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.holder.address, 1n, 0n); + + const { logs } = await tx.wait(); + const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); + for (const event of logs.filter(event => event.fragment.name == 'Transfer')) { + expect(event.index).to.lt(index); + } + + this.holderVotes = 0n; + this.recipientVotes = 0n; }); it('receiver delegation', async function () { - await this.votes.delegate(account2, { from: account2 }); - - const { receipt } = await this.votes.transferFrom(account1, account2, tokens[0], { from: account1 }); - expectEvent(receipt, 'Transfer', { from: account1, to: account2, tokenId: tokens[0] }); - expectEvent(receipt, 'DelegateVotesChanged', { delegate: account2, previousVotes: '0', newVotes: '1' }); - - const { logIndex: transferLogIndex } = receipt.logs.find(({ event }) => event == 'Transfer'); - expect( - receipt.logs - .filter(({ event }) => event == 'DelegateVotesChanged') - .every(({ logIndex }) => transferLogIndex < logIndex), - ).to.be.equal(true); - - this.account1Votes = '0'; - this.account2Votes = '1'; + await this.votes.connect(this.recipient).delegate(this.recipient); + + const tx = await this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0]); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.recipient.address, 0n, 1n); + + const { logs } = await tx.wait(); + const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); + for (const event of logs.filter(event => event.fragment.name == 'Transfer')) { + expect(event.index).to.lt(index); + } + + this.holderVotes = 0n; + this.recipientVotes = 1n; }); it('full delegation', async function () { - await this.votes.delegate(account1, { from: account1 }); - await this.votes.delegate(account2, { from: account2 }); - - const { receipt } = await this.votes.transferFrom(account1, account2, tokens[0], { from: account1 }); - expectEvent(receipt, 'Transfer', { from: account1, to: account2, tokenId: tokens[0] }); - expectEvent(receipt, 'DelegateVotesChanged', { delegate: account1, previousVotes: '1', newVotes: '0' }); - expectEvent(receipt, 'DelegateVotesChanged', { delegate: account2, previousVotes: '0', newVotes: '1' }); - - const { logIndex: transferLogIndex } = receipt.logs.find(({ event }) => event == 'Transfer'); - expect( - receipt.logs - .filter(({ event }) => event == 'DelegateVotesChanged') - .every(({ logIndex }) => transferLogIndex < logIndex), - ).to.be.equal(true); - - this.account1Votes = '0'; - this.account2Votes = '1'; + await this.votes.connect(this.holder).delegate(this.holder); + await this.votes.connect(this.recipient).delegate(this.recipient); + + const tx = await this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0]); + await expect(tx) + .to.emit(this.token, 'Transfer') + .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.holder.address, 1n, 0n) + .to.emit(this.token, 'DelegateVotesChanged') + .withArgs(this.recipient.address, 0n, 1n); + + const { logs } = await tx.wait(); + const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); + for (const event of logs.filter(event => event.fragment.name == 'Transfer')) { + expect(event.index).to.lt(index); + } + + this.holderVotes = 0; + this.recipientVotes = 1n; }); it('returns the same total supply on transfers', async function () { - await this.votes.delegate(account1, { from: account1 }); + await this.votes.connect(this.holder).delegate(this.holder); - const { receipt } = await this.votes.transferFrom(account1, account2, tokens[0], { from: account1 }); - const timepoint = await clockFromReceipt[mode](receipt); + const tx = await this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0]); + const timepoint = await time.clockFromReceipt[mode](tx); - await time.advanceBlock(); - await time.advanceBlock(); + await mine(2); - expect(await this.votes.getPastTotalSupply(timepoint - 1)).to.be.bignumber.equal('1'); - expect(await this.votes.getPastTotalSupply(timepoint + 1)).to.be.bignumber.equal('1'); + expect(await this.votes.getPastTotalSupply(timepoint - 1n)).to.equal(1n); + expect(await this.votes.getPastTotalSupply(timepoint + 1n)).to.equal(1n); - this.account1Votes = '0'; - this.account2Votes = '0'; + this.holderVotes = 0n; + this.recipientVotes = 0n; }); it('generally returns the voting balance at the appropriate checkpoint', async function () { - await this.votes.$_mint(account1, tokens[1]); - await this.votes.$_mint(account1, tokens[2]); - await this.votes.$_mint(account1, tokens[3]); - - const total = await this.votes.balanceOf(account1); - - const t1 = await this.votes.delegate(other1, { from: account1 }); - await time.advanceBlock(); - await time.advanceBlock(); - const t2 = await this.votes.transferFrom(account1, other2, tokens[0], { from: account1 }); - await time.advanceBlock(); - await time.advanceBlock(); - const t3 = await this.votes.transferFrom(account1, other2, tokens[2], { from: account1 }); - await time.advanceBlock(); - await time.advanceBlock(); - const t4 = await this.votes.transferFrom(other2, account1, tokens[2], { from: other2 }); - await time.advanceBlock(); - await time.advanceBlock(); - - t1.timepoint = await clockFromReceipt[mode](t1.receipt); - t2.timepoint = await clockFromReceipt[mode](t2.receipt); - t3.timepoint = await clockFromReceipt[mode](t3.receipt); - t4.timepoint = await clockFromReceipt[mode](t4.receipt); - - expect(await this.votes.getPastVotes(other1, t1.timepoint - 1)).to.be.bignumber.equal('0'); - expect(await this.votes.getPastVotes(other1, t1.timepoint)).to.be.bignumber.equal(total); - expect(await this.votes.getPastVotes(other1, t1.timepoint + 1)).to.be.bignumber.equal(total); - expect(await this.votes.getPastVotes(other1, t2.timepoint)).to.be.bignumber.equal('3'); - expect(await this.votes.getPastVotes(other1, t2.timepoint + 1)).to.be.bignumber.equal('3'); - expect(await this.votes.getPastVotes(other1, t3.timepoint)).to.be.bignumber.equal('2'); - expect(await this.votes.getPastVotes(other1, t3.timepoint + 1)).to.be.bignumber.equal('2'); - expect(await this.votes.getPastVotes(other1, t4.timepoint)).to.be.bignumber.equal('3'); - expect(await this.votes.getPastVotes(other1, t4.timepoint + 1)).to.be.bignumber.equal('3'); - - this.account1Votes = '0'; - this.account2Votes = '0'; + await this.votes.$_mint(this.holder, tokens[1]); + await this.votes.$_mint(this.holder, tokens[2]); + await this.votes.$_mint(this.holder, tokens[3]); + + const total = await this.votes.balanceOf(this.holder); + + const t1 = await this.votes.connect(this.holder).delegate(this.other1); + await mine(2); + const t2 = await this.votes.connect(this.holder).transferFrom(this.holder, this.other2, tokens[0]); + await mine(2); + const t3 = await this.votes.connect(this.holder).transferFrom(this.holder, this.other2, tokens[2]); + await mine(2); + const t4 = await this.votes.connect(this.other2).transferFrom(this.other2, this.holder, tokens[2]); + await mine(2); + + t1.timepoint = await time.clockFromReceipt[mode](t1); + t2.timepoint = await time.clockFromReceipt[mode](t2); + t3.timepoint = await time.clockFromReceipt[mode](t3); + t4.timepoint = await time.clockFromReceipt[mode](t4); + + expect(await this.votes.getPastVotes(this.other1, t1.timepoint - 1n)).to.equal(0n); + expect(await this.votes.getPastVotes(this.other1, t1.timepoint)).to.equal(total); + expect(await this.votes.getPastVotes(this.other1, t1.timepoint + 1n)).to.equal(total); + expect(await this.votes.getPastVotes(this.other1, t2.timepoint)).to.equal(3n); + expect(await this.votes.getPastVotes(this.other1, t2.timepoint + 1n)).to.equal(3n); + expect(await this.votes.getPastVotes(this.other1, t3.timepoint)).to.equal(2n); + expect(await this.votes.getPastVotes(this.other1, t3.timepoint + 1n)).to.equal(2n); + expect(await this.votes.getPastVotes(this.other1, t4.timepoint)).to.equal('3'); + expect(await this.votes.getPastVotes(this.other1, t4.timepoint + 1n)).to.equal(3n); + + this.holderVotes = 0n; + this.recipientVotes = 0n; }); afterEach(async function () { - expect(await this.votes.getVotes(account1)).to.be.bignumber.equal(this.account1Votes); - expect(await this.votes.getVotes(account2)).to.be.bignumber.equal(this.account2Votes); + expect(await this.votes.getVotes(this.holder)).to.equal(this.holderVotes); + expect(await this.votes.getVotes(this.recipient)).to.equal(this.recipientVotes); // need to advance 2 blocks to see the effect of a transfer on "getPastVotes" - const timepoint = await clock[mode](); - await time.advanceBlock(); - expect(await this.votes.getPastVotes(account1, timepoint)).to.be.bignumber.equal(this.account1Votes); - expect(await this.votes.getPastVotes(account2, timepoint)).to.be.bignumber.equal(this.account2Votes); + const timepoint = await time.clock[mode](); + await mine(); + expect(await this.votes.getPastVotes(this.holder, timepoint)).to.equal(this.holderVotes); + expect(await this.votes.getPastVotes(this.recipient, timepoint)).to.equal(this.recipientVotes); }); }); }); From 5bca2119ca634a0f7df4e2c3abf468e90c614119 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 19 Dec 2023 02:28:16 +0100 Subject: [PATCH 140/167] Migrate ERC165 tests (#4794) --- test/helpers/methods.js | 11 +- test/utils/introspection/ERC165.test.js | 11 +- .../utils/introspection/ERC165Checker.test.js | 219 +++++++----------- .../SupportsInterface.behavior.js | 26 +-- 4 files changed, 111 insertions(+), 156 deletions(-) diff --git a/test/helpers/methods.js b/test/helpers/methods.js index 94f01cff0..a49189720 100644 --- a/test/helpers/methods.js +++ b/test/helpers/methods.js @@ -1,5 +1,14 @@ const { ethers } = require('hardhat'); +const selector = signature => ethers.FunctionFragment.from(signature).selector; + +const interfaceId = signatures => + ethers.toBeHex( + signatures.reduce((acc, signature) => acc ^ ethers.toBigInt(selector(signature)), 0n), + 4, + ); + module.exports = { - selector: signature => ethers.FunctionFragment.from(signature).selector, + selector, + interfaceId, }; diff --git a/test/utils/introspection/ERC165.test.js b/test/utils/introspection/ERC165.test.js index 6d531c16d..d72791218 100644 --- a/test/utils/introspection/ERC165.test.js +++ b/test/utils/introspection/ERC165.test.js @@ -1,10 +1,17 @@ +const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { shouldSupportInterfaces } = require('./SupportsInterface.behavior'); -const ERC165 = artifacts.require('$ERC165'); +async function fixture() { + return { + mock: await ethers.deployContract('$ERC165'), + }; +} contract('ERC165', function () { beforeEach(async function () { - this.mock = await ERC165.new(); + Object.assign(this, await loadFixture(fixture)); }); shouldSupportInterfaces(['ERC165']); diff --git a/test/utils/introspection/ERC165Checker.test.js b/test/utils/introspection/ERC165Checker.test.js index caa220127..1bbe8a571 100644 --- a/test/utils/introspection/ERC165Checker.test.js +++ b/test/utils/introspection/ERC165Checker.test.js @@ -1,13 +1,6 @@ -require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); - -const ERC165Checker = artifacts.require('$ERC165Checker'); -const ERC165MissingData = artifacts.require('ERC165MissingData'); -const ERC165MaliciousData = artifacts.require('ERC165MaliciousData'); -const ERC165NotSupported = artifacts.require('ERC165NotSupported'); -const ERC165InterfacesSupported = artifacts.require('ERC165InterfacesSupported'); -const ERC165ReturnBombMock = artifacts.require('ERC165ReturnBombMock'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const DUMMY_ID = '0xdeadbeef'; const DUMMY_ID_2 = '0xcafebabe'; @@ -16,285 +9,237 @@ const DUMMY_UNSUPPORTED_ID = '0xbaddcafe'; const DUMMY_UNSUPPORTED_ID_2 = '0xbaadcafe'; const DUMMY_ACCOUNT = '0x1111111111111111111111111111111111111111'; -contract('ERC165Checker', function () { +async function fixture() { + return { mock: await ethers.deployContract('$ERC165Checker') }; +} + +describe('ERC165Checker', function () { beforeEach(async function () { - this.mock = await ERC165Checker.new(); + Object.assign(this, await loadFixture(fixture)); }); - context('ERC165 missing return data', function () { - beforeEach(async function () { - this.target = await ERC165MissingData.new(); + describe('ERC165 missing return data', function () { + before(async function () { + this.target = await ethers.deployContract('ERC165MissingData'); }); it('does not support ERC165', async function () { - const supported = await this.mock.$supportsERC165(this.target.address); - expect(supported).to.equal(false); + expect(await this.mock.$supportsERC165(this.target)).to.be.false; }); it('does not support mock interface via supportsInterface', async function () { - const supported = await this.mock.$supportsInterface(this.target.address, DUMMY_ID); - expect(supported).to.equal(false); + expect(await this.mock.$supportsInterface(this.target, DUMMY_ID)).to.be.false; }); it('does not support mock interface via supportsAllInterfaces', async function () { - const supported = await this.mock.$supportsAllInterfaces(this.target.address, [DUMMY_ID]); - expect(supported).to.equal(false); + expect(await this.mock.$supportsAllInterfaces(this.target, [DUMMY_ID])).to.be.false; }); it('does not support mock interface via getSupportedInterfaces', async function () { - const supported = await this.mock.$getSupportedInterfaces(this.target.address, [DUMMY_ID]); - expect(supported.length).to.equal(1); - expect(supported[0]).to.equal(false); + expect(await this.mock.$getSupportedInterfaces(this.target, [DUMMY_ID])).to.deep.equal([false]); }); it('does not support mock interface via supportsERC165InterfaceUnchecked', async function () { - const supported = await this.mock.$supportsERC165InterfaceUnchecked(this.target.address, DUMMY_ID); - expect(supported).to.equal(false); + expect(await this.mock.$supportsERC165InterfaceUnchecked(this.target, DUMMY_ID)).to.be.false; }); }); - context('ERC165 malicious return data', function () { + describe('ERC165 malicious return data', function () { beforeEach(async function () { - this.target = await ERC165MaliciousData.new(); + this.target = await ethers.deployContract('ERC165MaliciousData'); }); it('does not support ERC165', async function () { - const supported = await this.mock.$supportsERC165(this.target.address); - expect(supported).to.equal(false); + expect(await this.mock.$supportsERC165(this.target)).to.be.false; }); it('does not support mock interface via supportsInterface', async function () { - const supported = await this.mock.$supportsInterface(this.target.address, DUMMY_ID); - expect(supported).to.equal(false); + expect(await this.mock.$supportsInterface(this.target, DUMMY_ID)).to.be.false; }); it('does not support mock interface via supportsAllInterfaces', async function () { - const supported = await this.mock.$supportsAllInterfaces(this.target.address, [DUMMY_ID]); - expect(supported).to.equal(false); + expect(await this.mock.$supportsAllInterfaces(this.target, [DUMMY_ID])).to.be.false; }); it('does not support mock interface via getSupportedInterfaces', async function () { - const supported = await this.mock.$getSupportedInterfaces(this.target.address, [DUMMY_ID]); - expect(supported.length).to.equal(1); - expect(supported[0]).to.equal(false); + expect(await this.mock.$getSupportedInterfaces(this.target, [DUMMY_ID])).to.deep.equal([false]); }); it('does not support mock interface via supportsERC165InterfaceUnchecked', async function () { - const supported = await this.mock.$supportsERC165InterfaceUnchecked(this.target.address, DUMMY_ID); - expect(supported).to.equal(true); + expect(await this.mock.$supportsERC165InterfaceUnchecked(this.target, DUMMY_ID)).to.be.true; }); }); - context('ERC165 not supported', function () { + describe('ERC165 not supported', function () { beforeEach(async function () { - this.target = await ERC165NotSupported.new(); + this.target = await ethers.deployContract('ERC165NotSupported'); }); it('does not support ERC165', async function () { - const supported = await this.mock.$supportsERC165(this.target.address); - expect(supported).to.equal(false); + expect(await this.mock.$supportsERC165(this.target)).to.be.false; }); it('does not support mock interface via supportsInterface', async function () { - const supported = await this.mock.$supportsInterface(this.target.address, DUMMY_ID); - expect(supported).to.equal(false); + expect(await this.mock.$supportsInterface(this.target, DUMMY_ID)).to.be.false; }); it('does not support mock interface via supportsAllInterfaces', async function () { - const supported = await this.mock.$supportsAllInterfaces(this.target.address, [DUMMY_ID]); - expect(supported).to.equal(false); + expect(await this.mock.$supportsAllInterfaces(this.target, [DUMMY_ID])).to.be.false; }); it('does not support mock interface via getSupportedInterfaces', async function () { - const supported = await this.mock.$getSupportedInterfaces(this.target.address, [DUMMY_ID]); - expect(supported.length).to.equal(1); - expect(supported[0]).to.equal(false); + expect(await this.mock.$getSupportedInterfaces(this.target, [DUMMY_ID])).to.deep.equal([false]); }); it('does not support mock interface via supportsERC165InterfaceUnchecked', async function () { - const supported = await this.mock.$supportsERC165InterfaceUnchecked(this.target.address, DUMMY_ID); - expect(supported).to.equal(false); + expect(await this.mock.$supportsERC165InterfaceUnchecked(this.target, DUMMY_ID)).to.be.false; }); }); - context('ERC165 supported', function () { + describe('ERC165 supported', function () { beforeEach(async function () { - this.target = await ERC165InterfacesSupported.new([]); + this.target = await ethers.deployContract('ERC165InterfacesSupported', [[]]); }); it('supports ERC165', async function () { - const supported = await this.mock.$supportsERC165(this.target.address); - expect(supported).to.equal(true); + expect(await this.mock.$supportsERC165(this.target)).to.be.true; }); it('does not support mock interface via supportsInterface', async function () { - const supported = await this.mock.$supportsInterface(this.target.address, DUMMY_ID); - expect(supported).to.equal(false); + expect(await this.mock.$supportsInterface(this.target, DUMMY_ID)).to.be.false; }); it('does not support mock interface via supportsAllInterfaces', async function () { - const supported = await this.mock.$supportsAllInterfaces(this.target.address, [DUMMY_ID]); - expect(supported).to.equal(false); + expect(await this.mock.$supportsAllInterfaces(this.target, [DUMMY_ID])).to.be.false; }); it('does not support mock interface via getSupportedInterfaces', async function () { - const supported = await this.mock.$getSupportedInterfaces(this.target.address, [DUMMY_ID]); - expect(supported.length).to.equal(1); - expect(supported[0]).to.equal(false); + expect(await this.mock.$getSupportedInterfaces(this.target, [DUMMY_ID])).to.deep.equal([false]); }); it('does not support mock interface via supportsERC165InterfaceUnchecked', async function () { - const supported = await this.mock.$supportsERC165InterfaceUnchecked(this.target.address, DUMMY_ID); - expect(supported).to.equal(false); + expect(await this.mock.$supportsERC165InterfaceUnchecked(this.target, DUMMY_ID)).to.be.false; }); }); - context('ERC165 and single interface supported', function () { + describe('ERC165 and single interface supported', function () { beforeEach(async function () { - this.target = await ERC165InterfacesSupported.new([DUMMY_ID]); + this.target = await ethers.deployContract('ERC165InterfacesSupported', [[DUMMY_ID]]); }); it('supports ERC165', async function () { - const supported = await this.mock.$supportsERC165(this.target.address); - expect(supported).to.equal(true); + expect(await this.mock.$supportsERC165(this.target)).to.be.true; }); it('supports mock interface via supportsInterface', async function () { - const supported = await this.mock.$supportsInterface(this.target.address, DUMMY_ID); - expect(supported).to.equal(true); + expect(await this.mock.$supportsInterface(this.target, DUMMY_ID)).to.be.true; }); it('supports mock interface via supportsAllInterfaces', async function () { - const supported = await this.mock.$supportsAllInterfaces(this.target.address, [DUMMY_ID]); - expect(supported).to.equal(true); + expect(await this.mock.$supportsAllInterfaces(this.target, [DUMMY_ID])).to.be.true; }); it('supports mock interface via getSupportedInterfaces', async function () { - const supported = await this.mock.$getSupportedInterfaces(this.target.address, [DUMMY_ID]); - expect(supported.length).to.equal(1); - expect(supported[0]).to.equal(true); + expect(await this.mock.$getSupportedInterfaces(this.target, [DUMMY_ID])).to.deep.equal([true]); }); it('supports mock interface via supportsERC165InterfaceUnchecked', async function () { - const supported = await this.mock.$supportsERC165InterfaceUnchecked(this.target.address, DUMMY_ID); - expect(supported).to.equal(true); + expect(await this.mock.$supportsERC165InterfaceUnchecked(this.target, DUMMY_ID)).to.be.true; }); }); - context('ERC165 and many interfaces supported', function () { + describe('ERC165 and many interfaces supported', function () { + const supportedInterfaces = [DUMMY_ID, DUMMY_ID_2, DUMMY_ID_3]; beforeEach(async function () { - this.supportedInterfaces = [DUMMY_ID, DUMMY_ID_2, DUMMY_ID_3]; - this.target = await ERC165InterfacesSupported.new(this.supportedInterfaces); + this.target = await ethers.deployContract('ERC165InterfacesSupported', [supportedInterfaces]); }); it('supports ERC165', async function () { - const supported = await this.mock.$supportsERC165(this.target.address); - expect(supported).to.equal(true); + expect(await this.mock.$supportsERC165(this.target)).to.be.true; }); it('supports each interfaceId via supportsInterface', async function () { - for (const interfaceId of this.supportedInterfaces) { - const supported = await this.mock.$supportsInterface(this.target.address, interfaceId); - expect(supported).to.equal(true); + for (const interfaceId of supportedInterfaces) { + expect(await this.mock.$supportsInterface(this.target, interfaceId)).to.be.true; } }); it('supports all interfaceIds via supportsAllInterfaces', async function () { - const supported = await this.mock.$supportsAllInterfaces(this.target.address, this.supportedInterfaces); - expect(supported).to.equal(true); + expect(await this.mock.$supportsAllInterfaces(this.target, supportedInterfaces)).to.be.true; }); it('supports none of the interfaces queried via supportsAllInterfaces', async function () { const interfaceIdsToTest = [DUMMY_UNSUPPORTED_ID, DUMMY_UNSUPPORTED_ID_2]; - const supported = await this.mock.$supportsAllInterfaces(this.target.address, interfaceIdsToTest); - expect(supported).to.equal(false); + expect(await this.mock.$supportsAllInterfaces(this.target, interfaceIdsToTest)).to.be.false; }); it('supports not all of the interfaces queried via supportsAllInterfaces', async function () { - const interfaceIdsToTest = [...this.supportedInterfaces, DUMMY_UNSUPPORTED_ID]; - - const supported = await this.mock.$supportsAllInterfaces(this.target.address, interfaceIdsToTest); - expect(supported).to.equal(false); + const interfaceIdsToTest = [...supportedInterfaces, DUMMY_UNSUPPORTED_ID]; + expect(await this.mock.$supportsAllInterfaces(this.target, interfaceIdsToTest)).to.be.false; }); it('supports all interfaceIds via getSupportedInterfaces', async function () { - const supported = await this.mock.$getSupportedInterfaces(this.target.address, this.supportedInterfaces); - expect(supported.length).to.equal(3); - expect(supported[0]).to.equal(true); - expect(supported[1]).to.equal(true); - expect(supported[2]).to.equal(true); + expect(await this.mock.$getSupportedInterfaces(this.target, supportedInterfaces)).to.deep.equal( + supportedInterfaces.map(i => supportedInterfaces.includes(i)), + ); }); it('supports none of the interfaces queried via getSupportedInterfaces', async function () { const interfaceIdsToTest = [DUMMY_UNSUPPORTED_ID, DUMMY_UNSUPPORTED_ID_2]; - const supported = await this.mock.$getSupportedInterfaces(this.target.address, interfaceIdsToTest); - expect(supported.length).to.equal(2); - expect(supported[0]).to.equal(false); - expect(supported[1]).to.equal(false); + expect(await this.mock.$getSupportedInterfaces(this.target, interfaceIdsToTest)).to.deep.equal( + interfaceIdsToTest.map(i => supportedInterfaces.includes(i)), + ); }); it('supports not all of the interfaces queried via getSupportedInterfaces', async function () { - const interfaceIdsToTest = [...this.supportedInterfaces, DUMMY_UNSUPPORTED_ID]; + const interfaceIdsToTest = [...supportedInterfaces, DUMMY_UNSUPPORTED_ID]; - const supported = await this.mock.$getSupportedInterfaces(this.target.address, interfaceIdsToTest); - expect(supported.length).to.equal(4); - expect(supported[0]).to.equal(true); - expect(supported[1]).to.equal(true); - expect(supported[2]).to.equal(true); - expect(supported[3]).to.equal(false); + expect(await this.mock.$getSupportedInterfaces(this.target, interfaceIdsToTest)).to.deep.equal( + interfaceIdsToTest.map(i => supportedInterfaces.includes(i)), + ); }); it('supports each interfaceId via supportsERC165InterfaceUnchecked', async function () { - for (const interfaceId of this.supportedInterfaces) { - const supported = await this.mock.$supportsERC165InterfaceUnchecked(this.target.address, interfaceId); - expect(supported).to.equal(true); + for (const interfaceId of supportedInterfaces) { + expect(await this.mock.$supportsERC165InterfaceUnchecked(this.target, interfaceId)).to.be.true; } }); }); - context('account address does not support ERC165', function () { + describe('account address does not support ERC165', function () { it('does not support ERC165', async function () { - const supported = await this.mock.$supportsERC165(DUMMY_ACCOUNT); - expect(supported).to.equal(false); + expect(await this.mock.$supportsERC165(DUMMY_ACCOUNT)).to.be.false; }); it('does not support mock interface via supportsInterface', async function () { - const supported = await this.mock.$supportsInterface(DUMMY_ACCOUNT, DUMMY_ID); - expect(supported).to.equal(false); + expect(await this.mock.$supportsInterface(DUMMY_ACCOUNT, DUMMY_ID)).to.be.false; }); it('does not support mock interface via supportsAllInterfaces', async function () { - const supported = await this.mock.$supportsAllInterfaces(DUMMY_ACCOUNT, [DUMMY_ID]); - expect(supported).to.equal(false); + expect(await this.mock.$supportsAllInterfaces(DUMMY_ACCOUNT, [DUMMY_ID])).to.be.false; }); it('does not support mock interface via getSupportedInterfaces', async function () { - const supported = await this.mock.$getSupportedInterfaces(DUMMY_ACCOUNT, [DUMMY_ID]); - expect(supported.length).to.equal(1); - expect(supported[0]).to.equal(false); + expect(await this.mock.$getSupportedInterfaces(DUMMY_ACCOUNT, [DUMMY_ID])).to.deep.equal([false]); }); it('does not support mock interface via supportsERC165InterfaceUnchecked', async function () { - const supported = await this.mock.$supportsERC165InterfaceUnchecked(DUMMY_ACCOUNT, DUMMY_ID); - expect(supported).to.equal(false); + expect(await this.mock.$supportsERC165InterfaceUnchecked(DUMMY_ACCOUNT, DUMMY_ID)).to.be.false; }); }); it('Return bomb resistance', async function () { - this.target = await ERC165ReturnBombMock.new(); - - const tx1 = await this.mock.$supportsInterface.sendTransaction(this.target.address, DUMMY_ID); - expect(tx1.receipt.gasUsed).to.be.lessThan(120000); // 3*30k + 21k + some margin - - const tx2 = await this.mock.$getSupportedInterfaces.sendTransaction(this.target.address, [ - DUMMY_ID, - DUMMY_ID_2, - DUMMY_ID_3, - DUMMY_UNSUPPORTED_ID, - DUMMY_UNSUPPORTED_ID_2, - ]); - expect(tx2.receipt.gasUsed).to.be.lessThan(250000); // (2+5)*30k + 21k + some margin + this.target = await ethers.deployContract('ERC165ReturnBombMock'); + + const { gasUsed: gasUsed1 } = await this.mock.$supportsInterface.send(this.target, DUMMY_ID).then(tx => tx.wait()); + expect(gasUsed1).to.be.lessThan(120_000n); // 3*30k + 21k + some margin + + const { gasUsed: gasUsed2 } = await this.mock.$getSupportedInterfaces + .send(this.target, [DUMMY_ID, DUMMY_ID_2, DUMMY_ID_3, DUMMY_UNSUPPORTED_ID, DUMMY_UNSUPPORTED_ID_2]) + .then(tx => tx.wait()); + + expect(gasUsed2).to.be.lessThan(250_000n); // (2+5)*30k + 21k + some margin }); }); diff --git a/test/utils/introspection/SupportsInterface.behavior.js b/test/utils/introspection/SupportsInterface.behavior.js index 243dfb5d6..7a6df2c14 100644 --- a/test/utils/introspection/SupportsInterface.behavior.js +++ b/test/utils/introspection/SupportsInterface.behavior.js @@ -1,6 +1,6 @@ -const { ethers } = require('ethers'); const { expect } = require('chai'); -const { selector } = require('../../helpers/methods'); +const { selector, interfaceId } = require('../../helpers/methods'); +const { mapValues } = require('../../helpers/iterate'); const INVALID_ID = '0xffffffff'; const SIGNATURES = { @@ -81,15 +81,7 @@ const SIGNATURES = { ERC2981: ['royaltyInfo(uint256,uint256)'], }; -const INTERFACE_IDS = Object.fromEntries( - Object.entries(SIGNATURES).map(([name, signatures]) => [ - name, - ethers.toBeHex( - signatures.reduce((id, fnSig) => id ^ BigInt(selector(fnSig)), 0n), - 4, - ), - ]), -); +const INTERFACE_IDS = mapValues(SIGNATURES, interfaceId); function shouldSupportInterfaces(interfaces = []) { describe('ERC165', function () { @@ -101,25 +93,25 @@ function shouldSupportInterfaces(interfaces = []) { it('uses less than 30k gas', async function () { for (const k of interfaces) { const interface = INTERFACE_IDS[k] ?? k; - expect(await this.contractUnderTest.supportsInterface.estimateGas(interface)).to.be.lte(30000); + expect(await this.contractUnderTest.supportsInterface.estimateGas(interface)).to.lte(30_000n); } }); it('returns true', async function () { for (const k of interfaces) { const interfaceId = INTERFACE_IDS[k] ?? k; - expect(await this.contractUnderTest.supportsInterface(interfaceId)).to.equal(true, `does not support ${k}`); + expect(await this.contractUnderTest.supportsInterface(interfaceId), `does not support ${k}`).to.be.true; } }); }); describe('when the interfaceId is not supported', function () { it('uses less than 30k', async function () { - expect(await this.contractUnderTest.supportsInterface.estimateGas(INVALID_ID)).to.be.lte(30000); + expect(await this.contractUnderTest.supportsInterface.estimateGas(INVALID_ID)).to.lte(30_000n); }); it('returns false', async function () { - expect(await this.contractUnderTest.supportsInterface(INVALID_ID)).to.be.equal(false, `supports ${INVALID_ID}`); + expect(await this.contractUnderTest.supportsInterface(INVALID_ID), `supports ${INVALID_ID}`).to.be.false; }); }); @@ -127,6 +119,8 @@ function shouldSupportInterfaces(interfaces = []) { for (const k of interfaces) { // skip interfaces for which we don't have a function list if (SIGNATURES[k] === undefined) continue; + + // Check the presence of each function in the contract's interface for (const fnSig of SIGNATURES[k]) { // TODO: Remove Truffle case when ethersjs migration is done if (this.contractUnderTest.abi) { @@ -137,7 +131,7 @@ function shouldSupportInterfaces(interfaces = []) { ); } - expect(!!this.contractUnderTest.interface.getFunction(fnSig), `did not find ${fnSig}`).to.be.true; + expect(this.contractUnderTest.interface.hasFunction(fnSig), `did not find ${fnSig}`).to.be.true; } } }); From 44965d7779f89cc97b8dbc6e473d3931ecd9e4b2 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 19 Dec 2023 10:00:16 +0100 Subject: [PATCH 141/167] Migrate SafeERC20.test.js (#4798) Co-authored-by: ernestognw --- test/token/ERC20/utils/SafeERC20.test.js | 206 +++++++++++------------ 1 file changed, 98 insertions(+), 108 deletions(-) diff --git a/test/token/ERC20/utils/SafeERC20.test.js b/test/token/ERC20/utils/SafeERC20.test.js index 4ff27f14d..e710a3241 100644 --- a/test/token/ERC20/utils/SafeERC20.test.js +++ b/test/token/ERC20/utils/SafeERC20.test.js @@ -1,239 +1,229 @@ -const { constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); - -const SafeERC20 = artifacts.require('$SafeERC20'); -const ERC20ReturnFalseMock = artifacts.require('$ERC20ReturnFalseMock'); -const ERC20ReturnTrueMock = artifacts.require('$ERC20'); // default implementation returns true -const ERC20NoReturnMock = artifacts.require('$ERC20NoReturnMock'); -const ERC20ForceApproveMock = artifacts.require('$ERC20ForceApproveMock'); - -const { expectRevertCustomError } = require('../../../helpers/customError'); +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const name = 'ERC20Mock'; const symbol = 'ERC20Mock'; -contract('SafeERC20', function (accounts) { - const [hasNoCode, receiver, spender] = accounts; +async function fixture() { + const [hasNoCode, owner, receiver, spender] = await ethers.getSigners(); + + const mock = await ethers.deployContract('$SafeERC20'); + const erc20ReturnFalseMock = await ethers.deployContract('$ERC20ReturnFalseMock', [name, symbol]); + const erc20ReturnTrueMock = await ethers.deployContract('$ERC20', [name, symbol]); // default implementation returns true + const erc20NoReturnMock = await ethers.deployContract('$ERC20NoReturnMock', [name, symbol]); + const erc20ForceApproveMock = await ethers.deployContract('$ERC20ForceApproveMock', [name, symbol]); + + return { + hasNoCode, + owner, + receiver, + spender, + mock, + erc20ReturnFalseMock, + erc20ReturnTrueMock, + erc20NoReturnMock, + erc20ForceApproveMock, + }; +} +describe('SafeERC20', function () { before(async function () { - this.mock = await SafeERC20.new(); + Object.assign(this, await loadFixture(fixture)); }); describe('with address that has no contract code', function () { beforeEach(async function () { - this.token = { address: hasNoCode }; + this.token = this.hasNoCode; }); it('reverts on transfer', async function () { - await expectRevertCustomError(this.mock.$safeTransfer(this.token.address, receiver, 0), 'AddressEmptyCode', [ - this.token.address, - ]); + await expect(this.mock.$safeTransfer(this.token, this.receiver, 0n)) + .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') + .withArgs(this.token.address); }); it('reverts on transferFrom', async function () { - await expectRevertCustomError( - this.mock.$safeTransferFrom(this.token.address, this.mock.address, receiver, 0), - 'AddressEmptyCode', - [this.token.address], - ); + await expect(this.mock.$safeTransferFrom(this.token, this.mock, this.receiver, 0n)) + .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') + .withArgs(this.token.address); }); it('reverts on increaseAllowance', async function () { // Call to 'token.allowance' does not return any data, resulting in a decoding error (revert without reason) - await expectRevert.unspecified(this.mock.$safeIncreaseAllowance(this.token.address, spender, 0)); + await expect(this.mock.$safeIncreaseAllowance(this.token, this.spender, 0n)).to.be.revertedWithoutReason(); }); it('reverts on decreaseAllowance', async function () { // Call to 'token.allowance' does not return any data, resulting in a decoding error (revert without reason) - await expectRevert.unspecified(this.mock.$safeDecreaseAllowance(this.token.address, spender, 0)); + await expect(this.mock.$safeDecreaseAllowance(this.token, this.spender, 0n)).to.be.revertedWithoutReason(); }); it('reverts on forceApprove', async function () { - await expectRevertCustomError(this.mock.$forceApprove(this.token.address, spender, 0), 'AddressEmptyCode', [ - this.token.address, - ]); + await expect(this.mock.$forceApprove(this.token, this.spender, 0n)) + .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') + .withArgs(this.token.address); }); }); describe('with token that returns false on all calls', function () { beforeEach(async function () { - this.token = await ERC20ReturnFalseMock.new(name, symbol); + this.token = this.erc20ReturnFalseMock; }); it('reverts on transfer', async function () { - await expectRevertCustomError( - this.mock.$safeTransfer(this.token.address, receiver, 0), - 'SafeERC20FailedOperation', - [this.token.address], - ); + await expect(this.mock.$safeTransfer(this.token, this.receiver, 0n)) + .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') + .withArgs(this.token.target); }); it('reverts on transferFrom', async function () { - await expectRevertCustomError( - this.mock.$safeTransferFrom(this.token.address, this.mock.address, receiver, 0), - 'SafeERC20FailedOperation', - [this.token.address], - ); + await expect(this.mock.$safeTransferFrom(this.token, this.mock, this.receiver, 0n)) + .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') + .withArgs(this.token.target); }); it('reverts on increaseAllowance', async function () { - await expectRevertCustomError( - this.mock.$safeIncreaseAllowance(this.token.address, spender, 0), - 'SafeERC20FailedOperation', - [this.token.address], - ); + await expect(this.mock.$safeIncreaseAllowance(this.token, this.spender, 0n)) + .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') + .withArgs(this.token.target); }); it('reverts on decreaseAllowance', async function () { - await expectRevertCustomError( - this.mock.$safeDecreaseAllowance(this.token.address, spender, 0), - 'SafeERC20FailedOperation', - [this.token.address], - ); + await expect(this.mock.$safeDecreaseAllowance(this.token, this.spender, 0n)) + .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') + .withArgs(this.token.target); }); it('reverts on forceApprove', async function () { - await expectRevertCustomError( - this.mock.$forceApprove(this.token.address, spender, 0), - 'SafeERC20FailedOperation', - [this.token.address], - ); + await expect(this.mock.$forceApprove(this.token, this.spender, 0n)) + .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') + .withArgs(this.token.target); }); }); describe('with token that returns true on all calls', function () { beforeEach(async function () { - this.token = await ERC20ReturnTrueMock.new(name, symbol); + this.token = this.erc20ReturnTrueMock; }); - shouldOnlyRevertOnErrors(accounts); + shouldOnlyRevertOnErrors(); }); describe('with token that returns no boolean values', function () { beforeEach(async function () { - this.token = await ERC20NoReturnMock.new(name, symbol); + this.token = this.erc20NoReturnMock; }); - shouldOnlyRevertOnErrors(accounts); + shouldOnlyRevertOnErrors(); }); describe('with usdt approval beaviour', function () { - const spender = hasNoCode; - beforeEach(async function () { - this.token = await ERC20ForceApproveMock.new(name, symbol); + this.token = this.erc20ForceApproveMock; }); describe('with initial approval', function () { beforeEach(async function () { - await this.token.$_approve(this.mock.address, spender, 100); + await this.token.$_approve(this.mock, this.spender, 100n); }); it('safeIncreaseAllowance works', async function () { - await this.mock.$safeIncreaseAllowance(this.token.address, spender, 10); - expect(this.token.allowance(this.mock.address, spender, 90)); + await this.mock.$safeIncreaseAllowance(this.token, this.spender, 10n); + expect(await this.token.allowance(this.mock, this.spender)).to.equal(110n); }); it('safeDecreaseAllowance works', async function () { - await this.mock.$safeDecreaseAllowance(this.token.address, spender, 10); - expect(this.token.allowance(this.mock.address, spender, 110)); + await this.mock.$safeDecreaseAllowance(this.token, this.spender, 10n); + expect(await this.token.allowance(this.mock, this.spender)).to.equal(90n); }); it('forceApprove works', async function () { - await this.mock.$forceApprove(this.token.address, spender, 200); - expect(this.token.allowance(this.mock.address, spender, 200)); + await this.mock.$forceApprove(this.token, this.spender, 200n); + expect(await this.token.allowance(this.mock, this.spender)).to.equal(200n); }); }); }); }); -function shouldOnlyRevertOnErrors([owner, receiver, spender]) { +function shouldOnlyRevertOnErrors() { describe('transfers', function () { beforeEach(async function () { - await this.token.$_mint(owner, 100); - await this.token.$_mint(this.mock.address, 100); - await this.token.approve(this.mock.address, constants.MAX_UINT256, { from: owner }); + await this.token.$_mint(this.owner, 100n); + await this.token.$_mint(this.mock, 100n); + await this.token.$_approve(this.owner, this.mock, ethers.MaxUint256); }); it("doesn't revert on transfer", async function () { - const { tx } = await this.mock.$safeTransfer(this.token.address, receiver, 10); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: this.mock.address, - to: receiver, - value: '10', - }); + await expect(this.mock.$safeTransfer(this.token, this.receiver, 10n)) + .to.emit(this.token, 'Transfer') + .withArgs(this.mock.target, this.receiver.address, 10n); }); it("doesn't revert on transferFrom", async function () { - const { tx } = await this.mock.$safeTransferFrom(this.token.address, owner, receiver, 10); - await expectEvent.inTransaction(tx, this.token, 'Transfer', { - from: owner, - to: receiver, - value: '10', - }); + await expect(this.mock.$safeTransferFrom(this.token, this.owner, this.receiver, 10n)) + .to.emit(this.token, 'Transfer') + .withArgs(this.owner.address, this.receiver.address, 10n); }); }); describe('approvals', function () { context('with zero allowance', function () { beforeEach(async function () { - await this.token.$_approve(this.mock.address, spender, 0); + await this.token.$_approve(this.mock, this.spender, 0n); }); it("doesn't revert when force approving a non-zero allowance", async function () { - await this.mock.$forceApprove(this.token.address, spender, 100); - expect(await this.token.allowance(this.mock.address, spender)).to.be.bignumber.equal('100'); + await this.mock.$forceApprove(this.token, this.spender, 100n); + expect(await this.token.allowance(this.mock, this.spender)).to.equal(100n); }); it("doesn't revert when force approving a zero allowance", async function () { - await this.mock.$forceApprove(this.token.address, spender, 0); - expect(await this.token.allowance(this.mock.address, spender)).to.be.bignumber.equal('0'); + await this.mock.$forceApprove(this.token, this.spender, 0n); + expect(await this.token.allowance(this.mock, this.spender)).to.equal(0n); }); it("doesn't revert when increasing the allowance", async function () { - await this.mock.$safeIncreaseAllowance(this.token.address, spender, 10); - expect(await this.token.allowance(this.mock.address, spender)).to.be.bignumber.equal('10'); + await this.mock.$safeIncreaseAllowance(this.token, this.spender, 10n); + expect(await this.token.allowance(this.mock, this.spender)).to.equal(10n); }); it('reverts when decreasing the allowance', async function () { - await expectRevertCustomError( - this.mock.$safeDecreaseAllowance(this.token.address, spender, 10), - 'SafeERC20FailedDecreaseAllowance', - [spender, 0, 10], - ); + await expect(this.mock.$safeDecreaseAllowance(this.token, this.spender, 10n)) + .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedDecreaseAllowance') + .withArgs(this.spender.address, 0n, 10n); }); }); context('with non-zero allowance', function () { beforeEach(async function () { - await this.token.$_approve(this.mock.address, spender, 100); + await this.token.$_approve(this.mock, this.spender, 100n); }); it("doesn't revert when force approving a non-zero allowance", async function () { - await this.mock.$forceApprove(this.token.address, spender, 20); - expect(await this.token.allowance(this.mock.address, spender)).to.be.bignumber.equal('20'); + await this.mock.$forceApprove(this.token, this.spender, 20n); + expect(await this.token.allowance(this.mock, this.spender)).to.equal(20n); }); it("doesn't revert when force approving a zero allowance", async function () { - await this.mock.$forceApprove(this.token.address, spender, 0); - expect(await this.token.allowance(this.mock.address, spender)).to.be.bignumber.equal('0'); + await this.mock.$forceApprove(this.token, this.spender, 0n); + expect(await this.token.allowance(this.mock, this.spender)).to.equal(0n); }); it("doesn't revert when increasing the allowance", async function () { - await this.mock.$safeIncreaseAllowance(this.token.address, spender, 10); - expect(await this.token.allowance(this.mock.address, spender)).to.be.bignumber.equal('110'); + await this.mock.$safeIncreaseAllowance(this.token, this.spender, 10n); + expect(await this.token.allowance(this.mock, this.spender)).to.equal(110n); }); it("doesn't revert when decreasing the allowance to a positive value", async function () { - await this.mock.$safeDecreaseAllowance(this.token.address, spender, 50); - expect(await this.token.allowance(this.mock.address, spender)).to.be.bignumber.equal('50'); + await this.mock.$safeDecreaseAllowance(this.token, this.spender, 50n); + expect(await this.token.allowance(this.mock, this.spender)).to.equal(50n); }); it('reverts when decreasing the allowance to a negative value', async function () { - await expectRevertCustomError( - this.mock.$safeDecreaseAllowance(this.token.address, spender, 200), - 'SafeERC20FailedDecreaseAllowance', - [spender, 100, 200], - ); + await expect(this.mock.$safeDecreaseAllowance(this.token, this.spender, 200n)) + .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedDecreaseAllowance') + .withArgs(this.spender.address, 100n, 200n); }); }); }); From f627500649547942300719372ebdbc2113d7c1a1 Mon Sep 17 00:00:00 2001 From: NiftyMike Date: Tue, 19 Dec 2023 08:14:25 -0600 Subject: [PATCH 142/167] Update SupportsInterface.behavior.js (#4674) Co-authored-by: ernestognw --- test/token/ERC1155/ERC1155.behavior.js | 2 +- test/utils/introspection/SupportsInterface.behavior.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/token/ERC1155/ERC1155.behavior.js b/test/token/ERC1155/ERC1155.behavior.js index 8df30a814..9f76fae29 100644 --- a/test/token/ERC1155/ERC1155.behavior.js +++ b/test/token/ERC1155/ERC1155.behavior.js @@ -896,7 +896,7 @@ function shouldBehaveLikeERC1155([minter, firstTokenHolder, secondTokenHolder, m }); }); - shouldSupportInterfaces(['ERC165', 'ERC1155']); + shouldSupportInterfaces(['ERC165', 'ERC1155', 'ERC1155MetadataURI']); }); } diff --git a/test/utils/introspection/SupportsInterface.behavior.js b/test/utils/introspection/SupportsInterface.behavior.js index 7a6df2c14..83b264592 100644 --- a/test/utils/introspection/SupportsInterface.behavior.js +++ b/test/utils/introspection/SupportsInterface.behavior.js @@ -26,6 +26,7 @@ const SIGNATURES = { 'safeTransferFrom(address,address,uint256,uint256,bytes)', 'safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)', ], + ERC1155MetadataURI: ['uri(uint256)'], ERC1155Receiver: [ 'onERC1155Received(address,address,uint256,uint256,bytes)', 'onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)', From f213a10522a7bd808561c5a4b17266065a199dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Tue, 19 Dec 2023 14:56:43 -0600 Subject: [PATCH 143/167] Remove Governor's guide ERC6372 disclaimer for Tally (#4801) --- docs/modules/ROOT/pages/governance.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/ROOT/pages/governance.adoc b/docs/modules/ROOT/pages/governance.adoc index 18c335ff4..fda51e6ff 100644 --- a/docs/modules/ROOT/pages/governance.adoc +++ b/docs/modules/ROOT/pages/governance.adoc @@ -32,7 +32,7 @@ When using a timelock with your Governor contract, you can use either OpenZeppel https://www.tally.xyz[Tally] is a full-fledged application for user owned on-chain governance. It comprises a voting dashboard, proposal creation wizard, real time research and analysis, and educational content. -For all of these options, the Governor will be compatible with Tally: users will be able to create proposals, visualize voting power and advocates, navigate proposals, and cast votes. For proposal creation in particular, projects can also use Defender Admin as an alternative interface. +For all of these options, the Governor will be compatible with Tally: users will be able to create proposals, see voting periods and delays following xref:api:interfaces.adoc#IERC6372[IERC6372], visualize voting power and advocates, navigate proposals, and cast votes. For proposal creation in particular, projects can also use Defender Admin as an alternative interface. In the rest of this guide, we will focus on a fresh deploy of the vanilla OpenZeppelin Governor features without concern for compatibility with GovernorAlpha or Bravo. @@ -235,6 +235,6 @@ contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, Governor === Disclaimer -Timestamp based voting is a recent feature that was formalized in ERC-6372 and ERC-5805, and introduced in v4.9. At the time this feature is released, governance tooling such as https://www.tally.xyz[Tally] does not support it yet. While support for timestamps should come soon, users can expect invalid reporting of deadlines & durations. This invalid reporting by offchain tools does not affect the onchain security and functionality of the governance contract. +Timestamp based voting is a recent feature that was formalized in ERC-6372 and ERC-5805, and introduced in v4.9. At the time this feature is released, some governance tooling may not support it yet. Users can expect invalid reporting of deadlines & durations if the tool is not able to interpret the ERC6372 clock. This invalid reporting by offchain tools does not affect the onchain security and functionality of the governance contract. Governors with timestamp support (v4.9 and above) are compatible with old tokens (before v4.9) and will operate in "block number" mode (which is the mode all old tokens operate on). On the other hand, old Governor instances (before v4.9) are not compatible with new tokens operating using timestamps. If you update your token code to use timestamps, make sure to also update your Governor code. From e70a0118ef10773457f670671baefad2c5ea610d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 21 Dec 2023 09:08:59 -0600 Subject: [PATCH 144/167] Remove changesets already included in CHANGELOG (#4805) --- .changeset/dull-ghosts-sip.md | 6 ------ .changeset/grumpy-poets-rush.md | 5 ----- .changeset/purple-squids-attend.md | 6 ------ .changeset/rude-weeks-beg.md | 5 ----- .changeset/strong-points-invent.md | 5 ----- .changeset/thirty-drinks-happen.md | 5 ----- 6 files changed, 32 deletions(-) delete mode 100644 .changeset/dull-ghosts-sip.md delete mode 100644 .changeset/grumpy-poets-rush.md delete mode 100644 .changeset/purple-squids-attend.md delete mode 100644 .changeset/rude-weeks-beg.md delete mode 100644 .changeset/strong-points-invent.md delete mode 100644 .changeset/thirty-drinks-happen.md diff --git a/.changeset/dull-ghosts-sip.md b/.changeset/dull-ghosts-sip.md deleted file mode 100644 index 6c362332e..000000000 --- a/.changeset/dull-ghosts-sip.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`AccessManager`, `AccessManaged`, `GovernorTimelockAccess`: Ensure that calldata shorter than 4 bytes is not padded to 4 bytes. -pr: #4624 diff --git a/.changeset/grumpy-poets-rush.md b/.changeset/grumpy-poets-rush.md deleted file mode 100644 index e566a10fe..000000000 --- a/.changeset/grumpy-poets-rush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -Upgradeable Contracts: No longer transpile interfaces, libraries, and stateless contracts. diff --git a/.changeset/purple-squids-attend.md b/.changeset/purple-squids-attend.md deleted file mode 100644 index 7a13c7b93..000000000 --- a/.changeset/purple-squids-attend.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`AccessManager`: Use named return parameters in functions that return multiple values. -pr: #4624 diff --git a/.changeset/rude-weeks-beg.md b/.changeset/rude-weeks-beg.md deleted file mode 100644 index 77fe423c6..000000000 --- a/.changeset/rude-weeks-beg.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`ERC2771Context` and `Context`: Introduce a `_contextPrefixLength()` getter, used to trim extra information appended to `msg.data`. diff --git a/.changeset/strong-points-invent.md b/.changeset/strong-points-invent.md deleted file mode 100644 index 980000c42..000000000 --- a/.changeset/strong-points-invent.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': patch ---- - -`Multicall`: Make aware of non-canonical context (i.e. `msg.sender` is not `_msgSender()`), allowing compatibility with `ERC2771Context`. diff --git a/.changeset/thirty-drinks-happen.md b/.changeset/thirty-drinks-happen.md deleted file mode 100644 index 85be9732e..000000000 --- a/.changeset/thirty-drinks-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'openzeppelin-solidity': major ---- - -`AccessManager`: Make `schedule` and `execute` more conservative when delay is 0. From be0572a8dc80dd7d2766c2a15f9eb5436ed3a445 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 21 Dec 2023 22:57:39 +0100 Subject: [PATCH 145/167] Migrate ERC1155 tests to ethers v6 (#4771) Co-authored-by: ernestognw --- .../generate/templates/EnumerableMap.opts.js | 5 +- .../generate/templates/EnumerableSet.opts.js | 4 +- test/access/Ownable.test.js | 2 +- test/access/manager/AccessManaged.test.js | 2 +- test/helpers/enums.js | 1 + test/token/ERC1155/ERC1155.behavior.js | 1119 ++++++++--------- test/token/ERC1155/ERC1155.test.js | 231 ++-- .../extensions/ERC1155Burnable.test.js | 67 +- .../extensions/ERC1155Pausable.test.js | 110 +- .../ERC1155/extensions/ERC1155Supply.test.js | 115 +- .../extensions/ERC1155URIStorage.test.js | 70 +- .../token/ERC1155/utils/ERC1155Holder.test.js | 82 +- test/token/ERC721/ERC721.behavior.js | 4 +- 13 files changed, 832 insertions(+), 980 deletions(-) diff --git a/scripts/generate/templates/EnumerableMap.opts.js b/scripts/generate/templates/EnumerableMap.opts.js index 699fa7b14..7fef393a2 100644 --- a/scripts/generate/templates/EnumerableMap.opts.js +++ b/scripts/generate/templates/EnumerableMap.opts.js @@ -1,4 +1,7 @@ -const mapType = str => (str == 'uint256' ? 'Uint' : `${str.charAt(0).toUpperCase()}${str.slice(1)}`); +const { capitalize } = require('../../helpers'); + +const mapType = str => (str == 'uint256' ? 'Uint' : capitalize(str)); + const formatType = (keyType, valueType) => ({ name: `${mapType(keyType)}To${mapType(valueType)}Map`, keyType, diff --git a/scripts/generate/templates/EnumerableSet.opts.js b/scripts/generate/templates/EnumerableSet.opts.js index fb53724fe..739f0acdf 100644 --- a/scripts/generate/templates/EnumerableSet.opts.js +++ b/scripts/generate/templates/EnumerableSet.opts.js @@ -1,4 +1,6 @@ -const mapType = str => (str == 'uint256' ? 'Uint' : `${str.charAt(0).toUpperCase()}${str.slice(1)}`); +const { capitalize } = require('../../helpers'); + +const mapType = str => (str == 'uint256' ? 'Uint' : capitalize(str)); const formatType = type => ({ name: `${mapType(type)}Set`, diff --git a/test/access/Ownable.test.js b/test/access/Ownable.test.js index 568d52b68..d565fc382 100644 --- a/test/access/Ownable.test.js +++ b/test/access/Ownable.test.js @@ -14,7 +14,7 @@ describe('Ownable', function () { }); it('emits ownership transfer events during construction', async function () { - await expect(await this.ownable.deploymentTransaction()) + await expect(this.ownable.deploymentTransaction()) .to.emit(this.ownable, 'OwnershipTransferred') .withArgs(ethers.ZeroAddress, this.owner.address); }); diff --git a/test/access/manager/AccessManaged.test.js b/test/access/manager/AccessManaged.test.js index f3a433ebd..b468128ff 100644 --- a/test/access/manager/AccessManaged.test.js +++ b/test/access/manager/AccessManaged.test.js @@ -32,7 +32,7 @@ describe('AccessManaged', function () { }); it('sets authority and emits AuthorityUpdated event during construction', async function () { - await expect(await this.managed.deploymentTransaction()) + await expect(this.managed.deploymentTransaction()) .to.emit(this.managed, 'AuthorityUpdated') .withArgs(this.authority.target); }); diff --git a/test/helpers/enums.js b/test/helpers/enums.js index b75e73ba8..9a5d6b263 100644 --- a/test/helpers/enums.js +++ b/test/helpers/enums.js @@ -14,6 +14,7 @@ function createExport(Enum) { VoteType: Enum('Against', 'For', 'Abstain'), Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), + RevertType: Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'), }; } diff --git a/test/token/ERC1155/ERC1155.behavior.js b/test/token/ERC1155/ERC1155.behavior.js index 9f76fae29..4c81ea9d1 100644 --- a/test/token/ERC1155/ERC1155.behavior.js +++ b/test/token/ERC1155/ERC1155.behavior.js @@ -1,897 +1,798 @@ -const { BN, constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { ZERO_ADDRESS } = constants; - +const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); +const { + bigint: { RevertType }, +} = require('../../helpers/enums'); const { shouldSupportInterfaces } = require('../../utils/introspection/SupportsInterface.behavior'); -const { expectRevertCustomError } = require('../../helpers/customError'); -const { Enum } = require('../../helpers/enums'); - -const ERC1155ReceiverMock = artifacts.require('ERC1155ReceiverMock'); -const RevertType = Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'); -function shouldBehaveLikeERC1155([minter, firstTokenHolder, secondTokenHolder, multiTokenHolder, recipient, proxy]) { - const firstTokenId = new BN(1); - const secondTokenId = new BN(2); - const unknownTokenId = new BN(3); +function shouldBehaveLikeERC1155() { + const firstTokenId = 1n; + const secondTokenId = 2n; + const unknownTokenId = 3n; - const firstTokenValue = new BN(1000); - const secondTokenValue = new BN(2000); + const firstTokenValue = 1000n; + const secondTokenValue = 2000n; const RECEIVER_SINGLE_MAGIC_VALUE = '0xf23a6e61'; const RECEIVER_BATCH_MAGIC_VALUE = '0xbc197c81'; + beforeEach(async function () { + [this.recipient, this.proxy, this.alice, this.bruce] = this.otherAccounts; + }); + describe('like an ERC1155', function () { describe('balanceOf', function () { it('should return 0 when queried about the zero address', async function () { - expect(await this.token.balanceOf(ZERO_ADDRESS, firstTokenId)).to.be.bignumber.equal('0'); + expect(await this.token.balanceOf(ethers.ZeroAddress, firstTokenId)).to.equal(0n); }); - context("when accounts don't own tokens", function () { + describe("when accounts don't own tokens", function () { it('returns zero for given addresses', async function () { - expect(await this.token.balanceOf(firstTokenHolder, firstTokenId)).to.be.bignumber.equal('0'); - - expect(await this.token.balanceOf(secondTokenHolder, secondTokenId)).to.be.bignumber.equal('0'); - - expect(await this.token.balanceOf(firstTokenHolder, unknownTokenId)).to.be.bignumber.equal('0'); + expect(await this.token.balanceOf(this.alice, firstTokenId)).to.equal(0n); + expect(await this.token.balanceOf(this.bruce, secondTokenId)).to.equal(0n); + expect(await this.token.balanceOf(this.alice, unknownTokenId)).to.equal(0n); }); }); - context('when accounts own some tokens', function () { + describe('when accounts own some tokens', function () { beforeEach(async function () { - await this.token.$_mint(firstTokenHolder, firstTokenId, firstTokenValue, '0x', { - from: minter, - }); - await this.token.$_mint(secondTokenHolder, secondTokenId, secondTokenValue, '0x', { - from: minter, - }); + await this.token.$_mint(this.alice, firstTokenId, firstTokenValue, '0x'); + await this.token.$_mint(this.bruce, secondTokenId, secondTokenValue, '0x'); }); it('returns the amount of tokens owned by the given addresses', async function () { - expect(await this.token.balanceOf(firstTokenHolder, firstTokenId)).to.be.bignumber.equal(firstTokenValue); - - expect(await this.token.balanceOf(secondTokenHolder, secondTokenId)).to.be.bignumber.equal(secondTokenValue); - - expect(await this.token.balanceOf(firstTokenHolder, unknownTokenId)).to.be.bignumber.equal('0'); + expect(await this.token.balanceOf(this.alice, firstTokenId)).to.equal(firstTokenValue); + expect(await this.token.balanceOf(this.bruce, secondTokenId)).to.equal(secondTokenValue); + expect(await this.token.balanceOf(this.alice, unknownTokenId)).to.equal(0n); }); }); }); describe('balanceOfBatch', function () { it("reverts when input arrays don't match up", async function () { - const accounts1 = [firstTokenHolder, secondTokenHolder, firstTokenHolder, secondTokenHolder]; + const accounts1 = [this.alice, this.bruce, this.alice, this.bruce]; const ids1 = [firstTokenId, secondTokenId, unknownTokenId]; - await expectRevertCustomError(this.token.balanceOfBatch(accounts1, ids1), 'ERC1155InvalidArrayLength', [ - accounts1.length, - ids1.length, - ]); - const accounts2 = [firstTokenHolder, secondTokenHolder]; + await expect(this.token.balanceOfBatch(accounts1, ids1)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidArrayLength') + .withArgs(ids1.length, accounts1.length); + + const accounts2 = [this.alice, this.bruce]; const ids2 = [firstTokenId, secondTokenId, unknownTokenId]; - await expectRevertCustomError(this.token.balanceOfBatch(accounts2, ids2), 'ERC1155InvalidArrayLength', [ - accounts2.length, - ids2.length, - ]); + await expect(this.token.balanceOfBatch(accounts2, ids2)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidArrayLength') + .withArgs(ids2.length, accounts2.length); }); it('should return 0 as the balance when one of the addresses is the zero address', async function () { const result = await this.token.balanceOfBatch( - [firstTokenHolder, secondTokenHolder, ZERO_ADDRESS], + [this.alice, this.bruce, ethers.ZeroAddress], [firstTokenId, secondTokenId, unknownTokenId], ); - expect(result).to.be.an('array'); - expect(result[0]).to.be.a.bignumber.equal('0'); - expect(result[1]).to.be.a.bignumber.equal('0'); - expect(result[2]).to.be.a.bignumber.equal('0'); + expect(result).to.deep.equal([0n, 0n, 0n]); }); - context("when accounts don't own tokens", function () { + describe("when accounts don't own tokens", function () { it('returns zeros for each account', async function () { const result = await this.token.balanceOfBatch( - [firstTokenHolder, secondTokenHolder, firstTokenHolder], + [this.alice, this.bruce, this.alice], [firstTokenId, secondTokenId, unknownTokenId], ); - expect(result).to.be.an('array'); - expect(result[0]).to.be.a.bignumber.equal('0'); - expect(result[1]).to.be.a.bignumber.equal('0'); - expect(result[2]).to.be.a.bignumber.equal('0'); + expect(result).to.deep.equal([0n, 0n, 0n]); }); }); - context('when accounts own some tokens', function () { + describe('when accounts own some tokens', function () { beforeEach(async function () { - await this.token.$_mint(firstTokenHolder, firstTokenId, firstTokenValue, '0x', { - from: minter, - }); - await this.token.$_mint(secondTokenHolder, secondTokenId, secondTokenValue, '0x', { - from: minter, - }); + await this.token.$_mint(this.alice, firstTokenId, firstTokenValue, '0x'); + await this.token.$_mint(this.bruce, secondTokenId, secondTokenValue, '0x'); }); it('returns amounts owned by each account in order passed', async function () { const result = await this.token.balanceOfBatch( - [secondTokenHolder, firstTokenHolder, firstTokenHolder], + [this.bruce, this.alice, this.alice], [secondTokenId, firstTokenId, unknownTokenId], ); - expect(result).to.be.an('array'); - expect(result[0]).to.be.a.bignumber.equal(secondTokenValue); - expect(result[1]).to.be.a.bignumber.equal(firstTokenValue); - expect(result[2]).to.be.a.bignumber.equal('0'); + expect(result).to.deep.equal([secondTokenValue, firstTokenValue, 0n]); }); it('returns multiple times the balance of the same address when asked', async function () { const result = await this.token.balanceOfBatch( - [firstTokenHolder, secondTokenHolder, firstTokenHolder], + [this.alice, this.bruce, this.alice], [firstTokenId, secondTokenId, firstTokenId], ); - expect(result).to.be.an('array'); - expect(result[0]).to.be.a.bignumber.equal(result[2]); - expect(result[0]).to.be.a.bignumber.equal(firstTokenValue); - expect(result[1]).to.be.a.bignumber.equal(secondTokenValue); - expect(result[2]).to.be.a.bignumber.equal(firstTokenValue); + expect(result).to.deep.equal([firstTokenValue, secondTokenValue, firstTokenValue]); }); }); }); describe('setApprovalForAll', function () { - let receipt; beforeEach(async function () { - receipt = await this.token.setApprovalForAll(proxy, true, { from: multiTokenHolder }); + this.tx = await this.token.connect(this.holder).setApprovalForAll(this.proxy, true); }); it('sets approval status which can be queried via isApprovedForAll', async function () { - expect(await this.token.isApprovedForAll(multiTokenHolder, proxy)).to.be.equal(true); + expect(await this.token.isApprovedForAll(this.holder, this.proxy)).to.be.true; }); - it('emits an ApprovalForAll log', function () { - expectEvent(receipt, 'ApprovalForAll', { account: multiTokenHolder, operator: proxy, approved: true }); + it('emits an ApprovalForAll log', async function () { + await expect(this.tx) + .to.emit(this.token, 'ApprovalForAll') + .withArgs(this.holder.address, this.proxy.address, true); }); it('can unset approval for an operator', async function () { - await this.token.setApprovalForAll(proxy, false, { from: multiTokenHolder }); - expect(await this.token.isApprovedForAll(multiTokenHolder, proxy)).to.be.equal(false); + await this.token.connect(this.holder).setApprovalForAll(this.proxy, false); + expect(await this.token.isApprovedForAll(this.holder, this.proxy)).to.be.false; }); it('reverts if attempting to approve zero address as an operator', async function () { - await expectRevertCustomError( - this.token.setApprovalForAll(constants.ZERO_ADDRESS, true, { from: multiTokenHolder }), - 'ERC1155InvalidOperator', - [constants.ZERO_ADDRESS], - ); + await expect(this.token.connect(this.holder).setApprovalForAll(ethers.ZeroAddress, true)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidOperator') + .withArgs(ethers.ZeroAddress); }); }); describe('safeTransferFrom', function () { beforeEach(async function () { - await this.token.$_mint(multiTokenHolder, firstTokenId, firstTokenValue, '0x', { - from: minter, - }); - await this.token.$_mint(multiTokenHolder, secondTokenId, secondTokenValue, '0x', { - from: minter, - }); + await this.token.$_mint(this.holder, firstTokenId, firstTokenValue, '0x'); + await this.token.$_mint(this.holder, secondTokenId, secondTokenValue, '0x'); }); it('reverts when transferring more than balance', async function () { - await expectRevertCustomError( - this.token.safeTransferFrom(multiTokenHolder, recipient, firstTokenId, firstTokenValue.addn(1), '0x', { - from: multiTokenHolder, - }), - 'ERC1155InsufficientBalance', - [multiTokenHolder, firstTokenValue, firstTokenValue.addn(1), firstTokenId], - ); + await expect( + this.token + .connect(this.holder) + .safeTransferFrom(this.holder, this.recipient, firstTokenId, firstTokenValue + 1n, '0x'), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') + .withArgs(this.holder.address, firstTokenValue, firstTokenValue + 1n, firstTokenId); }); it('reverts when transferring to zero address', async function () { - await expectRevertCustomError( - this.token.safeTransferFrom(multiTokenHolder, ZERO_ADDRESS, firstTokenId, firstTokenValue, '0x', { - from: multiTokenHolder, - }), - 'ERC1155InvalidReceiver', - [ZERO_ADDRESS], - ); + await expect( + this.token + .connect(this.holder) + .safeTransferFrom(this.holder, ethers.ZeroAddress, firstTokenId, firstTokenValue, '0x'), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') + .withArgs(ethers.ZeroAddress); }); - function transferWasSuccessful({ operator, from, id, value }) { + function transferWasSuccessful() { it('debits transferred balance from sender', async function () { - const newBalance = await this.token.balanceOf(from, id); - expect(newBalance).to.be.a.bignumber.equal('0'); + expect(await this.token.balanceOf(this.args.from, this.args.id)).to.equal(0n); }); it('credits transferred balance to receiver', async function () { - const newBalance = await this.token.balanceOf(this.toWhom, id); - expect(newBalance).to.be.a.bignumber.equal(value); - }); - - it('emits a TransferSingle log', function () { - expectEvent(this.transferLogs, 'TransferSingle', { - operator, - from, - to: this.toWhom, - id, - value, - }); + expect(await this.token.balanceOf(this.args.to, this.args.id)).to.equal(this.args.value); + }); + + it('emits a TransferSingle log', async function () { + await expect(this.tx) + .to.emit(this.token, 'TransferSingle') + .withArgs( + this.args.operator.address ?? this.args.operator.target ?? this.args.operator, + this.args.from.address ?? this.args.from.target ?? this.args.from, + this.args.to.address ?? this.args.to.target ?? this.args.to, + this.args.id, + this.args.value, + ); }); } - context('when called by the multiTokenHolder', async function () { + describe('when called by the holder', async function () { beforeEach(async function () { - this.toWhom = recipient; - this.transferLogs = await this.token.safeTransferFrom( - multiTokenHolder, - recipient, - firstTokenId, - firstTokenValue, - '0x', - { - from: multiTokenHolder, - }, - ); - }); - - transferWasSuccessful.call(this, { - operator: multiTokenHolder, - from: multiTokenHolder, - id: firstTokenId, - value: firstTokenValue, + this.args = { + operator: this.holder, + from: this.holder, + to: this.recipient, + id: firstTokenId, + value: firstTokenValue, + data: '0x', + }; + this.tx = await this.token + .connect(this.args.operator) + .safeTransferFrom(this.args.from, this.args.to, this.args.id, this.args.value, this.args.data); }); - it('preserves existing balances which are not transferred by multiTokenHolder', async function () { - const balance1 = await this.token.balanceOf(multiTokenHolder, secondTokenId); - expect(balance1).to.be.a.bignumber.equal(secondTokenValue); + transferWasSuccessful(); - const balance2 = await this.token.balanceOf(recipient, secondTokenId); - expect(balance2).to.be.a.bignumber.equal('0'); + it('preserves existing balances which are not transferred by holder', async function () { + expect(await this.token.balanceOf(this.holder, secondTokenId)).to.equal(secondTokenValue); + expect(await this.token.balanceOf(this.recipient, secondTokenId)).to.equal(0n); }); }); - context('when called by an operator on behalf of the multiTokenHolder', function () { - context('when operator is not approved by multiTokenHolder', function () { + describe('when called by an operator on behalf of the holder', function () { + describe('when operator is not approved by holder', function () { beforeEach(async function () { - await this.token.setApprovalForAll(proxy, false, { from: multiTokenHolder }); + await this.token.connect(this.holder).setApprovalForAll(this.proxy, false); }); it('reverts', async function () { - await expectRevertCustomError( - this.token.safeTransferFrom(multiTokenHolder, recipient, firstTokenId, firstTokenValue, '0x', { - from: proxy, - }), - 'ERC1155MissingApprovalForAll', - [proxy, multiTokenHolder], - ); + await expect( + this.token + .connect(this.proxy) + .safeTransferFrom(this.holder, this.recipient, firstTokenId, firstTokenValue, '0x'), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') + .withArgs(this.proxy.address, this.holder.address); }); }); - context('when operator is approved by multiTokenHolder', function () { + describe('when operator is approved by holder', function () { beforeEach(async function () { - this.toWhom = recipient; - await this.token.setApprovalForAll(proxy, true, { from: multiTokenHolder }); - this.transferLogs = await this.token.safeTransferFrom( - multiTokenHolder, - recipient, - firstTokenId, - firstTokenValue, - '0x', - { - from: proxy, - }, - ); - }); + await this.token.connect(this.holder).setApprovalForAll(this.proxy, true); - transferWasSuccessful.call(this, { - operator: proxy, - from: multiTokenHolder, - id: firstTokenId, - value: firstTokenValue, + this.args = { + operator: this.proxy, + from: this.holder, + to: this.recipient, + id: firstTokenId, + value: firstTokenValue, + data: '0x', + }; + this.tx = await this.token + .connect(this.args.operator) + .safeTransferFrom(this.args.from, this.args.to, this.args.id, this.args.value, this.args.data); }); - it("preserves operator's balances not involved in the transfer", async function () { - const balance1 = await this.token.balanceOf(proxy, firstTokenId); - expect(balance1).to.be.a.bignumber.equal('0'); + transferWasSuccessful(); - const balance2 = await this.token.balanceOf(proxy, secondTokenId); - expect(balance2).to.be.a.bignumber.equal('0'); + it("preserves operator's balances not involved in the transfer", async function () { + expect(await this.token.balanceOf(this.proxy, firstTokenId)).to.equal(0n); + expect(await this.token.balanceOf(this.proxy, secondTokenId)).to.equal(0n); }); }); }); - context('when sending to a valid receiver', function () { + describe('when sending to a valid receiver', function () { beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new( + this.receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ RECEIVER_SINGLE_MAGIC_VALUE, RECEIVER_BATCH_MAGIC_VALUE, RevertType.None, - ); + ]); }); - context('without data', function () { + describe('without data', function () { beforeEach(async function () { - this.toWhom = this.receiver.address; - this.transferReceipt = await this.token.safeTransferFrom( - multiTokenHolder, - this.receiver.address, - firstTokenId, - firstTokenValue, - '0x', - { from: multiTokenHolder }, - ); - this.transferLogs = this.transferReceipt; + this.args = { + operator: this.holder, + from: this.holder, + to: this.receiver, + id: firstTokenId, + value: firstTokenValue, + data: '0x', + }; + this.tx = await this.token + .connect(this.args.operator) + .safeTransferFrom(this.args.from, this.args.to, this.args.id, this.args.value, this.args.data); }); - transferWasSuccessful.call(this, { - operator: multiTokenHolder, - from: multiTokenHolder, - id: firstTokenId, - value: firstTokenValue, - }); + transferWasSuccessful(); it('calls onERC1155Received', async function () { - await expectEvent.inTransaction(this.transferReceipt.tx, ERC1155ReceiverMock, 'Received', { - operator: multiTokenHolder, - from: multiTokenHolder, - id: firstTokenId, - value: firstTokenValue, - data: null, - }); + await expect(this.tx) + .to.emit(this.receiver, 'Received') + .withArgs( + this.args.operator.address, + this.args.from.address, + this.args.id, + this.args.value, + this.args.data, + anyValue, + ); }); }); - context('with data', function () { - const data = '0xf00dd00d'; + describe('with data', function () { beforeEach(async function () { - this.toWhom = this.receiver.address; - this.transferReceipt = await this.token.safeTransferFrom( - multiTokenHolder, - this.receiver.address, - firstTokenId, - firstTokenValue, - data, - { from: multiTokenHolder }, - ); - this.transferLogs = this.transferReceipt; + this.args = { + operator: this.holder, + from: this.holder, + to: this.receiver, + id: firstTokenId, + value: firstTokenValue, + data: '0xf00dd00d', + }; + this.tx = await this.token + .connect(this.args.operator) + .safeTransferFrom(this.args.from, this.args.to, this.args.id, this.args.value, this.args.data); }); - transferWasSuccessful.call(this, { - operator: multiTokenHolder, - from: multiTokenHolder, - id: firstTokenId, - value: firstTokenValue, - }); + transferWasSuccessful(); it('calls onERC1155Received', async function () { - await expectEvent.inTransaction(this.transferReceipt.tx, ERC1155ReceiverMock, 'Received', { - operator: multiTokenHolder, - from: multiTokenHolder, - id: firstTokenId, - value: firstTokenValue, - data, - }); + await expect(this.tx) + .to.emit(this.receiver, 'Received') + .withArgs( + this.args.operator.address, + this.args.from.address, + this.args.id, + this.args.value, + this.args.data, + anyValue, + ); }); }); }); - context('to a receiver contract returning unexpected value', function () { - beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new('0x00c0ffee', RECEIVER_BATCH_MAGIC_VALUE, RevertType.None); - }); - + describe('to a receiver contract returning unexpected value', function () { it('reverts', async function () { - await expectRevertCustomError( - this.token.safeTransferFrom(multiTokenHolder, this.receiver.address, firstTokenId, firstTokenValue, '0x', { - from: multiTokenHolder, - }), - 'ERC1155InvalidReceiver', - [this.receiver.address], - ); + const receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ + '0x00c0ffee', + RECEIVER_BATCH_MAGIC_VALUE, + RevertType.None, + ]); + + await expect( + this.token + .connect(this.holder) + .safeTransferFrom(this.holder, receiver, firstTokenId, firstTokenValue, '0x'), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') + .withArgs(receiver.target); }); }); - context('to a receiver contract that reverts', function () { - context('with a revert string', function () { - beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new( + describe('to a receiver contract that reverts', function () { + describe('with a revert string', function () { + it('reverts', async function () { + const receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ RECEIVER_SINGLE_MAGIC_VALUE, RECEIVER_BATCH_MAGIC_VALUE, RevertType.RevertWithMessage, - ); - }); + ]); - it('reverts', async function () { - await expectRevert( - this.token.safeTransferFrom( - multiTokenHolder, - this.receiver.address, - firstTokenId, - firstTokenValue, - '0x', - { - from: multiTokenHolder, - }, - ), - 'ERC1155ReceiverMock: reverting on receive', - ); + await expect( + this.token + .connect(this.holder) + .safeTransferFrom(this.holder, receiver, firstTokenId, firstTokenValue, '0x'), + ).to.be.revertedWith('ERC1155ReceiverMock: reverting on receive'); }); }); - context('without a revert string', function () { - beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new( + describe('without a revert string', function () { + it('reverts', async function () { + const receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ RECEIVER_SINGLE_MAGIC_VALUE, RECEIVER_BATCH_MAGIC_VALUE, RevertType.RevertWithoutMessage, - ); - }); + ]); - it('reverts', async function () { - await expectRevertCustomError( - this.token.safeTransferFrom( - multiTokenHolder, - this.receiver.address, - firstTokenId, - firstTokenValue, - '0x', - { - from: multiTokenHolder, - }, - ), - 'ERC1155InvalidReceiver', - [this.receiver.address], - ); + await expect( + this.token + .connect(this.holder) + .safeTransferFrom(this.holder, receiver, firstTokenId, firstTokenValue, '0x'), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') + .withArgs(receiver.target); }); }); - context('with a custom error', function () { - beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new( + describe('with a custom error', function () { + it('reverts', async function () { + const receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ RECEIVER_SINGLE_MAGIC_VALUE, RECEIVER_BATCH_MAGIC_VALUE, RevertType.RevertWithCustomError, - ); - }); + ]); - it('reverts', async function () { - await expectRevertCustomError( - this.token.safeTransferFrom( - multiTokenHolder, - this.receiver.address, - firstTokenId, - firstTokenValue, - '0x', - { - from: multiTokenHolder, - }, - ), - 'CustomError', - [RECEIVER_SINGLE_MAGIC_VALUE], - ); + await expect( + this.token + .connect(this.holder) + .safeTransferFrom(this.holder, receiver, firstTokenId, firstTokenValue, '0x'), + ) + .to.be.revertedWithCustomError(receiver, 'CustomError') + .withArgs(RECEIVER_SINGLE_MAGIC_VALUE); }); }); - context('with a panic', function () { - beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new( + describe('with a panic', function () { + it('reverts', async function () { + const receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ RECEIVER_SINGLE_MAGIC_VALUE, RECEIVER_BATCH_MAGIC_VALUE, RevertType.Panic, - ); - }); + ]); - it('reverts', async function () { - await expectRevert.unspecified( - this.token.safeTransferFrom( - multiTokenHolder, - this.receiver.address, - firstTokenId, - firstTokenValue, - '0x', - { - from: multiTokenHolder, - }, - ), - ); + await expect( + this.token + .connect(this.holder) + .safeTransferFrom(this.holder, receiver, firstTokenId, firstTokenValue, '0x'), + ).to.be.revertedWithPanic(); }); }); }); - context('to a contract that does not implement the required function', function () { + describe('to a contract that does not implement the required function', function () { it('reverts', async function () { - const invalidReceiver = this.token; - await expectRevert.unspecified( - this.token.safeTransferFrom( - multiTokenHolder, - invalidReceiver.address, - firstTokenId, - firstTokenValue, - '0x', - { - from: multiTokenHolder, - }, - ), - ); + const invalidReceiver = this.token.target; + + await expect( + this.token + .connect(this.holder) + .safeTransferFrom(this.holder, invalidReceiver, firstTokenId, firstTokenValue, '0x'), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') + .withArgs(invalidReceiver); }); }); }); describe('safeBatchTransferFrom', function () { beforeEach(async function () { - await this.token.$_mint(multiTokenHolder, firstTokenId, firstTokenValue, '0x', { - from: minter, - }); - await this.token.$_mint(multiTokenHolder, secondTokenId, secondTokenValue, '0x', { - from: minter, - }); + await this.token.$_mint(this.holder, firstTokenId, firstTokenValue, '0x'); + await this.token.$_mint(this.holder, secondTokenId, secondTokenValue, '0x'); }); it('reverts when transferring value more than any of balances', async function () { - await expectRevertCustomError( - this.token.safeBatchTransferFrom( - multiTokenHolder, - recipient, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue.addn(1)], - '0x', - { from: multiTokenHolder }, - ), - 'ERC1155InsufficientBalance', - [multiTokenHolder, secondTokenValue, secondTokenValue.addn(1), secondTokenId], - ); + await expect( + this.token + .connect(this.holder) + .safeBatchTransferFrom( + this.holder, + this.recipient, + [firstTokenId, secondTokenId], + [firstTokenValue, secondTokenValue + 1n], + '0x', + ), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') + .withArgs(this.holder.address, secondTokenValue, secondTokenValue + 1n, secondTokenId); }); it("reverts when ids array length doesn't match values array length", async function () { const ids1 = [firstTokenId]; const tokenValues1 = [firstTokenValue, secondTokenValue]; - await expectRevertCustomError( - this.token.safeBatchTransferFrom(multiTokenHolder, recipient, ids1, tokenValues1, '0x', { - from: multiTokenHolder, - }), - 'ERC1155InvalidArrayLength', - [ids1.length, tokenValues1.length], - ); + await expect( + this.token.connect(this.holder).safeBatchTransferFrom(this.holder, this.recipient, ids1, tokenValues1, '0x'), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidArrayLength') + .withArgs(ids1.length, tokenValues1.length); const ids2 = [firstTokenId, secondTokenId]; const tokenValues2 = [firstTokenValue]; - await expectRevertCustomError( - this.token.safeBatchTransferFrom(multiTokenHolder, recipient, ids2, tokenValues2, '0x', { - from: multiTokenHolder, - }), - 'ERC1155InvalidArrayLength', - [ids2.length, tokenValues2.length], - ); + + await expect( + this.token.connect(this.holder).safeBatchTransferFrom(this.holder, this.recipient, ids2, tokenValues2, '0x'), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidArrayLength') + .withArgs(ids2.length, tokenValues2.length); }); it('reverts when transferring to zero address', async function () { - await expectRevertCustomError( - this.token.safeBatchTransferFrom( - multiTokenHolder, - ZERO_ADDRESS, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - '0x', - { from: multiTokenHolder }, - ), - 'ERC1155InvalidReceiver', - [ZERO_ADDRESS], - ); + await expect( + this.token + .connect(this.holder) + .safeBatchTransferFrom( + this.holder, + ethers.ZeroAddress, + [firstTokenId, secondTokenId], + [firstTokenValue, secondTokenValue], + '0x', + ), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') + .withArgs(ethers.ZeroAddress); }); it('reverts when transferring from zero address', async function () { - await expectRevertCustomError( - this.token.$_safeBatchTransferFrom(ZERO_ADDRESS, multiTokenHolder, [firstTokenId], [firstTokenValue], '0x'), - 'ERC1155InvalidSender', - [ZERO_ADDRESS], - ); + await expect( + this.token.$_safeBatchTransferFrom(ethers.ZeroAddress, this.holder, [firstTokenId], [firstTokenValue], '0x'), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidSender') + .withArgs(ethers.ZeroAddress); }); - function batchTransferWasSuccessful({ operator, from, ids, values }) { + function batchTransferWasSuccessful() { it('debits transferred balances from sender', async function () { - const newBalances = await this.token.balanceOfBatch(new Array(ids.length).fill(from), ids); - for (const newBalance of newBalances) { - expect(newBalance).to.be.a.bignumber.equal('0'); - } + const newBalances = await this.token.balanceOfBatch( + this.args.ids.map(() => this.args.from), + this.args.ids, + ); + expect(newBalances).to.deep.equal(this.args.ids.map(() => 0n)); }); it('credits transferred balances to receiver', async function () { - const newBalances = await this.token.balanceOfBatch(new Array(ids.length).fill(this.toWhom), ids); - for (let i = 0; i < newBalances.length; i++) { - expect(newBalances[i]).to.be.a.bignumber.equal(values[i]); - } - }); - - it('emits a TransferBatch log', function () { - expectEvent(this.transferLogs, 'TransferBatch', { - operator, - from, - to: this.toWhom, - // ids, - // values, - }); + const newBalances = await this.token.balanceOfBatch( + this.args.ids.map(() => this.args.to), + this.args.ids, + ); + expect(newBalances).to.deep.equal(this.args.values); + }); + + it('emits a TransferBatch log', async function () { + await expect(this.tx) + .to.emit(this.token, 'TransferBatch') + .withArgs( + this.args.operator.address ?? this.args.operator.target ?? this.args.operator, + this.args.from.address ?? this.args.from.target ?? this.args.from, + this.args.to.address ?? this.args.to.target ?? this.args.to, + this.args.ids, + this.args.values, + ); }); } - context('when called by the multiTokenHolder', async function () { + describe('when called by the holder', async function () { beforeEach(async function () { - this.toWhom = recipient; - this.transferLogs = await this.token.safeBatchTransferFrom( - multiTokenHolder, - recipient, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - '0x', - { from: multiTokenHolder }, - ); + this.args = { + operator: this.holder, + from: this.holder, + to: this.recipient, + ids: [firstTokenId, secondTokenId], + values: [firstTokenValue, secondTokenValue], + data: '0x', + }; + this.tx = await this.token + .connect(this.args.operator) + .safeBatchTransferFrom(this.args.from, this.args.to, this.args.ids, this.args.values, this.args.data); }); - batchTransferWasSuccessful.call(this, { - operator: multiTokenHolder, - from: multiTokenHolder, - ids: [firstTokenId, secondTokenId], - values: [firstTokenValue, secondTokenValue], - }); + batchTransferWasSuccessful(); }); - context('when called by an operator on behalf of the multiTokenHolder', function () { - context('when operator is not approved by multiTokenHolder', function () { + describe('when called by an operator on behalf of the holder', function () { + describe('when operator is not approved by holder', function () { beforeEach(async function () { - await this.token.setApprovalForAll(proxy, false, { from: multiTokenHolder }); + await this.token.connect(this.holder).setApprovalForAll(this.proxy, false); }); it('reverts', async function () { - await expectRevertCustomError( - this.token.safeBatchTransferFrom( - multiTokenHolder, - recipient, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - '0x', - { from: proxy }, - ), - 'ERC1155MissingApprovalForAll', - [proxy, multiTokenHolder], - ); - }); - }); - - context('when operator is approved by multiTokenHolder', function () { + await expect( + this.token + .connect(this.proxy) + .safeBatchTransferFrom( + this.holder, + this.recipient, + [firstTokenId, secondTokenId], + [firstTokenValue, secondTokenValue], + '0x', + ), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') + .withArgs(this.proxy.address, this.holder.address); + }); + }); + + describe('when operator is approved by holder', function () { beforeEach(async function () { - this.toWhom = recipient; - await this.token.setApprovalForAll(proxy, true, { from: multiTokenHolder }); - this.transferLogs = await this.token.safeBatchTransferFrom( - multiTokenHolder, - recipient, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - '0x', - { from: proxy }, - ); - }); + await this.token.connect(this.holder).setApprovalForAll(this.proxy, true); - batchTransferWasSuccessful.call(this, { - operator: proxy, - from: multiTokenHolder, - ids: [firstTokenId, secondTokenId], - values: [firstTokenValue, secondTokenValue], + this.args = { + operator: this.proxy, + from: this.holder, + to: this.recipient, + ids: [firstTokenId, secondTokenId], + values: [firstTokenValue, secondTokenValue], + data: '0x', + }; + this.tx = await this.token + .connect(this.args.operator) + .safeBatchTransferFrom(this.args.from, this.args.to, this.args.ids, this.args.values, this.args.data); }); + batchTransferWasSuccessful(); + it("preserves operator's balances not involved in the transfer", async function () { - const balance1 = await this.token.balanceOf(proxy, firstTokenId); - expect(balance1).to.be.a.bignumber.equal('0'); - const balance2 = await this.token.balanceOf(proxy, secondTokenId); - expect(balance2).to.be.a.bignumber.equal('0'); + expect(await this.token.balanceOf(this.proxy, firstTokenId)).to.equal(0n); + expect(await this.token.balanceOf(this.proxy, secondTokenId)).to.equal(0n); }); }); }); - context('when sending to a valid receiver', function () { + describe('when sending to a valid receiver', function () { beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new( + this.receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ RECEIVER_SINGLE_MAGIC_VALUE, RECEIVER_BATCH_MAGIC_VALUE, RevertType.None, - ); + ]); }); - context('without data', function () { + describe('without data', function () { beforeEach(async function () { - this.toWhom = this.receiver.address; - this.transferReceipt = await this.token.safeBatchTransferFrom( - multiTokenHolder, - this.receiver.address, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - '0x', - { from: multiTokenHolder }, - ); - this.transferLogs = this.transferReceipt; + this.args = { + operator: this.holder, + from: this.holder, + to: this.receiver, + ids: [firstTokenId, secondTokenId], + values: [firstTokenValue, secondTokenValue], + data: '0x', + }; + this.tx = await this.token + .connect(this.args.operator) + .safeBatchTransferFrom(this.args.from, this.args.to, this.args.ids, this.args.values, this.args.data); }); - batchTransferWasSuccessful.call(this, { - operator: multiTokenHolder, - from: multiTokenHolder, - ids: [firstTokenId, secondTokenId], - values: [firstTokenValue, secondTokenValue], - }); + batchTransferWasSuccessful(); it('calls onERC1155BatchReceived', async function () { - await expectEvent.inTransaction(this.transferReceipt.tx, ERC1155ReceiverMock, 'BatchReceived', { - operator: multiTokenHolder, - from: multiTokenHolder, - // ids: [firstTokenId, secondTokenId], - // values: [firstTokenValue, secondTokenValue], - data: null, - }); + await expect(this.tx) + .to.emit(this.receiver, 'BatchReceived') + .withArgs( + this.holder.address, + this.holder.address, + this.args.ids, + this.args.values, + this.args.data, + anyValue, + ); }); }); - context('with data', function () { - const data = '0xf00dd00d'; + describe('with data', function () { beforeEach(async function () { - this.toWhom = this.receiver.address; - this.transferReceipt = await this.token.safeBatchTransferFrom( - multiTokenHolder, - this.receiver.address, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - data, - { from: multiTokenHolder }, - ); - this.transferLogs = this.transferReceipt; + this.args = { + operator: this.holder, + from: this.holder, + to: this.receiver, + ids: [firstTokenId, secondTokenId], + values: [firstTokenValue, secondTokenValue], + data: '0xf00dd00d', + }; + this.tx = await this.token + .connect(this.args.operator) + .safeBatchTransferFrom(this.args.from, this.args.to, this.args.ids, this.args.values, this.args.data); }); - batchTransferWasSuccessful.call(this, { - operator: multiTokenHolder, - from: multiTokenHolder, - ids: [firstTokenId, secondTokenId], - values: [firstTokenValue, secondTokenValue], - }); + batchTransferWasSuccessful(); it('calls onERC1155Received', async function () { - await expectEvent.inTransaction(this.transferReceipt.tx, ERC1155ReceiverMock, 'BatchReceived', { - operator: multiTokenHolder, - from: multiTokenHolder, - // ids: [firstTokenId, secondTokenId], - // values: [firstTokenValue, secondTokenValue], - data, - }); + await expect(this.tx) + .to.emit(this.receiver, 'BatchReceived') + .withArgs( + this.holder.address, + this.holder.address, + this.args.ids, + this.args.values, + this.args.data, + anyValue, + ); }); }); }); - context('to a receiver contract returning unexpected value', function () { - beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new( + describe('to a receiver contract returning unexpected value', function () { + it('reverts', async function () { + const receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ RECEIVER_SINGLE_MAGIC_VALUE, RECEIVER_SINGLE_MAGIC_VALUE, RevertType.None, - ); - }); - - it('reverts', async function () { - await expectRevertCustomError( - this.token.safeBatchTransferFrom( - multiTokenHolder, - this.receiver.address, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - '0x', - { from: multiTokenHolder }, - ), - 'ERC1155InvalidReceiver', - [this.receiver.address], - ); + ]); + + await expect( + this.token + .connect(this.holder) + .safeBatchTransferFrom( + this.holder, + receiver, + [firstTokenId, secondTokenId], + [firstTokenValue, secondTokenValue], + '0x', + ), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') + .withArgs(receiver.target); }); }); - context('to a receiver contract that reverts', function () { - context('with a revert string', function () { - beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new( + describe('to a receiver contract that reverts', function () { + describe('with a revert string', function () { + it('reverts', async function () { + const receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ RECEIVER_SINGLE_MAGIC_VALUE, RECEIVER_BATCH_MAGIC_VALUE, RevertType.RevertWithMessage, - ); - }); + ]); - it('reverts', async function () { - await expectRevert( - this.token.safeBatchTransferFrom( - multiTokenHolder, - this.receiver.address, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - '0x', - { from: multiTokenHolder }, - ), - 'ERC1155ReceiverMock: reverting on batch receive', - ); + await expect( + this.token + .connect(this.holder) + .safeBatchTransferFrom( + this.holder, + receiver, + [firstTokenId, secondTokenId], + [firstTokenValue, secondTokenValue], + '0x', + ), + ).to.be.revertedWith('ERC1155ReceiverMock: reverting on batch receive'); }); }); - context('without a revert string', function () { - beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new( + describe('without a revert string', function () { + it('reverts', async function () { + const receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ RECEIVER_SINGLE_MAGIC_VALUE, RECEIVER_BATCH_MAGIC_VALUE, RevertType.RevertWithoutMessage, - ); - }); + ]); - it('reverts', async function () { - await expectRevertCustomError( - this.token.safeBatchTransferFrom( - multiTokenHolder, - this.receiver.address, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - '0x', - { from: multiTokenHolder }, - ), - 'ERC1155InvalidReceiver', - [this.receiver.address], - ); + await expect( + this.token + .connect(this.holder) + .safeBatchTransferFrom( + this.holder, + receiver, + [firstTokenId, secondTokenId], + [firstTokenValue, secondTokenValue], + '0x', + ), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') + .withArgs(receiver.target); }); }); - context('with a custom error', function () { - beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new( + describe('with a custom error', function () { + it('reverts', async function () { + const receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ RECEIVER_SINGLE_MAGIC_VALUE, RECEIVER_BATCH_MAGIC_VALUE, RevertType.RevertWithCustomError, - ); - }); + ]); - it('reverts', async function () { - await expectRevertCustomError( - this.token.safeBatchTransferFrom( - multiTokenHolder, - this.receiver.address, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - '0x', - { from: multiTokenHolder }, - ), - 'CustomError', - [RECEIVER_SINGLE_MAGIC_VALUE], - ); + await expect( + this.token + .connect(this.holder) + .safeBatchTransferFrom( + this.holder, + receiver, + [firstTokenId, secondTokenId], + [firstTokenValue, secondTokenValue], + '0x', + ), + ) + .to.be.revertedWithCustomError(receiver, 'CustomError') + .withArgs(RECEIVER_SINGLE_MAGIC_VALUE); }); }); - context('with a panic', function () { - beforeEach(async function () { - this.receiver = await ERC1155ReceiverMock.new( + describe('with a panic', function () { + it('reverts', async function () { + const receiver = await ethers.deployContract('$ERC1155ReceiverMock', [ RECEIVER_SINGLE_MAGIC_VALUE, RECEIVER_BATCH_MAGIC_VALUE, RevertType.Panic, - ); - }); + ]); - it('reverts', async function () { - await expectRevert.unspecified( - this.token.safeBatchTransferFrom( - multiTokenHolder, - this.receiver.address, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - '0x', - { from: multiTokenHolder }, - ), - ); + await expect( + this.token + .connect(this.holder) + .safeBatchTransferFrom( + this.holder, + receiver, + [firstTokenId, secondTokenId], + [firstTokenValue, secondTokenValue], + '0x', + ), + ).to.be.revertedWithPanic(); }); }); }); - context('to a contract that does not implement the required function', function () { + describe('to a contract that does not implement the required function', function () { it('reverts', async function () { - const invalidReceiver = this.token; - await expectRevert.unspecified( - this.token.safeBatchTransferFrom( - multiTokenHolder, - invalidReceiver.address, - [firstTokenId, secondTokenId], - [firstTokenValue, secondTokenValue], - '0x', - { from: multiTokenHolder }, - ), - ); + const invalidReceiver = this.token.target; + + await expect( + this.token + .connect(this.holder) + .safeBatchTransferFrom( + this.holder, + invalidReceiver, + [firstTokenId, secondTokenId], + [firstTokenValue, secondTokenValue], + '0x', + ), + ) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') + .withArgs(invalidReceiver); }); }); }); diff --git a/test/token/ERC1155/ERC1155.test.js b/test/token/ERC1155/ERC1155.test.js index 58d747a4b..c469dd845 100644 --- a/test/token/ERC1155/ERC1155.test.js +++ b/test/token/ERC1155/ERC1155.test.js @@ -1,251 +1,212 @@ -const { BN, constants, expectEvent } = require('@openzeppelin/test-helpers'); -const { ZERO_ADDRESS } = constants; - +const { ethers } = require('hardhat'); const { expect } = require('chai'); - -const { expectRevertCustomError } = require('../../helpers/customError'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { zip } = require('../../helpers/iterate'); const { shouldBehaveLikeERC1155 } = require('./ERC1155.behavior'); -const ERC1155Mock = artifacts.require('$ERC1155'); -contract('ERC1155', function (accounts) { - const [operator, tokenHolder, tokenBatchHolder, ...otherAccounts] = accounts; +const initialURI = 'https://token-cdn-domain/{id}.json'; - const initialURI = 'https://token-cdn-domain/{id}.json'; +async function fixture() { + const [operator, holder, ...otherAccounts] = await ethers.getSigners(); + const token = await ethers.deployContract('$ERC1155', [initialURI]); + return { token, operator, holder, otherAccounts }; +} +describe('ERC1155', function () { beforeEach(async function () { - this.token = await ERC1155Mock.new(initialURI); + Object.assign(this, await loadFixture(fixture)); }); - shouldBehaveLikeERC1155(otherAccounts); + shouldBehaveLikeERC1155(); describe('internal functions', function () { - const tokenId = new BN(1990); - const mintValue = new BN(9001); - const burnValue = new BN(3000); + const tokenId = 1990n; + const mintValue = 9001n; + const burnValue = 3000n; - const tokenBatchIds = [new BN(2000), new BN(2010), new BN(2020)]; - const mintValues = [new BN(5000), new BN(10000), new BN(42195)]; - const burnValues = [new BN(5000), new BN(9001), new BN(195)]; + const tokenBatchIds = [2000n, 2010n, 2020n]; + const mintValues = [5000n, 10000n, 42195n]; + const burnValues = [5000n, 9001n, 195n]; const data = '0x12345678'; describe('_mint', function () { it('reverts with a zero destination address', async function () { - await expectRevertCustomError( - this.token.$_mint(ZERO_ADDRESS, tokenId, mintValue, data), - 'ERC1155InvalidReceiver', - [ZERO_ADDRESS], - ); + await expect(this.token.$_mint(ethers.ZeroAddress, tokenId, mintValue, data)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') + .withArgs(ethers.ZeroAddress); }); - context('with minted tokens', function () { + describe('with minted tokens', function () { beforeEach(async function () { - this.receipt = await this.token.$_mint(tokenHolder, tokenId, mintValue, data, { from: operator }); + this.tx = await this.token.connect(this.operator).$_mint(this.holder, tokenId, mintValue, data); }); - it('emits a TransferSingle event', function () { - expectEvent(this.receipt, 'TransferSingle', { - operator, - from: ZERO_ADDRESS, - to: tokenHolder, - id: tokenId, - value: mintValue, - }); + it('emits a TransferSingle event', async function () { + await expect(this.tx) + .to.emit(this.token, 'TransferSingle') + .withArgs(this.operator.address, ethers.ZeroAddress, this.holder.address, tokenId, mintValue); }); it('credits the minted token value', async function () { - expect(await this.token.balanceOf(tokenHolder, tokenId)).to.be.bignumber.equal(mintValue); + expect(await this.token.balanceOf(this.holder, tokenId)).to.equal(mintValue); }); }); }); describe('_mintBatch', function () { it('reverts with a zero destination address', async function () { - await expectRevertCustomError( - this.token.$_mintBatch(ZERO_ADDRESS, tokenBatchIds, mintValues, data), - 'ERC1155InvalidReceiver', - [ZERO_ADDRESS], - ); + await expect(this.token.$_mintBatch(ethers.ZeroAddress, tokenBatchIds, mintValues, data)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') + .withArgs(ethers.ZeroAddress); }); it('reverts if length of inputs do not match', async function () { - await expectRevertCustomError( - this.token.$_mintBatch(tokenBatchHolder, tokenBatchIds, mintValues.slice(1), data), - 'ERC1155InvalidArrayLength', - [tokenBatchIds.length, mintValues.length - 1], - ); - - await expectRevertCustomError( - this.token.$_mintBatch(tokenBatchHolder, tokenBatchIds.slice(1), mintValues, data), - 'ERC1155InvalidArrayLength', - [tokenBatchIds.length - 1, mintValues.length], - ); + await expect(this.token.$_mintBatch(this.holder, tokenBatchIds, mintValues.slice(1), data)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidArrayLength') + .withArgs(tokenBatchIds.length, mintValues.length - 1); + + await expect(this.token.$_mintBatch(this.holder, tokenBatchIds.slice(1), mintValues, data)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidArrayLength') + .withArgs(tokenBatchIds.length - 1, mintValues.length); }); - context('with minted batch of tokens', function () { + describe('with minted batch of tokens', function () { beforeEach(async function () { - this.receipt = await this.token.$_mintBatch(tokenBatchHolder, tokenBatchIds, mintValues, data, { - from: operator, - }); + this.tx = await this.token.connect(this.operator).$_mintBatch(this.holder, tokenBatchIds, mintValues, data); }); - it('emits a TransferBatch event', function () { - expectEvent(this.receipt, 'TransferBatch', { - operator, - from: ZERO_ADDRESS, - to: tokenBatchHolder, - }); + it('emits a TransferBatch event', async function () { + await expect(this.tx) + .to.emit(this.token, 'TransferBatch') + .withArgs(this.operator.address, ethers.ZeroAddress, this.holder.address, tokenBatchIds, mintValues); }); it('credits the minted batch of tokens', async function () { const holderBatchBalances = await this.token.balanceOfBatch( - new Array(tokenBatchIds.length).fill(tokenBatchHolder), + tokenBatchIds.map(() => this.holder), tokenBatchIds, ); - for (let i = 0; i < holderBatchBalances.length; i++) { - expect(holderBatchBalances[i]).to.be.bignumber.equal(mintValues[i]); - } + expect(holderBatchBalances).to.deep.equal(mintValues); }); }); }); describe('_burn', function () { it("reverts when burning the zero account's tokens", async function () { - await expectRevertCustomError(this.token.$_burn(ZERO_ADDRESS, tokenId, mintValue), 'ERC1155InvalidSender', [ - ZERO_ADDRESS, - ]); + await expect(this.token.$_burn(ethers.ZeroAddress, tokenId, mintValue)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidSender') + .withArgs(ethers.ZeroAddress); }); it('reverts when burning a non-existent token id', async function () { - await expectRevertCustomError( - this.token.$_burn(tokenHolder, tokenId, mintValue), - 'ERC1155InsufficientBalance', - [tokenHolder, 0, mintValue, tokenId], - ); + await expect(this.token.$_burn(this.holder, tokenId, mintValue)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') + .withArgs(this.holder.address, 0, mintValue, tokenId); }); it('reverts when burning more than available tokens', async function () { - await this.token.$_mint(tokenHolder, tokenId, mintValue, data, { from: operator }); + await this.token.connect(this.operator).$_mint(this.holder, tokenId, mintValue, data); - await expectRevertCustomError( - this.token.$_burn(tokenHolder, tokenId, mintValue.addn(1)), - 'ERC1155InsufficientBalance', - [tokenHolder, mintValue, mintValue.addn(1), tokenId], - ); + await expect(this.token.$_burn(this.holder, tokenId, mintValue + 1n)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') + .withArgs(this.holder.address, mintValue, mintValue + 1n, tokenId); }); - context('with minted-then-burnt tokens', function () { + describe('with minted-then-burnt tokens', function () { beforeEach(async function () { - await this.token.$_mint(tokenHolder, tokenId, mintValue, data); - this.receipt = await this.token.$_burn(tokenHolder, tokenId, burnValue, { from: operator }); + await this.token.$_mint(this.holder, tokenId, mintValue, data); + this.tx = await this.token.connect(this.operator).$_burn(this.holder, tokenId, burnValue); }); - it('emits a TransferSingle event', function () { - expectEvent(this.receipt, 'TransferSingle', { - operator, - from: tokenHolder, - to: ZERO_ADDRESS, - id: tokenId, - value: burnValue, - }); + it('emits a TransferSingle event', async function () { + await expect(this.tx) + .to.emit(this.token, 'TransferSingle') + .withArgs(this.operator.address, this.holder.address, ethers.ZeroAddress, tokenId, burnValue); }); it('accounts for both minting and burning', async function () { - expect(await this.token.balanceOf(tokenHolder, tokenId)).to.be.bignumber.equal(mintValue.sub(burnValue)); + expect(await this.token.balanceOf(this.holder, tokenId)).to.equal(mintValue - burnValue); }); }); }); describe('_burnBatch', function () { it("reverts when burning the zero account's tokens", async function () { - await expectRevertCustomError( - this.token.$_burnBatch(ZERO_ADDRESS, tokenBatchIds, burnValues), - 'ERC1155InvalidSender', - [ZERO_ADDRESS], - ); + await expect(this.token.$_burnBatch(ethers.ZeroAddress, tokenBatchIds, burnValues)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidSender') + .withArgs(ethers.ZeroAddress); }); it('reverts if length of inputs do not match', async function () { - await expectRevertCustomError( - this.token.$_burnBatch(tokenBatchHolder, tokenBatchIds, burnValues.slice(1)), - 'ERC1155InvalidArrayLength', - [tokenBatchIds.length, burnValues.length - 1], - ); - - await expectRevertCustomError( - this.token.$_burnBatch(tokenBatchHolder, tokenBatchIds.slice(1), burnValues), - 'ERC1155InvalidArrayLength', - [tokenBatchIds.length - 1, burnValues.length], - ); + await expect(this.token.$_burnBatch(this.holder, tokenBatchIds, burnValues.slice(1))) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidArrayLength') + .withArgs(tokenBatchIds.length, burnValues.length - 1); + + await expect(this.token.$_burnBatch(this.holder, tokenBatchIds.slice(1), burnValues)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidArrayLength') + .withArgs(tokenBatchIds.length - 1, burnValues.length); }); it('reverts when burning a non-existent token id', async function () { - await expectRevertCustomError( - this.token.$_burnBatch(tokenBatchHolder, tokenBatchIds, burnValues), - 'ERC1155InsufficientBalance', - [tokenBatchHolder, 0, tokenBatchIds[0], burnValues[0]], - ); + await expect(this.token.$_burnBatch(this.holder, tokenBatchIds, burnValues)) + .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') + .withArgs(this.holder.address, 0, burnValues[0], tokenBatchIds[0]); }); - context('with minted-then-burnt tokens', function () { + describe('with minted-then-burnt tokens', function () { beforeEach(async function () { - await this.token.$_mintBatch(tokenBatchHolder, tokenBatchIds, mintValues, data); - this.receipt = await this.token.$_burnBatch(tokenBatchHolder, tokenBatchIds, burnValues, { from: operator }); + await this.token.$_mintBatch(this.holder, tokenBatchIds, mintValues, data); + this.tx = await this.token.connect(this.operator).$_burnBatch(this.holder, tokenBatchIds, burnValues); }); - it('emits a TransferBatch event', function () { - expectEvent(this.receipt, 'TransferBatch', { - operator, - from: tokenBatchHolder, - to: ZERO_ADDRESS, - // ids: tokenBatchIds, - // values: burnValues, - }); + it('emits a TransferBatch event', async function () { + await expect(this.tx) + .to.emit(this.token, 'TransferBatch') + .withArgs(this.operator.address, this.holder.address, ethers.ZeroAddress, tokenBatchIds, burnValues); }); it('accounts for both minting and burning', async function () { const holderBatchBalances = await this.token.balanceOfBatch( - new Array(tokenBatchIds.length).fill(tokenBatchHolder), + tokenBatchIds.map(() => this.holder), tokenBatchIds, ); - for (let i = 0; i < holderBatchBalances.length; i++) { - expect(holderBatchBalances[i]).to.be.bignumber.equal(mintValues[i].sub(burnValues[i])); - } + expect(holderBatchBalances).to.deep.equal( + zip(mintValues, burnValues).map(([mintValue, burnValue]) => mintValue - burnValue), + ); }); }); }); }); describe('ERC1155MetadataURI', function () { - const firstTokenID = new BN('42'); - const secondTokenID = new BN('1337'); + const firstTokenID = 42n; + const secondTokenID = 1337n; it('emits no URI event in constructor', async function () { - await expectEvent.notEmitted.inConstruction(this.token, 'URI'); + await expect(this.token.deploymentTransaction()).to.not.emit(this.token, 'URI'); }); it('sets the initial URI for all token types', async function () { - expect(await this.token.uri(firstTokenID)).to.be.equal(initialURI); - expect(await this.token.uri(secondTokenID)).to.be.equal(initialURI); + expect(await this.token.uri(firstTokenID)).to.equal(initialURI); + expect(await this.token.uri(secondTokenID)).to.equal(initialURI); }); describe('_setURI', function () { const newURI = 'https://token-cdn-domain/{locale}/{id}.json'; it('emits no URI event', async function () { - const receipt = await this.token.$_setURI(newURI); - - expectEvent.notEmitted(receipt, 'URI'); + await expect(this.token.$_setURI(newURI)).to.not.emit(this.token, 'URI'); }); it('sets the new URI for all token types', async function () { await this.token.$_setURI(newURI); - expect(await this.token.uri(firstTokenID)).to.be.equal(newURI); - expect(await this.token.uri(secondTokenID)).to.be.equal(newURI); + expect(await this.token.uri(firstTokenID)).to.equal(newURI); + expect(await this.token.uri(secondTokenID)).to.equal(newURI); }); }); }); diff --git a/test/token/ERC1155/extensions/ERC1155Burnable.test.js b/test/token/ERC1155/extensions/ERC1155Burnable.test.js index fc94db052..6a75dc223 100644 --- a/test/token/ERC1155/extensions/ERC1155Burnable.test.js +++ b/test/token/ERC1155/extensions/ERC1155Burnable.test.js @@ -1,71 +1,66 @@ -const { BN } = require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { expectRevertCustomError } = require('../../../helpers/customError'); - -const ERC1155Burnable = artifacts.require('$ERC1155Burnable'); +const ids = [42n, 1137n]; +const values = [3000n, 9902n]; -contract('ERC1155Burnable', function (accounts) { - const [holder, operator, other] = accounts; +async function fixture() { + const [holder, operator, other] = await ethers.getSigners(); - const uri = 'https://token.com'; + const token = await ethers.deployContract('$ERC1155Burnable', ['https://token-cdn-domain/{id}.json']); + await token.$_mint(holder, ids[0], values[0], '0x'); + await token.$_mint(holder, ids[1], values[1], '0x'); - const tokenIds = [new BN('42'), new BN('1137')]; - const values = [new BN('3000'), new BN('9902')]; + return { token, holder, operator, other }; +} +describe('ERC1155Burnable', function () { beforeEach(async function () { - this.token = await ERC1155Burnable.new(uri); - - await this.token.$_mint(holder, tokenIds[0], values[0], '0x'); - await this.token.$_mint(holder, tokenIds[1], values[1], '0x'); + Object.assign(this, await loadFixture(fixture)); }); describe('burn', function () { it('holder can burn their tokens', async function () { - await this.token.burn(holder, tokenIds[0], values[0].subn(1), { from: holder }); + await this.token.connect(this.holder).burn(this.holder, ids[0], values[0] - 1n); - expect(await this.token.balanceOf(holder, tokenIds[0])).to.be.bignumber.equal('1'); + expect(await this.token.balanceOf(this.holder, ids[0])).to.equal(1n); }); it("approved operators can burn the holder's tokens", async function () { - await this.token.setApprovalForAll(operator, true, { from: holder }); - await this.token.burn(holder, tokenIds[0], values[0].subn(1), { from: operator }); + await this.token.connect(this.holder).setApprovalForAll(this.operator, true); + await this.token.connect(this.operator).burn(this.holder, ids[0], values[0] - 1n); - expect(await this.token.balanceOf(holder, tokenIds[0])).to.be.bignumber.equal('1'); + expect(await this.token.balanceOf(this.holder, ids[0])).to.equal(1n); }); it("unapproved accounts cannot burn the holder's tokens", async function () { - await expectRevertCustomError( - this.token.burn(holder, tokenIds[0], values[0].subn(1), { from: other }), - 'ERC1155MissingApprovalForAll', - [other, holder], - ); + await expect(this.token.connect(this.other).burn(this.holder, ids[0], values[0] - 1n)) + .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') + .withArgs(this.other.address, this.holder.address); }); }); describe('burnBatch', function () { it('holder can burn their tokens', async function () { - await this.token.burnBatch(holder, tokenIds, [values[0].subn(1), values[1].subn(2)], { from: holder }); + await this.token.connect(this.holder).burnBatch(this.holder, ids, [values[0] - 1n, values[1] - 2n]); - expect(await this.token.balanceOf(holder, tokenIds[0])).to.be.bignumber.equal('1'); - expect(await this.token.balanceOf(holder, tokenIds[1])).to.be.bignumber.equal('2'); + expect(await this.token.balanceOf(this.holder, ids[0])).to.equal(1n); + expect(await this.token.balanceOf(this.holder, ids[1])).to.equal(2n); }); it("approved operators can burn the holder's tokens", async function () { - await this.token.setApprovalForAll(operator, true, { from: holder }); - await this.token.burnBatch(holder, tokenIds, [values[0].subn(1), values[1].subn(2)], { from: operator }); + await this.token.connect(this.holder).setApprovalForAll(this.operator, true); + await this.token.connect(this.operator).burnBatch(this.holder, ids, [values[0] - 1n, values[1] - 2n]); - expect(await this.token.balanceOf(holder, tokenIds[0])).to.be.bignumber.equal('1'); - expect(await this.token.balanceOf(holder, tokenIds[1])).to.be.bignumber.equal('2'); + expect(await this.token.balanceOf(this.holder, ids[0])).to.equal(1n); + expect(await this.token.balanceOf(this.holder, ids[1])).to.equal(2n); }); it("unapproved accounts cannot burn the holder's tokens", async function () { - await expectRevertCustomError( - this.token.burnBatch(holder, tokenIds, [values[0].subn(1), values[1].subn(2)], { from: other }), - 'ERC1155MissingApprovalForAll', - [other, holder], - ); + await expect(this.token.connect(this.other).burnBatch(this.holder, ids, [values[0] - 1n, values[1] - 2n])) + .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') + .withArgs(this.other.address, this.holder.address); }); }); }); diff --git a/test/token/ERC1155/extensions/ERC1155Pausable.test.js b/test/token/ERC1155/extensions/ERC1155Pausable.test.js index 248ea5684..7038180bb 100644 --- a/test/token/ERC1155/extensions/ERC1155Pausable.test.js +++ b/test/token/ERC1155/extensions/ERC1155Pausable.test.js @@ -1,112 +1,104 @@ -const { BN } = require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { expectRevertCustomError } = require('../../../helpers/customError'); - -const ERC1155Pausable = artifacts.require('$ERC1155Pausable'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -contract('ERC1155Pausable', function (accounts) { - const [holder, operator, receiver, other] = accounts; +async function fixture() { + const [holder, operator, receiver, other] = await ethers.getSigners(); + const token = await ethers.deployContract('$ERC1155Pausable', ['https://token-cdn-domain/{id}.json']); + return { token, holder, operator, receiver, other }; +} - const uri = 'https://token.com'; +contract('ERC1155Pausable', function () { + const firstTokenId = 37n; + const firstTokenValue = 42n; + const secondTokenId = 19842n; + const secondTokenValue = 23n; beforeEach(async function () { - this.token = await ERC1155Pausable.new(uri); + Object.assign(this, await loadFixture(fixture)); }); context('when token is paused', function () { - const firstTokenId = new BN('37'); - const firstTokenValue = new BN('42'); - - const secondTokenId = new BN('19842'); - const secondTokenValue = new BN('23'); - beforeEach(async function () { - await this.token.setApprovalForAll(operator, true, { from: holder }); - await this.token.$_mint(holder, firstTokenId, firstTokenValue, '0x'); - + await this.token.connect(this.holder).setApprovalForAll(this.operator, true); + await this.token.$_mint(this.holder, firstTokenId, firstTokenValue, '0x'); await this.token.$_pause(); }); it('reverts when trying to safeTransferFrom from holder', async function () { - await expectRevertCustomError( - this.token.safeTransferFrom(holder, receiver, firstTokenId, firstTokenValue, '0x', { from: holder }), - 'EnforcedPause', - [], - ); + await expect( + this.token + .connect(this.holder) + .safeTransferFrom(this.holder, this.receiver, firstTokenId, firstTokenValue, '0x'), + ).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); it('reverts when trying to safeTransferFrom from operator', async function () { - await expectRevertCustomError( - this.token.safeTransferFrom(holder, receiver, firstTokenId, firstTokenValue, '0x', { from: operator }), - 'EnforcedPause', - [], - ); + await expect( + this.token + .connect(this.operator) + .safeTransferFrom(this.holder, this.receiver, firstTokenId, firstTokenValue, '0x'), + ).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); it('reverts when trying to safeBatchTransferFrom from holder', async function () { - await expectRevertCustomError( - this.token.safeBatchTransferFrom(holder, receiver, [firstTokenId], [firstTokenValue], '0x', { from: holder }), - 'EnforcedPause', - [], - ); + await expect( + this.token + .connect(this.holder) + .safeBatchTransferFrom(this.holder, this.receiver, [firstTokenId], [firstTokenValue], '0x'), + ).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); it('reverts when trying to safeBatchTransferFrom from operator', async function () { - await expectRevertCustomError( - this.token.safeBatchTransferFrom(holder, receiver, [firstTokenId], [firstTokenValue], '0x', { - from: operator, - }), - 'EnforcedPause', - [], - ); + await expect( + this.token + .connect(this.operator) + .safeBatchTransferFrom(this.holder, this.receiver, [firstTokenId], [firstTokenValue], '0x'), + ).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); it('reverts when trying to mint', async function () { - await expectRevertCustomError( - this.token.$_mint(holder, secondTokenId, secondTokenValue, '0x'), + await expect(this.token.$_mint(this.holder, secondTokenId, secondTokenValue, '0x')).to.be.revertedWithCustomError( + this.token, 'EnforcedPause', - [], ); }); it('reverts when trying to mintBatch', async function () { - await expectRevertCustomError( - this.token.$_mintBatch(holder, [secondTokenId], [secondTokenValue], '0x'), - 'EnforcedPause', - [], - ); + await expect( + this.token.$_mintBatch(this.holder, [secondTokenId], [secondTokenValue], '0x'), + ).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); it('reverts when trying to burn', async function () { - await expectRevertCustomError(this.token.$_burn(holder, firstTokenId, firstTokenValue), 'EnforcedPause', []); + await expect(this.token.$_burn(this.holder, firstTokenId, firstTokenValue)).to.be.revertedWithCustomError( + this.token, + 'EnforcedPause', + ); }); it('reverts when trying to burnBatch', async function () { - await expectRevertCustomError( - this.token.$_burnBatch(holder, [firstTokenId], [firstTokenValue]), - 'EnforcedPause', - [], - ); + await expect( + this.token.$_burnBatch(this.holder, [firstTokenId], [firstTokenValue]), + ).to.be.revertedWithCustomError(this.token, 'EnforcedPause'); }); describe('setApprovalForAll', function () { it('approves an operator', async function () { - await this.token.setApprovalForAll(other, true, { from: holder }); - expect(await this.token.isApprovedForAll(holder, other)).to.equal(true); + await this.token.connect(this.holder).setApprovalForAll(this.other, true); + expect(await this.token.isApprovedForAll(this.holder, this.other)).to.be.true; }); }); describe('balanceOf', function () { it('returns the token value owned by the given address', async function () { - const balance = await this.token.balanceOf(holder, firstTokenId); - expect(balance).to.be.bignumber.equal(firstTokenValue); + expect(await this.token.balanceOf(this.holder, firstTokenId)).to.equal(firstTokenValue); }); }); describe('isApprovedForAll', function () { it('returns the approval of the operator', async function () { - expect(await this.token.isApprovedForAll(holder, operator)).to.equal(true); + expect(await this.token.isApprovedForAll(this.holder, this.operator)).to.be.true; }); }); }); diff --git a/test/token/ERC1155/extensions/ERC1155Supply.test.js b/test/token/ERC1155/extensions/ERC1155Supply.test.js index bf86920f6..72736d836 100644 --- a/test/token/ERC1155/extensions/ERC1155Supply.test.js +++ b/test/token/ERC1155/extensions/ERC1155Supply.test.js @@ -1,116 +1,119 @@ -const { BN, constants } = require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { ZERO_ADDRESS } = constants; - -const ERC1155Supply = artifacts.require('$ERC1155Supply'); - -contract('ERC1155Supply', function (accounts) { - const [holder] = accounts; - - const uri = 'https://token.com'; - - const firstTokenId = new BN('37'); - const firstTokenValue = new BN('42'); +async function fixture() { + const [holder] = await ethers.getSigners(); + const token = await ethers.deployContract('$ERC1155Supply', ['https://token-cdn-domain/{id}.json']); + return { token, holder }; +} - const secondTokenId = new BN('19842'); - const secondTokenValue = new BN('23'); +describe('ERC1155Supply', function () { + const firstTokenId = 37n; + const firstTokenValue = 42n; + const secondTokenId = 19842n; + const secondTokenValue = 23n; beforeEach(async function () { - this.token = await ERC1155Supply.new(uri); + Object.assign(this, await loadFixture(fixture)); }); - context('before mint', function () { + describe('before mint', function () { it('exist', async function () { - expect(await this.token.exists(firstTokenId)).to.be.equal(false); + expect(await this.token.exists(firstTokenId)).to.be.false; }); it('totalSupply', async function () { - expect(await this.token.methods['totalSupply(uint256)'](firstTokenId)).to.be.bignumber.equal('0'); - expect(await this.token.methods['totalSupply()']()).to.be.bignumber.equal('0'); + expect(await this.token.totalSupply(ethers.Typed.uint256(firstTokenId))).to.equal(0n); + expect(await this.token.totalSupply()).to.equal(0n); }); }); - context('after mint', function () { - context('single', function () { + describe('after mint', function () { + describe('single', function () { beforeEach(async function () { - await this.token.$_mint(holder, firstTokenId, firstTokenValue, '0x'); + await this.token.$_mint(this.holder, firstTokenId, firstTokenValue, '0x'); }); it('exist', async function () { - expect(await this.token.exists(firstTokenId)).to.be.equal(true); + expect(await this.token.exists(firstTokenId)).to.be.true; }); it('totalSupply', async function () { - expect(await this.token.methods['totalSupply(uint256)'](firstTokenId)).to.be.bignumber.equal(firstTokenValue); - expect(await this.token.methods['totalSupply()']()).to.be.bignumber.equal(firstTokenValue); + expect(await this.token.totalSupply(ethers.Typed.uint256(firstTokenId))).to.equal(firstTokenValue); + expect(await this.token.totalSupply()).to.equal(firstTokenValue); }); }); - context('batch', function () { + describe('batch', function () { beforeEach(async function () { - await this.token.$_mintBatch(holder, [firstTokenId, secondTokenId], [firstTokenValue, secondTokenValue], '0x'); + await this.token.$_mintBatch( + this.holder, + [firstTokenId, secondTokenId], + [firstTokenValue, secondTokenValue], + '0x', + ); }); it('exist', async function () { - expect(await this.token.exists(firstTokenId)).to.be.equal(true); - expect(await this.token.exists(secondTokenId)).to.be.equal(true); + expect(await this.token.exists(firstTokenId)).to.be.true; + expect(await this.token.exists(secondTokenId)).to.be.true; }); it('totalSupply', async function () { - expect(await this.token.methods['totalSupply(uint256)'](firstTokenId)).to.be.bignumber.equal(firstTokenValue); - expect(await this.token.methods['totalSupply(uint256)'](secondTokenId)).to.be.bignumber.equal(secondTokenValue); - expect(await this.token.methods['totalSupply()']()).to.be.bignumber.equal( - firstTokenValue.add(secondTokenValue), - ); + expect(await this.token.totalSupply(ethers.Typed.uint256(firstTokenId))).to.equal(firstTokenValue); + expect(await this.token.totalSupply(ethers.Typed.uint256(secondTokenId))).to.equal(secondTokenValue); + expect(await this.token.totalSupply()).to.equal(firstTokenValue + secondTokenValue); }); }); }); - context('after burn', function () { - context('single', function () { + describe('after burn', function () { + describe('single', function () { beforeEach(async function () { - await this.token.$_mint(holder, firstTokenId, firstTokenValue, '0x'); - await this.token.$_burn(holder, firstTokenId, firstTokenValue); + await this.token.$_mint(this.holder, firstTokenId, firstTokenValue, '0x'); + await this.token.$_burn(this.holder, firstTokenId, firstTokenValue); }); it('exist', async function () { - expect(await this.token.exists(firstTokenId)).to.be.equal(false); + expect(await this.token.exists(firstTokenId)).to.be.false; }); it('totalSupply', async function () { - expect(await this.token.methods['totalSupply(uint256)'](firstTokenId)).to.be.bignumber.equal('0'); - expect(await this.token.methods['totalSupply()']()).to.be.bignumber.equal('0'); + expect(await this.token.totalSupply(ethers.Typed.uint256(firstTokenId))).to.equal(0n); + expect(await this.token.totalSupply()).to.equal(0n); }); }); - context('batch', function () { + describe('batch', function () { beforeEach(async function () { - await this.token.$_mintBatch(holder, [firstTokenId, secondTokenId], [firstTokenValue, secondTokenValue], '0x'); - await this.token.$_burnBatch(holder, [firstTokenId, secondTokenId], [firstTokenValue, secondTokenValue]); + await this.token.$_mintBatch( + this.holder, + [firstTokenId, secondTokenId], + [firstTokenValue, secondTokenValue], + '0x', + ); + await this.token.$_burnBatch(this.holder, [firstTokenId, secondTokenId], [firstTokenValue, secondTokenValue]); }); it('exist', async function () { - expect(await this.token.exists(firstTokenId)).to.be.equal(false); - expect(await this.token.exists(secondTokenId)).to.be.equal(false); + expect(await this.token.exists(firstTokenId)).to.be.false; + expect(await this.token.exists(secondTokenId)).to.be.false; }); it('totalSupply', async function () { - expect(await this.token.methods['totalSupply(uint256)'](firstTokenId)).to.be.bignumber.equal('0'); - expect(await this.token.methods['totalSupply(uint256)'](secondTokenId)).to.be.bignumber.equal('0'); - expect(await this.token.methods['totalSupply()']()).to.be.bignumber.equal('0'); + expect(await this.token.totalSupply(ethers.Typed.uint256(firstTokenId))).to.equal(0n); + expect(await this.token.totalSupply(ethers.Typed.uint256(secondTokenId))).to.equal(0n); + expect(await this.token.totalSupply()).to.equal(0n); }); }); }); - context('other', function () { + describe('other', function () { it('supply unaffected by no-op', async function () { - this.token.safeTransferFrom(ZERO_ADDRESS, ZERO_ADDRESS, firstTokenId, firstTokenValue, '0x', { - from: ZERO_ADDRESS, - }); - expect(await this.token.methods['totalSupply(uint256)'](firstTokenId)).to.be.bignumber.equal('0'); - expect(await this.token.methods['totalSupply()']()).to.be.bignumber.equal('0'); + this.token.safeTransferFrom(ethers.ZeroAddress, ethers.ZeroAddress, firstTokenId, firstTokenValue, '0x'); + expect(await this.token.totalSupply(ethers.Typed.uint256(firstTokenId))).to.equal(0n); + expect(await this.token.totalSupply()).to.equal(0n); }); }); }); diff --git a/test/token/ERC1155/extensions/ERC1155URIStorage.test.js b/test/token/ERC1155/extensions/ERC1155URIStorage.test.js index 58ac67bc6..a0d9b5704 100644 --- a/test/token/ERC1155/extensions/ERC1155URIStorage.test.js +++ b/test/token/ERC1155/extensions/ERC1155URIStorage.test.js @@ -1,66 +1,70 @@ -const { BN, expectEvent } = require('@openzeppelin/test-helpers'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { artifacts } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const ERC1155URIStorage = artifacts.require('$ERC1155URIStorage'); +const erc1155Uri = 'https://token.com/nfts/'; +const baseUri = 'https://token.com/'; +const tokenId = 1n; +const value = 3000n; -contract(['ERC1155URIStorage'], function (accounts) { - const [holder] = accounts; +describe('ERC1155URIStorage', function () { + describe('with base uri set', function () { + async function fixture() { + const [holder] = await ethers.getSigners(); - const erc1155Uri = 'https://token.com/nfts/'; - const baseUri = 'https://token.com/'; + const token = await ethers.deployContract('$ERC1155URIStorage', [erc1155Uri]); + await token.$_setBaseURI(baseUri); + await token.$_mint(holder, tokenId, value, '0x'); - const tokenId = new BN('1'); - const value = new BN('3000'); + return { token, holder }; + } - describe('with base uri set', function () { beforeEach(async function () { - this.token = await ERC1155URIStorage.new(erc1155Uri); - await this.token.$_setBaseURI(baseUri); - - await this.token.$_mint(holder, tokenId, value, '0x'); + Object.assign(this, await loadFixture(fixture)); }); it('can request the token uri, returning the erc1155 uri if no token uri was set', async function () { - const receivedTokenUri = await this.token.uri(tokenId); - - expect(receivedTokenUri).to.be.equal(erc1155Uri); + expect(await this.token.uri(tokenId)).to.equal(erc1155Uri); }); it('can request the token uri, returning the concatenated uri if a token uri was set', async function () { const tokenUri = '1234/'; - const receipt = await this.token.$_setURI(tokenId, tokenUri); + const expectedUri = `${baseUri}${tokenUri}`; - const receivedTokenUri = await this.token.uri(tokenId); + await expect(this.token.$_setURI(ethers.Typed.uint256(tokenId), tokenUri)) + .to.emit(this.token, 'URI') + .withArgs(expectedUri, tokenId); - const expectedUri = `${baseUri}${tokenUri}`; - expect(receivedTokenUri).to.be.equal(expectedUri); - expectEvent(receipt, 'URI', { value: expectedUri, id: tokenId }); + expect(await this.token.uri(tokenId)).to.equal(expectedUri); }); }); describe('with base uri set to the empty string', function () { - beforeEach(async function () { - this.token = await ERC1155URIStorage.new(''); + async function fixture() { + const [holder] = await ethers.getSigners(); + + const token = await ethers.deployContract('$ERC1155URIStorage', ['']); + await token.$_mint(holder, tokenId, value, '0x'); - await this.token.$_mint(holder, tokenId, value, '0x'); + return { token, holder }; + } + + beforeEach(async function () { + Object.assign(this, await loadFixture(fixture)); }); it('can request the token uri, returning an empty string if no token uri was set', async function () { - const receivedTokenUri = await this.token.uri(tokenId); - - expect(receivedTokenUri).to.be.equal(''); + expect(await this.token.uri(tokenId)).to.equal(''); }); it('can request the token uri, returning the token uri if a token uri was set', async function () { const tokenUri = 'ipfs://1234/'; - const receipt = await this.token.$_setURI(tokenId, tokenUri); - const receivedTokenUri = await this.token.uri(tokenId); + await expect(this.token.$_setURI(ethers.Typed.uint256(tokenId), tokenUri)) + .to.emit(this.token, 'URI') + .withArgs(tokenUri, tokenId); - expect(receivedTokenUri).to.be.equal(tokenUri); - expectEvent(receipt, 'URI', { value: tokenUri, id: tokenId }); + expect(await this.token.uri(tokenId)).to.equal(tokenUri); }); }); }); diff --git a/test/token/ERC1155/utils/ERC1155Holder.test.js b/test/token/ERC1155/utils/ERC1155Holder.test.js index ee818eae8..52705fc45 100644 --- a/test/token/ERC1155/utils/ERC1155Holder.test.js +++ b/test/token/ERC1155/utils/ERC1155Holder.test.js @@ -1,64 +1,56 @@ -const { BN } = require('@openzeppelin/test-helpers'); - -const ERC1155Holder = artifacts.require('$ERC1155Holder'); -const ERC1155 = artifacts.require('$ERC1155'); - +const { ethers } = require('hardhat'); const { expect } = require('chai'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { shouldSupportInterfaces } = require('../../../utils/introspection/SupportsInterface.behavior'); -contract('ERC1155Holder', function (accounts) { - const [creator] = accounts; - const uri = 'https://token-cdn-domain/{id}.json'; - const multiTokenIds = [new BN(1), new BN(2), new BN(3)]; - const multiTokenValues = [new BN(1000), new BN(2000), new BN(3000)]; - const transferData = '0x12345678'; +const ids = [1n, 2n, 3n]; +const values = [1000n, 2000n, 3000n]; +const data = '0x12345678'; + +async function fixture() { + const [owner] = await ethers.getSigners(); + + const token = await ethers.deployContract('$ERC1155', ['https://token-cdn-domain/{id}.json']); + const mock = await ethers.deployContract('$ERC1155Holder'); + + await token.$_mintBatch(owner, ids, values, '0x'); + return { owner, token, mock }; +} + +describe('ERC1155Holder', function () { beforeEach(async function () { - this.multiToken = await ERC1155.new(uri); - this.holder = await ERC1155Holder.new(); - await this.multiToken.$_mintBatch(creator, multiTokenIds, multiTokenValues, '0x'); + Object.assign(this, await loadFixture(fixture)); }); shouldSupportInterfaces(['ERC165', 'ERC1155Receiver']); it('receives ERC1155 tokens from a single ID', async function () { - await this.multiToken.safeTransferFrom( - creator, - this.holder.address, - multiTokenIds[0], - multiTokenValues[0], - transferData, - { from: creator }, - ); + await this.token.connect(this.owner).safeTransferFrom(this.owner, this.mock, ids[0], values[0], data); - expect(await this.multiToken.balanceOf(this.holder.address, multiTokenIds[0])).to.be.bignumber.equal( - multiTokenValues[0], - ); + expect(await this.token.balanceOf(this.mock, ids[0])).to.equal(values[0]); - for (let i = 1; i < multiTokenIds.length; i++) { - expect(await this.multiToken.balanceOf(this.holder.address, multiTokenIds[i])).to.be.bignumber.equal(new BN(0)); + for (let i = 1; i < ids.length; i++) { + expect(await this.token.balanceOf(this.mock, ids[i])).to.equal(0n); } }); it('receives ERC1155 tokens from a multiple IDs', async function () { - for (let i = 0; i < multiTokenIds.length; i++) { - expect(await this.multiToken.balanceOf(this.holder.address, multiTokenIds[i])).to.be.bignumber.equal(new BN(0)); - } - - await this.multiToken.safeBatchTransferFrom( - creator, - this.holder.address, - multiTokenIds, - multiTokenValues, - transferData, - { from: creator }, - ); - - for (let i = 0; i < multiTokenIds.length; i++) { - expect(await this.multiToken.balanceOf(this.holder.address, multiTokenIds[i])).to.be.bignumber.equal( - multiTokenValues[i], - ); - } + expect( + await this.token.balanceOfBatch( + ids.map(() => this.mock), + ids, + ), + ).to.deep.equal(ids.map(() => 0n)); + + await this.token.connect(this.owner).safeBatchTransferFrom(this.owner, this.mock, ids, values, data); + + expect( + await this.token.balanceOfBatch( + ids.map(() => this.mock), + ids, + ), + ).to.deep.equal(values); }); }); diff --git a/test/token/ERC721/ERC721.behavior.js b/test/token/ERC721/ERC721.behavior.js index 32d67d90d..ff441f5e6 100644 --- a/test/token/ERC721/ERC721.behavior.js +++ b/test/token/ERC721/ERC721.behavior.js @@ -5,11 +5,9 @@ const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { shouldSupportInterfaces } = require('../../utils/introspection/SupportsInterface.behavior'); const { - bigint: { Enum }, + bigint: { RevertType }, } = require('../../helpers/enums'); -const RevertType = Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'); - const firstTokenId = 5042n; const secondTokenId = 79217n; const nonExistentTokenId = 13n; From 015ef69287ba794cba0551db124495d9dd977ad9 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Fri, 22 Dec 2023 20:50:25 +0100 Subject: [PATCH 146/167] Refactor time helper and remove custom error helper. (#4803) Co-authored-by: ernestognw --- test/access/AccessControl.behavior.js | 54 ++++++++------- test/access/manager/AccessManaged.test.js | 12 ++-- .../access/manager/AccessManager.predicate.js | 13 ++-- test/access/manager/AccessManager.test.js | 65 +++++++++---------- test/access/manager/AuthorityUtils.test.js | 2 +- test/finance/VestingWallet.behavior.js | 6 +- test/finance/VestingWallet.test.js | 3 +- test/governance/TimelockController.test.js | 32 ++++----- .../extensions/GovernorTimelockAccess.test.js | 7 +- .../GovernorTimelockControl.test.js | 2 +- test/governance/utils/Votes.behavior.js | 2 +- test/governance/utils/Votes.test.js | 2 +- test/helpers/access-manager.js | 15 ++--- test/helpers/constants.js | 10 +-- test/helpers/customError.js | 45 ------------- test/helpers/governance.js | 8 +-- test/helpers/namespaced-storage.js | 14 ++-- test/helpers/time.js | 48 +++++++++----- test/proxy/utils/Initializable.test.js | 4 +- test/token/ERC1155/ERC1155.behavior.js | 1 + test/token/ERC1155/ERC1155.test.js | 2 +- .../ERC20/extensions/ERC20Burnable.test.js | 1 + test/utils/math/Math.test.js | 1 + test/utils/math/SafeCast.test.js | 1 + test/utils/math/SignedMath.test.js | 1 + test/utils/structs/BitMap.test.js | 2 +- test/utils/structs/Checkpoints.test.js | 2 +- test/utils/structs/DoubleEndedQueue.test.js | 2 +- test/utils/structs/EnumerableMap.behavior.js | 2 +- test/utils/structs/EnumerableMap.test.js | 1 + test/utils/structs/EnumerableSet.test.js | 1 + test/utils/types/Time.test.js | 6 +- 32 files changed, 158 insertions(+), 209 deletions(-) delete mode 100644 test/helpers/customError.js diff --git a/test/access/AccessControl.behavior.js b/test/access/AccessControl.behavior.js index 836ca2d6a..e9027cd65 100644 --- a/test/access/AccessControl.behavior.js +++ b/test/access/AccessControl.behavior.js @@ -1,5 +1,6 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); + const { bigint: time } = require('../helpers/time'); const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior'); @@ -279,8 +280,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin); // Wait for acceptance - const acceptSchedule = (await time.clock.timestamp()) + this.delay; - await time.forward.timestamp(acceptSchedule + 1n, false); + await time.increaseBy.timestamp(this.delay + 1n, false); await this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer(); const value = await this.mock[getter](); @@ -309,7 +309,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it(`returns pending admin and schedule ${tag} it passes if not accepted`, async function () { // Wait until schedule + fromSchedule const { schedule: firstSchedule } = await this.mock.pendingDefaultAdmin(); - await time.forward.timestamp(firstSchedule + fromSchedule); + await time.increaseTo.timestamp(firstSchedule + fromSchedule); const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); expect(newAdmin).to.equal(this.newDefaultAdmin.address); @@ -320,7 +320,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it('returns 0 after schedule passes and the transfer was accepted', async function () { // Wait after schedule const { schedule: firstSchedule } = await this.mock.pendingDefaultAdmin(); - await time.forward.timestamp(firstSchedule + 1n, false); + await time.increaseTo.timestamp(firstSchedule + 1n, false); // Accepts await this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer(); @@ -352,7 +352,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it(`returns ${delayTag} delay ${tag} delay schedule passes`, async function () { // Wait until schedule + fromSchedule const { schedule } = await this.mock.pendingDefaultAdminDelay(); - await time.forward.timestamp(schedule + fromSchedule); + await time.increaseTo.timestamp(schedule + fromSchedule); const currentDelay = await this.mock.defaultAdminDelay(); expect(currentDelay).to.equal(expectNew ? newDelay : this.delay); @@ -383,7 +383,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it(`returns ${delayTag} delay ${tag} delay schedule passes`, async function () { // Wait until schedule + fromSchedule const { schedule: firstSchedule } = await this.mock.pendingDefaultAdminDelay(); - await time.forward.timestamp(firstSchedule + fromSchedule); + await time.increaseTo.timestamp(firstSchedule + fromSchedule); const { newDelay, schedule } = await this.mock.pendingDefaultAdminDelay(); expect(newDelay).to.equal(expectedDelay); @@ -437,7 +437,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { const nextBlockTimestamp = (await time.clock.timestamp()) + 1n; const acceptSchedule = nextBlockTimestamp + this.delay; - await time.forward.timestamp(nextBlockTimestamp, false); // set timestamp but don't mine the block yet + await time.increaseTo.timestamp(nextBlockTimestamp, false); // set timestamp but don't mine the block yet await expect(this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin)) .to.emit(this.mock, 'DefaultAdminTransferScheduled') .withArgs(this.newDefaultAdmin.address, acceptSchedule); @@ -461,7 +461,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { ]) { it(`should be able to begin a transfer again ${tag} acceptSchedule passes`, async function () { // Wait until schedule + fromSchedule - await time.forward.timestamp(this.acceptSchedule + fromSchedule, false); + await time.increaseTo.timestamp(this.acceptSchedule + fromSchedule, false); // defaultAdmin changes its mind and begin again to another address await expect(this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.other)).to.emit( @@ -477,7 +477,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it('should not emit a cancellation event if the new default admin accepted', async function () { // Wait until the acceptSchedule has passed - await time.forward.timestamp(this.acceptSchedule + 1n, false); + await time.increaseTo.timestamp(this.acceptSchedule + 1n, false); // Accept and restart await this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer(); @@ -506,7 +506,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { } delay and apply it to next default admin transfer schedule ${schedulePassed} effectSchedule passed`, async function () { // Wait until the expected fromSchedule time const nextBlockTimestamp = this.effectSchedule + fromSchedule; - await time.forward.timestamp(nextBlockTimestamp, false); + await time.increaseTo.timestamp(nextBlockTimestamp, false); // Start the new default admin transfer and get its schedule const expectedDelay = expectNewDelay ? newDelay : this.delay; @@ -531,7 +531,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { }); it('should revert if caller is not pending default admin', async function () { - await time.forward.timestamp(this.acceptSchedule + 1n, false); + await time.increaseTo.timestamp(this.acceptSchedule + 1n, false); await expect(this.mock.connect(this.other).acceptDefaultAdminTransfer()) .to.be.revertedWithCustomError(this.mock, 'AccessControlInvalidDefaultAdmin') .withArgs(this.other.address); @@ -539,7 +539,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { describe('when caller is pending default admin and delay has passed', function () { beforeEach(async function () { - await time.forward.timestamp(this.acceptSchedule + 1n, false); + await time.increaseTo.timestamp(this.acceptSchedule + 1n, false); }); it('accepts a transfer and changes default admin', async function () { @@ -568,7 +568,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { [0n, 'equal'], ]) { it(`should revert if block.timestamp is ${tag} to schedule`, async function () { - await time.forward.timestamp(this.acceptSchedule + fromSchedule, false); + await time.increaseTo.timestamp(this.acceptSchedule + fromSchedule, false); expect(this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer()) .to.be.revertedWithCustomError(this.mock, 'AccessControlEnforcedDefaultAdminDelay') .withArgs(this.acceptSchedule); @@ -597,7 +597,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { ]) { it(`resets pending default admin and schedule ${tag} transfer schedule passes`, async function () { // Advance until passed delay - await time.forward.timestamp(this.acceptSchedule + fromSchedule, false); + await time.increaseTo.timestamp(this.acceptSchedule + fromSchedule, false); await expect(this.mock.connect(this.defaultAdmin).cancelDefaultAdminTransfer()).to.emit( this.mock, @@ -614,7 +614,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await this.mock.connect(this.defaultAdmin).cancelDefaultAdminTransfer(); // Advance until passed delay - await time.forward.timestamp(this.acceptSchedule + 1n, false); + await time.increaseTo.timestamp(this.acceptSchedule + 1n, false); // Previous pending default admin should not be able to accept after cancellation. await expect(this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer()) @@ -641,19 +641,17 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { beforeEach(async function () { await this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(ethers.ZeroAddress); this.expectedSchedule = (await time.clock.timestamp()) + this.delay; - this.delayNotPassed = this.expectedSchedule; - this.delayPassed = this.expectedSchedule + 1n; }); it('reverts if caller is not default admin', async function () { - await time.forward.timestamp(this.delayPassed, false); + await time.increaseBy.timestamp(this.delay + 1n, false); await expect( this.mock.connect(this.defaultAdmin).renounceRole(DEFAULT_ADMIN_ROLE, this.other), ).to.be.revertedWithCustomError(this.mock, 'AccessControlBadConfirmation'); }); it("renouncing the admin role when not an admin doesn't affect the schedule", async function () { - await time.forward.timestamp(this.delayPassed, false); + await time.increaseBy.timestamp(this.delay + 1n, false); await this.mock.connect(this.other).renounceRole(DEFAULT_ADMIN_ROLE, this.other); const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); @@ -662,7 +660,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { }); it('keeps defaultAdmin consistent with hasRole if another non-defaultAdmin user renounces the DEFAULT_ADMIN_ROLE', async function () { - await time.forward.timestamp(this.delayPassed, false); + await time.increaseBy.timestamp(this.delay + 1n, false); // This passes because it's a noop await this.mock.connect(this.other).renounceRole(DEFAULT_ADMIN_ROLE, this.other); @@ -672,7 +670,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { }); it('renounces role', async function () { - await time.forward.timestamp(this.delayPassed, false); + await time.increaseBy.timestamp(this.delay + 1n, false); await expect(this.mock.connect(this.defaultAdmin).renounceRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)) .to.emit(this.mock, 'RoleRevoked') .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin.address, this.defaultAdmin.address); @@ -687,7 +685,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { }); it('allows to recover access using the internal _grantRole', async function () { - await time.forward.timestamp(this.delayPassed, false); + await time.increaseBy.timestamp(this.delay + 1n, false); await this.mock.connect(this.defaultAdmin).renounceRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin); await expect(this.mock.connect(this.defaultAdmin).$_grantRole(DEFAULT_ADMIN_ROLE, this.other)) @@ -701,7 +699,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { [0n, 'equal'], ]) { it(`reverts if block.timestamp is ${tag} to schedule`, async function () { - await time.forward.timestamp(this.delayNotPassed + fromSchedule, false); + await time.increaseBy.timestamp(this.delay + fromSchedule, false); await expect(this.mock.connect(this.defaultAdmin).renounceRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)) .to.be.revertedWithCustomError(this.mock, 'AccessControlEnforcedDefaultAdminDelay') .withArgs(this.expectedSchedule); @@ -736,7 +734,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { const nextBlockTimestamp = (await time.clock.timestamp()) + 1n; const effectSchedule = nextBlockTimestamp + changeDelay; - await time.forward.timestamp(nextBlockTimestamp, false); + await time.increaseTo.timestamp(nextBlockTimestamp, false); // Begins the change await expect(this.mock.connect(this.defaultAdmin).changeDefaultAdminDelay(this.newDefaultAdminDelay)) @@ -765,7 +763,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { // Wait until schedule + fromSchedule const { schedule: firstSchedule } = await this.mock.pendingDefaultAdminDelay(); const nextBlockTimestamp = firstSchedule + fromSchedule; - await time.forward.timestamp(nextBlockTimestamp, false); + await time.increaseTo.timestamp(nextBlockTimestamp, false); // Calculate expected values const anotherNewDefaultAdminDelay = this.newDefaultAdminDelay + time.duration.hours(2); @@ -788,7 +786,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it(`should ${emit} a cancellation event ${tag} the delay schedule passes`, async function () { // Wait until schedule + fromSchedule const { schedule: firstSchedule } = await this.mock.pendingDefaultAdminDelay(); - await time.forward.timestamp(firstSchedule + fromSchedule, false); + await time.increaseTo.timestamp(firstSchedule + fromSchedule, false); // Default admin changes its mind and begins another delay change const anotherNewDefaultAdminDelay = this.newDefaultAdminDelay + time.duration.hours(2); @@ -830,7 +828,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it(`resets pending delay and schedule ${tag} delay change schedule passes`, async function () { // Wait until schedule + fromSchedule const { schedule: firstSchedule } = await this.mock.pendingDefaultAdminDelay(); - await time.forward.timestamp(firstSchedule + fromSchedule, false); + await time.increaseTo.timestamp(firstSchedule + fromSchedule, false); await this.mock.connect(this.defaultAdmin).rollbackDefaultAdminDelay(); @@ -843,7 +841,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it(`should ${emit} a cancellation event ${tag} the delay schedule passes`, async function () { // Wait until schedule + fromSchedule const { schedule: firstSchedule } = await this.mock.pendingDefaultAdminDelay(); - await time.forward.timestamp(firstSchedule + fromSchedule, false); + await time.increaseTo.timestamp(firstSchedule + fromSchedule, false); const expected = expect(this.mock.connect(this.defaultAdmin).rollbackDefaultAdminDelay()); if (passed) { diff --git a/test/access/manager/AccessManaged.test.js b/test/access/manager/AccessManaged.test.js index b468128ff..8af07a7dd 100644 --- a/test/access/manager/AccessManaged.test.js +++ b/test/access/manager/AccessManaged.test.js @@ -1,7 +1,8 @@ -const { bigint: time } = require('../../helpers/time'); +const { ethers } = require('hardhat'); + const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { impersonate } = require('../../helpers/account'); -const { ethers } = require('hardhat'); +const { bigint: time } = require('../../helpers/time'); async function fixture() { const [admin, roleMember, other] = await ethers.getSigners(); @@ -84,14 +85,13 @@ describe('AccessManaged', function () { const calldata = this.managed.interface.encodeFunctionData(fn, []); // Schedule - const timestamp = await time.clock.timestamp(); - const scheduledAt = timestamp + 1n; + const scheduledAt = (await time.clock.timestamp()) + 1n; const when = scheduledAt + delay; - await time.forward.timestamp(scheduledAt, false); + await time.increaseTo.timestamp(scheduledAt, false); await this.authority.connect(this.roleMember).schedule(this.managed, calldata, when); // Set execution date - await time.forward.timestamp(when, false); + await time.increaseTo.timestamp(when, false); // Shouldn't revert await this.managed.connect(this.roleMember)[this.selector](); diff --git a/test/access/manager/AccessManager.predicate.js b/test/access/manager/AccessManager.predicate.js index 048437e03..5bf40a3d7 100644 --- a/test/access/manager/AccessManager.predicate.js +++ b/test/access/manager/AccessManager.predicate.js @@ -1,8 +1,9 @@ +const { ethers } = require('hardhat'); const { setStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); + const { EXECUTION_ID_STORAGE_SLOT, EXPIRATION, prepareOperation } = require('../../helpers/access-manager'); const { impersonate } = require('../../helpers/account'); const { bigint: time } = require('../../helpers/time'); -const { ethers } = require('hardhat'); // ============ COMMON PREDICATES ============ @@ -146,7 +147,7 @@ function testAsDelay(type, { before, after }) { describe(`when ${type} delay has not taken effect yet`, function () { beforeEach(`set next block timestamp before ${type} takes effect`, async function () { - await time.forward.timestamp(this.delayEffect - 1n, !!before.mineDelay); + await time.increaseTo.timestamp(this.delayEffect - 1n, !!before.mineDelay); }); before(); @@ -154,7 +155,7 @@ function testAsDelay(type, { before, after }) { describe(`when ${type} delay has taken effect`, function () { beforeEach(`set next block timestamp when ${type} takes effect`, async function () { - await time.forward.timestamp(this.delayEffect, !!after.mineDelay); + await time.increaseTo.timestamp(this.delayEffect, !!after.mineDelay); }); after(); @@ -187,7 +188,7 @@ function testAsSchedulableOperation({ scheduled: { before, after, expired }, not beforeEach('set next block time before operation is ready', async function () { this.scheduledAt = await time.clock.timestamp(); const schedule = await this.manager.getSchedule(this.operationId); - await time.forward.timestamp(schedule - 1n, !!before.mineDelay); + await time.increaseTo.timestamp(schedule - 1n, !!before.mineDelay); }); before(); @@ -197,7 +198,7 @@ function testAsSchedulableOperation({ scheduled: { before, after, expired }, not beforeEach('set next block time when operation is ready for execution', async function () { this.scheduledAt = await time.clock.timestamp(); const schedule = await this.manager.getSchedule(this.operationId); - await time.forward.timestamp(schedule, !!after.mineDelay); + await time.increaseTo.timestamp(schedule, !!after.mineDelay); }); after(); @@ -207,7 +208,7 @@ function testAsSchedulableOperation({ scheduled: { before, after, expired }, not beforeEach('set next block time when operation expired', async function () { this.scheduledAt = await time.clock.timestamp(); const schedule = await this.manager.getSchedule(this.operationId); - await time.forward.timestamp(schedule + EXPIRATION, !!expired.mineDelay); + await time.increaseTo.timestamp(schedule + EXPIRATION, !!expired.mineDelay); }); expired(); diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index b26a246af..ed16dd007 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -1,5 +1,12 @@ -const { ethers, expect } = require('hardhat'); +const { ethers } = require('hardhat'); +const { expect } = require('chai'); +const { loadFixture, getStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); + +const { impersonate } = require('../../helpers/account'); +const { MAX_UINT48 } = require('../../helpers/constants'); +const { bigint: time } = require('../../helpers/time'); const { selector } = require('../../helpers/methods'); + const { buildBaseRoles, formatAccess, @@ -26,17 +33,7 @@ const { testAsGetAccess, } = require('./AccessManager.predicate'); -const { - time: { increase }, - getStorageAt, - loadFixture, -} = require('@nomicfoundation/hardhat-network-helpers'); -const { MAX_UINT48 } = require('../../helpers/constants'); -const { impersonate } = require('../../helpers/account'); -const { bigint: time } = require('../../helpers/time'); -const { ZeroAddress: ZERO_ADDRESS, Wallet, toBeHex, id } = require('ethers'); - -const { address: someAddress } = Wallet.createRandom(); +const { address: someAddress } = ethers.Wallet.createRandom(); async function fixture() { const [admin, roleAdmin, roleGuardian, member, user, other] = await ethers.getSigners(); @@ -118,7 +115,7 @@ contract('AccessManager', function () { it('rejects zero address for initialAdmin', async function () { await expect(ethers.deployContract('$AccessManager', [ethers.ZeroAddress])) .to.be.revertedWithCustomError(this.manager, 'AccessManagerInvalidInitialAdmin') - .withArgs(ZERO_ADDRESS); + .withArgs(ethers.ZeroAddress); }); it('initializes setup roles correctly', async function () { @@ -759,7 +756,7 @@ contract('AccessManager', function () { describe('when is not scheduled', function () { it('returns default 0', async function () { - expect(await this.manager.getNonce(id('operation'))).to.equal(0n); + expect(await this.manager.getNonce(ethers.id('operation'))).to.equal(0n); }); }); }); @@ -912,7 +909,7 @@ contract('AccessManager', function () { beforeEach('sets old delay', async function () { this.role = this.roles.SOME; await this.manager.$_setGrantDelay(this.role.id, oldDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(oldDelay); }); @@ -924,7 +921,7 @@ contract('AccessManager', function () { .withArgs(this.role.id, newDelay, setGrantDelayAt + MINSETBACK); expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(oldDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(newDelay); }); }); @@ -935,7 +932,7 @@ contract('AccessManager', function () { beforeEach('sets old delay', async function () { this.role = this.roles.SOME; await this.manager.$_setGrantDelay(this.role.id, oldDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(oldDelay); }); @@ -950,7 +947,7 @@ contract('AccessManager', function () { .withArgs(this.role.id, newDelay, setGrantDelayAt + MINSETBACK); expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(oldDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(newDelay); }); }); @@ -973,7 +970,7 @@ contract('AccessManager', function () { .withArgs(this.role.id, newDelay, setGrantDelayAt + setback); expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(oldDelay); - await increase(setback); + await time.increaseBy.timestamp(setback); expect(await this.manager.getRoleGrantDelay(this.role.id)).to.equal(newDelay); }); }); @@ -998,7 +995,7 @@ contract('AccessManager', function () { beforeEach('sets old delay', async function () { await this.manager.$_setTargetAdminDelay(target, oldDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); }); @@ -1010,7 +1007,7 @@ contract('AccessManager', function () { .withArgs(target, newDelay, setTargetAdminDelayAt + MINSETBACK); expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); }); }); @@ -1021,7 +1018,7 @@ contract('AccessManager', function () { beforeEach('sets old delay', async function () { await this.manager.$_setTargetAdminDelay(target, oldDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); }); @@ -1036,7 +1033,7 @@ contract('AccessManager', function () { .withArgs(target, newDelay, setTargetAdminDelayAt + MINSETBACK); expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); }); }); @@ -1059,7 +1056,7 @@ contract('AccessManager', function () { .withArgs(target, newDelay, setTargetAdminDelayAt + setback); expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); - await increase(setback); + await time.increaseBy.timestamp(setback); expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); }); }); @@ -1205,7 +1202,7 @@ contract('AccessManager', function () { // Delay granting this.grantDelay = time.duration.weeks(2); await this.manager.$_setGrantDelay(ANOTHER_ROLE, this.grantDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); // Grant role this.executionDelay = time.duration.days(3); @@ -1279,7 +1276,7 @@ contract('AccessManager', function () { // Delay granting this.grantDelay = 0; await this.manager.$_setGrantDelay(ANOTHER_ROLE, this.grantDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); }); it('immediately grants the role to the user', async function () { @@ -1326,7 +1323,7 @@ contract('AccessManager', function () { // Delay granting const grantDelay = time.duration.weeks(2); await this.manager.$_setGrantDelay(ANOTHER_ROLE, grantDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); }); describe('when increasing the execution delay', function () { @@ -1443,7 +1440,7 @@ contract('AccessManager', function () { // Delay granting const grantDelay = 0; await this.manager.$_setGrantDelay(ANOTHER_ROLE, grantDelay); - await increase(MINSETBACK); + await time.increaseBy.timestamp(MINSETBACK); }); describe('when increasing the execution delay', function () { @@ -1942,7 +1939,7 @@ contract('AccessManager', function () { expect(expectedOperationId).to.equal(op1.operationId); // Consume - await increase(this.delay); + await time.increaseBy.timestamp(this.delay); await this.manager.$_consumeScheduledOp(expectedOperationId); // Check nonce @@ -2166,7 +2163,7 @@ contract('AccessManager', function () { delay, }); await schedule(); - await increase(delay); + await time.increaseBy.timestamp(delay); await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.emit(this.manager, 'OperationExecuted') .withArgs(operationId, 1n); @@ -2191,7 +2188,7 @@ contract('AccessManager', function () { // remove the execution delay await this.manager.$_grantRole(this.role.id, this.caller, 0, 0); - await increase(delay); + await time.increaseBy.timestamp(delay); await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.emit(this.manager, 'OperationExecuted') .withArgs(operationId, 1n); @@ -2217,7 +2214,7 @@ contract('AccessManager', function () { delay, }); await schedule(); - await increase(delay); + await time.increaseBy.timestamp(delay); await this.manager.connect(this.caller).execute(this.target, this.calldata); await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerNotScheduled') @@ -2241,7 +2238,7 @@ contract('AccessManager', function () { describe('when caller is not consuming scheduled operation', function () { beforeEach('set consuming false', async function () { - await this.target.setIsConsumingScheduledOp(false, toBeHex(CONSUMING_SCHEDULE_STORAGE_SLOT, 32)); + await this.target.setIsConsumingScheduledOp(false, ethers.toBeHex(CONSUMING_SCHEDULE_STORAGE_SLOT, 32)); }); it('reverts as AccessManagerUnauthorizedConsume', async function () { @@ -2253,7 +2250,7 @@ contract('AccessManager', function () { describe('when caller is consuming scheduled operation', function () { beforeEach('set consuming true', async function () { - await this.target.setIsConsumingScheduledOp(true, toBeHex(CONSUMING_SCHEDULE_STORAGE_SLOT, 32)); + await this.target.setIsConsumingScheduledOp(true, ethers.toBeHex(CONSUMING_SCHEDULE_STORAGE_SLOT, 32)); }); testAsSchedulableOperation({ diff --git a/test/access/manager/AuthorityUtils.test.js b/test/access/manager/AuthorityUtils.test.js index 6c353f206..c17220541 100644 --- a/test/access/manager/AuthorityUtils.test.js +++ b/test/access/manager/AuthorityUtils.test.js @@ -1,5 +1,5 @@ -const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { ethers } = require('hardhat'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); async function fixture() { const [user, other] = await ethers.getSigners(); diff --git a/test/finance/VestingWallet.behavior.js b/test/finance/VestingWallet.behavior.js index d4863bc52..53c8c565c 100644 --- a/test/finance/VestingWallet.behavior.js +++ b/test/finance/VestingWallet.behavior.js @@ -4,7 +4,7 @@ const { bigint: time } = require('../helpers/time'); function shouldBehaveLikeVesting() { it('check vesting schedule', async function () { for (const timestamp of this.schedule) { - await time.forward.timestamp(timestamp); + await time.increaseTo.timestamp(timestamp); const vesting = this.vestingFn(timestamp); expect(await this.mock.vestedAmount(...this.args, timestamp)).to.be.equal(vesting); @@ -24,7 +24,7 @@ function shouldBehaveLikeVesting() { } for (const timestamp of this.schedule) { - await time.forward.timestamp(timestamp, false); + await time.increaseTo.timestamp(timestamp, false); const vested = this.vestingFn(timestamp); const tx = await this.mock.release(...this.args); @@ -39,7 +39,7 @@ function shouldBehaveLikeVesting() { const { args, error } = await this.setupFailure(); for (const timestamp of this.schedule) { - await time.forward.timestamp(timestamp); + await time.increaseTo.timestamp(timestamp); await expect(this.mock.release(...args)).to.be.revertedWithCustomError(...error); } diff --git a/test/finance/VestingWallet.test.js b/test/finance/VestingWallet.test.js index fa60faea7..843918fee 100644 --- a/test/finance/VestingWallet.test.js +++ b/test/finance/VestingWallet.test.js @@ -1,8 +1,9 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { bigint: time } = require('../helpers/time'); + const { min } = require('../helpers/math'); +const { bigint: time } = require('../helpers/time'); const { shouldBehaveLikeVesting } = require('./VestingWallet.behavior'); diff --git a/test/governance/TimelockController.test.js b/test/governance/TimelockController.test.js index 9d3f5188b..709104743 100644 --- a/test/governance/TimelockController.test.js +++ b/test/governance/TimelockController.test.js @@ -329,7 +329,7 @@ describe('TimelockController', function () { it('revert if execution comes too early 2/2', async function () { // -1 is too tight, test sometime fails - await this.mock.getTimestamp(this.operation.id).then(clock => time.forward.timestamp(clock - 5n)); + await this.mock.getTimestamp(this.operation.id).then(clock => time.increaseTo.timestamp(clock - 5n)); await expect( this.mock @@ -348,7 +348,7 @@ describe('TimelockController', function () { describe('on time', function () { beforeEach(async function () { - await this.mock.getTimestamp(this.operation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(this.operation.id).then(time.increaseTo.timestamp); }); it('executor can reveal', async function () { @@ -407,7 +407,7 @@ describe('TimelockController', function () { ); // Advance on time to make the operation executable - await this.mock.getTimestamp(reentrantOperation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(reentrantOperation.id).then(time.increaseTo.timestamp); // Grant executor role to the reentrant contract await this.mock.connect(this.admin).grantRole(EXECUTOR_ROLE, reentrant); @@ -667,7 +667,7 @@ describe('TimelockController', function () { it('revert if execution comes too early 2/2', async function () { // -1 is to tight, test sometime fails - await this.mock.getTimestamp(this.operation.id).then(clock => time.forward.timestamp(clock - 5n)); + await this.mock.getTimestamp(this.operation.id).then(clock => time.increaseTo.timestamp(clock - 5n)); await expect( this.mock @@ -686,7 +686,7 @@ describe('TimelockController', function () { describe('on time', function () { beforeEach(async function () { - await this.mock.getTimestamp(this.operation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(this.operation.id).then(time.increaseTo.timestamp); }); it('executor can reveal', async function () { @@ -800,7 +800,7 @@ describe('TimelockController', function () { ); // Advance on time to make the operation executable - await this.mock.getTimestamp(reentrantBatchOperation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(reentrantBatchOperation.id).then(time.increaseTo.timestamp); // Grant executor role to the reentrant contract await this.mock.connect(this.admin).grantRole(EXECUTOR_ROLE, reentrant); @@ -883,7 +883,7 @@ describe('TimelockController', function () { MINDELAY, ); - await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(operation.id).then(time.increaseTo.timestamp); await expect( this.mock @@ -965,7 +965,7 @@ describe('TimelockController', function () { .connect(this.proposer) .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(operation.id).then(time.increaseTo.timestamp); await expect( this.mock @@ -1016,7 +1016,7 @@ describe('TimelockController', function () { MINDELAY, ); - await this.mock.getTimestamp(this.operation2.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(this.operation2.id).then(time.increaseTo.timestamp); }); it('cannot execute before dependency', async function () { @@ -1073,7 +1073,7 @@ describe('TimelockController', function () { .connect(this.proposer) .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(operation.id).then(time.increaseTo.timestamp); await this.mock .connect(this.executor) @@ -1095,7 +1095,7 @@ describe('TimelockController', function () { .connect(this.proposer) .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(operation.id).then(time.increaseTo.timestamp); await expect( this.mock @@ -1117,7 +1117,7 @@ describe('TimelockController', function () { .connect(this.proposer) .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(operation.id).then(time.increaseTo.timestamp); // Targeted function reverts with a panic code (0x1) + the timelock bubble the panic code await expect( @@ -1140,7 +1140,7 @@ describe('TimelockController', function () { .connect(this.proposer) .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(operation.id).then(time.increaseTo.timestamp); await expect( this.mock @@ -1164,7 +1164,7 @@ describe('TimelockController', function () { .connect(this.proposer) .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(operation.id).then(time.increaseTo.timestamp); expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); expect(await ethers.provider.getBalance(this.callreceivermock)).to.equal(0n); @@ -1192,7 +1192,7 @@ describe('TimelockController', function () { .connect(this.proposer) .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(operation.id).then(time.increaseTo.timestamp); expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); expect(await ethers.provider.getBalance(this.callreceivermock)).to.equal(0n); @@ -1220,7 +1220,7 @@ describe('TimelockController', function () { .connect(this.proposer) .schedule(operation.target, operation.value, operation.data, operation.predecessor, operation.salt, MINDELAY); - await this.mock.getTimestamp(operation.id).then(clock => time.forward.timestamp(clock)); + await this.mock.getTimestamp(operation.id).then(time.increaseTo.timestamp); expect(await ethers.provider.getBalance(this.mock)).to.equal(0n); expect(await ethers.provider.getBalance(this.callreceivermock)).to.equal(0n); diff --git a/test/governance/extensions/GovernorTimelockAccess.test.js b/test/governance/extensions/GovernorTimelockAccess.test.js index 2f16d1b99..a984a7f5e 100644 --- a/test/governance/extensions/GovernorTimelockAccess.test.js +++ b/test/governance/extensions/GovernorTimelockAccess.test.js @@ -595,7 +595,7 @@ describe('GovernorTimelockAccess', function () { .to.emit(this.mock, 'ProposalCanceled') .withArgs(original.currentProposal.id); - await time.clock.timestamp().then(clock => time.forward.timestamp(max(clock + 1n, eta))); + await time.clock.timestamp().then(clock => time.increaseTo.timestamp(max(clock + 1n, eta))); await expect(original.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') @@ -621,7 +621,7 @@ describe('GovernorTimelockAccess', function () { .to.emit(this.mock, 'ProposalCanceled') .withArgs(this.proposal.id); - await time.clock.timestamp().then(clock => time.forward.timestamp(max(clock + 1n, eta))); + await time.clock.timestamp().then(clock => time.increaseTo.timestamp(max(clock + 1n, eta))); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') @@ -639,14 +639,11 @@ describe('GovernorTimelockAccess', function () { await this.helper.waitForSnapshot(); await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); await this.helper.waitForDeadline(); - // await this.helper.queue(); - // const eta = await this.mock.proposalEta(this.proposal.id); await expect(this.helper.cancel('internal')) .to.emit(this.mock, 'ProposalCanceled') .withArgs(this.proposal.id); - // await time.forward.timestamp(eta); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( diff --git a/test/governance/extensions/GovernorTimelockControl.test.js b/test/governance/extensions/GovernorTimelockControl.test.js index 9f6bceb5b..71c2b188c 100644 --- a/test/governance/extensions/GovernorTimelockControl.test.js +++ b/test/governance/extensions/GovernorTimelockControl.test.js @@ -374,7 +374,7 @@ describe('GovernorTimelockControl', function () { await this.timelock.connect(this.owner).schedule(...call, delay); - await time.clock.timestamp().then(clock => time.forward.timestamp(clock + delay)); + await time.increaseBy.timestamp(delay); // Error bubbled up from Governor await expect(this.timelock.connect(this.owner).execute(...call)).to.be.revertedWithCustomError( diff --git a/test/governance/utils/Votes.behavior.js b/test/governance/utils/Votes.behavior.js index a08f184c8..be3a87db5 100644 --- a/test/governance/utils/Votes.behavior.js +++ b/test/governance/utils/Votes.behavior.js @@ -2,8 +2,8 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { mine } = require('@nomicfoundation/hardhat-network-helpers'); -const { bigint: time } = require('../../helpers/time'); const { getDomain, Delegation } = require('../../helpers/eip712'); +const { bigint: time } = require('../../helpers/time'); const { shouldBehaveLikeERC6372 } = require('./ERC6372.behavior'); diff --git a/test/governance/utils/Votes.test.js b/test/governance/utils/Votes.test.js index dda5e5c82..c133609bc 100644 --- a/test/governance/utils/Votes.test.js +++ b/test/governance/utils/Votes.test.js @@ -2,9 +2,9 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { bigint: time } = require('../../helpers/time'); const { sum } = require('../../helpers/math'); const { zip } = require('../../helpers/iterate'); +const { bigint: time } = require('../../helpers/time'); const { shouldBehaveLikeVotes } = require('./Votes.behavior'); diff --git a/test/helpers/access-manager.js b/test/helpers/access-manager.js index 5f55dd518..e08b48d4e 100644 --- a/test/helpers/access-manager.js +++ b/test/helpers/access-manager.js @@ -1,9 +1,7 @@ -const { - bigint: { MAX_UINT64 }, -} = require('./constants'); +const { ethers } = require('hardhat'); +const { MAX_UINT64 } = require('./constants'); const { namespaceSlot } = require('./namespaced-storage'); const { bigint: time } = require('./time'); -const { keccak256, AbiCoder } = require('ethers'); function buildBaseRoles() { const roles = { @@ -54,9 +52,8 @@ const CONSUMING_SCHEDULE_STORAGE_SLOT = namespaceSlot('AccessManaged', 0n); * @requires this.{manager, caller, target, calldata} */ async function prepareOperation(manager, { caller, target, calldata, delay }) { - const timestamp = await time.clock.timestamp(); - const scheduledAt = timestamp + 1n; - await time.forward.timestamp(scheduledAt, false); // Fix next block timestamp for predictability + const scheduledAt = (await time.clock.timestamp()) + 1n; + await time.increaseTo.timestamp(scheduledAt, false); // Fix next block timestamp for predictability return { schedule: () => manager.connect(caller).schedule(target, calldata, scheduledAt + delay), @@ -68,8 +65,8 @@ async function prepareOperation(manager, { caller, target, calldata, delay }) { const lazyGetAddress = addressable => addressable.address ?? addressable.target ?? addressable; const hashOperation = (caller, target, data) => - keccak256( - AbiCoder.defaultAbiCoder().encode( + ethers.keccak256( + ethers.AbiCoder.defaultAbiCoder().encode( ['address', 'address', 'bytes'], [lazyGetAddress(caller), lazyGetAddress(target), data], ), diff --git a/test/helpers/constants.js b/test/helpers/constants.js index 17937bee1..4dfda5eab 100644 --- a/test/helpers/constants.js +++ b/test/helpers/constants.js @@ -1,12 +1,4 @@ -// TODO: deprecate the old version in favor of this one -const bigint = { +module.exports = { MAX_UINT48: 2n ** 48n - 1n, MAX_UINT64: 2n ** 64n - 1n, }; - -// TODO: remove toString() when bigint are supported -module.exports = { - MAX_UINT48: bigint.MAX_UINT48.toString(), - MAX_UINT64: bigint.MAX_UINT64.toString(), - bigint, -}; diff --git a/test/helpers/customError.js b/test/helpers/customError.js deleted file mode 100644 index acc3214eb..000000000 --- a/test/helpers/customError.js +++ /dev/null @@ -1,45 +0,0 @@ -// DEPRECATED: replace with hardhat-toolbox chai matchers. - -const { expect } = require('chai'); - -/** Revert handler that supports custom errors. */ -async function expectRevertCustomError(promise, expectedErrorName, args) { - if (!Array.isArray(args)) { - expect.fail('Expected 3rd array parameter for error arguments'); - } - - await promise.then( - () => expect.fail("Expected promise to throw but it didn't"), - ({ message }) => { - // The revert message for custom errors looks like: - // VM Exception while processing transaction: - // reverted with custom error 'InvalidAccountNonce("0x70997970C51812dc3A010C7d01b50e0d17dc79C8", 0)' - - // Attempt to parse as a custom error - const match = message.match(/custom error '(?\w+)\((?.*)\)'/); - if (!match) { - expect.fail(`Could not parse as custom error. ${message}`); - } - // Extract the error name and parameters - const errorName = match.groups.name; - const argMatches = [...match.groups.args.matchAll(/-?\w+/g)]; - - // Assert error name - expect(errorName).to.be.equal( - expectedErrorName, - `Unexpected custom error name (with found args: [${argMatches.map(([a]) => a)}])`, - ); - - // Coerce to string for comparison since `arg` can be either a number or hex. - const sanitizedExpected = args.map(arg => arg.toString().toLowerCase()); - const sanitizedActual = argMatches.map(([arg]) => arg.toString().toLowerCase()); - - // Assert argument equality - expect(sanitizedActual).to.have.members(sanitizedExpected, `Unexpected ${errorName} arguments`); - }, - ); -} - -module.exports = { - expectRevertCustomError, -}; diff --git a/test/helpers/governance.js b/test/helpers/governance.js index c2e79461a..0efb3da5c 100644 --- a/test/helpers/governance.js +++ b/test/helpers/governance.js @@ -1,7 +1,7 @@ const { ethers } = require('hardhat'); -const { forward } = require('./time'); const { ProposalState } = require('./enums'); const { unique } = require('./iterate'); +const time = require('./time'); const timelockSalt = (address, descriptionHash) => ethers.toBeHex((ethers.toBigInt(address) << 96n) ^ ethers.toBigInt(descriptionHash), 32); @@ -131,17 +131,17 @@ class GovernorHelper { /// Clock helpers async waitForSnapshot(offset = 0n) { const timepoint = await this.governor.proposalSnapshot(this.id); - return forward[this.mode](timepoint + offset); + return time.increaseTo[this.mode](timepoint + offset); } async waitForDeadline(offset = 0n) { const timepoint = await this.governor.proposalDeadline(this.id); - return forward[this.mode](timepoint + offset); + return time.increaseTo[this.mode](timepoint + offset); } async waitForEta(offset = 0n) { const timestamp = await this.governor.proposalEta(this.id); - return forward.timestamp(timestamp + offset); + return time.increaseTo.timestamp(timestamp + offset); } /// Other helpers diff --git a/test/helpers/namespaced-storage.js b/test/helpers/namespaced-storage.js index 9fa704113..eccec3b52 100644 --- a/test/helpers/namespaced-storage.js +++ b/test/helpers/namespaced-storage.js @@ -1,21 +1,15 @@ -const { keccak256, id, toBeHex, MaxUint256 } = require('ethers'); -const { artifacts } = require('hardhat'); +const { ethers, artifacts } = require('hardhat'); +const { erc7201slot } = require('./erc1967'); function namespaceId(contractName) { return `openzeppelin.storage.${contractName}`; } -function namespaceLocation(value) { - const hashIdBN = BigInt(id(value)) - 1n; // keccak256(id) - 1 - const mask = MaxUint256 - 0xffn; // ~0xff - return BigInt(keccak256(toBeHex(hashIdBN, 32))) & mask; -} - function namespaceSlot(contractName, offset) { try { // Try to get the artifact paths, will throw if it doesn't exist artifacts._getArtifactPathSync(`${contractName}Upgradeable`); - return offset + namespaceLocation(namespaceId(contractName)); + return offset + ethers.toBigInt(erc7201slot(namespaceId(contractName))); } catch (_) { return offset; } @@ -23,6 +17,6 @@ function namespaceSlot(contractName, offset) { module.exports = { namespaceSlot, - namespaceLocation, + namespaceLocation: erc7201slot, namespaceId, }; diff --git a/test/helpers/time.js b/test/helpers/time.js index 5f85b6915..db72f2063 100644 --- a/test/helpers/time.js +++ b/test/helpers/time.js @@ -1,27 +1,39 @@ const { ethers } = require('hardhat'); -const { time, mineUpTo } = require('@nomicfoundation/hardhat-network-helpers'); +const { time, mine, mineUpTo } = require('@nomicfoundation/hardhat-network-helpers'); const { mapValues } = require('./iterate'); +const clock = { + blocknumber: () => time.latestBlock(), + timestamp: () => time.latest(), +}; +const clockFromReceipt = { + blocknumber: receipt => Promise.resolve(receipt.blockNumber), + timestamp: receipt => ethers.provider.getBlock(receipt.blockNumber).then(block => block.timestamp), +}; +const increaseBy = { + blockNumber: mine, + timestamp: (delay, mine = true) => + time.latest().then(clock => increaseTo.timestamp(clock + ethers.toNumber(delay), mine)), +}; +const increaseTo = { + blocknumber: mineUpTo, + timestamp: (to, mine = true) => (mine ? time.increaseTo(to) : time.setNextBlockTimestamp(to)), +}; +const duration = time.duration; + module.exports = { - clock: { - blocknumber: () => time.latestBlock(), - timestamp: () => time.latest(), - }, - clockFromReceipt: { - blocknumber: receipt => Promise.resolve(receipt.blockNumber), - timestamp: receipt => ethers.provider.getBlock(receipt.blockNumber).then(block => block.timestamp), - }, - forward: { - blocknumber: mineUpTo, - timestamp: (to, mine = true) => (mine ? time.increaseTo(to) : time.setNextBlockTimestamp(to)), - }, - duration: time.duration, + clock, + clockFromReceipt, + increaseBy, + increaseTo, + duration, }; // TODO: deprecate the old version in favor of this one module.exports.bigint = { - clock: mapValues(module.exports.clock, fn => () => fn().then(ethers.toBigInt)), - clockFromReceipt: mapValues(module.exports.clockFromReceipt, fn => receipt => fn(receipt).then(ethers.toBigInt)), - forward: module.exports.forward, - duration: mapValues(module.exports.duration, fn => n => ethers.toBigInt(fn(ethers.toNumber(n)))), + clock: mapValues(clock, fn => () => fn().then(ethers.toBigInt)), + clockFromReceipt: mapValues(clockFromReceipt, fn => receipt => fn(receipt).then(ethers.toBigInt)), + increaseBy: increaseBy, + increaseTo: increaseTo, + duration: mapValues(duration, fn => n => ethers.toBigInt(fn(ethers.toNumber(n)))), }; diff --git a/test/proxy/utils/Initializable.test.js b/test/proxy/utils/Initializable.test.js index bc26e6b60..6bf213f0d 100644 --- a/test/proxy/utils/Initializable.test.js +++ b/test/proxy/utils/Initializable.test.js @@ -1,8 +1,6 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { - bigint: { MAX_UINT64 }, -} = require('../../helpers/constants'); +const { MAX_UINT64 } = require('../../helpers/constants'); describe('Initializable', function () { describe('basic testing without inheritance', function () { diff --git a/test/token/ERC1155/ERC1155.behavior.js b/test/token/ERC1155/ERC1155.behavior.js index 4c81ea9d1..9ae706f84 100644 --- a/test/token/ERC1155/ERC1155.behavior.js +++ b/test/token/ERC1155/ERC1155.behavior.js @@ -1,6 +1,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); + const { bigint: { RevertType }, } = require('../../helpers/enums'); diff --git a/test/token/ERC1155/ERC1155.test.js b/test/token/ERC1155/ERC1155.test.js index c469dd845..486d1aec9 100644 --- a/test/token/ERC1155/ERC1155.test.js +++ b/test/token/ERC1155/ERC1155.test.js @@ -1,8 +1,8 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { zip } = require('../../helpers/iterate'); +const { zip } = require('../../helpers/iterate'); const { shouldBehaveLikeERC1155 } = require('./ERC1155.behavior'); const initialURI = 'https://token-cdn-domain/{id}.json'; diff --git a/test/token/ERC20/extensions/ERC20Burnable.test.js b/test/token/ERC20/extensions/ERC20Burnable.test.js index 8253acbf1..9fa02e44f 100644 --- a/test/token/ERC20/extensions/ERC20Burnable.test.js +++ b/test/token/ERC20/extensions/ERC20Burnable.test.js @@ -1,4 +1,5 @@ const { ethers } = require('hardhat'); +const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const name = 'My Token'; diff --git a/test/utils/math/Math.test.js b/test/utils/math/Math.test.js index 6e4fa3b9c..dda94f8d3 100644 --- a/test/utils/math/Math.test.js +++ b/test/utils/math/Math.test.js @@ -2,6 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); + const { min, max } = require('../../helpers/math'); const { bigint: { Rounding }, diff --git a/test/utils/math/SafeCast.test.js b/test/utils/math/SafeCast.test.js index dd04f75ba..a69e75c99 100644 --- a/test/utils/math/SafeCast.test.js +++ b/test/utils/math/SafeCast.test.js @@ -1,6 +1,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { range } = require('../../../scripts/helpers'); async function fixture() { diff --git a/test/utils/math/SignedMath.test.js b/test/utils/math/SignedMath.test.js index 253e72357..51aa5d8fb 100644 --- a/test/utils/math/SignedMath.test.js +++ b/test/utils/math/SignedMath.test.js @@ -1,6 +1,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { min, max } = require('../../helpers/math'); async function testCommutative(fn, lhs, rhs, expected, ...extra) { diff --git a/test/utils/structs/BitMap.test.js b/test/utils/structs/BitMap.test.js index 133f1f734..a7685414e 100644 --- a/test/utils/structs/BitMap.test.js +++ b/test/utils/structs/BitMap.test.js @@ -1,5 +1,5 @@ -const { expect } = require('chai'); const { ethers } = require('hardhat'); +const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); async function fixture() { diff --git a/test/utils/structs/Checkpoints.test.js b/test/utils/structs/Checkpoints.test.js index c5b9e65a0..2c15e082d 100644 --- a/test/utils/structs/Checkpoints.test.js +++ b/test/utils/structs/Checkpoints.test.js @@ -1,5 +1,5 @@ -const { expect } = require('chai'); const { ethers } = require('hardhat'); +const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { VALUE_SIZES } = require('../../../scripts/generate/templates/Checkpoints.opts.js'); diff --git a/test/utils/structs/DoubleEndedQueue.test.js b/test/utils/structs/DoubleEndedQueue.test.js index 92d9f530c..1f6e782b5 100644 --- a/test/utils/structs/DoubleEndedQueue.test.js +++ b/test/utils/structs/DoubleEndedQueue.test.js @@ -1,5 +1,5 @@ -const { expect } = require('chai'); const { ethers } = require('hardhat'); +const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); async function fixture() { diff --git a/test/utils/structs/EnumerableMap.behavior.js b/test/utils/structs/EnumerableMap.behavior.js index 9c675c62d..39e74a68e 100644 --- a/test/utils/structs/EnumerableMap.behavior.js +++ b/test/utils/structs/EnumerableMap.behavior.js @@ -1,5 +1,5 @@ -const { expect } = require('chai'); const { ethers } = require('hardhat'); +const { expect } = require('chai'); const zip = (array1, array2) => array1.map((item, index) => [item, array2[index]]); diff --git a/test/utils/structs/EnumerableMap.test.js b/test/utils/structs/EnumerableMap.test.js index 183a8c812..6df9871ae 100644 --- a/test/utils/structs/EnumerableMap.test.js +++ b/test/utils/structs/EnumerableMap.test.js @@ -1,5 +1,6 @@ const { ethers } = require('hardhat'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { mapValues } = require('../../helpers/iterate'); const { randomArray, generators } = require('../../helpers/random'); const { TYPES, formatType } = require('../../../scripts/generate/templates/EnumerableMap.opts'); diff --git a/test/utils/structs/EnumerableSet.test.js b/test/utils/structs/EnumerableSet.test.js index 4345dfe7d..db6c5a453 100644 --- a/test/utils/structs/EnumerableSet.test.js +++ b/test/utils/structs/EnumerableSet.test.js @@ -1,5 +1,6 @@ const { ethers } = require('hardhat'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { mapValues } = require('../../helpers/iterate'); const { randomArray, generators } = require('../../helpers/random'); const { TYPES } = require('../../../scripts/generate/templates/EnumerableSet.opts'); diff --git a/test/utils/types/Time.test.js b/test/utils/types/Time.test.js index c55a769f9..171a84526 100644 --- a/test/utils/types/Time.test.js +++ b/test/utils/types/Time.test.js @@ -1,12 +1,12 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { - bigint: { clock }, -} = require('../../helpers/time'); const { product } = require('../../helpers/iterate'); const { max } = require('../../helpers/math'); +const { + bigint: { clock }, +} = require('../../helpers/time'); const MAX_UINT32 = 1n << (32n - 1n); const MAX_UINT48 = 1n << (48n - 1n); From abcf9dd8b78ca81ac0c3571a6ce9831235ff1b4c Mon Sep 17 00:00:00 2001 From: cairo <101215230+cairoeth@users.noreply.github.com> Date: Fri, 22 Dec 2023 22:52:00 +0100 Subject: [PATCH 147/167] Replace Defender Admin with Transaction Proposals (#4804) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto García --- README.md | 2 +- docs/modules/ROOT/pages/governance.adoc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9ca41573f..06f54553a 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ :mage: **Not sure how to get started?** Check out [Contracts Wizard](https://wizard.openzeppelin.com/) — an interactive smart contract generator. -:building_construction: **Want to scale your decentralized application?** Check out [OpenZeppelin Defender](https://openzeppelin.com/defender) — a secure platform for automating and monitoring your operations. +:building_construction: **Want to scale your decentralized application?** Check out [OpenZeppelin Defender](https://openzeppelin.com/defender) — a mission-critical developer security platform to code, audit, deploy, monitor, and operate with confidence. > [!IMPORTANT] > OpenZeppelin Contracts uses semantic versioning to communicate backwards compatibility of its API and storage layout. For upgradeable contracts, the storage layout of different major versions should be assumed incompatible, for example, it is unsafe to upgrade from 4.9.3 to 5.0.0. Learn more at [Backwards Compatibility](https://docs.openzeppelin.com/contracts/backwards-compatibility). diff --git a/docs/modules/ROOT/pages/governance.adoc b/docs/modules/ROOT/pages/governance.adoc index fda51e6ff..27efeaf9a 100644 --- a/docs/modules/ROOT/pages/governance.adoc +++ b/docs/modules/ROOT/pages/governance.adoc @@ -32,7 +32,7 @@ When using a timelock with your Governor contract, you can use either OpenZeppel https://www.tally.xyz[Tally] is a full-fledged application for user owned on-chain governance. It comprises a voting dashboard, proposal creation wizard, real time research and analysis, and educational content. -For all of these options, the Governor will be compatible with Tally: users will be able to create proposals, see voting periods and delays following xref:api:interfaces.adoc#IERC6372[IERC6372], visualize voting power and advocates, navigate proposals, and cast votes. For proposal creation in particular, projects can also use Defender Admin as an alternative interface. +For all of these options, the Governor will be compatible with Tally: users will be able to create proposals, see voting periods and delays following xref:api:interfaces.adoc#IERC6372[IERC6372], visualize voting power and advocates, navigate proposals, and cast votes. For proposal creation in particular, projects can also use https://docs.openzeppelin.com/defender/module/actions#transaction-proposals-reference[Defender Transaction Proposals] as an alternative interface. In the rest of this guide, we will focus on a fresh deploy of the vanilla OpenZeppelin Governor features without concern for compatibility with GovernorAlpha or Bravo. @@ -102,7 +102,7 @@ A proposal is a sequence of actions that the Governor contract will perform if i Let’s say we want to create a proposal to give a team a grant, in the form of ERC-20 tokens from the governance treasury. This proposal will consist of a single action where the target is the ERC-20 token, calldata is the encoded function call `transfer(, )`, and with 0 ETH attached. -Generally a proposal will be created with the help of an interface such as Tally or Defender. Here we will show how to create the proposal using Ethers.js. +Generally a proposal will be created with the help of an interface such as Tally or https://docs.openzeppelin.com/defender/module/actions#transaction-proposals-reference[Defender Proposals]. Here we will show how to create the proposal using Ethers.js. First we get all the parameters necessary for the proposal action. From a72c9561b9c200bac87f14ffd43a8c719fd6fa5a Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 26 Dec 2023 23:46:06 +0100 Subject: [PATCH 148/167] Finalize test migration: remove legacy dependencies and test helpers (#4797) --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/workflows/checks.yml | 6 - .gitignore | 6 - README.md | 2 +- contracts/proxy/README.adoc | 2 +- docs/modules/ROOT/pages/index.adoc | 2 +- docs/modules/ROOT/pages/utilities.adoc | 9 +- docs/modules/ROOT/pages/wizard.adoc | 2 +- hardhat.config.js | 1 - hardhat/env-contract.js | 23 - package-lock.json | 17206 ++++++---------- package.json | 9 +- scripts/generate/templates/Checkpoints.js | 2 +- scripts/upgradeable/upgradeable.patch | 20 +- test/access/AccessControl.behavior.js | 62 +- test/access/AccessControl.test.js | 2 +- test/access/Ownable.test.js | 18 +- test/access/Ownable2Step.test.js | 22 +- .../AccessControlDefaultAdminRules.test.js | 6 +- .../AccessControlEnumerable.test.js | 2 +- test/access/manager/AccessManaged.test.js | 19 +- test/access/manager/AccessManager.behavior.js | 10 +- .../access/manager/AccessManager.predicate.js | 11 +- test/access/manager/AccessManager.test.js | 191 +- test/access/manager/AuthorityUtils.test.js | 1 + test/finance/VestingWallet.behavior.js | 2 +- test/finance/VestingWallet.test.js | 10 +- test/governance/Governor.test.js | 200 +- test/governance/TimelockController.test.js | 20 +- .../extensions/GovernorERC721.test.js | 20 +- .../GovernorPreventLateQuorum.test.js | 30 +- .../extensions/GovernorStorage.test.js | 10 +- .../extensions/GovernorTimelockAccess.test.js | 88 +- .../GovernorTimelockCompound.test.js | 84 +- .../GovernorTimelockControl.test.js | 86 +- .../GovernorVotesQuorumFraction.test.js | 20 +- .../extensions/GovernorWithParams.test.js | 24 +- test/governance/utils/ERC6372.behavior.js | 4 +- test/governance/utils/Votes.behavior.js | 40 +- test/governance/utils/Votes.test.js | 12 +- test/helpers/access-manager.js | 9 +- test/helpers/chainid.js | 6 - test/helpers/eip712.js | 5 +- test/helpers/enums.js | 26 +- test/helpers/governance.js | 2 +- test/helpers/math.js | 3 - test/helpers/namespaced-storage.js | 22 - test/helpers/{erc1967.js => storage.js} | 19 +- test/helpers/time.js | 19 +- test/helpers/txpool.js | 2 + test/metatx/ERC2771Context.test.js | 8 +- test/metatx/ERC2771Forwarder.test.js | 6 +- test/proxy/ERC1967/ERC1967Utils.test.js | 34 +- test/proxy/Proxy.behaviour.js | 6 +- test/proxy/beacon/BeaconProxy.test.js | 7 +- test/proxy/beacon/UpgradeableBeacon.test.js | 14 +- test/proxy/transparent/ProxyAdmin.test.js | 13 +- .../TransparentUpgradeableProxy.behaviour.js | 34 +- test/proxy/utils/UUPSUpgradeable.test.js | 18 +- test/sanity.test.js | 6 +- test/token/ERC1155/ERC1155.behavior.js | 80 +- test/token/ERC1155/ERC1155.test.js | 14 +- .../extensions/ERC1155Burnable.test.js | 4 +- .../extensions/ERC1155Pausable.test.js | 2 +- test/token/ERC20/ERC20.behavior.js | 22 +- test/token/ERC20/ERC20.test.js | 22 +- .../ERC20/extensions/ERC20Burnable.test.js | 14 +- .../ERC20/extensions/ERC20FlashMint.test.js | 36 +- .../ERC20/extensions/ERC20Permit.test.js | 6 +- .../token/ERC20/extensions/ERC20Votes.test.js | 50 +- .../ERC20/extensions/ERC20Wrapper.test.js | 38 +- test/token/ERC20/extensions/ERC4626.test.js | 150 +- test/token/ERC20/utils/SafeERC20.test.js | 24 +- test/token/ERC721/ERC721.behavior.js | 70 +- .../ERC721/extensions/ERC721Burnable.test.js | 4 +- .../extensions/ERC721Consecutive.test.js | 22 +- .../ERC721/extensions/ERC721Pausable.test.js | 2 +- .../extensions/ERC721URIStorage.test.js | 2 +- .../ERC721/extensions/ERC721Votes.test.js | 18 +- .../ERC721/extensions/ERC721Wrapper.test.js | 58 +- test/token/ERC721/utils/ERC721Holder.test.js | 2 +- test/utils/Address.test.js | 14 +- test/utils/Context.behavior.js | 6 +- test/utils/Create2.test.js | 4 +- test/utils/Multicall.test.js | 8 +- test/utils/Nonces.test.js | 2 +- test/utils/Pausable.test.js | 4 +- test/utils/cryptography/ECDSA.test.js | 35 +- test/utils/cryptography/EIP712.test.js | 3 +- test/utils/introspection/ERC165.test.js | 2 +- .../SupportsInterface.behavior.js | 11 +- test/utils/math/Math.test.js | 4 +- test/utils/math/SafeCast.test.js | 2 +- test/utils/math/SignedMath.test.js | 2 +- test/utils/structs/Checkpoints.test.js | 2 +- test/utils/types/Time.test.js | 14 +- 96 files changed, 6873 insertions(+), 12425 deletions(-) delete mode 100644 test/helpers/chainid.js delete mode 100644 test/helpers/namespaced-storage.js rename test/helpers/{erc1967.js => storage.js} (66%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2797a0889..35ad097ff 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,7 +10,7 @@ about: Report a bug in OpenZeppelin Contracts **💻 Environment** - + **📝 Details** diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 9951280b7..7a44045a1 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -34,8 +34,6 @@ jobs: - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - - name: Compile contracts # TODO: Remove after migrating tests to ethers - run: npm run compile - name: Run tests and generate gas report run: npm run test - name: Check linearisation of the inheritance graph @@ -64,8 +62,6 @@ jobs: cp -rnT contracts lib/openzeppelin-contracts/contracts - name: Transpile to upgradeable run: bash scripts/upgradeable/transpile.sh - - name: Compile contracts # TODO: Remove after migrating tests to ethers - run: npm run compile - name: Run tests run: npm run test - name: Check linearisation of the inheritance graph @@ -94,8 +90,6 @@ jobs: - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - - name: Compile contracts # TODO: Remove after migrating tests to ethers - run: npm run compile - name: Run coverage run: npm run coverage - uses: codecov/codecov-action@v3 diff --git a/.gitignore b/.gitignore index a6caa9fc7..b2b1eab1e 100644 --- a/.gitignore +++ b/.gitignore @@ -29,15 +29,9 @@ npm-debug.log # local env variables .env -# truffle build directory -build/ - # macOS .DS_Store -# truffle -.node-xmlhttprequest-* - # IntelliJ IDE .idea diff --git a/README.md b/README.md index 06f54553a..2f4609f00 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ ### Installation -#### Hardhat, Truffle (npm) +#### Hardhat (npm) ``` $ npm install @openzeppelin/contracts diff --git a/contracts/proxy/README.adoc b/contracts/proxy/README.adoc index c6badf0fc..1c4d0105c 100644 --- a/contracts/proxy/README.adoc +++ b/contracts/proxy/README.adoc @@ -19,7 +19,7 @@ There are two alternative ways to add upgradeability to an ERC-1967 proxy. Their - {TransparentUpgradeableProxy}: A proxy with a built-in immutable admin and upgrade interface. - {UUPSUpgradeable}: An upgradeability mechanism to be included in the implementation contract. -CAUTION: Using upgradeable proxies correctly and securely is a difficult task that requires deep knowledge of the proxy pattern, Solidity, and the EVM. Unless you want a lot of low level control, we recommend using the xref:upgrades-plugins::index.adoc[OpenZeppelin Upgrades Plugins] for Truffle and Hardhat. +CAUTION: Using upgradeable proxies correctly and securely is a difficult task that requires deep knowledge of the proxy pattern, Solidity, and the EVM. Unless you want a lot of low level control, we recommend using the xref:upgrades-plugins::index.adoc[OpenZeppelin Upgrades Plugins] for Hardhat and Foundry. A different family of proxies are beacon proxies. This pattern, popularized by Dharma, allows multiple proxies to be upgraded to a different implementation in a single transaction. diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index b1e68e955..a4e163fec 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -13,7 +13,7 @@ IMPORTANT: OpenZeppelin Contracts uses semantic versioning to communicate backwa [[install]] === Installation -==== Hardhat, Truffle (npm) +==== Hardhat (npm) ```console $ npm install @openzeppelin/contracts diff --git a/docs/modules/ROOT/pages/utilities.adoc b/docs/modules/ROOT/pages/utilities.adoc index 02ae4efff..1688ae741 100644 --- a/docs/modules/ROOT/pages/utilities.adoc +++ b/docs/modules/ROOT/pages/utilities.adoc @@ -186,16 +186,15 @@ contract Box is Multicall { } ---- -This is how to call the `multicall` function using Truffle, allowing `foo` and `bar` to be called in a single transaction: +This is how to call the `multicall` function using Ethers.js, allowing `foo` and `bar` to be called in a single transaction: [source,javascript] ---- // scripts/foobar.js -const Box = artifacts.require('Box'); -const instance = await Box.new(); +const instance = await ethers.deployContract("Box"); await instance.multicall([ - instance.contract.methods.foo().encodeABI(), - instance.contract.methods.bar().encodeABI() + instance.interface.encodeFunctionData("foo"), + instance.interface.encodeFunctionData("bar") ]); ---- diff --git a/docs/modules/ROOT/pages/wizard.adoc b/docs/modules/ROOT/pages/wizard.adoc index 262505378..ed416e2da 100644 --- a/docs/modules/ROOT/pages/wizard.adoc +++ b/docs/modules/ROOT/pages/wizard.adoc @@ -4,7 +4,7 @@ Not sure where to start? Use the interactive generator below to bootstrap your contract and learn about the components offered in OpenZeppelin Contracts. -TIP: Place the resulting contract in your `contracts` directory in order to compile it with a tool like Hardhat or Truffle. Consider reading our guide on xref:learn::developing-smart-contracts.adoc[Developing Smart Contracts] for more guidance! +TIP: Place the resulting contract in your `contracts` or `src` directory in order to compile it with a tool like Hardhat or Foundry. Consider reading our guide on xref:learn::developing-smart-contracts.adoc[Developing Smart Contracts] for more guidance! ++++ diff --git a/hardhat.config.js b/hardhat.config.js index 3102cfda5..dac13f5e0 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -55,7 +55,6 @@ const argv = require('yargs/yargs')() }, }).argv; -require('@nomiclabs/hardhat-truffle5'); // deprecated require('@nomicfoundation/hardhat-toolbox'); require('@nomicfoundation/hardhat-ethers'); require('hardhat-ignore-warnings'); diff --git a/hardhat/env-contract.js b/hardhat/env-contract.js index 06d4f187d..fb01482f6 100644 --- a/hardhat/env-contract.js +++ b/hardhat/env-contract.js @@ -15,27 +15,4 @@ extendEnvironment(hre => { const filteredSignersAsPromise = originalGetSigners().then(signers => signers.slice(1)); hre.ethers.getSigners = () => filteredSignersAsPromise; } - - // override hre.contract - const originalContract = hre.contract; - hre.contract = function (name, body) { - originalContract.call(this, name, accounts => { - let snapshot; - - before(async function () { - // reset the state of the chain in between contract test suites - // TODO: this should be removed when migration to ethers is over - const { takeSnapshot } = require('@nomicfoundation/hardhat-network-helpers'); - snapshot = await takeSnapshot(); - }); - - after(async function () { - // reset the state of the chain in between contract test suites - // TODO: this should be removed when migration to ethers is over - await snapshot.restore(); - }); - - body(accounts.slice(1)); - }); - }; }); diff --git a/package-lock.json b/package-lock.json index fc8a1ca7f..1e5382369 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,24 +13,18 @@ "@changesets/cli": "^2.26.0", "@changesets/pre": "^2.0.0", "@changesets/read": "^0.6.0", - "@nomicfoundation/hardhat-chai-matchers": "^2.0.2", + "@nomicfoundation/hardhat-chai-matchers": "^2.0.3", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@nomicfoundation/hardhat-toolbox": "^4.0.0", - "@nomiclabs/hardhat-truffle5": "^2.0.5", - "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.5", "@openzeppelin/merkle-tree": "^1.0.5", - "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", "chai": "^4.2.0", "eslint": "^8.30.0", "eslint-config-prettier": "^9.0.0", - "eth-sig-util": "^3.0.0", - "ethereumjs-util": "^7.0.7", - "ethereumjs-wallet": "^1.0.1", "ethers": "^6.7.1", "glob": "^10.3.5", "graphlib": "^2.1.8", @@ -51,7 +45,6 @@ "solidity-coverage": "^0.8.5", "solidity-docgen": "^0.6.0-beta.29", "undici": "^5.22.1", - "web3": "^1.3.0", "yargs": "^17.0.0" } }, @@ -579,106 +572,6 @@ "node": ">=12" } }, - "node_modules/@ensdomains/address-encoder": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz", - "integrity": "sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg==", - "dev": true, - "dependencies": { - "bech32": "^1.1.3", - "blakejs": "^1.1.0", - "bn.js": "^4.11.8", - "bs58": "^4.0.1", - "crypto-addr-codec": "^0.1.7", - "nano-base32": "^1.0.1", - "ripemd160": "^2.0.2" - } - }, - "node_modules/@ensdomains/ens": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/@ensdomains/ens/-/ens-0.4.5.tgz", - "integrity": "sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw==", - "deprecated": "Please use @ensdomains/ens-contracts", - "dev": true, - "dependencies": { - "bluebird": "^3.5.2", - "eth-ens-namehash": "^2.0.8", - "solc": "^0.4.20", - "testrpc": "0.0.1", - "web3-utils": "^1.0.0-beta.31" - } - }, - "node_modules/@ensdomains/ensjs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@ensdomains/ensjs/-/ensjs-2.1.0.tgz", - "integrity": "sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.4.4", - "@ensdomains/address-encoder": "^0.1.7", - "@ensdomains/ens": "0.4.5", - "@ensdomains/resolver": "0.2.4", - "content-hash": "^2.5.2", - "eth-ens-namehash": "^2.0.8", - "ethers": "^5.0.13", - "js-sha3": "^0.8.0" - } - }, - "node_modules/@ensdomains/ensjs/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - }, - "node_modules/@ensdomains/resolver": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@ensdomains/resolver/-/resolver-0.2.4.tgz", - "integrity": "sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA==", - "deprecated": "Please use @ensdomains/ens-contracts", - "dev": true - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -753,16 +646,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@ethereumjs/common": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.5.0.tgz", - "integrity": "sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg==", - "dev": true, - "dependencies": { - "crc-32": "^1.2.0", - "ethereumjs-util": "^7.1.1" - } - }, "node_modules/@ethereumjs/rlp": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", @@ -775,16 +658,6 @@ "node": ">=14" } }, - "node_modules/@ethereumjs/tx": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.2.tgz", - "integrity": "sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog==", - "dev": true, - "dependencies": { - "@ethereumjs/common": "^2.5.0", - "ethereumjs-util": "^7.1.2" - } - }, "node_modules/@ethereumjs/util": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", @@ -2205,9 +2078,9 @@ } }, "node_modules/@nomicfoundation/hardhat-chai-matchers": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.2.tgz", - "integrity": "sha512-9Wu9mRtkj0U9ohgXYFbB/RQDa+PcEdyBm2suyEtsJf3PqzZEEjLUZgWnMjlFhATMk/fp3BjmnYVPrwl+gr8oEw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.3.tgz", + "integrity": "sha512-A40s7EAK4Acr8UP1Yudgi9GGD9Cca/K3LHt3DzmRIje14lBfHtg9atGQ7qK56vdPcTwKmeaGn30FzxMUfPGEMw==", "dev": true, "dependencies": { "@types/chai-as-promised": "^7.1.3", @@ -2510,144 +2383,6 @@ "node": ">= 10" } }, - "node_modules/@nomiclabs/hardhat-truffle5": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-truffle5/-/hardhat-truffle5-2.0.7.tgz", - "integrity": "sha512-Pw8451IUZp1bTp0QqCHCYfCHs66sCnyxPcaorapu9mfOV9xnZsVaFdtutnhNEiXdiZwbed7LFKpRsde4BjFwig==", - "dev": true, - "dependencies": { - "@nomiclabs/truffle-contract": "^4.2.23", - "@types/chai": "^4.2.0", - "chai": "^4.2.0", - "ethereumjs-util": "^7.1.4", - "fs-extra": "^7.0.1" - }, - "peerDependencies": { - "@nomiclabs/hardhat-web3": "^2.0.0", - "hardhat": "^2.6.4", - "web3": "^1.0.0-beta.36" - } - }, - "node_modules/@nomiclabs/hardhat-web3": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-web3/-/hardhat-web3-2.0.0.tgz", - "integrity": "sha512-zt4xN+D+fKl3wW2YlTX3k9APR3XZgPkxJYf36AcliJn3oujnKEVRZaHu0PhgLjO+gR+F/kiYayo9fgd2L8970Q==", - "dev": true, - "dependencies": { - "@types/bignumber.js": "^5.0.0" - }, - "peerDependencies": { - "hardhat": "^2.0.0", - "web3": "^1.0.0-beta.36" - } - }, - "node_modules/@nomiclabs/truffle-contract": { - "version": "4.5.10", - "resolved": "https://registry.npmjs.org/@nomiclabs/truffle-contract/-/truffle-contract-4.5.10.tgz", - "integrity": "sha512-nF/6InFV+0hUvutyFgsdOMCoYlr//2fJbRER4itxYtQtc4/O1biTwZIKRu+5l2J5Sq6LU2WX7vZHtDgQdhWxIQ==", - "dev": true, - "dependencies": { - "@ensdomains/ensjs": "^2.0.1", - "@truffle/blockchain-utils": "^0.1.3", - "@truffle/contract-schema": "^3.4.7", - "@truffle/debug-utils": "^6.0.22", - "@truffle/error": "^0.1.0", - "@truffle/interface-adapter": "^0.5.16", - "bignumber.js": "^7.2.1", - "ethereum-ens": "^0.8.0", - "ethers": "^4.0.0-beta.1", - "source-map-support": "^0.5.19" - }, - "peerDependencies": { - "web3": "^1.2.1", - "web3-core-helpers": "^1.2.1", - "web3-core-promievent": "^1.2.1", - "web3-eth-abi": "^1.2.1", - "web3-utils": "^1.2.1" - } - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "dev": true - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", - "dev": true, - "dependencies": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", - "dev": true - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true - }, - "node_modules/@openzeppelin/contract-loader": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contract-loader/-/contract-loader-0.6.3.tgz", - "integrity": "sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg==", - "dev": true, - "dependencies": { - "find-up": "^4.1.0", - "fs-extra": "^8.1.0" - } - }, - "node_modules/@openzeppelin/contract-loader/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, "node_modules/@openzeppelin/docs-utils": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/@openzeppelin/docs-utils/-/docs-utils-0.1.5.tgz", @@ -2802,42 +2537,6 @@ "@scure/bip39": "1.1.1" } }, - "node_modules/@openzeppelin/test-helpers": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/@openzeppelin/test-helpers/-/test-helpers-0.5.16.tgz", - "integrity": "sha512-T1EvspSfH1qQO/sgGlskLfYVBbqzJR23SZzYl/6B2JnT4EhThcI85UpvDk0BkLWKaDScQTabGHt4GzHW+3SfZg==", - "dev": true, - "dependencies": { - "@openzeppelin/contract-loader": "^0.6.2", - "@truffle/contract": "^4.0.35", - "ansi-colors": "^3.2.3", - "chai": "^4.2.0", - "chai-bn": "^0.2.1", - "ethjs-abi": "^0.2.1", - "lodash.flatten": "^4.4.0", - "semver": "^5.6.0", - "web3": "^1.2.5", - "web3-utils": "^1.2.5" - } - }, - "node_modules/@openzeppelin/test-helpers/node_modules/ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@openzeppelin/test-helpers/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/@openzeppelin/upgrade-safe-transpiler": { "version": "0.3.32", "resolved": "https://registry.npmjs.org/@openzeppelin/upgrade-safe-transpiler/-/upgrade-safe-transpiler-0.3.32.tgz", @@ -3160,18 +2859,6 @@ "node": ">=6" } }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" - } - }, "node_modules/@solidity-parser/parser": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.5.tgz", @@ -3181,2753 +2868,2317 @@ "antlr4ts": "^0.5.0-alpha.4" } }, - "node_modules/@szmarczak/http-timer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", - "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", "dev": true, - "dependencies": { - "defer-to-connect": "^2.0.1" - }, - "engines": { - "node": ">=14.16" - } + "peer": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "peer": true }, - "node_modules/@truffle/abi-utils": { + "node_modules/@tsconfig/node14": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@truffle/abi-utils/-/abi-utils-1.0.3.tgz", - "integrity": "sha512-AWhs01HCShaVKjml7Z4AbVREr/u4oiWxCcoR7Cktm0mEvtT04pvnxW5xB/cI4znRkrbPdFQlFt67kgrAjesYkw==", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true, - "dependencies": { - "change-case": "3.0.2", - "fast-check": "3.1.1", - "web3-utils": "1.10.0" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" - } + "peer": true }, - "node_modules/@truffle/abi-utils/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "peer": true }, - "node_modules/@truffle/abi-utils/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", + "node_modules/@typechain/ethers-v6": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v6/-/ethers-v6-0.5.1.tgz", + "integrity": "sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==", "dev": true, + "peer": true, "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" + "lodash": "^4.17.15", + "ts-essentials": "^7.0.1" }, - "engines": { - "node": ">=8.0.0" + "peerDependencies": { + "ethers": "6.x", + "typechain": "^8.3.2", + "typescript": ">=4.7.0" } }, - "node_modules/@truffle/blockchain-utils": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.9.tgz", - "integrity": "sha512-RHfumgbIVo68Rv9ofDYfynjnYZIfP/f1vZy4RoqkfYAO+fqfc58PDRzB1WAGq2U6GPuOnipOJxQhnqNnffORZg==", + "node_modules/@typechain/hardhat": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-9.1.0.tgz", + "integrity": "sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==", "dev": true, - "engines": { - "node": "^16.20 || ^18.16 || >=20" + "peer": true, + "dependencies": { + "fs-extra": "^9.1.0" + }, + "peerDependencies": { + "@typechain/ethers-v6": "^0.5.1", + "ethers": "^6.1.0", + "hardhat": "^2.9.9", + "typechain": "^8.3.2" } }, - "node_modules/@truffle/codec": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.17.3.tgz", - "integrity": "sha512-Ko/+dsnntNyrJa57jUD9u4qx9nQby+H4GsUO6yjiCPSX0TQnEHK08XWqBSg0WdmCH2+h0y1nr2CXSx8gbZapxg==", + "node_modules/@typechain/hardhat/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, + "peer": true, "dependencies": { - "@truffle/abi-utils": "^1.0.3", - "@truffle/compile-common": "^0.9.8", - "big.js": "^6.0.3", - "bn.js": "^5.1.3", - "cbor": "^5.2.0", - "debug": "^4.3.1", - "lodash": "^4.17.21", - "semver": "^7.5.4", - "utf8": "^3.0.0", - "web3-utils": "1.10.0" + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": "^16.20 || ^18.16 || >=20" + "node": ">=10" } }, - "node_modules/@truffle/codec/node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/@truffle/codec/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/@truffle/codec/node_modules/cbor": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-5.2.0.tgz", - "integrity": "sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==", + "node_modules/@typechain/hardhat/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, + "peer": true, "dependencies": { - "bignumber.js": "^9.0.1", - "nofilter": "^1.0.4" + "universalify": "^2.0.0" }, - "engines": { - "node": ">=6.0.0" + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/@truffle/codec/node_modules/nofilter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz", - "integrity": "sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==", + "node_modules/@typechain/hardhat/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true, + "peer": true, "engines": { - "node": ">=8" + "node": ">= 10.0.0" } }, - "node_modules/@truffle/codec/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", + "node_modules/@types/bn.js": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.2.tgz", + "integrity": "sha512-dkpZu0szUtn9UXTmw+e0AJFd4D2XAxDnsCLdc05SfqpqzPEBft8eQr8uaFitfo/dUUOZERaLec2hHMG87A4Dxg==", "dev": true, "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" + "@types/node": "*" } }, - "node_modules/@truffle/compile-common": { - "version": "0.9.8", - "resolved": "https://registry.npmjs.org/@truffle/compile-common/-/compile-common-0.9.8.tgz", - "integrity": "sha512-DTpiyo32t/YhLI1spn84D3MHYHrnoVqO+Gp7ZHrYNwDs86mAxtNiH5lsVzSb8cPgiqlvNsRCU9nm9R0YmKMTBQ==", + "node_modules/@types/chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", + "dev": true + }, + "node_modules/@types/chai-as-promised": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.6.tgz", + "integrity": "sha512-cQLhk8fFarRVZAXUQV1xEnZgMoPxqKojBvRkqPCKPQCzEhpbbSKl1Uu75kDng7k5Ln6LQLUmNBjLlFthCgm1NA==", "dev": true, "dependencies": { - "@truffle/error": "^0.2.2", - "colors": "1.4.0" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" + "@types/chai": "*" } }, - "node_modules/@truffle/compile-common/node_modules/@truffle/error": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.2.tgz", - "integrity": "sha512-TqbzJ0O8DHh34cu8gDujnYl4dUl6o2DE4PR6iokbybvnIm/L2xl6+Gv1VC+YJS45xfH83Yo3/Zyg/9Oq8/xZWg==", + "node_modules/@types/concat-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", "dev": true, - "engines": { - "node": "^16.20 || ^18.16 || >=20" + "dependencies": { + "@types/node": "*" } }, - "node_modules/@truffle/contract": { - "version": "4.6.31", - "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.6.31.tgz", - "integrity": "sha512-s+oHDpXASnZosiCdzu+X1Tx5mUJUs1L1CYXIcgRmzMghzqJkaUFmR6NpNo7nJYliYbO+O9/aW8oCKqQ7rCHfmQ==", + "node_modules/@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", "dev": true, "dependencies": { - "@ensdomains/ensjs": "^2.1.0", - "@truffle/blockchain-utils": "^0.1.9", - "@truffle/contract-schema": "^3.4.16", - "@truffle/debug-utils": "^6.0.57", - "@truffle/error": "^0.2.2", - "@truffle/interface-adapter": "^0.5.37", - "bignumber.js": "^7.2.1", - "debug": "^4.3.1", - "ethers": "^4.0.32", - "web3": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" + "@types/node": "*" } }, - "node_modules/@truffle/contract-schema": { - "version": "3.4.16", - "resolved": "https://registry.npmjs.org/@truffle/contract-schema/-/contract-schema-3.4.16.tgz", - "integrity": "sha512-g0WNYR/J327DqtJPI70ubS19K1Fth/1wxt2jFqLsPmz5cGZVjCwuhiie+LfBde4/Mc9QR8G+L3wtmT5cyoBxAg==", + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", "dev": true, "dependencies": { - "ajv": "^6.10.0", - "debug": "^4.3.1" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" + "@types/minimatch": "*", + "@types/node": "*" } }, - "node_modules/@truffle/contract/node_modules/@truffle/error": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.2.tgz", - "integrity": "sha512-TqbzJ0O8DHh34cu8gDujnYl4dUl6o2DE4PR6iokbybvnIm/L2xl6+Gv1VC+YJS45xfH83Yo3/Zyg/9Oq8/xZWg==", + "node_modules/@types/is-ci": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/is-ci/-/is-ci-3.0.0.tgz", + "integrity": "sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==", "dev": true, - "engines": { - "node": "^16.20 || ^18.16 || >=20" + "dependencies": { + "ci-info": "^3.1.0" } }, - "node_modules/@truffle/contract/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "node_modules/@types/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", "dev": true }, - "node_modules/@truffle/contract/node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", "dev": true }, - "node_modules/@truffle/contract/node_modules/cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", - "dev": true, - "dependencies": { - "node-fetch": "^2.6.12" - } + "node_modules/@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true }, - "node_modules/@truffle/contract/node_modules/eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "node_modules/@types/mocha": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", + "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", "dev": true, - "dependencies": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } + "peer": true }, - "node_modules/@truffle/contract/node_modules/ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "node_modules/@types/node": { + "version": "20.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", + "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", "dev": true, "dependencies": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" + "undici-types": "~5.26.4" } }, - "node_modules/@truffle/contract/node_modules/ethers/node_modules/scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true - }, - "node_modules/@truffle/contract/node_modules/ethers/node_modules/uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "node_modules/@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, - "node_modules/@truffle/contract/node_modules/hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "node_modules/@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "@types/node": "*" } }, - "node_modules/@truffle/contract/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true + "node_modules/@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true, + "peer": true }, - "node_modules/@truffle/contract/node_modules/setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", + "node_modules/@types/qs": { + "version": "6.9.8", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.8.tgz", + "integrity": "sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg==", "dev": true }, - "node_modules/@truffle/contract/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "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, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" + "dependencies": { + "@types/node": "*", + "safe-buffer": "~5.1.1" } }, - "node_modules/@truffle/contract/node_modules/web3": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.0.tgz", - "integrity": "sha512-YfKY9wSkGcM8seO+daR89oVTcbu18NsVfvOngzqMYGUU0pPSQmE57qQDvQzUeoIOHAnXEBNzrhjQJmm8ER0rng==", + "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/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", "dev": true, - "hasInstallScript": true, "dependencies": { - "web3-bzz": "1.10.0", - "web3-core": "1.10.0", - "web3-eth": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-shh": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "@types/node": "*" } }, - "node_modules/@truffle/contract/node_modules/web3-bzz": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.0.tgz", - "integrity": "sha512-o9IR59io3pDUsXTsps5pO5hW1D5zBmg46iNc2t4j2DkaYHNdDLwk2IP9ukoM2wg47QILfPEJYzhTfkS/CcX0KA==", + "node_modules/@types/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==", + "dev": true + }, + "node_modules/abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", + "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, - "hasInstallScript": true, "dependencies": { - "@types/node": "^12.12.6", - "got": "12.1.0", - "swarm-js": "^0.1.40" + "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": ">=8.0.0" + "node": ">=12" } }, - "node_modules/@truffle/contract/node_modules/web3-core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.0.tgz", - "integrity": "sha512-fWySwqy2hn3TL89w5TM8wXF1Z2Q6frQTKHWmP0ppRQorEK8NcHJRfeMiv/mQlSKoTS1F6n/nv2uyZsixFycjYQ==", + "node_modules/abstract-level/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "@types/bn.js": "^5.1.1", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-requestmanager": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "node_modules/@truffle/contract/node_modules/web3-core-method": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.0.tgz", - "integrity": "sha512-4R700jTLAMKDMhQ+nsVfIXvH6IGJlJzGisIfMKWAIswH31h5AZz7uDUW2YctI+HrYd+5uOAlS4OJeeT9bIpvkA==", + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true, - "dependencies": { - "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-utils": "1.10.0" + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=8.0.0" + "node": ">=0.4.0" } }, - "node_modules/@truffle/contract/node_modules/web3-core-requestmanager": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.0.tgz", - "integrity": "sha512-3z/JKE++Os62APml4dvBM+GAuId4h3L9ckUrj7ebEtS2AR0ixyQPbrBodgL91Sv7j7cQ3Y+hllaluqjguxvSaQ==", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "dependencies": { - "util": "^0.12.5", - "web3-core-helpers": "1.10.0", - "web3-providers-http": "1.10.0", - "web3-providers-ipc": "1.10.0", - "web3-providers-ws": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@truffle/contract/node_modules/web3-core-subscriptions": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.0.tgz", - "integrity": "sha512-HGm1PbDqsxejI075gxBc5OSkwymilRWZufIy9zEpnWKNmfbuv5FfHgW1/chtJP6aP3Uq2vHkvTDl3smQBb8l+g==", + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true, - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0" - }, + "peer": true, "engines": { - "node": ">=8.0.0" + "node": ">=0.4.0" } }, - "node_modules/@truffle/contract/node_modules/web3-core/node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "node_modules/address": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz", + "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", "dev": true, "engines": { - "node": "*" + "node": ">= 10.0.0" } }, - "node_modules/@truffle/contract/node_modules/web3-eth": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.0.tgz", - "integrity": "sha512-Z5vT6slNMLPKuwRyKGbqeGYC87OAy8bOblaqRTgg94CXcn/mmqU7iPIlG4506YdcdK3x6cfEDG7B6w+jRxypKA==", + "node_modules/adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", "dev": true, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-accounts": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-eth-ens": "1.10.0", - "web3-eth-iban": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=0.3.0" } }, - "node_modules/@truffle/contract/node_modules/web3-eth-abi": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.0.tgz", - "integrity": "sha512-cwS+qRBWpJ43aI9L3JS88QYPfFcSJJ3XapxOQ4j40v6mk7ATpA8CVK1vGTzpihNlOfMVRBkR95oAj7oL6aiDOg==", + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "dependencies": { - "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.0" + "debug": "4" }, "engines": { - "node": ">=8.0.0" + "node": ">= 6.0.0" } }, - "node_modules/@truffle/contract/node_modules/web3-eth-accounts": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.0.tgz", - "integrity": "sha512-wiq39Uc3mOI8rw24wE2n15hboLE0E9BsQLdlmsL4Zua9diDS6B5abXG0XhFcoNsXIGMWXVZz4TOq3u4EdpXF/Q==", + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "dependencies": { - "@ethereumjs/common": "2.5.0", - "@ethereumjs/tx": "3.3.2", - "eth-lib": "0.2.8", - "ethereumjs-util": "^7.1.5", - "scrypt-js": "^3.0.1", - "uuid": "^9.0.0", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/@truffle/contract/node_modules/web3-eth-contract": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.0.tgz", - "integrity": "sha512-MIC5FOzP/+2evDksQQ/dpcXhSqa/2hFNytdl/x61IeWxhh6vlFeSjq0YVTAyIzdjwnL7nEmZpjfI6y6/Ufhy7w==", + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "dependencies": { - "@types/bn.js": "^5.1.1", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-utils": "1.10.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=8.0.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@truffle/contract/node_modules/web3-eth-ens": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.0.tgz", - "integrity": "sha512-3hpGgzX3qjgxNAmqdrC2YUQMTfnZbs4GeLEmy8aCWziVwogbuqQZ+Gzdfrym45eOZodk+lmXyLuAdqkNlvkc1g==", + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", "dev": true, - "dependencies": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-utils": "1.10.0" - }, + "optional": true, "engines": { - "node": ">=8.0.0" + "node": ">=0.4.2" } }, - "node_modules/@truffle/contract/node_modules/web3-eth-personal": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.0.tgz", - "integrity": "sha512-anseKn98w/d703eWq52uNuZi7GhQeVjTC5/svrBWEKob0WZ5kPdo+EZoFN0sp5a5ubbrk/E0xSl1/M5yORMtpg==", + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, - "dependencies": { - "@types/node": "^12.12.6", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=6" } }, - "node_modules/@truffle/contract/node_modules/web3-net": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.0.tgz", - "integrity": "sha512-NLH/N3IshYWASpxk4/18Ge6n60GEvWBVeM8inx2dmZJVmRI6SJIlUxbL8jySgiTn3MMZlhbdvrGo8fpUW7a1GA==", + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "dependencies": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" + "type-fest": "^0.21.3" }, "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-providers-http": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.0.tgz", - "integrity": "sha512-eNr965YB8a9mLiNrkjAWNAPXgmQWfpBfkkn7tpEFlghfww0u3I0tktMZiaToJVcL2+Xq+81cxbkpeWJ5XQDwOA==", - "dev": true, - "dependencies": { - "abortcontroller-polyfill": "^1.7.3", - "cross-fetch": "^3.1.4", - "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.0" + "node": ">=8" }, - "engines": { - "node": ">=8.0.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@truffle/contract/node_modules/web3-providers-ipc": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.0.tgz", - "integrity": "sha512-OfXG1aWN8L1OUqppshzq8YISkWrYHaATW9H8eh0p89TlWMc1KZOL9vttBuaBEi96D/n0eYDn2trzt22bqHWfXA==", + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, - "dependencies": { - "oboe": "2.1.5", - "web3-core-helpers": "1.10.0" - }, "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-providers-ws": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.0.tgz", - "integrity": "sha512-sK0fNcglW36yD5xjnjtSGBnEtf59cbw4vZzJ+CmOWIKGIR96mP5l684g0WD0Eo+f4NQc2anWWXG74lRc9OVMCQ==", - "dev": true, - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0", - "websocket": "^1.0.32" + "node": ">=10" }, - "engines": { - "node": ">=8.0.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@truffle/contract/node_modules/web3-shh": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.0.tgz", - "integrity": "sha512-uNUUuNsO2AjX41GJARV9zJibs11eq6HtOe6Wr0FtRUcj8SN6nHeYIzwstAvJ4fXA53gRqFMTxdntHEt9aXVjpg==", + "node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true, - "hasInstallScript": true, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-net": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=4" } }, - "node_modules/@truffle/contract/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=4" } }, - "node_modules/@truffle/contract/node_modules/web3-utils/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/@truffle/debug-utils": { - "version": "6.0.57", - "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.57.tgz", - "integrity": "sha512-Q6oI7zLaeNLB69ixjwZk2UZEWBY6b2OD1sjLMGDKBGR7GaHYiw96GLR2PFgPH1uwEeLmV4N78LYaQCrDsHbNeA==", + "node_modules/antlr4": { + "version": "4.13.1", + "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.1.tgz", + "integrity": "sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA==", "dev": true, - "dependencies": { - "@truffle/codec": "^0.17.3", - "@trufflesuite/chromafi": "^3.0.0", - "bn.js": "^5.1.3", - "chalk": "^2.4.2", - "debug": "^4.3.1", - "highlightjs-solidity": "^2.0.6" - }, "engines": { - "node": "^16.20 || ^18.16 || >=20" + "node": ">=16" } }, - "node_modules/@truffle/debug-utils/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/@truffle/error": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.1.1.tgz", - "integrity": "sha512-sE7c9IHIGdbK4YayH4BC8i8qMjoAOeg6nUXUDZZp8wlU21/EMpaG+CLx+KqcIPyR+GSWIW3Dm0PXkr2nlggFDA==", + "node_modules/antlr4ts": { + "version": "0.5.0-alpha.4", + "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", + "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", "dev": true }, - "node_modules/@truffle/interface-adapter": { - "version": "0.5.37", - "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.37.tgz", - "integrity": "sha512-lPH9MDgU+7sNDlJSClwyOwPCfuOimqsCx0HfGkznL3mcFRymc1pukAR1k17zn7ErHqBwJjiKAZ6Ri72KkS+IWw==", + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { - "bn.js": "^5.1.3", - "ethers": "^4.0.32", - "web3": "1.10.0" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": "^16.20 || ^18.16 || >=20" + "node": ">= 8" } }, - "node_modules/@truffle/interface-adapter/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true + "peer": true }, - "node_modules/@truffle/interface-adapter/node_modules/cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "dependencies": { - "node-fetch": "^2.6.12" + "sprintf-js": "~1.0.2" } }, - "node_modules/@truffle/interface-adapter/node_modules/eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", "dev": true, - "dependencies": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" + "peer": true, + "engines": { + "node": ">=6" } }, - "node_modules/@truffle/interface-adapter/node_modules/eth-lib/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", "dev": true, "dependencies": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@truffle/interface-adapter/node_modules/ethers/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/ethers/node_modules/scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/ethers/node_modules/uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/@truffle/interface-adapter/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.0.tgz", - "integrity": "sha512-YfKY9wSkGcM8seO+daR89oVTcbu18NsVfvOngzqMYGUU0pPSQmE57qQDvQzUeoIOHAnXEBNzrhjQJmm8ER0rng==", + "node_modules/array.prototype.findlast": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.3.tgz", + "integrity": "sha512-kcBubumjciBg4JKp5KTKtI7ec7tRefPk88yjkWJwaVKYd9QfTaxcsOxoMNKd7iBr447zCfDV0z1kOF47umv42g==", "dev": true, - "hasInstallScript": true, "dependencies": { - "web3-bzz": "1.10.0", - "web3-core": "1.10.0", - "web3-eth": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-shh": "1.10.0", - "web3-utils": "1.10.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-bzz": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.0.tgz", - "integrity": "sha512-o9IR59io3pDUsXTsps5pO5hW1D5zBmg46iNc2t4j2DkaYHNdDLwk2IP9ukoM2wg47QILfPEJYzhTfkS/CcX0KA==", + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, - "hasInstallScript": true, "dependencies": { - "@types/node": "^12.12.6", - "got": "12.1.0", - "swarm-js": "^0.1.40" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.0.tgz", - "integrity": "sha512-fWySwqy2hn3TL89w5TM8wXF1Z2Q6frQTKHWmP0ppRQorEK8NcHJRfeMiv/mQlSKoTS1F6n/nv2uyZsixFycjYQ==", - "dev": true, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "dev": true, "dependencies": { - "@types/bn.js": "^5.1.1", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-requestmanager": "1.10.0", - "web3-utils": "1.10.0" + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-core-method": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.0.tgz", - "integrity": "sha512-4R700jTLAMKDMhQ+nsVfIXvH6IGJlJzGisIfMKWAIswH31h5AZz7uDUW2YctI+HrYd+5uOAlS4OJeeT9bIpvkA==", + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true, - "dependencies": { - "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-utils": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-core-requestmanager": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.0.tgz", - "integrity": "sha512-3z/JKE++Os62APml4dvBM+GAuId4h3L9ckUrj7ebEtS2AR0ixyQPbrBodgL91Sv7j7cQ3Y+hllaluqjguxvSaQ==", + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, - "dependencies": { - "util": "^0.12.5", - "web3-core-helpers": "1.10.0", - "web3-providers-http": "1.10.0", - "web3-providers-ipc": "1.10.0", - "web3-providers-ws": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": "*" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-core-subscriptions": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.0.tgz", - "integrity": "sha512-HGm1PbDqsxejI075gxBc5OSkwymilRWZufIy9zEpnWKNmfbuv5FfHgW1/chtJP6aP3Uq2vHkvTDl3smQBb8l+g==", + "node_modules/ast-parents": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", + "integrity": "sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==", + "dev": true + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.0.tgz", - "integrity": "sha512-Z5vT6slNMLPKuwRyKGbqeGYC87OAy8bOblaqRTgg94CXcn/mmqU7iPIlG4506YdcdK3x6cfEDG7B6w+jRxypKA==", + "node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-accounts": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-eth-ens": "1.10.0", - "web3-eth-iban": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" - }, + "peer": true, "engines": { - "node": ">=8.0.0" + "node": ">= 4.0.0" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth-abi": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.0.tgz", - "integrity": "sha512-cwS+qRBWpJ43aI9L3JS88QYPfFcSJJ3XapxOQ4j40v6mk7ATpA8CVK1vGTzpihNlOfMVRBkR95oAj7oL6aiDOg==", + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", "dev": true, - "dependencies": { - "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth-accounts": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.0.tgz", - "integrity": "sha512-wiq39Uc3mOI8rw24wE2n15hboLE0E9BsQLdlmsL4Zua9diDS6B5abXG0XhFcoNsXIGMWXVZz4TOq3u4EdpXF/Q==", + "node_modules/axios": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "dev": true, "dependencies": { - "@ethereumjs/common": "2.5.0", - "@ethereumjs/tx": "3.3.2", - "eth-lib": "0.2.8", - "ethereumjs-util": "^7.1.5", - "scrypt-js": "^3.0.1", - "uuid": "^9.0.0", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth-contract": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.0.tgz", - "integrity": "sha512-MIC5FOzP/+2evDksQQ/dpcXhSqa/2hFNytdl/x61IeWxhh6vlFeSjq0YVTAyIzdjwnL7nEmZpjfI6y6/Ufhy7w==", + "node_modules/axios/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, "dependencies": { - "@types/bn.js": "^5.1.1", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-utils": "1.10.0" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" }, "engines": { - "node": ">=8.0.0" + "node": ">= 6" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth-ens": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.0.tgz", - "integrity": "sha512-3hpGgzX3qjgxNAmqdrC2YUQMTfnZbs4GeLEmy8aCWziVwogbuqQZ+Gzdfrym45eOZodk+lmXyLuAdqkNlvkc1g==", + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", "dev": true, "dependencies": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "safe-buffer": "^5.0.1" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth-personal": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.0.tgz", - "integrity": "sha512-anseKn98w/d703eWq52uNuZi7GhQeVjTC5/svrBWEKob0WZ5kPdo+EZoFN0sp5a5ubbrk/E0xSl1/M5yORMtpg==", + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", + "dev": true + }, + "node_modules/better-path-resolve": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", + "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", "dev": true, "dependencies": { - "@types/node": "^12.12.6", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" + "is-windows": "^1.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=4" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-net": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.0.tgz", - "integrity": "sha512-NLH/N3IshYWASpxk4/18Ge6n60GEvWBVeM8inx2dmZJVmRI6SJIlUxbL8jySgiTn3MMZlhbdvrGo8fpUW7a1GA==", + "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, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=14.0.0" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-providers-http": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.0.tgz", - "integrity": "sha512-eNr965YB8a9mLiNrkjAWNAPXgmQWfpBfkkn7tpEFlghfww0u3I0tktMZiaToJVcL2+Xq+81cxbkpeWJ5XQDwOA==", + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, - "dependencies": { - "abortcontroller-polyfill": "^1.7.3", - "cross-fetch": "^3.1.4", - "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-providers-ipc": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.0.tgz", - "integrity": "sha512-OfXG1aWN8L1OUqppshzq8YISkWrYHaATW9H8eh0p89TlWMc1KZOL9vttBuaBEi96D/n0eYDn2trzt22bqHWfXA==", + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", + "dev": true + }, + "node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "oboe": "2.1.5", - "web3-core-helpers": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-providers-ws": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.0.tgz", - "integrity": "sha512-sK0fNcglW36yD5xjnjtSGBnEtf59cbw4vZzJ+CmOWIKGIR96mP5l684g0WD0Eo+f4NQc2anWWXG74lRc9OVMCQ==", + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0", - "websocket": "^1.0.32" + "fill-range": "^7.0.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-shh": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.0.tgz", - "integrity": "sha512-uNUUuNsO2AjX41GJARV9zJibs11eq6HtOe6Wr0FtRUcj8SN6nHeYIzwstAvJ4fXA53gRqFMTxdntHEt9aXVjpg==", + "node_modules/breakword": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/breakword/-/breakword-1.0.6.tgz", + "integrity": "sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==", "dev": true, - "hasInstallScript": true, "dependencies": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-net": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" + "wcwidth": "^1.0.1" } }, - "node_modules/@truffle/interface-adapter/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "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": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" + "abstract-level": "^1.0.2", + "catering": "^2.1.1", + "module-error": "^1.0.2", + "run-parallel-limit": "^1.1.0" } }, - "node_modules/@trufflesuite/chromafi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz", - "integrity": "sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ==", + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "dependencies": { - "camelcase": "^4.1.0", - "chalk": "^2.3.2", - "cheerio": "^1.0.0-rc.2", - "detect-indent": "^5.0.0", - "highlight.js": "^10.4.1", - "lodash.merge": "^4.6.2", - "strip-ansi": "^4.0.0", - "strip-indent": "^2.0.0" + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "node_modules/@trufflesuite/chromafi/node_modules/detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==", + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "base-x": "^3.0.2" } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "dev": true, - "peer": true + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "peer": true + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, - "node_modules/@tsconfig/node14": { + "node_modules/buffer-xor": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "peer": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "peer": true - }, - "node_modules/@typechain/ethers-v6": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@typechain/ethers-v6/-/ethers-v6-0.5.1.tgz", - "integrity": "sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==", - "dev": true, - "peer": true, - "dependencies": { - "lodash": "^4.17.15", - "ts-essentials": "^7.0.1" - }, - "peerDependencies": { - "ethers": "6.x", - "typechain": "^8.3.2", - "typescript": ">=4.7.0" - } + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "dev": true }, - "node_modules/@typechain/hardhat": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-9.1.0.tgz", - "integrity": "sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==", + "node_modules/bufferutil": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", "dev": true, + "hasInstallScript": true, + "optional": true, "peer": true, "dependencies": { - "fs-extra": "^9.1.0" + "node-gyp-build": "^4.3.0" }, - "peerDependencies": { - "@typechain/ethers-v6": "^0.5.1", - "ethers": "^6.1.0", - "hardhat": "^2.9.9", - "typechain": "^8.3.2" + "engines": { + "node": ">=6.14.2" } }, - "node_modules/@typechain/hardhat/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, - "peer": true, - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, "engines": { - "node": ">=10" + "node": ">= 0.8" } }, - "node_modules/@typechain/hardhat/node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, - "peer": true, "dependencies": { - "universalify": "^2.0.0" + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@typechain/hardhat/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "peer": true, "engines": { - "node": ">= 10.0.0" + "node": ">=6" } }, - "node_modules/@types/bignumber.js": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-5.0.0.tgz", - "integrity": "sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA==", - "deprecated": "This is a stub types definition for bignumber.js (https://github.com/MikeMcl/bignumber.js/). bignumber.js provides its own type definitions, so you don't need @types/bignumber.js installed!", + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", "dev": true, "dependencies": { - "bignumber.js": "*" + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@types/bn.js": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.2.tgz", - "integrity": "sha512-dkpZu0szUtn9UXTmw+e0AJFd4D2XAxDnsCLdc05SfqpqzPEBft8eQr8uaFitfo/dUUOZERaLec2hHMG87A4Dxg==", + "node_modules/camelcase-keys/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "dependencies": { - "@types/node": "*" + "engines": { + "node": ">=6" } }, - "node_modules/@types/cacheable-request": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", - "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "node_modules/case": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", + "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", "dev": true, - "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" + "engines": { + "node": ">= 0.8.0" } }, - "node_modules/@types/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", + "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/@types/chai-as-promised": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.6.tgz", - "integrity": "sha512-cQLhk8fFarRVZAXUQV1xEnZgMoPxqKojBvRkqPCKPQCzEhpbbSKl1Uu75kDng7k5Ln6LQLUmNBjLlFthCgm1NA==", + "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": "9.0.1", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-9.0.1.tgz", + "integrity": "sha512-/TQOWyamDxvVIv+DY9cOLNuABkoyz8K/F3QE56539pGVYohx0+MEA1f4lChFTX79dBTBS7R1PF6ovH7G+VtBfQ==", "dev": true, "dependencies": { - "@types/chai": "*" + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=16" } }, - "node_modules/@types/concat-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", - "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", + "node_modules/chai": { + "version": "4.3.8", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.8.tgz", + "integrity": "sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==", "dev": true, "dependencies": { - "@types/node": "*" + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^4.1.2", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" } }, - "node_modules/@types/form-data": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", - "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", + "node_modules/chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", "dev": true, "dependencies": { - "@types/node": "*" + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 5" } }, - "node_modules/@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.2.tgz", - "integrity": "sha512-FD+nQWA2zJjh4L9+pFXqWOi0Hs1ryBCfI+985NjluQ1p8EYtoLvjLOKidXBtZ4/IcxDX4o8/E8qDS3540tNliw==", + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, - "node_modules/@types/is-ci": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/is-ci/-/is-ci-3.0.0.tgz", - "integrity": "sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==", + "node_modules/charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", "dev": true, - "dependencies": { - "ci-info": "^3.1.0" + "engines": { + "node": "*" } }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", "dev": true, - "dependencies": { - "@types/node": "*" + "engines": { + "node": "*" } }, - "node_modules/@types/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", - "dev": true - }, - "node_modules/@types/minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "dev": true - }, - "node_modules/@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, - "node_modules/@types/mocha": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", - "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", - "dev": true, - "peer": true - }, - "node_modules/@types/node": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", - "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", - "dev": true - }, - "node_modules/@types/pbkdf2": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", - "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/prettier": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", - "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", - "dev": true, - "peer": true - }, - "node_modules/@types/qs": { - "version": "6.9.8", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.8.tgz", - "integrity": "sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg==", - "dev": 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==", + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "@types/node": "*", - "safe-buffer": "~5.1.1" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "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", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "dev": true, - "dependencies": { - "@types/node": "*" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" } }, - "node_modules/@types/secp256k1": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", - "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "dependencies": { - "@types/node": "*" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "node_modules/@types/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==", - "dev": true - }, - "node_modules/abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", - "dev": true - }, - "node_modules/abortcontroller-polyfill": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", - "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==", - "dev": true - }, - "node_modules/abstract-level": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", - "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", + "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": { - "buffer": "^6.0.3", + "abstract-level": "^1.0.2", "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" + "napi-macros": "^2.2.2", + "node-gyp-build": "^4.3.0" }, "engines": { "node": ">=12" } }, - "node_modules/abstract-level/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "node_modules/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, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "engines": { + "node": ">=6" } }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "node_modules/cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", "dev": true, "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" + "object-assign": "^4.1.0", + "string-width": "^2.1.1" }, "engines": { - "node": ">= 0.6" + "node": ">=6" + }, + "optionalDependencies": { + "colors": "^1.1.2" } }, - "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "bin": { - "acorn": "bin/acorn" + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + "node": ">=12" } }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "peer": true, "engines": { - "node": ">=0.4.0" + "node": ">=8" } }, - "node_modules/address": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz", - "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { - "node": ">= 10.0.0" + "node": ">=8" } }, - "node_modules/adm-zip": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", - "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, "engines": { - "node": ">=0.3.0" + "node": ">=8" } }, - "node_modules/aes-js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", - "dev": true - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "debug": "4" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">= 6.0.0" + "node": ">=8" } }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "dev": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=0.8" } }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "color-name": "1.1.3" } }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", "dev": true, - "optional": true, "engines": { - "node": ">=0.4.2" + "node": ">=0.1.90" } }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, "engines": { - "node": ">=6" + "node": ">= 0.8" } }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "dev": true + }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", "dev": true, + "peer": true, "dependencies": { - "type-fest": "^0.21.3" + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4.0.0" } }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "node_modules/command-line-usage": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", + "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", "dev": true, - "engines": { - "node": ">=10" + "peer": true, + "dependencies": { + "array-back": "^4.0.2", + "chalk": "^2.4.2", + "table-layout": "^1.0.2", + "typical": "^5.2.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=8.0.0" } }, - "node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", "dev": true, + "peer": true, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, + "peer": true, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/antlr4": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.1.tgz", - "integrity": "sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA==", + "node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, "engines": { - "node": ">=16" + "node": ">=14" } }, - "node_modules/antlr4ts": { - "version": "0.5.0-alpha.4", - "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", - "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", + "node_modules/compare-versions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==", "dev": true }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, + "engines": [ + "node >= 0.8" + ], "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "peer": true + "node_modules/concat-stream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/concat-stream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "dependencies": { - "sprintf-js": "~1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "node_modules/array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } + "node_modules/concat-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/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "node_modules/concat-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "safe-buffer": "~5.1.0" } }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 0.6" } }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true }, - "node_modules/array.prototype.findlast": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.3.tgz", - "integrity": "sha512-kcBubumjciBg4JKp5KTKtI7ec7tRefPk88yjkWJwaVKYd9QfTaxcsOxoMNKd7iBr447zCfDV0z1kOF47umv42g==", + "node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.2.1" + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "node_modules/cosmiconfig/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/cosmiconfig/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" + "argparse": "^2.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", - "is-shared-array-buffer": "^1.0.2" + "bin": { + "crc32": "bin/crc32.njs" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.8" } }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, - "node_modules/asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true - }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "dependencies": { - "safer-buffer": "~2.1.0" + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true, + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, "engines": { - "node": ">=0.8" + "node": ">= 8" } }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "node_modules/crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", "dev": true, "engines": { "node": "*" } }, - "node_modules/ast-parents": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", - "integrity": "sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==", - "dev": true - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "node_modules/csv": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/csv/-/csv-5.5.3.tgz", + "integrity": "sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==", "dev": true, + "dependencies": { + "csv-generate": "^3.4.3", + "csv-parse": "^4.16.3", + "csv-stringify": "^5.6.5", + "stream-transform": "^2.1.3" + }, "engines": { - "node": ">=8" + "node": ">= 0.1.90" } }, - "node_modules/async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "node_modules/csv-generate": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/csv-generate/-/csv-generate-3.4.3.tgz", + "integrity": "sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==", "dev": true }, - "node_modules/async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "node_modules/csv-parse": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.3.tgz", + "integrity": "sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==", "dev": true }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "node_modules/csv-stringify": { + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-5.6.5.tgz", + "integrity": "sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==", "dev": true }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "node_modules/dataloader": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", + "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", + "dev": true + }, + "node_modules/death": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", + "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "peer": true, + "dependencies": { + "ms": "2.1.2" + }, "engines": { - "node": ">= 4.0.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, "engines": { - "node": ">= 0.4" + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "dev": true, + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", "dev": true, "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "node_modules/aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", - "dev": true - }, - "node_modules/axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/axios/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "type-detect": "^4.0.0" }, "engines": { - "node": ">= 6" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base-x": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", - "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" + "node": ">=6" } }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, - "dependencies": { - "tweetnacl": "^0.14.3" + "peer": true, + "engines": { + "node": ">=4.0.0" } }, - "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, - "node_modules/bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/better-path-resolve": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", - "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", "dev": true, "dependencies": { - "is-windows": "^1.0.0" + "clone": "^1.0.2" }, - "engines": { - "node": ">=4" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/big-integer": { - "version": "1.6.36", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz", - "integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==", + "node_modules/define-data-property": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", + "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, "engines": { - "node": ">=0.6" + "node": ">= 0.4" } }, - "node_modules/big.js": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", - "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, "engines": { - "node": "*" + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/bigjs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/bigint-crypto-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/bigint-crypto-utils/-/bigint-crypto-utils-3.3.0.tgz", - "integrity": "sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==", + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, "engines": { - "node": ">=14.0.0" + "node": ">=0.4.0" } }, - "node_modules/bignumber.js": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", - "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "dev": true, "engines": { - "node": "*" + "node": ">= 0.8" } }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/blakejs": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", - "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", - "dev": true - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "node_modules/detect-port": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", + "integrity": "sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ==", "dev": true, "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" + "address": "^1.0.1", + "debug": "4" }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "bin": { + "detect": "bin/detect-port.js", + "detect-port": "bin/detect-port.js" } }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, - "dependencies": { - "ms": "2.0.0" + "engines": { + "node": ">=0.3.1" } }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "node_modules/difflib": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", + "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", "dev": true, "dependencies": { - "side-channel": "^1.0.4" + "heap": ">= 0.2.0" }, "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "*" } }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "esutils": "^2.0.2" }, "engines": { - "node": ">=8" + "node": ">=6.0.0" } }, - "node_modules/breakword": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/breakword/-/breakword-1.0.6.tgz", - "integrity": "sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==", + "node_modules/dotenv": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", + "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", "dev": true, - "dependencies": { - "wcwidth": "^1.0.1" + "engines": { + "node": ">=10" } }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "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==", + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, "dependencies": { - "abstract-level": "^1.0.2", - "catering": "^2.1.1", - "module-error": "^1.0.2", - "run-parallel-limit": "^1.1.0" + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", - "dev": true, - "dependencies": { - "base-x": "^3.0.2" - } - }, - "node_modules/bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dev": true, "dependencies": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "node_modules/enquirer/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "engines": { + "node": ">=8" } }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==", - "dev": true - }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true - }, - "node_modules/bufferutil": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", - "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", + "node_modules/enquirer/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "hasInstallScript": true, "dependencies": { - "node-gyp-build": "^4.3.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=6.14.2" + "node": ">=8" } }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", "dev": true, "engines": { - "node": ">= 0.8" + "node": ">=6" } }, - "node_modules/cacheable-lookup": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz", - "integrity": "sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==", + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "engines": { - "node": ">=10.6.0" + "dependencies": { + "is-arrayish": "^0.2.1" } }, - "node_modules/cacheable-request": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", - "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "node_modules/es-abstract": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", + "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", "dev": true, "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.1", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.11" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", "dev": true, "dependencies": { - "pump": "^3.0.0" + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.4" } }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "has": "^1.0.3" } }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, "engines": { "node": ">=6" } }, - "node_modules/camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "node_modules/camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==", + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.8.0" } }, - "node_modules/camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "node_modules/escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", "dev": true, "dependencies": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" }, "engines": { - "node": ">=8" + "node": ">=0.12.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "optionalDependencies": { + "source-map": "~0.2.0" } }, - "node_modules/camelcase-keys/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/escodegen/node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/case": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", - "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", + "node_modules/escodegen/node_modules/estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", "dev": true, "engines": { - "node": ">= 0.8.0" + "node": ">=0.10.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==", + "node_modules/escodegen/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, "engines": { - "node": ">=6" + "node": ">= 0.8.0" } }, - "node_modules/cbor": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-9.0.1.tgz", - "integrity": "sha512-/TQOWyamDxvVIv+DY9cOLNuABkoyz8K/F3QE56539pGVYohx0+MEA1f4lChFTX79dBTBS7R1PF6ovH7G+VtBfQ==", + "node_modules/escodegen/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "dependencies": { - "nofilter": "^3.1.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" }, "engines": { - "node": ">=16" + "node": ">= 0.8.0" } }, - "node_modules/chai": { - "version": "4.3.8", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.8.tgz", - "integrity": "sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==", + "node_modules/escodegen/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "prelude-ls": "~1.1.2" }, "engines": { - "node": ">=4" + "node": ">= 0.8.0" } }, - "node_modules/chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "node_modules/eslint": { + "version": "8.49.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.49.0.tgz", + "integrity": "sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==", "dev": true, "dependencies": { - "check-error": "^1.0.2" + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "8.49.0", + "@humanwhocodes/config-array": "^0.11.11", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" }, - "peerDependencies": { - "chai": ">= 2.1.2 < 5" + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/chai-bn": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/chai-bn/-/chai-bn-0.2.2.tgz", - "integrity": "sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg==", + "node_modules/eslint-config-prettier": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", + "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, "peerDependencies": { - "bn.js": "^4.11.0", - "chai": "^4.0.0" + "eslint": ">=7.0.0" } }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/change-case": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.0.2.tgz", - "integrity": "sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==", - "dev": true, - "dependencies": { - "camel-case": "^3.0.0", - "constant-case": "^2.0.0", - "dot-case": "^2.1.0", - "header-case": "^1.0.0", - "is-lower-case": "^1.1.0", - "is-upper-case": "^1.1.0", - "lower-case": "^1.1.1", - "lower-case-first": "^1.0.0", - "no-case": "^2.3.2", - "param-case": "^2.1.0", - "pascal-case": "^2.0.0", - "path-case": "^2.1.0", - "sentence-case": "^2.1.0", - "snake-case": "^2.1.0", - "swap-case": "^1.1.0", - "title-case": "^2.1.0", - "upper-case": "^1.1.1", - "upper-case-first": "^1.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "node_modules/charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { - "node": "*" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/cheerio": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "node_modules/eslint/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": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">= 6" + "node": ">=8" }, "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/eslint/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": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/fb55" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "node_modules/eslint/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, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "node": ">=7.0.0" } }, - "node_modules/chownr": { + "node_modules/eslint/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, - "node_modules/ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cids": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", - "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", - "deprecated": "This module has been superseded by the multiformats module", + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "buffer": "^5.5.0", - "class-is": "^1.1.0", - "multibase": "~0.6.0", - "multicodec": "^1.0.0", - "multihashes": "~0.4.15" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=4.0.0", - "npm": ">=3.0.0" - } - }, - "node_modules/cids/node_modules/multicodec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", - "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", - "deprecated": "This module has been superseded by the multiformats module", - "dev": true, - "dependencies": { - "buffer": "^5.6.0", - "varint": "^5.0.0" - } - }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/class-is": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", - "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", - "dev": true - }, - "node_modules/classic-level": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", - "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "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" + "is-glob": "^4.0.3" }, "engines": { - "node": ">=12" + "node": ">=10.13.0" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "node_modules/eslint/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": ">=6" + "node": ">=8" } }, - "node_modules/cli-table3": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", - "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "object-assign": "^4.1.0", - "string-width": "^2.1.1" - }, - "engines": { - "node": ">=6" + "argparse": "^2.0.1" }, - "optionalDependencies": { - "colors": "^1.1.2" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cliui/node_modules/strip-ansi": { + "node_modules/eslint/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -5939,669 +5190,761 @@ "node": ">=8" } }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "node_modules/eslint/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": ">=0.8" + "node": ">=8" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "mimic-response": "^1.0.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/eslint" } }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true, + "estraverse": "^5.1.0" + }, "engines": { - "node": ">=0.1.90" + "node": ">=0.10" } }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "dependencies": { - "delayed-stream": "~1.0.0" + "estraverse": "^5.2.0" }, "engines": { - "node": ">= 0.8" + "node": ">=4.0" } }, - "node_modules/command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", - "dev": true - }, - "node_modules/command-line-args": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", - "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "peer": true, - "dependencies": { - "array-back": "^3.1.0", - "find-replace": "^3.0.0", - "lodash.camelcase": "^4.3.0", - "typical": "^4.0.0" - }, "engines": { - "node": ">=4.0.0" + "node": ">=4.0" } }, - "node_modules/command-line-usage": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", - "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "peer": true, - "dependencies": { - "array-back": "^4.0.2", - "chalk": "^2.4.2", - "table-layout": "^1.0.2", - "typical": "^5.2.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" } }, - "node_modules/command-line-usage/node_modules/array-back": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", - "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "node_modules/eth-gas-reporter": { + "version": "0.2.27", + "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.27.tgz", + "integrity": "sha512-femhvoAM7wL0GcI8ozTdxfuBtBFJ9qsyIAsmKVjlWAHUbdnnXHt+lKzz/kmldM5lA9jLuNHGwuIxorNpLbR1Zw==", "dev": true, - "peer": true, - "engines": { - "node": ">=8" + "dependencies": { + "@solidity-parser/parser": "^0.14.0", + "axios": "^1.5.1", + "cli-table3": "^0.5.0", + "colors": "1.4.0", + "ethereum-cryptography": "^1.0.3", + "ethers": "^5.7.2", + "fs-readdir-recursive": "^1.1.0", + "lodash": "^4.17.14", + "markdown-table": "^1.1.3", + "mocha": "^10.2.0", + "req-cwd": "^2.0.0", + "sha1": "^1.1.1", + "sync-request": "^6.0.0" + }, + "peerDependencies": { + "@codechecks/client": "^0.1.0" + }, + "peerDependenciesMeta": { + "@codechecks/client": { + "optional": true + } } }, - "node_modules/command-line-usage/node_modules/typical": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", - "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "node_modules/eth-gas-reporter/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] }, - "node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "node_modules/eth-gas-reporter/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", "dev": true, - "engines": { - "node": ">=14" + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" } }, - "node_modules/compare-versions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", - "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "node_modules/eth-gas-reporter/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", "dev": true, - "engines": [ - "node >= 0.8" + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } ], "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" } }, - "node_modules/concat-stream/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/concat-stream/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "node_modules/eth-gas-reporter/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", "dev": true, "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" } }, - "node_modules/concat-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/concat-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/eth-gas-reporter/node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "dependencies": { - "safe-buffer": "~5.1.0" + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" } }, - "node_modules/constant-case": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz", - "integrity": "sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==", + "node_modules/ethereum-bloom-filters": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", + "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", "dev": true, "dependencies": { - "snake-case": "^2.1.0", - "upper-case": "^1.1.1" + "js-sha3": "^0.8.0" } }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "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": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" + "@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/content-hash": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", - "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "node_modules/ethereumjs-abi": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", "dev": true, "dependencies": { - "cids": "^0.7.1", - "multicodec": "^0.5.5", - "multihashes": "^0.4.15" + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" } }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "node_modules/ethereumjs-abi/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", "dev": true, - "engines": { - "node": ">= 0.6" + "dependencies": { + "@types/node": "*" } }, - "node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", "dev": true, - "engines": { - "node": ">= 0.6" + "dependencies": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" } }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true + "node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dev": true, + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "node_modules/ethereumjs-util/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "node_modules/ethers": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.7.1.tgz", + "integrity": "sha512-qX5kxIFMfg1i+epfgb0xF4WM7IqapIIu50pOJ17aebkxxa4BacW5jFrQRmCJpDEg2ZK2oNtR5QjrQ1WDBF29dA==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "dependencies": { - "object-assign": "^4", - "vary": "^1" + "@adraffy/ens-normalize": "1.9.2", + "@noble/hashes": "1.1.2", + "@noble/secp256k1": "1.7.1", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", + "tslib": "2.4.0", + "ws": "8.5.0" }, "engines": { - "node": ">= 0.10" + "node": ">=14.0.0" } }, - "node_modules/cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "node_modules/ethers/node_modules/@noble/hashes": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz", + "integrity": "sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/ethers/node_modules/@types/node": { + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==", + "dev": true + }, + "node_modules/ethers/node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", + "dev": true + }, + "node_modules/ethers/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, + "node_modules/ethers/node_modules/ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", "dev": true, - "dependencies": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - }, "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" + "node": ">=10.0.0" }, "peerDependencies": { - "typescript": ">=4.9.5" + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" }, "peerDependenciesMeta": { - "typescript": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { "optional": true } } }, - "node_modules/cosmiconfig/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", "dev": true, "dependencies": { - "argparse": "^2.0.1" + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "node_modules/ethjs-unit/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true + }, + "node_modules/ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", "dev": true, - "bin": { - "crc32": "bin/crc32.njs" + "dependencies": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" }, "engines": { - "node": ">=0.8" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" + "safe-buffer": "^5.1.1" } }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "node_modules/extendable-error": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", + "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", + "dev": true + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "dev": true, "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" } }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "peer": true + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, - "node_modules/cross-fetch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", - "dev": true, - "dependencies": { - "node-fetch": "^2.6.12" - } + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" }, "engines": { - "node": ">= 8" + "node": ">=8.6.0" } }, - "node_modules/crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", - "dev": true, - "engines": { - "node": "*" - } + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true }, - "node_modules/crypto-addr-codec": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/crypto-addr-codec/-/crypto-addr-codec-0.1.8.tgz", - "integrity": "sha512-GqAK90iLLgP3FvhNmHbpT3wR6dEdaM8hZyZtLX29SPardh3OA13RFLHDR6sntGCgRWOfiHqW6sIyohpNqOtV/g==", + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "dependencies": { - "base-x": "^3.0.8", - "big-integer": "1.6.36", - "blakejs": "^1.1.0", - "bs58": "^4.0.1", - "ripemd160-min": "0.0.6", - "safe-buffer": "^5.2.0", - "sha3": "^2.1.1" + "reusify": "^1.0.4" } }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" + "flat-cache": "^3.0.4" }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true, "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/csv": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/csv/-/csv-5.5.3.tgz", - "integrity": "sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==", + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "dependencies": { - "csv-generate": "^3.4.3", - "csv-parse": "^4.16.3", - "csv-stringify": "^5.6.5", - "stream-transform": "^2.1.3" + "to-regex-range": "^5.0.1" }, "engines": { - "node": ">= 0.1.90" + "node": ">=8" } }, - "node_modules/csv-generate": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/csv-generate/-/csv-generate-3.4.3.tgz", - "integrity": "sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==", - "dev": true - }, - "node_modules/csv-parse": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.3.tgz", - "integrity": "sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==", - "dev": true - }, - "node_modules/csv-stringify": { - "version": "5.6.5", - "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-5.6.5.tgz", - "integrity": "sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==", - "dev": true - }, - "node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", "dev": true, + "peer": true, "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "dependencies": { - "assert-plus": "^1.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=0.10" + "node": ">=8" } }, - "node_modules/dataloader": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", - "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", - "dev": true + "node_modules/find-yarn-workspace-root2": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz", + "integrity": "sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==", + "dev": true, + "dependencies": { + "micromatch": "^4.0.2", + "pkg-dir": "^4.2.0" + } }, - "node_modules/death": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", - "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", - "dev": true + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/flat-cache": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", + "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", "dev": true, "dependencies": { - "ms": "2.1.2" + "flatted": "^3.2.7", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=12.0.0" } }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "node_modules/flat-cache/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/decamelize-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", - "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "dependencies": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" + "glob": "^7.1.3" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "rimraf": "bin.js" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/decamelize-keys/node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true + }, + "node_modules/follow-redirects": { + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], "engines": { - "node": ">=0.10.0" + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } } }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, - "engines": { - "node": ">=0.10" + "dependencies": { + "is-callable": "^1.1.3" } }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "dev": true, "dependencies": { - "mimic-response": "^3.1.0" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" }, "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "dependencies": { - "type-detect": "^4.0.0" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" }, "engines": { - "node": ">=6" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4.0.0" + "node": ">= 0.12" } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "node_modules/fp-ts": { + "version": "1.19.3", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", + "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", "dev": true }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "dev": true, "dependencies": { - "clone": "^1.0.2" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true, "engines": { - "node": ">=10" + "node": ">=6 <7 || >=8" } }, - "node_modules/define-data-property": { + "node_modules/fs-readdir-recursive": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", - "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" - }, + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 0.4" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" @@ -6610,351 +5953,219 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } + "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/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, - "engines": { - "node": ">= 0.8" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/detect-indent": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", - "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/detect-port": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", - "integrity": "sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ==", + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "dependencies": { - "address": "^1.0.1", - "debug": "4" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" }, - "bin": { - "detect": "bin/detect-port.js", - "detect-port": "bin/detect-port.js" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "node_modules/get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", "dev": true, "engines": { - "node": ">=0.3.1" + "node": ">=4" } }, - "node_modules/difflib": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", - "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, "dependencies": { - "heap": ">= 0.2.0" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" }, "engines": { - "node": "*" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "node_modules/ghost-testrpc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", + "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", "dev": true, "dependencies": { - "path-type": "^4.0.0" + "chalk": "^2.4.2", + "node-emoji": "^1.10.0" }, - "engines": { - "node": ">=8" + "bin": { + "testrpc-sc": "index.js" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "node_modules/glob": { + "version": "10.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.5.tgz", + "integrity": "sha512-bYUpUD7XDEHI4Q2O5a7PXGvyw4deKR70kHiDxzQbe925wbZknhOzUt2xBgTkYL6RBcVeXYuD9iNYeqoWbBZQnA==", "dev": true, "dependencies": { - "esutils": "^2.0.2" + "foreground-child": "^3.1.0", + "jackspeak": "^2.0.3", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/cjs/src/bin.js" }, "engines": { - "node": ">=6.0.0" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" + "is-glob": "^4.0.1" }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + "engines": { + "node": ">= 6" } }, - "node_modules/dom-walk": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", - "dev": true - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] + "dependencies": { + "balanced-match": "^1.0.0" + } }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { - "domelementtype": "^2.3.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">= 4" + "node": ">=16 || 14 >=14.17" }, "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "node_modules/glob/node_modules/minipass": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", + "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==", "dev": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" + "engines": { + "node": ">=16 || 14 >=14.17" } }, - "node_modules/dot-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz", - "integrity": "sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==", + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", "dev": true, "dependencies": { - "no-case": "^2.2.0" + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "node_modules/dotenv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", - "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", "dev": true, + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, "engines": { - "node": ">=10" + "node": ">=6" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" } }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/enquirer": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", - "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/enquirer/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/enquirer/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/globals": { + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1" + "type-fest": "^0.20.2" }, "engines": { "node": ">=8" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "engines": { - "node": ">=0.12" }, "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es-abstract": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", - "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.1", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.11" + "define-properties": "^1.1.3" }, "engines": { "node": ">= 0.4" @@ -6963,4308 +6174,3647 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, - "hasInstallScript": true, "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" + "get-intrinsic": "^1.1.3" }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dev": true, - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/graphlib": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", + "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", "dev": true, - "engines": { - "node": ">=0.8.0" + "dependencies": { + "lodash": "^4.17.15" } }, - "node_modules/escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, "dependencies": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1" + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" }, "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" + "handlebars": "bin/handlebars" }, "engines": { - "node": ">=0.12.0" + "node": ">=0.4.7" }, "optionalDependencies": { - "source-map": "~0.2.0" + "uglify-js": "^3.1.4" } }, - "node_modules/escodegen/node_modules/esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/escodegen/node_modules/estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/escodegen/node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "node_modules/hardhat": { + "version": "2.17.4", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.17.4.tgz", + "integrity": "sha512-YTyHjVc9s14CY/O7Dbtzcr/92fcz6AzhrMaj6lYsZpYPIPLzOrFCZHHPxfGQB6FiE6IPNE0uJaAbr7zGF79goA==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "@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/solidity-analyzer": "^0.1.0", + "@sentry/node": "^5.18.1", + "@types/bn.js": "^5.1.0", + "@types/lru-cache": "^5.1.0", + "adm-zip": "^0.4.16", + "aggregate-error": "^3.0.0", + "ansi-escapes": "^4.3.0", + "chalk": "^2.4.2", + "chokidar": "^3.4.0", + "ci-info": "^2.0.0", + "debug": "^4.1.1", + "enquirer": "^2.3.0", + "env-paths": "^2.2.0", + "ethereum-cryptography": "^1.0.3", + "ethereumjs-abi": "^0.6.8", + "find-up": "^2.1.0", + "fp-ts": "1.19.3", + "fs-extra": "^7.0.1", + "glob": "7.2.0", + "immutable": "^4.0.0-rc.12", + "io-ts": "1.10.4", + "keccak": "^3.0.2", + "lodash": "^4.17.11", + "mnemonist": "^0.38.0", + "mocha": "^10.0.0", + "p-map": "^4.0.0", + "raw-body": "^2.4.1", + "resolve": "1.17.0", + "semver": "^6.3.0", + "solc": "0.7.3", + "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" }, - "engines": { - "node": ">= 0.8.0" + "bin": { + "hardhat": "internal/cli/bootstrap.js" + }, + "peerDependencies": { + "ts-node": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + }, + "typescript": { + "optional": true + } } }, - "node_modules/escodegen/node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "node_modules/hardhat-exposed": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/hardhat-exposed/-/hardhat-exposed-0.3.13.tgz", + "integrity": "sha512-hY2qCYSi2wD2ChZ0WP0oEPS4zlZ2vGaLOVXvfosGcy6mNeQ+pWsxTge35tTumCHwCzk/dYxLZq+KW0Z5t08yDA==", "dev": true, "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "micromatch": "^4.0.4", + "solidity-ast": "^0.4.52" }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true, - "engines": { - "node": ">= 0.8.0" + "peerDependencies": { + "hardhat": "^2.3.0" } }, - "node_modules/escodegen/node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "node_modules/hardhat-gas-reporter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", + "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2" + "array-uniq": "1.0.3", + "eth-gas-reporter": "^0.2.25", + "sha1": "^1.1.1" }, - "engines": { - "node": ">= 0.8.0" + "peerDependencies": { + "hardhat": "^2.0.2" } }, - "node_modules/eslint": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.49.0.tgz", - "integrity": "sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==", + "node_modules/hardhat-ignore-warnings": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/hardhat-ignore-warnings/-/hardhat-ignore-warnings-0.2.9.tgz", + "integrity": "sha512-q1oj6/ixiAx+lgIyGLBajVCSC7qUtAoK7LS9Nr8UVHYo8Iuh5naBiVGo4RDJ6wxbDGYBkeSukUGZrMqzC2DWwA==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.49.0", - "@humanwhocodes/config-array": "^0.11.11", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "minimatch": "^5.1.0", + "node-interval-tree": "^2.0.1", + "solidity-comments": "^0.0.2" } }, - "node_modules/eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "node_modules/hardhat-ignore-warnings/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" + "dependencies": { + "balanced-match": "^1.0.0" } }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "node_modules/hardhat-ignore-warnings/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=10" } }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "node_modules/hardhat/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] }, - "node_modules/eslint/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/hardhat/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", "dev": true, - "engines": { - "node": ">=8" + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" } }, - "node_modules/eslint/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==", + "node_modules/hardhat/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "node_modules/hardhat/node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, - "node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/hardhat/node_modules/commander": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", + "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", + "dev": true + }, + "node_modules/hardhat/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", "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" + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" } }, - "node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/hardhat/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "locate-path": "^2.0.0" }, "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/eslint/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/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "node_modules/eslint/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/hardhat/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=10" + "node": "*" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/hardhat/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, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/hardhat/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/hardhat/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "dependencies": { - "argparse": "^2.0.1" + "p-try": "^1.0.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=4" } }, - "node_modules/eslint/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/hardhat/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", "dev": true, "dependencies": { - "p-locate": "^5.0.0" + "p-limit": "^1.1.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "node_modules/eslint/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/hardhat/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "node_modules/eslint/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/hardhat/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/hardhat/node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "node_modules/hardhat/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "glob": "^7.1.3" }, - "funding": { - "url": "https://opencollective.com/eslint" + "bin": { + "rimraf": "bin.js" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/hardhat/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" + "semver": "bin/semver.js" } }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "node_modules/hardhat/node_modules/solc": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", + "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", "dev": true, "dependencies": { - "estraverse": "^5.1.0" + "command-exists": "^1.2.8", + "commander": "3.0.2", + "follow-redirects": "^1.12.1", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solcjs" }, "engines": { - "node": ">=0.10" + "node": ">=8.0.0" } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "node_modules/hardhat/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": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" + "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/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/hardhat/node_modules/solc/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "engines": { - "node": ">=4.0" + "bin": { + "semver": "bin/semver" } }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4.0" } }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, - "engines": { - "node": ">= 0.6" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw==", + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, - "dependencies": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" + "engines": { + "node": ">=4" } }, - "node_modules/eth-ens-namehash/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, - "node_modules/eth-gas-reporter": { - "version": "0.2.27", - "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.27.tgz", - "integrity": "sha512-femhvoAM7wL0GcI8ozTdxfuBtBFJ9qsyIAsmKVjlWAHUbdnnXHt+lKzz/kmldM5lA9jLuNHGwuIxorNpLbR1Zw==", + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", "dev": true, "dependencies": { - "@solidity-parser/parser": "^0.14.0", - "axios": "^1.5.1", - "cli-table3": "^0.5.0", - "colors": "1.4.0", - "ethereum-cryptography": "^1.0.3", - "ethers": "^5.7.2", - "fs-readdir-recursive": "^1.1.0", - "lodash": "^4.17.14", - "markdown-table": "^1.1.3", - "mocha": "^10.2.0", - "req-cwd": "^2.0.0", - "sha1": "^1.1.1", - "sync-request": "^6.0.0" - }, - "peerDependencies": { - "@codechecks/client": "^0.1.0" + "get-intrinsic": "^1.1.1" }, - "peerDependenciesMeta": { - "@codechecks/client": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eth-gas-reporter/node_modules/@noble/hashes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", - "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/eth-gas-reporter/node_modules/@scure/bip32": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", - "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "@noble/hashes": "~1.2.0", - "@noble/secp256k1": "~1.7.0", - "@scure/base": "~1.1.0" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eth-gas-reporter/node_modules/@scure/bip39": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", - "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { - "@noble/hashes": "~1.2.0", - "@scure/base": "~1.1.0" + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eth-gas-reporter/node_modules/ethereum-cryptography": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", - "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "dependencies": { - "@noble/hashes": "1.2.0", - "@noble/secp256k1": "1.7.1", - "@scure/bip32": "1.1.5", - "@scure/bip39": "1.1.1" + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/eth-gas-reporter/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" } }, - "node_modules/eth-lib": { - "version": "0.1.29", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", - "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, - "dependencies": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "nano-json-stream-parser": "^0.1.2", - "servify": "^0.1.12", - "ws": "^3.0.0", - "xhr-request-promise": "^0.1.2" + "bin": { + "he": "bin/he" } }, - "node_modules/eth-lib/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/eth-lib/node_modules/ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "dependencies": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } + "node_modules/heap": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", + "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", + "dev": true }, - "node_modules/eth-sig-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.1.tgz", - "integrity": "sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==", - "deprecated": "Deprecated in favor of '@metamask/eth-sig-util'", + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", "dev": true, "dependencies": { - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^5.1.1", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.0" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/eth-sig-util/node_modules/ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true }, - "node_modules/ethereum-bloom-filters": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", - "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", + "node_modules/http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", "dev": true, "dependencies": { - "js-sha3": "^0.8.0" + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + }, + "engines": { + "node": ">=6.0.0" } }, - "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/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "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" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" } }, - "node_modules/ethereum-ens": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/ethereum-ens/-/ethereum-ens-0.8.0.tgz", - "integrity": "sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg==", + "node_modules/http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", "dev": true, "dependencies": { - "bluebird": "^3.4.7", - "eth-ens-namehash": "^2.0.0", - "js-sha3": "^0.5.7", - "pako": "^1.0.4", - "underscore": "^1.8.3", - "web3": "^1.0.0-beta.34" + "@types/node": "^10.0.3" } }, - "node_modules/ethereum-ens/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", + "node_modules/http-response-object/node_modules/@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", "dev": true }, - "node_modules/ethereumjs-abi": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", - "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - } - }, - "node_modules/ethereumjs-abi/node_modules/@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "dev": true, - "dependencies": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - }, - "node_modules/ethereumjs-util": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", - "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, "dependencies": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" + "agent-base": "6", + "debug": "4" }, "engines": { - "node": ">=10.0.0" + "node": ">= 6" } }, - "node_modules/ethereumjs-util/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "node_modules/human-id": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz", + "integrity": "sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==", "dev": true }, - "node_modules/ethereumjs-wallet": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz", - "integrity": "sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA==", + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "dependencies": { - "aes-js": "^3.1.2", - "bs58check": "^2.1.2", - "ethereum-cryptography": "^0.1.3", - "ethereumjs-util": "^7.1.2", - "randombytes": "^2.1.0", - "scrypt-js": "^3.0.1", - "utf8": "^3.0.0", - "uuid": "^8.3.2" + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/ethers": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.7.1.tgz", - "integrity": "sha512-qX5kxIFMfg1i+epfgb0xF4WM7IqapIIu50pOJ17aebkxxa4BacW5jFrQRmCJpDEg2ZK2oNtR5QjrQ1WDBF29dA==", + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true, "funding": [ { - "type": "individual", - "url": "https://github.com/sponsors/ethers-io/" + "type": "github", + "url": "https://github.com/sponsors/feross" }, { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@adraffy/ens-normalize": "1.9.2", - "@noble/hashes": "1.1.2", - "@noble/secp256k1": "1.7.1", - "@types/node": "18.15.13", - "aes-js": "4.0.0-beta.5", - "tslib": "2.4.0", - "ws": "8.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/ethers/node_modules/@noble/hashes": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz", - "integrity": "sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==", - "dev": true, - "funding": [ + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, { - "type": "individual", - "url": "https://paulmillr.com/funding/" + "type": "consulting", + "url": "https://feross.org/support" } ] }, - "node_modules/ethers/node_modules/@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==", - "dev": true - }, - "node_modules/ethers/node_modules/aes-js": { - "version": "4.0.0-beta.5", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", - "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", - "dev": true - }, - "node_modules/ethers/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "dev": true - }, - "node_modules/ethers/node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "node": ">= 4" } }, - "node_modules/ethjs-abi": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", - "integrity": "sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA==", + "node_modules/immutable": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", + "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", + "dev": true + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "dependencies": { - "bn.js": "4.11.6", - "js-sha3": "0.5.5", - "number-to-bn": "1.7.0" + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" }, "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ethjs-abi/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - }, - "node_modules/ethjs-abi/node_modules/js-sha3": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", - "integrity": "sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA==", - "dev": true - }, - "node_modules/ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "dependencies": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">=4" } }, - "node_modules/ethjs-unit/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - }, - "node_modules/ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "dependencies": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - }, "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">=0.8.19" } }, - "node_modules/eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "dev": true + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", "dev": true, "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" }, "engines": { - "node": ">= 0.10.0" + "node": ">= 0.4" } }, - "node_modules/express/node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true, - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "node": ">= 0.10" } }, - "node_modules/express/node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "node_modules/io-ts": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", + "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", "dev": true, - "engines": { - "node": ">= 0.6" + "dependencies": { + "fp-ts": "^1.0.0" } }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", "dev": true, "dependencies": { - "ms": "2.0.0" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, - "node_modules/express/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" + "has-bigints": "^1.0.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/express/node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "binary-extensions": "^2.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">=8" } }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "dependencies": { - "type": "^2.7.2" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "dev": true - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "node_modules/extendable-error": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", - "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", - "dev": true - }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true, - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "engines": { "node": ">=4" } }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-check": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.1.1.tgz", - "integrity": "sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA==", + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, - "dependencies": { - "pure-rand": "^5.0.1" - }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "node_modules/is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "ci-info": "^3.2.0" }, - "engines": { - "node": ">=8.6.0" + "bin": { + "is-ci": "bin.js" } }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, "dependencies": { - "reusify": "^1.0.4" + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=0.10.0" } }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" + "is-extglob": "^2.1.1" }, "engines": { - "node": ">= 0.8" + "node": ">=0.10.0" } }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", "dev": true, - "dependencies": { - "ms": "2.0.0" + "engines": { + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/find-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, - "peer": true, - "dependencies": { - "array-back": "^3.0.1" + "engines": { + "node": ">= 0.4" }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, "engines": { - "node": ">=4.0.0" + "node": ">=0.12.0" } }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/find-yarn-workspace-root2": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz", - "integrity": "sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==", + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, - "dependencies": { - "micromatch": "^4.0.2", - "pkg-dir": "^4.2.0" + "engines": { + "node": ">=8" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", "dev": true, - "bin": { - "flat": "cli.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/flat-cache": { + "node_modules/is-port-reachable": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", - "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", + "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-3.1.0.tgz", + "integrity": "sha512-vjc0SSRNZ32s9SbZBzGaiP6YVB+xglLShhgZD/FHMZUXBvQWaV9CtzgeVhjccFJrI6RAMV+LX7NYxueW/A8W5A==", "dev": true, - "dependencies": { - "flatted": "^3.2.7", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, "engines": { - "node": ">=12.0.0" + "node": ">=8" } }, - "node_modules/flat-cache/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "engines": { - "node": "*" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/flat-cache/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" + "call-bind": "^1.0.2" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { - "node": ">=4.0" + "node": ">= 0.4" }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "node_modules/is-subdir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", + "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", "dev": true, "dependencies": { - "is-callable": "^1.1.3" + "better-path-resolve": "1.0.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" + "has-symbols": "^1.0.2" }, "engines": { - "node": ">=14" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, "engines": { - "node": ">=14" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, "engines": { - "node": "*" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "call-bind": "^1.0.2" }, - "engines": { - "node": ">= 0.12" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/form-data-encoder": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", - "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==", - "dev": true - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, "engines": { - "node": ">= 0.6" + "node": ">=0.10.0" } }, - "node_modules/fp-ts": { - "version": "1.19.3", - "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", - "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, - "engines": { - "node": ">= 0.6" - } + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, - "node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "node_modules/jackspeak": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.3.tgz", + "integrity": "sha512-R2bUw+kVZFS/h1AZqBKrSgDmdmjApzgY0AlCPumopFiAlbUxE2gf+SCuBzQ0cP5hHmUmFYF5yw55T97Th5Kstg==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "@isaacs/cliui": "^8.0.2" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" } }, - "node_modules/fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "node_modules/js-sdsl": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", + "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", "dev": true, - "dependencies": { - "minipass": "^2.6.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" } }, - "node_modules/fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", "dev": true }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, - "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, - "node_modules/functional-red-black-tree": { + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { "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==", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "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", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "node_modules/jsonschema": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", + "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", "dev": true, "engines": { - "node": "6.* || 8.* || >= 10.*" + "node": "*" } }, - "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "node_modules/keccak": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", + "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, "engines": { - "node": "*" + "node": ">=10.0.0" } }, - "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "node_modules/keyv": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", + "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "json-buffer": "3.0.1" } }, - "node_modules/get-port": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", - "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "node_modules/klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.9" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "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": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "browser-level": "^1.0.1", + "classic-level": "^1.2.0" }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/ghost-testrpc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", - "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", - "dev": true, - "dependencies": { - "chalk": "^2.4.2", - "node-emoji": "^1.10.0" - }, - "bin": { - "testrpc-sc": "index.js" + "type": "opencollective", + "url": "https://opencollective.com/level" } }, - "node_modules/glob": { - "version": "10.3.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.5.tgz", - "integrity": "sha512-bYUpUD7XDEHI4Q2O5a7PXGvyw4deKR70kHiDxzQbe925wbZknhOzUt2xBgTkYL6RBcVeXYuD9iNYeqoWbBZQnA==", + "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, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/cjs/src/bin.js" - }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=12" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "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": { - "is-glob": "^4.0.1" + "buffer": "^6.0.3", + "module-error": "^1.0.1" }, "engines": { - "node": ">= 6" + "node": ">=12" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/level-transcoder/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "balanced-match": "^1.0.0" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "node_modules/glob/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob/node_modules/minipass": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", - "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==", - "dev": true, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">= 0.8.0" } }, - "node_modules/global": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", - "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", - "dev": true, - "dependencies": { - "min-document": "^2.19.0", - "process": "^0.11.10" - } + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true }, - "node_modules/global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "node_modules/load-yaml-file": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", + "integrity": "sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==", "dev": true, "dependencies": { - "global-prefix": "^3.0.0" + "graceful-fs": "^4.1.5", + "js-yaml": "^3.13.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" }, "engines": { "node": ">=6" } }, - "node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" + "p-locate": "^4.1.0" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } + "peer": true }, - "node_modules/globals": { - "version": "13.22.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", - "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true, + "peer": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "dependencies": { - "type-fest": "^0.20.2" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "define-properties": "^1.1.3" + "color-convert": "^2.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3" + "color-name": "~1.1.4" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=7.0.0" } }, - "node_modules/got": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", - "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^4.6.0", - "@szmarczak/http-timer": "^5.0.1", - "@types/cacheable-request": "^6.0.2", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^6.0.4", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "form-data-encoder": "1.7.1", - "get-stream": "^6.0.1", - "http2-wrapper": "^2.1.10", - "lowercase-keys": "^3.0.0", - "p-cancelable": "^3.0.0", - "responselike": "^2.0.0" - }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/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": ">=14.16" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" + "node": ">=8" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true + "node_modules/loupe": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.0" + } }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "node_modules/lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", "dev": true }, - "node_modules/graphlib": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", - "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", + "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": { - "lodash": "^4.17.15" + "yallist": "^3.0.2" } }, - "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "peer": true + }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", "dev": true, - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, "engines": { - "node": ">=0.4.7" + "node": ">=8" }, - "optionalDependencies": { - "uglify-js": "^3.1.4" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/handlebars/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/markdown-table": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", + "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", + "dev": 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": ">=0.10.0" + "node": ">=8.9.0" } }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", + "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": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" + "abstract-level": "^1.0.0", + "functional-red-black-tree": "^1.0.1", + "module-error": "^1.0.1" }, "engines": { - "node": ">=6" + "node": ">=12" } }, - "node_modules/hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", "dev": true, "engines": { - "node": ">=6" + "node": ">= 0.10.0" } }, - "node_modules/hardhat": { - "version": "2.17.4", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.17.4.tgz", - "integrity": "sha512-YTyHjVc9s14CY/O7Dbtzcr/92fcz6AzhrMaj6lYsZpYPIPLzOrFCZHHPxfGQB6FiE6IPNE0uJaAbr7zGF79goA==", + "node_modules/meow": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-6.1.1.tgz", + "integrity": "sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==", "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/solidity-analyzer": "^0.1.0", - "@sentry/node": "^5.18.1", - "@types/bn.js": "^5.1.0", - "@types/lru-cache": "^5.1.0", - "adm-zip": "^0.4.16", - "aggregate-error": "^3.0.0", - "ansi-escapes": "^4.3.0", - "chalk": "^2.4.2", - "chokidar": "^3.4.0", - "ci-info": "^2.0.0", - "debug": "^4.1.1", - "enquirer": "^2.3.0", - "env-paths": "^2.2.0", - "ethereum-cryptography": "^1.0.3", - "ethereumjs-abi": "^0.6.8", - "find-up": "^2.1.0", - "fp-ts": "1.19.3", - "fs-extra": "^7.0.1", - "glob": "7.2.0", - "immutable": "^4.0.0-rc.12", - "io-ts": "1.10.4", - "keccak": "^3.0.2", - "lodash": "^4.17.11", - "mnemonist": "^0.38.0", - "mocha": "^10.0.0", - "p-map": "^4.0.0", - "raw-body": "^2.4.1", - "resolve": "1.17.0", - "semver": "^6.3.0", - "solc": "0.7.3", - "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" - }, - "bin": { - "hardhat": "internal/cli/bootstrap.js" + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "^4.0.2", + "normalize-package-data": "^2.5.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.13.1", + "yargs-parser": "^18.1.3" }, - "peerDependencies": { - "ts-node": "*", - "typescript": "*" + "engines": { + "node": ">=8" }, - "peerDependenciesMeta": { - "ts-node": { - "optional": true - }, - "typescript": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/hardhat-exposed": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/hardhat-exposed/-/hardhat-exposed-0.3.13.tgz", - "integrity": "sha512-hY2qCYSi2wD2ChZ0WP0oEPS4zlZ2vGaLOVXvfosGcy6mNeQ+pWsxTge35tTumCHwCzk/dYxLZq+KW0Z5t08yDA==", + "node_modules/meow/node_modules/type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", "dev": true, - "dependencies": { - "micromatch": "^4.0.4", - "solidity-ast": "^0.4.52" + "engines": { + "node": ">=10" }, - "peerDependencies": { - "hardhat": "^2.3.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/hardhat-gas-reporter": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", - "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "dependencies": { - "array-uniq": "1.0.3", - "eth-gas-reporter": "^0.2.25", - "sha1": "^1.1.1" - }, - "peerDependencies": { - "hardhat": "^2.0.2" + "engines": { + "node": ">= 8" } }, - "node_modules/hardhat-ignore-warnings": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/hardhat-ignore-warnings/-/hardhat-ignore-warnings-0.2.9.tgz", - "integrity": "sha512-q1oj6/ixiAx+lgIyGLBajVCSC7qUtAoK7LS9Nr8UVHYo8Iuh5naBiVGo4RDJ6wxbDGYBkeSukUGZrMqzC2DWwA==", - "dev": true, - "dependencies": { - "minimatch": "^5.1.0", - "node-interval-tree": "^2.0.1", - "solidity-comments": "^0.0.2" - } - }, - "node_modules/hardhat-ignore-warnings/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } + "node_modules/micro-ftch": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "dev": true }, - "node_modules/hardhat-ignore-warnings/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" + "braces": "^3.0.2", + "picomatch": "^2.3.1" }, "engines": { - "node": ">=10" + "node": ">=8.6" } }, - "node_modules/hardhat/node_modules/@noble/hashes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", - "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] + "engines": { + "node": ">= 0.6" + } }, - "node_modules/hardhat/node_modules/@scure/bip32": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", - "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { - "@noble/hashes": "~1.2.0", - "@noble/secp256k1": "~1.7.0", - "@scure/base": "~1.1.0" + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" } }, - "node_modules/hardhat/node_modules/@scure/bip39": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", - "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "@noble/hashes": "~1.2.0", - "@scure/base": "~1.1.0" + "engines": { + "node": ">=4" } }, - "node_modules/hardhat/node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", "dev": true }, - "node_modules/hardhat/node_modules/commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", "dev": true }, - "node_modules/hardhat/node_modules/ethereum-cryptography": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", - "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "@noble/hashes": "1.2.0", - "@noble/secp256k1": "1.7.1", - "@scure/bip32": "1.1.5", - "@scure/bip39": "1.1.1" + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "node_modules/hardhat/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hardhat/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">= 6" } }, - "node_modules/hardhat/node_modules/jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", + "node_modules/mixme": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/mixme/-/mixme-0.5.9.tgz", + "integrity": "sha512-VC5fg6ySUscaWUpI4gxCBTQMH2RdUpNrk+MsbpCYtIvf9SBJdiUey4qE7BXviJsJR4nDQxCZ+3yaYNW3guz/Pw==", "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "engines": { + "node": ">= 8.0.0" } }, - "node_modules/hardhat/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "minimist": "^1.2.6" }, - "engines": { - "node": ">=4" + "bin": { + "mkdirp": "bin/cmd.js" } }, - "node_modules/hardhat/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "node_modules/mnemonist": { + "version": "0.38.5", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", + "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", "dev": true, "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" + "obliterator": "^2.0.0" } }, - "node_modules/hardhat/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "node_modules/mocha": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "dependencies": { - "p-limit": "^1.1.0" + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" }, "engines": { - "node": ">=4" + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" } }, - "node_modules/hardhat/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "node_modules/mocha/node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/hardhat/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "node_modules/mocha/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/hardhat/node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/mocha/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, - "node_modules/hardhat/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "node_modules/hardhat/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/hardhat/node_modules/solc": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", - "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", + "node_modules/mocha/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "command-exists": "^1.2.8", - "commander": "3.0.2", - "follow-redirects": "^1.12.1", - "fs-extra": "^0.30.0", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", - "semver": "^5.5.0", - "tmp": "0.0.33" - }, - "bin": { - "solcjs": "solcjs" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/hardhat/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==", + "node_modules/mocha/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "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/hardhat/node_modules/solc/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "function-bind": "^1.1.1" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">= 0.4.0" + "node": "*" } }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "node_modules/mocha/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, - "node_modules/has-flag": { + "node_modules/mocha/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "node_modules/mocha/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.1" + "argparse": "^2.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "node_modules/mocha/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, - "engines": { - "node": ">= 0.4" + "dependencies": { + "brace-expansion": "^2.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=10" } }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "node_modules/mocha/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "node_modules/mocha/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "bin": { - "he": "bin/he" + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/header-case": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz", - "integrity": "sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==", + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.1.3" + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" } }, - "node_modules/heap": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", - "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", - "dev": true + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "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": "*" + "node": ">=10" } }, - "node_modules/highlightjs-solidity": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz", - "integrity": "sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg==", + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true, - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "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/htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "dev": true + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" + "lodash": "^4.17.21" } }, - "node_modules/http-basic": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", - "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, "dependencies": { - "caseless": "^0.12.0", - "concat-stream": "^1.6.2", - "http-response-object": "^3.0.1", - "parse-cache-control": "^1.0.1" + "whatwg-url": "^5.0.0" }, "engines": { - "node": ">=6.0.0" + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "dev": true + "node_modules/node-gyp-build": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", + "dev": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "node_modules/node-interval-tree": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/node-interval-tree/-/node-interval-tree-2.1.2.tgz", + "integrity": "sha512-bJ9zMDuNGzVQg1xv0bCPzyEDxHgbrx7/xGj6CDokvizZZmastPsOh0JJLuY8wA5q2SfX1TLNMk7XNV8WxbGxzA==", "dev": true, "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "shallowequal": "^1.1.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 14.0.0" } }, - "node_modules/http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==", - "dev": true - }, - "node_modules/http-response-object": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", - "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", "dev": true, - "dependencies": { - "@types/node": "^10.0.3" + "engines": { + "node": ">=12.19" } }, - "node_modules/http-response-object/node_modules/@types/node": { - "version": "10.17.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", - "dev": true - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "abbrev": "1" }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" + "bin": { + "nopt": "bin/nopt.js" } }, - "node_modules/http2-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", - "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.2.0" - }, - "engines": { - "node": ">=10.19.0" + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, - "node_modules/http2-wrapper/node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "node_modules/number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", "dev": true, "dependencies": { - "agent-base": "6", - "debug": "4" + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" }, "engines": { - "node": ">= 6" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/human-id": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz", - "integrity": "sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==", + "node_modules/number-to-bn/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", "dev": true }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true, - "dependencies": { - "punycode": "2.1.0" - }, - "engines": { - "node": ">=4.0.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, "engines": { - "node": ">= 4" + "node": ">= 0.4" } }, - "node_modules/immutable": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", - "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", - "dev": true - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" }, "engines": { - "node": ">=6" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/obliterator": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", + "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==", + "dev": true }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { - "once": "^1.3.0", "wrappy": "1" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.8.0" } }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "engines": { - "node": ">= 0.10" - } + "node_modules/ordinal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", + "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", + "dev": true }, - "node_modules/invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/io-ts": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", - "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", + "node_modules/outdent": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", + "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", + "dev": true + }, + "node_modules/p-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", + "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", "dev": true, "dependencies": { - "fp-ts": "^1.0.0" + "p-map": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "node_modules/p-filter/node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", "dev": true, "engines": { - "node": ">= 0.10" + "node": ">=6" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "p-limit": "^2.2.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "dependencies": { - "has-bigints": "^1.0.1" + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "dependencies": { - "binary-extensions": "^2.0.0" + "aggregate-error": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6" } }, - "node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "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" - } - ], - "engines": { - "node": ">=4" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "dependencies": { - "ci-info": "^3.2.0" + "callsites": "^3.0.0" }, - "bin": { - "is-ci": "bin.js" + "engines": { + "node": ">=6" } }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "node_modules/parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", + "dev": true + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/is-function": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", - "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "node_modules/path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=16 || 14 >=14.17" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", + "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, "engines": { - "node": ">=0.10.0" + "node": "14 || >=16.14" } }, - "node_modules/is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", + "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==", "dev": true, "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">=16 || 14 >=14.17" } }, - "node_modules/is-lower-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", - "integrity": "sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==", + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "dependencies": { - "lower-case": "^1.1.0" + "engines": { + "node": ">=8" } }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "*" } }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "dev": true, + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, "engines": { - "node": ">=0.12.0" + "node": ">=0.12" } }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, "engines": { - "node": ">= 0.4" + "node": ">=8.6" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/is-port-reachable": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-3.1.0.tgz", - "integrity": "sha512-vjc0SSRNZ32s9SbZBzGaiP6YVB+xglLShhgZD/FHMZUXBvQWaV9CtzgeVhjccFJrI6RAMV+LX7NYxueW/A8W5A==", + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "node_modules/preferred-pm": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.1.2.tgz", + "integrity": "sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "find-up": "^5.0.0", + "find-yarn-workspace-root2": "1.2.16", + "path-exists": "^4.0.0", + "which-pm": "2.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=10" } }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "node_modules/preferred-pm/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "node_modules/preferred-pm/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-subdir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", - "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", + "node_modules/preferred-pm/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { - "better-path-resolve": "1.0.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8.0" } }, - "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "node_modules/prettier": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", "dev": true, - "dependencies": { - "which-typed-array": "^1.1.11" + "bin": { + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">= 0.4" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "node_modules/prettier-plugin-solidity": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.3.tgz", + "integrity": "sha512-fQ9yucPi2sBbA2U2Xjh6m4isUTJ7S7QLc/XDDsktqqxYfTwdYKJ0EnnywXHwCGAaYbQNK+HIYPL1OemxuMsgeg==", "dev": true, + "dependencies": { + "@solidity-parser/parser": "^0.16.0", + "semver": "^7.3.8", + "solidity-comments-extractor": "^0.0.7" + }, "engines": { - "node": ">=10" + "node": ">=12" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "prettier": ">=2.3.0 || >=3.0.0-alpha.0" } }, - "node_modules/is-upper-case": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", - "integrity": "sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==", + "node_modules/prettier-plugin-solidity/node_modules/@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", "dev": true, "dependencies": { - "upper-case": "^1.1.0" + "antlr4ts": "^0.5.0-alpha.4" } }, - "node_modules/is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "node_modules/promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "asap": "~2.0.6" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" } }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "dev": true }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", "dev": true }, - "node_modules/jackspeak": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.3.tgz", - "integrity": "sha512-R2bUw+kVZFS/h1AZqBKrSgDmdmjApzgY0AlCPumopFiAlbUxE2gf+SCuBzQ0cP5hHmUmFYF5yw55T97Th5Kstg==", + "node_modules/punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==", "dev": true, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" + "node": ">=6" } }, - "node_modules/js-sdsl": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", - "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", + "node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" + "engines": { + "node": ">=0.6" } }, - "node_modules/js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "safe-buffer": "^5.1.0" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">= 0.8" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jsonschema": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", - "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true, - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, "engines": { - "node": ">=0.6.0" + "node": ">=8" } }, - "node_modules/keccak": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", - "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", + "node_modules/read-yaml-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", + "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", "dev": true, - "hasInstallScript": true, "dependencies": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0", - "readable-stream": "^3.6.0" + "graceful-fs": "^4.1.5", + "js-yaml": "^3.6.1", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=6" } }, - "node_modules/keyv": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", - "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.9" - } - }, - "node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "dev": true, + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, "engines": { - "node": ">=6" + "node": ">= 6" } }, - "node_modules/lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "dependencies": { - "invert-kv": "^1.0.0" + "picomatch": "^2.2.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8.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==", + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, "dependencies": { - "browser-level": "^1.0.1", - "classic-level": "^1.2.0" + "resolve": "^1.1.6" }, "engines": { - "node": ">=12" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/level" + "node": ">= 0.10" } }, - "node_modules/level-supports": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", - "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", + "node_modules/recursive-readdir": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", + "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", "dev": true, + "dependencies": { + "minimatch": "^3.0.5" + }, "engines": { - "node": ">=12" + "node": ">=6.0.0" } }, - "node_modules/level-transcoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", - "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dev": true, "dependencies": { - "buffer": "^6.0.3", - "module-error": "^1.0.1" + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" }, "engines": { - "node": ">=12" + "node": ">=8" } }, - "node_modules/level-transcoder/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "node_modules/redent/node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "node_modules/reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, + "peer": true, "engines": { - "node": ">= 0.8.0" + "node": ">=6" } }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "node_modules/regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", "dev": true }, - "node_modules/load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/load-json-file/node_modules/parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "node_modules/req-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", + "integrity": "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==", "dev": true, "dependencies": { - "error-ex": "^1.2.0" + "req-from": "^2.0.0" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/load-json-file/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/load-json-file/node_modules/strip-bom": { + "node_modules/req-from": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", + "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", + "integrity": "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==", "dev": true, "dependencies": { - "is-utf8": "^0.2.0" + "resolve-from": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/load-yaml-file": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", - "integrity": "sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==", + "node_modules/req-from/node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", "dev": true, - "dependencies": { - "graceful-fs": "^4.1.5", - "js-yaml": "^3.13.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0" - }, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw==", - "dev": true - }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "dev": true, - "peer": true - }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", - "dev": true, - "peer": true - }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", - "dev": true - }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lodash.startcase": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", - "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", - "dev": true - }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", "dev": true, "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" + "path-parse": "^1.0.6" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", "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": ">= 4" } }, - "node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, "engines": { - "node": ">=7.0.0" + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, - "node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/rimraf": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", + "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", "dev": true, + "dependencies": { + "glob": "^10.2.5" + }, + "bin": { + "rimraf": "dist/cjs/src/bin.js" + }, "engines": { - "node": ">=8" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" } }, - "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "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": { - "get-func-name": "^2.0.0" + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" } }, - "node_modules/lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==", + "node_modules/rlp/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, - "node_modules/lower-case-first": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz", - "integrity": "sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==", + "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" + } + ], "dependencies": { - "lower-case": "^1.1.2" + "queue-microtask": "^1.2.2" } }, - "node_modules/lowercase-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", - "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "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==", "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" } }, - "node_modules/lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", + "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/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==", + "node_modules/safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", "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", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "peer": true - }, - "node_modules/map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "dev": true, + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, "engines": { - "node": ">=8" + "node": ">=0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/markdown-table": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", - "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", - "dev": 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==", + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, - "engines": { - "node": ">=8.9.0" - } + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", "dev": true, "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, - "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==", + "node_modules/sc-istanbul": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", + "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", "dev": true, "dependencies": { - "abstract-level": "^1.0.0", - "functional-red-black-tree": "^1.0.1", - "module-error": "^1.0.1" + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" }, - "engines": { - "node": ">=12" + "bin": { + "istanbul": "lib/cli.js" } }, - "node_modules/memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "node_modules/sc-istanbul/node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, "engines": { - "node": ">= 0.10.0" + "node": ">=0.10.0" } }, - "node_modules/meow": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-6.1.1.tgz", - "integrity": "sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==", + "node_modules/sc-istanbul/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", "dev": true, "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "^4.0.2", - "normalize-package-data": "^2.5.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.13.1", - "yargs-parser": "^18.1.3" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "*" } }, - "node_modules/meow/node_modules/type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "node_modules/sc-istanbul/node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "node_modules/sc-istanbul/node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", "dev": true }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/sc-istanbul/node_modules/supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", "dev": true, + "dependencies": { + "has-flag": "^1.0.0" + }, "engines": { - "node": ">= 8" + "node": ">=0.8.0" } }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "node_modules/sc-istanbul/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, - "engines": { - "node": ">= 0.6" + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" } }, - "node_modules/micro-ftch": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", - "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", "dev": true }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "node_modules/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", "dev": true, + "hasInstallScript": true, "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" + "elliptic": "^6.5.4", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" }, "engines": { - "node": ">=8.6" + "node": ">=10.0.0" } }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { - "mime": "cli.js" + "semver": "bin/semver.js" }, "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, "engines": { - "node": ">= 0.6" + "node": ">=10" } }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "engines": { - "node": ">=4" - } + "node_modules/semver/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, - "node_modules/min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==", + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, "dependencies": { - "dom-walk": "^0.1.0" + "randombytes": "^2.1.0" } }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, "engines": { - "node": ">=4" + "node": ">= 0.4" } }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", "dev": true }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "sha.js": "bin.js" } }, - "node_modules/minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "node_modules/sha1": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", + "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", "dev": true, "dependencies": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" + "charenc": ">= 0.0.1", + "crypt": ">= 0.0.1" }, "engines": { - "node": ">= 6" + "node": "*" } }, - "node_modules/minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } + "node_modules/shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "dev": true }, - "node_modules/minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { - "minipass": "^2.9.0" + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/mixme": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/mixme/-/mixme-0.5.9.tgz", - "integrity": "sha512-VC5fg6ySUscaWUpI4gxCBTQMH2RdUpNrk+MsbpCYtIvf9SBJdiUey4qE7BXviJsJR4nDQxCZ+3yaYNW3guz/Pw==", + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "engines": { - "node": ">= 8.0.0" + "node": ">=8" } }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dev": true, "dependencies": { - "minimist": "^1.2.6" + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" }, "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/mkdirp-promise": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", - "integrity": "sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w==", - "deprecated": "This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.", - "dev": true, - "dependencies": { - "mkdirp": "*" + "shjs": "bin/shjs" }, "engines": { "node": ">=4" } }, - "node_modules/mnemonist": { - "version": "0.38.5", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", - "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", - "dev": true, - "dependencies": { - "obliterator": "^2.0.0" - } - }, - "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "node_modules/shelljs/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">= 14.0.0" + "node": "*" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/mocha/node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/mocha/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/mocha/node_modules/escape-string-regexp": { + "node_modules/slice-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mocha/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/mocha/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "color-convert": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/mocha/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "color-name": "~1.1.4" }, "engines": { - "node": "*" + "node": ">=7.0.0" } }, - "node_modules/mocha/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, - "node_modules/mocha/node_modules/is-fullwidth-code-point": { + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", @@ -11273,76 +9823,89 @@ "node": ">=8" } }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/smartwrap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/smartwrap/-/smartwrap-2.0.2.tgz", + "integrity": "sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==", "dev": true, "dependencies": { - "argparse": "^2.0.1" + "array.prototype.flat": "^1.2.3", + "breakword": "^1.0.5", + "grapheme-splitter": "^1.0.4", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1", + "yargs": "^15.1.0" }, "bin": { - "js-yaml": "bin/js-yaml.js" + "smartwrap": "src/terminal-adapter.js" + }, + "engines": { + "node": ">=6" } }, - "node_modules/mocha/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/smartwrap/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/smartwrap/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": { - "p-locate": "^5.0.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "node_modules/smartwrap/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" } }, - "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { + "node_modules/smartwrap/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "node_modules/smartwrap/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/mocha/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/smartwrap/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "node_modules/mocha/node_modules/string-width": { + "node_modules/smartwrap/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", @@ -11356,7 +9919,7 @@ "node": ">=8" } }, - "node_modules/mocha/node_modules/strip-ansi": { + "node_modules/smartwrap/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -11368,4494 +9931,824 @@ "node": ">=8" } }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/smartwrap/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">=8" } }, - "node_modules/mocha/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "node_modules/smartwrap/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/smartwrap/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "node_modules/solhint": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.6.2.tgz", + "integrity": "sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "@solidity-parser/parser": "^0.16.0", + "ajv": "^6.12.6", + "antlr4": "^4.11.0", + "ast-parents": "^0.0.1", + "chalk": "^4.1.2", + "commander": "^10.0.0", + "cosmiconfig": "^8.0.0", + "fast-diff": "^1.2.0", + "glob": "^8.0.3", + "ignore": "^5.2.4", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "pluralize": "^8.0.0", + "semver": "^7.5.2", + "strip-ansi": "^6.0.1", + "table": "^6.8.1", + "text-table": "^0.2.0" + }, + "bin": { + "solhint": "solhint.js" + }, + "optionalDependencies": { + "prettier": "^2.8.3" } }, - "node_modules/mock-fs": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", - "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", - "dev": true + "node_modules/solhint-plugin-openzeppelin": { + "resolved": "scripts/solhint-custom", + "link": 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", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/multibase": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", - "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", - "deprecated": "This module has been superseded by the multiformats module", - "dev": true, - "dependencies": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - }, - "node_modules/multicodec": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", - "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", - "deprecated": "This module has been superseded by the multiformats module", + "node_modules/solhint/node_modules/@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", "dev": true, "dependencies": { - "varint": "^5.0.0" + "antlr4ts": "^0.5.0-alpha.4" } }, - "node_modules/multihashes": { - "version": "0.4.21", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", - "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "node_modules/solhint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "multibase": "^0.7.0", - "varint": "^5.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/multihashes/node_modules/multibase": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", - "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", - "deprecated": "This module has been superseded by the multiformats module", + "node_modules/solhint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - }, - "node_modules/nano-base32": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nano-base32/-/nano-base32-1.0.1.tgz", - "integrity": "sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw==", - "dev": true - }, - "node_modules/nano-json-stream-parser": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", - "integrity": "sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" + "color-convert": "^2.0.1" }, "engines": { - "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", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "engines": { - "node": ">= 0.6" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "node_modules/solhint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "node_modules/solhint/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "lower-case": "^1.1.1" + "balanced-match": "^1.0.0" } }, - "node_modules/node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "dev": true - }, - "node_modules/node-emoji": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", - "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "node_modules/solhint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "lodash": "^4.17.21" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "node_modules/solhint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "whatwg-url": "^5.0.0" + "color-name": "~1.1.4" }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "node": ">=7.0.0" } }, - "node_modules/node-gyp-build": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", - "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", - "dev": true, - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } + "node_modules/solhint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, - "node_modules/node-interval-tree": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/node-interval-tree/-/node-interval-tree-2.1.2.tgz", - "integrity": "sha512-bJ9zMDuNGzVQg1xv0bCPzyEDxHgbrx7/xGj6CDokvizZZmastPsOh0JJLuY8wA5q2SfX1TLNMk7XNV8WxbGxzA==", + "node_modules/solhint/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { - "shallowequal": "^1.1.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": ">= 14.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/nofilter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", - "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "node_modules/solhint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">=12.19" + "node": ">=8" } }, - "node_modules/nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "node_modules/solhint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "abbrev": "1" + "argparse": "^2.0.1" }, "bin": { - "nopt": "bin/nopt.js" + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "node_modules/solhint/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, + "brace-expansion": "^2.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "node_modules/solhint/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, + "optional": true, + "bin": { + "prettier": "bin-prettier.js" + }, "engines": { - "node": ">=10" + "node": ">=10.13.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "node_modules/solhint/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "boolbase": "^1.0.0" + "ansi-regex": "^5.0.1" }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", - "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", + "node_modules/solhint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">=8" } }, - "node_modules/number-to-bn/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "node_modules/solidity-ast": { + "version": "0.4.52", + "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.52.tgz", + "integrity": "sha512-iOya9BSiB9jhM8Vf40n8lGELGzwrUc57rl5BhfNtJ5cvAaMvRcNlHeAMNvqJJyjoUnczqRbHqdivEqK89du3Cw==", "dev": true, - "engines": { - "node": "*" + "dependencies": { + "array.prototype.findlast": "^1.2.2" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "node_modules/solidity-comments": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments/-/solidity-comments-0.0.2.tgz", + "integrity": "sha512-G+aK6qtyUfkn1guS8uzqUeua1dURwPlcOjoTYW/TwmXAcE7z/1+oGCfZUdMSe4ZMKklNbVZNiG5ibnF8gkkFfw==", "dev": true, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 12" + }, + "optionalDependencies": { + "solidity-comments-darwin-arm64": "0.0.2", + "solidity-comments-darwin-x64": "0.0.2", + "solidity-comments-freebsd-x64": "0.0.2", + "solidity-comments-linux-arm64-gnu": "0.0.2", + "solidity-comments-linux-arm64-musl": "0.0.2", + "solidity-comments-linux-x64-gnu": "0.0.2", + "solidity-comments-linux-x64-musl": "0.0.2", + "solidity-comments-win32-arm64-msvc": "0.0.2", + "solidity-comments-win32-ia32-msvc": "0.0.2", + "solidity-comments-win32-x64-msvc": "0.0.2" } }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "node_modules/solidity-comments-darwin-arm64": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-darwin-arm64/-/solidity-comments-darwin-arm64-0.0.2.tgz", + "integrity": "sha512-HidWkVLSh7v+Vu0CA7oI21GWP/ZY7ro8g8OmIxE8oTqyMwgMbE8F1yc58Sj682Hj199HCZsjmtn1BE4PCbLiGA==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 0.4" + "node": ">= 10" } }, - "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "node_modules/solidity-comments-darwin-x64": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-darwin-x64/-/solidity-comments-darwin-x64-0.0.2.tgz", + "integrity": "sha512-Zjs0Ruz6faBTPT6fBecUt6qh4CdloT8Bwoc0+qxRoTn9UhYscmbPQkUgQEbS0FQPysYqVzzxJB4h1Ofbf4wwtA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 10" } }, - "node_modules/obliterator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", - "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==", + "node_modules/solidity-comments-extractor": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz", + "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==", "dev": true }, - "node_modules/oboe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", - "integrity": "sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==", - "dev": true, - "dependencies": { - "http-https": "^1.0.0" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "node_modules/solidity-comments-freebsd-x64": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-freebsd-x64/-/solidity-comments-freebsd-x64-0.0.2.tgz", + "integrity": "sha512-8Qe4mpjuAxFSwZJVk7B8gAoLCdbtS412bQzBwk63L8dmlHogvE39iT70aAk3RHUddAppT5RMBunlPUCFYJ3ZTw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">= 0.8" + "node": ">= 10" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "node_modules/solidity-comments-linux-arm64-gnu": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-gnu/-/solidity-comments-linux-arm64-gnu-0.0.2.tgz", + "integrity": "sha512-spkb0MZZnmrP+Wtq4UxP+nyPAVRe82idOjqndolcNR0S9Xvu4ebwq+LvF4HiUgjTDmeiqYiFZQ8T9KGdLSIoIg==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "wrappy": "1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "node_modules/solidity-comments-linux-arm64-musl": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-musl/-/solidity-comments-linux-arm64-musl-0.0.2.tgz", + "integrity": "sha512-guCDbHArcjE+JDXYkxx5RZzY1YF6OnAKCo+sTC5fstyW/KGKaQJNPyBNWuwYsQiaEHpvhW1ha537IvlGek8GqA==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 0.8.0" + "node": ">= 10" } }, - "node_modules/ordinal": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", - "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", - "dev": true - }, - "node_modules/os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", + "node_modules/solidity-comments-linux-x64-gnu": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-gnu/-/solidity-comments-linux-x64-gnu-0.0.2.tgz", + "integrity": "sha512-zIqLehBK/g7tvrFmQljrfZXfkEeLt2v6wbe+uFu6kH/qAHZa7ybt8Vc0wYcmjo2U0PeBm15d79ee3AkwbIjFdQ==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "lcid": "^1.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.10.0" + "node": ">= 10" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "node_modules/solidity-comments-linux-x64-musl": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-musl/-/solidity-comments-linux-x64-musl-0.0.2.tgz", + "integrity": "sha512-R9FeDloVlFGTaVkOlELDVC7+1Tjx5WBPI5L8r0AGOPHK3+jOcRh6sKYpI+VskSPDc3vOO46INkpDgUXrKydlIw==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.10.0" + "node": ">= 10" } }, - "node_modules/outdent": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", - "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", - "dev": true - }, - "node_modules/p-cancelable": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", - "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "node_modules/solidity-comments-win32-arm64-msvc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-win32-arm64-msvc/-/solidity-comments-win32-arm64-msvc-0.0.2.tgz", + "integrity": "sha512-QnWJoCQcJj+rnutULOihN9bixOtYWDdF5Rfz9fpHejL1BtNjdLW1om55XNVHGAHPqBxV4aeQQ6OirKnp9zKsug==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=12.20" + "node": ">= 10" } }, - "node_modules/p-filter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", - "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", + "node_modules/solidity-comments-win32-ia32-msvc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-win32-ia32-msvc/-/solidity-comments-win32-ia32-msvc-0.0.2.tgz", + "integrity": "sha512-vUg4nADtm/NcOtlIymG23NWJUSuMsvX15nU7ynhGBsdKtt8xhdP3C/zA6vjDk8Jg+FXGQL6IHVQ++g/7rSQi0w==", + "cpu": [ + "ia32" + ], "dev": true, - "dependencies": { - "p-map": "^2.0.0" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=8" + "node": ">= 10" } }, - "node_modules/p-filter/node_modules/p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "node_modules/solidity-comments-win32-x64-msvc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/solidity-comments-win32-x64-msvc/-/solidity-comments-win32-x64-msvc-0.0.2.tgz", + "integrity": "sha512-36j+KUF4V/y0t3qatHm/LF5sCUCBx2UndxE1kq5bOzh/s+nQgatuyB+Pd5BfuPQHdWu2KaExYe20FlAa6NL7+Q==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=6" + "node": ">= 10" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, - "node_modules/param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-cache-control": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", - "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", - "dev": true - }, - "node_modules/parse-headers": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz", - "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==", - "dev": true - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, - "dependencies": { - "entities": "^4.4.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", - "dev": true, - "dependencies": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/pascal-case": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz", - "integrity": "sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==", - "dev": true, - "dependencies": { - "camel-case": "^3.0.0", - "upper-case-first": "^1.1.0" - } - }, - "node_modules/path-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", - "integrity": "sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", - "dev": true, - "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } - }, - "node_modules/path-scurry/node_modules/minipass": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", - "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==", - "dev": true, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dev": true, - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/preferred-pm": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.1.2.tgz", - "integrity": "sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q==", - "dev": true, - "dependencies": { - "find-up": "^5.0.0", - "find-yarn-workspace-root2": "1.2.16", - "path-exists": "^4.0.0", - "which-pm": "2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/preferred-pm/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/preferred-pm/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/preferred-pm/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-plugin-solidity": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.3.tgz", - "integrity": "sha512-fQ9yucPi2sBbA2U2Xjh6m4isUTJ7S7QLc/XDDsktqqxYfTwdYKJ0EnnywXHwCGAaYbQNK+HIYPL1OemxuMsgeg==", - "dev": true, - "dependencies": { - "@solidity-parser/parser": "^0.16.0", - "semver": "^7.3.8", - "solidity-comments-extractor": "^0.0.7" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "prettier": ">=2.3.0 || >=3.0.0-alpha.0" - } - }, - "node_modules/prettier-plugin-solidity/node_modules/@solidity-parser/parser": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", - "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", - "dev": true, - "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/promise": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", - "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", - "dev": true, - "dependencies": { - "asap": "~2.0.6" - } - }, - "node_modules/proper-lockfile": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", - "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "retry": "^0.12.0", - "signal-exit": "^3.0.2" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pure-rand": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.5.tgz", - "integrity": "sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ] - }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "dependencies": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-yaml-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", - "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.5", - "js-yaml": "^3.6.1", - "pify": "^4.0.1", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", - "dev": true, - "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/recursive-readdir": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", - "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", - "dev": true, - "dependencies": { - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, - "dependencies": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/redent/node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "dependencies": { - "min-indent": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/reduce-flatten": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", - "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", - "dev": true - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/req-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", - "integrity": "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==", - "dev": true, - "dependencies": { - "req-from": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/req-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", - "integrity": "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==", - "dev": true, - "dependencies": { - "resolve-from": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/req-from/node_modules/resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dev": true, - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "node_modules/resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "dependencies": { - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", - "dev": true, - "dependencies": { - "lowercase-keys": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/responselike/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", - "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", - "dev": true, - "dependencies": { - "glob": "^10.2.5" - }, - "bin": { - "rimraf": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/ripemd160-min": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/ripemd160-min/-/ripemd160-min-0.0.6.tgz", - "integrity": "sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.0" - }, - "bin": { - "rlp": "bin/rlp" - } - }, - "node_modules/rlp/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/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" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/run-parallel-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", - "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "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-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/sc-istanbul": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", - "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", - "dev": true, - "dependencies": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "istanbul": "lib/cli.js" - } - }, - "node_modules/sc-istanbul/node_modules/esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sc-istanbul/node_modules/glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", - "dev": true, - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/sc-istanbul/node_modules/has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sc-istanbul/node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", - "dev": true - }, - "node_modules/sc-istanbul/node_modules/supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", - "dev": true, - "dependencies": { - "has-flag": "^1.0.0" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/sc-istanbul/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true - }, - "node_modules/secp256k1": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", - "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "elliptic": "^6.5.4", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/sentence-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz", - "integrity": "sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0", - "upper-case-first": "^1.1.2" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/servify": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", - "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", - "dev": true, - "dependencies": { - "body-parser": "^1.16.0", - "cors": "^2.8.1", - "express": "^4.14.0", - "request": "^2.79.0", - "xhr": "^2.3.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, - "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", - "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/sha1": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", - "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", - "dev": true, - "dependencies": { - "charenc": ">= 0.0.1", - "crypt": ">= 0.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/sha3": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", - "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", - "dev": true, - "dependencies": { - "buffer": "6.0.3" - } - }, - "node_modules/sha3/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", - "dev": true - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/shelljs/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/simple-get": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.2.tgz", - "integrity": "sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==", - "dev": true, - "dependencies": { - "decompress-response": "^3.3.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/simple-get/node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/smartwrap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/smartwrap/-/smartwrap-2.0.2.tgz", - "integrity": "sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==", - "dev": true, - "dependencies": { - "array.prototype.flat": "^1.2.3", - "breakword": "^1.0.5", - "grapheme-splitter": "^1.0.4", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1", - "yargs": "^15.1.0" - }, - "bin": { - "smartwrap": "src/terminal-adapter.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/smartwrap/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/smartwrap/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/smartwrap/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/smartwrap/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/smartwrap/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/smartwrap/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/smartwrap/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/smartwrap/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/smartwrap/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/smartwrap/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/smartwrap/node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/snake-case": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz", - "integrity": "sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0" - } - }, - "node_modules/solc": { - "version": "0.4.26", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz", - "integrity": "sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA==", - "dev": true, - "dependencies": { - "fs-extra": "^0.30.0", - "memorystream": "^0.3.1", - "require-from-string": "^1.1.0", - "semver": "^5.3.0", - "yargs": "^4.7.1" - }, - "bin": { - "solcjs": "solcjs" - } - }, - "node_modules/solc/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", - "dev": true, - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "node_modules/solc/node_modules/find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "node_modules/solc/node_modules/get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "node_modules/solc/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/solc/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "dev": true, - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/solc/node_modules/path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "dependencies": { - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", - "dev": true, - "dependencies": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", - "dev": true, - "dependencies": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==", - "dev": true - }, - "node_modules/solc/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/solc/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/solc/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "dev": true, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==", - "dev": true - }, - "node_modules/solc/node_modules/wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", - "dev": true, - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", - "dev": true - }, - "node_modules/solc/node_modules/yargs": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", - "integrity": "sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA==", - "dev": true, - "dependencies": { - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "lodash.assign": "^4.0.3", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.1", - "which-module": "^1.0.0", - "window-size": "^0.2.0", - "y18n": "^3.2.1", - "yargs-parser": "^2.4.1" - } - }, - "node_modules/solc/node_modules/yargs-parser": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", - "integrity": "sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA==", - "dev": true, - "dependencies": { - "camelcase": "^3.0.0", - "lodash.assign": "^4.0.6" - } - }, - "node_modules/solhint": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.6.2.tgz", - "integrity": "sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==", - "dev": true, - "dependencies": { - "@solidity-parser/parser": "^0.16.0", - "ajv": "^6.12.6", - "antlr4": "^4.11.0", - "ast-parents": "^0.0.1", - "chalk": "^4.1.2", - "commander": "^10.0.0", - "cosmiconfig": "^8.0.0", - "fast-diff": "^1.2.0", - "glob": "^8.0.3", - "ignore": "^5.2.4", - "js-yaml": "^4.1.0", - "lodash": "^4.17.21", - "pluralize": "^8.0.0", - "semver": "^7.5.2", - "strip-ansi": "^6.0.1", - "table": "^6.8.1", - "text-table": "^0.2.0" - }, - "bin": { - "solhint": "solhint.js" - }, - "optionalDependencies": { - "prettier": "^2.8.3" - } - }, - "node_modules/solhint-plugin-openzeppelin": { - "resolved": "scripts/solhint-custom", - "link": true - }, - "node_modules/solhint/node_modules/@solidity-parser/parser": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", - "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", - "dev": true, - "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "node_modules/solhint/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/solhint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/solhint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/solhint/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/solhint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/solhint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/solhint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/solhint/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/solhint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/solhint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/solhint/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/solhint/node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "optional": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/solhint/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/solhint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/solidity-ast": { - "version": "0.4.52", - "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.52.tgz", - "integrity": "sha512-iOya9BSiB9jhM8Vf40n8lGELGzwrUc57rl5BhfNtJ5cvAaMvRcNlHeAMNvqJJyjoUnczqRbHqdivEqK89du3Cw==", - "dev": true, - "dependencies": { - "array.prototype.findlast": "^1.2.2" - } - }, - "node_modules/solidity-comments": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments/-/solidity-comments-0.0.2.tgz", - "integrity": "sha512-G+aK6qtyUfkn1guS8uzqUeua1dURwPlcOjoTYW/TwmXAcE7z/1+oGCfZUdMSe4ZMKklNbVZNiG5ibnF8gkkFfw==", - "dev": true, - "engines": { - "node": ">= 12" - }, - "optionalDependencies": { - "solidity-comments-darwin-arm64": "0.0.2", - "solidity-comments-darwin-x64": "0.0.2", - "solidity-comments-freebsd-x64": "0.0.2", - "solidity-comments-linux-arm64-gnu": "0.0.2", - "solidity-comments-linux-arm64-musl": "0.0.2", - "solidity-comments-linux-x64-gnu": "0.0.2", - "solidity-comments-linux-x64-musl": "0.0.2", - "solidity-comments-win32-arm64-msvc": "0.0.2", - "solidity-comments-win32-ia32-msvc": "0.0.2", - "solidity-comments-win32-x64-msvc": "0.0.2" - } - }, - "node_modules/solidity-comments-darwin-arm64": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-darwin-arm64/-/solidity-comments-darwin-arm64-0.0.2.tgz", - "integrity": "sha512-HidWkVLSh7v+Vu0CA7oI21GWP/ZY7ro8g8OmIxE8oTqyMwgMbE8F1yc58Sj682Hj199HCZsjmtn1BE4PCbLiGA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/solidity-comments-darwin-x64": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-darwin-x64/-/solidity-comments-darwin-x64-0.0.2.tgz", - "integrity": "sha512-Zjs0Ruz6faBTPT6fBecUt6qh4CdloT8Bwoc0+qxRoTn9UhYscmbPQkUgQEbS0FQPysYqVzzxJB4h1Ofbf4wwtA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/solidity-comments-extractor": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz", - "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==", - "dev": true - }, - "node_modules/solidity-comments-freebsd-x64": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-freebsd-x64/-/solidity-comments-freebsd-x64-0.0.2.tgz", - "integrity": "sha512-8Qe4mpjuAxFSwZJVk7B8gAoLCdbtS412bQzBwk63L8dmlHogvE39iT70aAk3RHUddAppT5RMBunlPUCFYJ3ZTw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/solidity-comments-linux-arm64-gnu": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-gnu/-/solidity-comments-linux-arm64-gnu-0.0.2.tgz", - "integrity": "sha512-spkb0MZZnmrP+Wtq4UxP+nyPAVRe82idOjqndolcNR0S9Xvu4ebwq+LvF4HiUgjTDmeiqYiFZQ8T9KGdLSIoIg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/solidity-comments-linux-arm64-musl": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-musl/-/solidity-comments-linux-arm64-musl-0.0.2.tgz", - "integrity": "sha512-guCDbHArcjE+JDXYkxx5RZzY1YF6OnAKCo+sTC5fstyW/KGKaQJNPyBNWuwYsQiaEHpvhW1ha537IvlGek8GqA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/solidity-comments-linux-x64-gnu": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-gnu/-/solidity-comments-linux-x64-gnu-0.0.2.tgz", - "integrity": "sha512-zIqLehBK/g7tvrFmQljrfZXfkEeLt2v6wbe+uFu6kH/qAHZa7ybt8Vc0wYcmjo2U0PeBm15d79ee3AkwbIjFdQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/solidity-comments-linux-x64-musl": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-musl/-/solidity-comments-linux-x64-musl-0.0.2.tgz", - "integrity": "sha512-R9FeDloVlFGTaVkOlELDVC7+1Tjx5WBPI5L8r0AGOPHK3+jOcRh6sKYpI+VskSPDc3vOO46INkpDgUXrKydlIw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/solidity-comments-win32-arm64-msvc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-win32-arm64-msvc/-/solidity-comments-win32-arm64-msvc-0.0.2.tgz", - "integrity": "sha512-QnWJoCQcJj+rnutULOihN9bixOtYWDdF5Rfz9fpHejL1BtNjdLW1om55XNVHGAHPqBxV4aeQQ6OirKnp9zKsug==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/solidity-comments-win32-ia32-msvc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-win32-ia32-msvc/-/solidity-comments-win32-ia32-msvc-0.0.2.tgz", - "integrity": "sha512-vUg4nADtm/NcOtlIymG23NWJUSuMsvX15nU7ynhGBsdKtt8xhdP3C/zA6vjDk8Jg+FXGQL6IHVQ++g/7rSQi0w==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/solidity-comments-win32-x64-msvc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/solidity-comments-win32-x64-msvc/-/solidity-comments-win32-x64-msvc-0.0.2.tgz", - "integrity": "sha512-36j+KUF4V/y0t3qatHm/LF5sCUCBx2UndxE1kq5bOzh/s+nQgatuyB+Pd5BfuPQHdWu2KaExYe20FlAa6NL7+Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/solidity-coverage": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.5.tgz", - "integrity": "sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ==", - "dev": true, - "dependencies": { - "@ethersproject/abi": "^5.0.9", - "@solidity-parser/parser": "^0.16.0", - "chalk": "^2.4.2", - "death": "^1.1.0", - "detect-port": "^1.3.0", - "difflib": "^0.2.4", - "fs-extra": "^8.1.0", - "ghost-testrpc": "^0.0.2", - "global-modules": "^2.0.0", - "globby": "^10.0.1", - "jsonschema": "^1.2.4", - "lodash": "^4.17.15", - "mocha": "10.2.0", - "node-emoji": "^1.10.0", - "pify": "^4.0.1", - "recursive-readdir": "^2.2.2", - "sc-istanbul": "^0.4.5", - "semver": "^7.3.4", - "shelljs": "^0.8.3", - "web3-utils": "^1.3.6" - }, - "bin": { - "solidity-coverage": "plugins/bin.js" - }, - "peerDependencies": { - "hardhat": "^2.11.0" - } - }, - "node_modules/solidity-coverage/node_modules/@solidity-parser/parser": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", - "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", - "dev": true, - "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "node_modules/solidity-coverage/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/solidity-coverage/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/solidity-coverage/node_modules/globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", - "dev": true, - "dependencies": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/solidity-docgen": { - "version": "0.6.0-beta.36", - "resolved": "https://registry.npmjs.org/solidity-docgen/-/solidity-docgen-0.6.0-beta.36.tgz", - "integrity": "sha512-f/I5G2iJgU1h0XrrjRD0hHMr7C10u276vYvm//rw1TzFcYQ4xTOyAoi9oNAHRU0JU4mY9eTuxdVc2zahdMuhaQ==", - "dev": true, - "dependencies": { - "handlebars": "^4.7.7", - "solidity-ast": "^0.4.38" - }, - "peerDependencies": { - "hardhat": "^2.8.0" - } - }, - "node_modules/source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", - "dev": true, - "optional": true, - "dependencies": { - "amdefine": ">=0.0.4" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawndamnit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", - "integrity": "sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==", - "dev": true, - "dependencies": { - "cross-spawn": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, - "node_modules/spawndamnit/node_modules/cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", - "dev": true, - "dependencies": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "node_modules/spawndamnit/node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "node_modules/spawndamnit/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawndamnit/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawndamnit/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/spawndamnit/node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.15.tgz", - "integrity": "sha512-lpT8hSQp9jAKp9mhtBU4Xjon8LPGBvLIuBiSVhMEtmLecTh2mO0tlqrAMp47tBXzMr13NJMQ2lf7RpQGLJ3HsQ==", - "dev": true - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dev": true, - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sshpk/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, - "node_modules/stacktrace-parser": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", - "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", - "dev": true, - "dependencies": { - "type-fest": "^0.7.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/stacktrace-parser/node_modules/type-fest": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", - "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/stream-transform": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-2.1.3.tgz", - "integrity": "sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==", - "dev": true, - "dependencies": { - "mixme": "^0.5.1" - } - }, - "node_modules/strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-format": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz", - "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==", - "dev": true, - "peer": true - }, - "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-hex-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", - "dev": true, - "dependencies": { - "is-hex-prefixed": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/swap-case": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz", - "integrity": "sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==", - "dev": true, - "dependencies": { - "lower-case": "^1.1.1", - "upper-case": "^1.1.1" - } - }, - "node_modules/swarm-js": { - "version": "0.1.42", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.42.tgz", - "integrity": "sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ==", - "dev": true, - "dependencies": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^11.8.5", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request": "^1.0.1" - } - }, - "node_modules/swarm-js/node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "dev": true, - "dependencies": { - "defer-to-connect": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/swarm-js/node_modules/cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", - "dev": true, - "engines": { - "node": ">=10.6.0" - } - }, - "node_modules/swarm-js/node_modules/fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "node_modules/swarm-js/node_modules/got": { - "version": "11.8.6", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", - "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=10.19.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" - } - }, - "node_modules/swarm-js/node_modules/http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", - "dev": true, - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" - }, - "engines": { - "node": ">=10.19.0" - } - }, - "node_modules/swarm-js/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/swarm-js/node_modules/p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/swarm-js/node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/sync-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", - "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", - "dev": true, - "dependencies": { - "http-response-object": "^3.0.1", - "sync-rpc": "^1.2.1", - "then-request": "^6.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/sync-rpc": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", - "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", - "dev": true, - "dependencies": { - "get-port": "^3.1.0" - } - }, - "node_modules/table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table-layout": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", - "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", - "dev": true, - "peer": true, - "dependencies": { - "array-back": "^4.0.1", - "deep-extend": "~0.6.0", - "typical": "^5.2.0", - "wordwrapjs": "^4.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/table-layout/node_modules/array-back": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", - "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/table-layout/node_modules/typical": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", - "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/table/node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/table/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tar": { - "version": "4.4.19", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", - "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", - "dev": true, - "dependencies": { - "chownr": "^1.1.4", - "fs-minipass": "^1.2.7", - "minipass": "^2.9.0", - "minizlib": "^1.3.3", - "mkdirp": "^0.5.5", - "safe-buffer": "^5.2.1", - "yallist": "^3.1.1" - }, - "engines": { - "node": ">=4.5" - } - }, - "node_modules/term-size": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", - "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/testrpc": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/testrpc/-/testrpc-0.0.1.tgz", - "integrity": "sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA==", - "deprecated": "testrpc has been renamed to ganache-cli, please use this package from now on.", - "dev": true - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/then-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", - "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", - "dev": true, - "dependencies": { - "@types/concat-stream": "^1.6.0", - "@types/form-data": "0.0.33", - "@types/node": "^8.0.0", - "@types/qs": "^6.2.31", - "caseless": "~0.12.0", - "concat-stream": "^1.6.0", - "form-data": "^2.2.0", - "http-basic": "^8.1.1", - "http-response-object": "^3.0.1", - "promise": "^8.0.0", - "qs": "^6.4.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/then-request/node_modules/@types/node": { - "version": "8.10.66", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", - "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", - "dev": true - }, - "node_modules/timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/title-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", - "integrity": "sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.0.3" - } - }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tough-cookie/node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/trim-newlines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ts-command-line-args": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", - "integrity": "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==", + "node_modules/solidity-coverage": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.5.tgz", + "integrity": "sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ==", "dev": true, - "peer": true, "dependencies": { - "chalk": "^4.1.0", - "command-line-args": "^5.1.1", - "command-line-usage": "^6.1.0", - "string-format": "^2.0.0" + "@ethersproject/abi": "^5.0.9", + "@solidity-parser/parser": "^0.16.0", + "chalk": "^2.4.2", + "death": "^1.1.0", + "detect-port": "^1.3.0", + "difflib": "^0.2.4", + "fs-extra": "^8.1.0", + "ghost-testrpc": "^0.0.2", + "global-modules": "^2.0.0", + "globby": "^10.0.1", + "jsonschema": "^1.2.4", + "lodash": "^4.17.15", + "mocha": "10.2.0", + "node-emoji": "^1.10.0", + "pify": "^4.0.1", + "recursive-readdir": "^2.2.2", + "sc-istanbul": "^0.4.5", + "semver": "^7.3.4", + "shelljs": "^0.8.3", + "web3-utils": "^1.3.6" }, "bin": { - "write-markdown": "dist/write-markdown.js" - } - }, - "node_modules/ts-command-line-args/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ts-command-line-args/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "peer": 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/ts-command-line-args/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/ts-command-line-args/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "peer": true - }, - "node_modules/ts-command-line-args/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ts-command-line-args/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^4.0.0" + "solidity-coverage": "plugins/bin.js" }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ts-essentials": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", - "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", - "dev": true, - "peer": true, "peerDependencies": { - "typescript": ">=3.7.0" + "hardhat": "^2.11.0" } }, - "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "node_modules/solidity-coverage/node_modules/@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", "dev": true, - "peer": true, "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } + "antlr4ts": "^0.5.0-alpha.4" } }, - "node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "node_modules/solidity-coverage/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, - "peer": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, "engines": { - "node": ">=0.3.1" + "node": ">=6 <7 || >=8" } }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/tsort": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", - "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", - "dev": true - }, - "node_modules/tty-table": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/tty-table/-/tty-table-4.2.1.tgz", - "integrity": "sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g==", + "node_modules/solidity-coverage/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { - "chalk": "^4.1.2", - "csv": "^5.5.3", - "kleur": "^4.1.5", - "smartwrap": "^2.0.2", - "strip-ansi": "^6.0.1", - "wcwidth": "^1.0.1", - "yargs": "^17.7.1" - }, - "bin": { - "tty-table": "adapters/terminal-adapter.js" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=8.0.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/tty-table/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/solidity-coverage/node_modules/globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", "dev": true, + "dependencies": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + }, "engines": { "node": ">=8" } }, - "node_modules/tty-table/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==", + "node_modules/solidity-docgen": { + "version": "0.6.0-beta.36", + "resolved": "https://registry.npmjs.org/solidity-docgen/-/solidity-docgen-0.6.0-beta.36.tgz", + "integrity": "sha512-f/I5G2iJgU1h0XrrjRD0hHMr7C10u276vYvm//rw1TzFcYQ4xTOyAoi9oNAHRU0JU4mY9eTuxdVc2zahdMuhaQ==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" + "handlebars": "^4.7.7", + "solidity-ast": "^0.4.38" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "hardhat": "^2.8.0" } }, - "node_modules/tty-table/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", "dev": true, + "optional": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "amdefine": ">=0.0.4" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=0.8.0" } }, - "node_modules/tty-table/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "dependencies": { - "color-name": "~1.1.4" - }, + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, "engines": { - "node": ">=7.0.0" + "node": ">=0.10.0" } }, - "node_modules/tty-table/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/spawndamnit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", + "integrity": "sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==", + "dev": true, + "dependencies": { + "cross-spawn": "^5.1.0", + "signal-exit": "^3.0.2" + } }, - "node_modules/tty-table/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/spawndamnit/node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, - "node_modules/tty-table/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/spawndamnit/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, - "node_modules/tty-table/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/spawndamnit/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "shebang-regex": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "node_modules/spawndamnit/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawndamnit/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "dependencies": { - "safe-buffer": "^5.0.1" + "isexe": "^2.0.0" }, - "engines": { - "node": "*" + "bin": { + "which": "bin/which" } }, - "node_modules/tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "node_modules/spawndamnit/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", "dev": true }, - "node_modules/tweetnacl-util": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", - "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, - "node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.15.tgz", + "integrity": "sha512-lpT8hSQp9jAKp9mhtBU4Xjon8LPGBvLIuBiSVhMEtmLecTh2mO0tlqrAMp47tBXzMr13NJMQ2lf7RpQGLJ3HsQ==", "dev": true }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/stacktrace-parser": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", + "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", "dev": true, "dependencies": { - "prelude-ls": "^1.2.1" + "type-fest": "^0.7.1" }, "engines": { - "node": ">= 0.8.0" + "node": ">=6" } }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "node_modules/stacktrace-parser/node_modules/type-fest": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", + "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, - "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==", + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.8" } }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "node_modules/stream-transform": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-2.1.3.tgz", + "integrity": "sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==", "dev": true, "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" + "mixme": "^0.5.1" } }, - "node_modules/typechain": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.2.tgz", - "integrity": "sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==", + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, - "peer": true, "dependencies": { - "@types/prettier": "^2.1.1", - "debug": "^4.3.1", - "fs-extra": "^7.0.0", - "glob": "7.1.7", - "js-sha3": "^0.8.0", - "lodash": "^4.17.15", - "mkdirp": "^1.0.4", - "prettier": "^2.3.1", - "ts-command-line-args": "^2.2.0", - "ts-essentials": "^7.0.1" - }, - "bin": { - "typechain": "dist/cli/cli.js" - }, - "peerDependencies": { - "typescript": ">=4.3.0" + "safe-buffer": "~5.2.0" } }, - "node_modules/typechain/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "node_modules/string-format": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz", + "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==", + "dev": true, + "peer": true + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, - "peer": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=4" } }, - "node_modules/typechain/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "peer": true, - "bin": { - "mkdirp": "bin/cmd.js" + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/typechain/node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "peer": true, - "bin": { - "prettier": "bin-prettier.js" - }, "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" + "node": ">=8" } }, - "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" - }, "engines": { - "node": ">= 0.4" + "node": ">=8" } }, - "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -15864,1112 +10757,986 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", "dev": true, "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, - "engines": { - "node": ">=14.17" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typical": { + "node_modules/strip-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", - "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "dev": true, - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true - }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "ansi-regex": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=4" } }, - "node_modules/underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true - }, - "node_modules/undici": { - "version": "5.26.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.2.tgz", - "integrity": "sha512-a4PDLQgLTPHVzOK+x3F79/M4GtyYPl+aX9AAK7aQxpwxDwCqkeZCScy7Gk5kWT3JtdFq1uhO3uZJdLtHI4dK9A==", + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "@fastify/busboy": "^2.0.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=14.0" + "node": ">=8" } }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, "engines": { - "node": ">= 4.0.0" + "node": ">=4" } }, - "node_modules/unpipe": { + "node_modules/strip-hex-prefix": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", "dev": true, + "dependencies": { + "is-hex-prefixed": "1.0.0" + }, "engines": { - "node": ">= 0.8" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==", - "dev": true - }, - "node_modules/upper-case-first": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz", - "integrity": "sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==", + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "dependencies": { - "upper-case": "^1.1.1" + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { - "punycode": "^2.1.0" + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/url-set-query": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==", - "dev": true - }, - "node_modules/utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "node_modules/sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", "dev": true, - "hasInstallScript": true, "dependencies": { - "node-gyp-build": "^4.3.0" + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" }, "engines": { - "node": ">=6.14.2" + "node": ">=8.0.0" } }, - "node_modules/utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", - "dev": true + "node_modules/sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "dev": true, + "dependencies": { + "get-port": "^3.1.0" + } }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "node_modules/table": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" } }, - "node_modules/util-deprecate": { + "node_modules/table-layout": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", "dev": true, + "peer": true, + "dependencies": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, "engines": { - "node": ">= 0.4.0" + "node": ">=8.0.0" } }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "node_modules/table-layout/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", "dev": true, - "bin": { - "uuid": "dist/bin/uuid" + "peer": true, + "engines": { + "node": ">=8" } }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "node_modules/table-layout/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", "dev": true, - "peer": true + "peer": true, + "engines": { + "node": ">=8" + } }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "node_modules/table/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "node_modules/table/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": ">= 0.8" + "node": ">=8" } }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "node_modules/table/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "engines": { + "node": ">=8" } }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/table/node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, - "dependencies": { - "defaults": "^1.0.3" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/web3": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.2.tgz", - "integrity": "sha512-DAtZ3a3ruPziE80uZ3Ob0YDZxt6Vk2un/F5BcBrxO70owJ9Z1Y2+loZmbh1MoAmoLGjA/SUSHeUtid3fYmBaog==", + "node_modules/table/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "hasInstallScript": true, "dependencies": { - "web3-bzz": "1.10.2", - "web3-core": "1.10.2", - "web3-eth": "1.10.2", - "web3-eth-personal": "1.10.2", - "web3-net": "1.10.2", - "web3-shh": "1.10.2", - "web3-utils": "1.10.2" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/web3-bzz": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.2.tgz", - "integrity": "sha512-vLOfDCj6198Qc7esDrCKeFA/M3ZLbowsaHQ0hIL4NmIHoq7lU8aSRTa5AI+JBh8cKN1gVryJsuW2ZCc5bM4I4Q==", + "node_modules/table/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "hasInstallScript": true, "dependencies": { - "@types/node": "^12.12.6", - "got": "12.1.0", - "swarm-js": "^0.1.40" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/web3-bzz/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "node_modules/term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, - "node_modules/web3-core": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.2.tgz", - "integrity": "sha512-qTn2UmtE8tvwMRsC5pXVdHxrQ4uZ6jiLgF5DRUVtdi7dPUmX18Dp9uxKfIfhGcA011EAn8P6+X7r3pvi2YRxBw==", + "node_modules/then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", "dev": true, "dependencies": { - "@types/bn.js": "^5.1.1", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.2", - "web3-core-method": "1.10.2", - "web3-core-requestmanager": "1.10.2", - "web3-utils": "1.10.2" + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=6.0.0" } }, - "node_modules/web3-core-helpers": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.0.tgz", - "integrity": "sha512-pIxAzFDS5vnbXvfvLSpaA1tfRykAe9adw43YCKsEYQwH0gCLL0kMLkaCX3q+Q8EVmAh+e1jWL/nl9U0de1+++g==", + "node_modules/then-request/node_modules/@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", + "dev": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "dependencies": { - "web3-eth-iban": "1.10.0", - "web3-utils": "1.10.0" + "os-tmpdir": "~1.0.2" }, "engines": { - "node": ">=8.0.0" + "node": ">=0.6.0" } }, - "node_modules/web3-core-helpers/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-core-helpers/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" + "is-number": "^7.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=8.0" } }, - "node_modules/web3-core-method": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.2.tgz", - "integrity": "sha512-gG6ES+LOuo01MJHML4gnEt702M8lcPGMYZoX8UjZzmEebGrPYOY9XccpCrsFgCeKgQzM12SVnlwwpMod1+lcLg==", + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true, - "dependencies": { - "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.2", - "web3-core-promievent": "1.10.2", - "web3-core-subscriptions": "1.10.2", - "web3-utils": "1.10.2" - }, "engines": { - "node": ">=8.0.0" + "node": ">=0.6" } }, - "node_modules/web3-core-method/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, - "node_modules/web3-core-method/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/web3-core-method/node_modules/web3-core-promievent": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.2.tgz", - "integrity": "sha512-Qkkb1dCDOU8dZeORkcwJBQRAX+mdsjx8LqFBB+P4W9QgwMqyJ6LXda+y1XgyeEVeKEmY1RCeTq9Y94q1v62Sfw==", + "node_modules/ts-command-line-args": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", + "integrity": "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==", "dev": true, + "peer": true, "dependencies": { - "eventemitter3": "4.0.4" + "chalk": "^4.1.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.0", + "string-format": "^2.0.0" }, - "engines": { - "node": ">=8.0.0" + "bin": { + "write-markdown": "dist/write-markdown.js" } }, - "node_modules/web3-core-method/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "node_modules/ts-command-line-args/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "peer": true, "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/web3-core-promievent": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.0.tgz", - "integrity": "sha512-68N7k5LWL5R38xRaKFrTFT2pm2jBNFaM4GioS00YjAKXRQ3KjmhijOMG3TICz6Aa5+6GDWYelDNx21YAeZ4YTg==", + "node_modules/ts-command-line-args/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "peer": true, "dependencies": { - "eventemitter3": "4.0.4" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/web3-core-requestmanager": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.2.tgz", - "integrity": "sha512-nlLeNJUu6fR+ZbJr2k9Du/nN3VWwB4AJPY4r6nxUODAmykgJq57T21cLP/BEk6mbiFQYGE9TrrPhh4qWxQEtAw==", + "node_modules/ts-command-line-args/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "peer": true, "dependencies": { - "util": "^0.12.5", - "web3-core-helpers": "1.10.2", - "web3-providers-http": "1.10.2", - "web3-providers-ipc": "1.10.2", - "web3-providers-ws": "1.10.2" + "color-name": "~1.1.4" }, "engines": { - "node": ">=8.0.0" + "node": ">=7.0.0" } }, - "node_modules/web3-core-requestmanager/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true + "node_modules/ts-command-line-args/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "peer": true }, - "node_modules/web3-core-requestmanager/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/ts-command-line-args/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, + "peer": true, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/web3-core-requestmanager/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "node_modules/ts-command-line-args/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "peer": true, "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/web3-core-subscriptions": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.2.tgz", - "integrity": "sha512-MiWcKjz4tco793EPPPLc/YOJmYUV3zAfxeQH/UVTfBejMfnNvmfwKa2SBKfPIvKQHz/xI5bV2TF15uvJEucU7w==", + "node_modules/ts-essentials": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", + "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", "dev": true, - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" + "peer": true, + "peerDependencies": { + "typescript": ">=3.7.0" } }, - "node_modules/web3-core-subscriptions/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-core-subscriptions/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, + "peer": true, "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" }, - "engines": { - "node": ">=8.0.0" + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } } }, - "node_modules/web3-core-subscriptions/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, + "peer": true, "engines": { - "node": ">=8.0.0" + "node": ">=0.3.1" } }, - "node_modules/web3-core/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "node_modules/web3-core/node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/web3-core/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "node_modules/tsort": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", + "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", "dev": true }, - "node_modules/web3-core/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/tty-table": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/tty-table/-/tty-table-4.2.1.tgz", + "integrity": "sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g==", "dev": true, "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" + "chalk": "^4.1.2", + "csv": "^5.5.3", + "kleur": "^4.1.5", + "smartwrap": "^2.0.2", + "strip-ansi": "^6.0.1", + "wcwidth": "^1.0.1", + "yargs": "^17.7.1" + }, + "bin": { + "tty-table": "adapters/terminal-adapter.js" }, "engines": { "node": ">=8.0.0" } }, - "node_modules/web3-core/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "node_modules/tty-table/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/web3-eth": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.2.tgz", - "integrity": "sha512-s38rhrntyhGShmXC4R/aQtfkpcmev9c7iZwgb9CDIBFo7K8nrEJvqIOyajeZTxnDIiGzTJmrHxiKSadii5qTRg==", + "node_modules/tty-table/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": { - "web3-core": "1.10.2", - "web3-core-helpers": "1.10.2", - "web3-core-method": "1.10.2", - "web3-core-subscriptions": "1.10.2", - "web3-eth-abi": "1.10.2", - "web3-eth-accounts": "1.10.2", - "web3-eth-contract": "1.10.2", - "web3-eth-ens": "1.10.2", - "web3-eth-iban": "1.10.2", - "web3-eth-personal": "1.10.2", - "web3-net": "1.10.2", - "web3-utils": "1.10.2" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/web3-eth-abi": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.2.tgz", - "integrity": "sha512-pY4fQUio7W7ZRSLf+vsYkaxJqaT/jHcALZjIxy+uBQaYAJ3t6zpQqMZkJB3Dw7HUODRJ1yI0NPEFGTnkYf/17A==", + "node_modules/tty-table/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": { - "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.2" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/web3-eth-accounts": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.2.tgz", - "integrity": "sha512-6/HhCBYAXN/f553/SyxS9gY62NbLgpD1zJpENcvRTDpJN3Znvli1cmpl5Q3ZIUJkvHnG//48EWfWh0cbb3fbKQ==", + "node_modules/tty-table/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": { - "@ethereumjs/common": "2.5.0", - "@ethereumjs/tx": "3.3.2", - "@ethereumjs/util": "^8.1.0", - "eth-lib": "0.2.8", - "scrypt-js": "^3.0.1", - "uuid": "^9.0.0", - "web3-core": "1.10.2", - "web3-core-helpers": "1.10.2", - "web3-core-method": "1.10.2", - "web3-utils": "1.10.2" + "color-name": "~1.1.4" }, "engines": { - "node": ">=8.0.0" + "node": ">=7.0.0" } }, - "node_modules/web3-eth-accounts/node_modules/eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } + "node_modules/tty-table/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/web3-eth-accounts/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "node_modules/tty-table/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, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" + "engines": { + "node": ">=8" } }, - "node_modules/web3-eth-accounts/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/tty-table/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/web3-eth-accounts/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "node_modules/tty-table/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": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/web3-eth-accounts/node_modules/web3-eth-iban/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", "dev": true }, - "node_modules/web3-eth-contract": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.2.tgz", - "integrity": "sha512-CZLKPQRmupP/+OZ5A/CBwWWkBiz5B/foOpARz0upMh1yjb0dEud4YzRW2gJaeNu0eGxDLsWVaXhUimJVGYprQw==", - "dev": true, - "dependencies": { - "@types/bn.js": "^5.1.1", - "web3-core": "1.10.2", - "web3-core-helpers": "1.10.2", - "web3-core-method": "1.10.2", - "web3-core-promievent": "1.10.2", - "web3-core-subscriptions": "1.10.2", - "web3-eth-abi": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-contract/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "node_modules/tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", "dev": true }, - "node_modules/web3-eth-contract/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" + "prelude-ls": "^1.2.1" }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.8.0" } }, - "node_modules/web3-eth-contract/node_modules/web3-core-promievent": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.2.tgz", - "integrity": "sha512-Qkkb1dCDOU8dZeORkcwJBQRAX+mdsjx8LqFBB+P4W9QgwMqyJ6LXda+y1XgyeEVeKEmY1RCeTq9Y94q1v62Sfw==", + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "dependencies": { - "eventemitter3": "4.0.4" - }, "engines": { - "node": ">=8.0.0" + "node": ">=4" } }, - "node_modules/web3-eth-contract/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "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, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-ens": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.2.tgz", - "integrity": "sha512-kTQ42UdNHy4BQJHgWe97bHNMkc3zCMBKKY7t636XOMxdI/lkRdIjdE5nQzt97VjQvSVasgIWYKRAtd8aRaiZiQ==", - "dev": true, - "dependencies": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.2", - "web3-core-helpers": "1.10.2", - "web3-core-promievent": "1.10.2", - "web3-eth-abi": "1.10.2", - "web3-eth-contract": "1.10.2", - "web3-utils": "1.10.2" + "node": ">=10" }, - "engines": { - "node": ">=8.0.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/web3-eth-ens/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-eth-ens/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/typechain": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.2.tgz", + "integrity": "sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==", "dev": true, + "peer": true, "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" + "@types/prettier": "^2.1.1", + "debug": "^4.3.1", + "fs-extra": "^7.0.0", + "glob": "7.1.7", + "js-sha3": "^0.8.0", + "lodash": "^4.17.15", + "mkdirp": "^1.0.4", + "prettier": "^2.3.1", + "ts-command-line-args": "^2.2.0", + "ts-essentials": "^7.0.1" }, - "engines": { - "node": ">=8.0.0" + "bin": { + "typechain": "dist/cli/cli.js" + }, + "peerDependencies": { + "typescript": ">=4.3.0" } }, - "node_modules/web3-eth-ens/node_modules/web3-core-promievent": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.2.tgz", - "integrity": "sha512-Qkkb1dCDOU8dZeORkcwJBQRAX+mdsjx8LqFBB+P4W9QgwMqyJ6LXda+y1XgyeEVeKEmY1RCeTq9Y94q1v62Sfw==", + "node_modules/typechain/node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "dev": true, + "peer": true, "dependencies": { - "eventemitter3": "4.0.4" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=8.0.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/web3-eth-ens/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "node_modules/typechain/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" + "peer": true, + "bin": { + "mkdirp": "bin/cmd.js" }, "engines": { - "node": ">=8.0.0" + "node": ">=10" } }, - "node_modules/web3-eth-iban": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.0.tgz", - "integrity": "sha512-0l+SP3IGhInw7Q20LY3IVafYEuufo4Dn75jAHT7c2aDJsIolvf2Lc6ugHkBajlwUneGfbRQs/ccYPQ9JeMUbrg==", + "node_modules/typechain/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.0" + "peer": true, + "bin": { + "prettier": "bin-prettier.js" }, "engines": { - "node": ">=8.0.0" + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/web3-eth-iban/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-eth-iban/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", "dev": true, "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.4" } }, - "node_modules/web3-eth-personal": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.2.tgz", - "integrity": "sha512-+vEbJsPUJc5J683y0c2aN645vXC+gPVlFVCQu4IjPvXzJrAtUfz26+IZ6AUOth4fDJPT0f1uSLS5W2yrUdw9BQ==", + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", "dev": true, "dependencies": { - "@types/node": "^12.12.6", - "web3-core": "1.10.2", - "web3-core-helpers": "1.10.2", - "web3-core-method": "1.10.2", - "web3-net": "1.10.2", - "web3-utils": "1.10.2" + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/web3-eth-personal/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "node_modules/web3-eth-personal/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-eth-personal/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", "dev": true, "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/web3-eth-personal/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", "dev": true, "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" }, - "engines": { - "node": ">=8.0.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/web3-eth/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", "dev": true }, - "node_modules/web3-eth/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/typescript": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=8.0.0" + "node": ">=14.17" } }, - "node_modules/web3-eth/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, + "peer": true, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/web3-net": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.2.tgz", - "integrity": "sha512-w9i1t2z7dItagfskhaCKwpp6W3ylUR88gs68u820y5f8yfK5EbPmHc6c2lD8X9ZrTnmDoeOpIRCN/RFPtZCp+g==", + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", "dev": true, - "dependencies": { - "web3-core": "1.10.2", - "web3-core-method": "1.10.2", - "web3-utils": "1.10.2" + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" }, "engines": { - "node": ">=8.0.0" + "node": ">=0.8.0" } }, - "node_modules/web3-providers-http": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.2.tgz", - "integrity": "sha512-G8abKtpkyKGpRVKvfjIF3I4O/epHP7mxXWN8mNMQLkQj1cjMFiZBZ13f+qI77lNJN7QOf6+LtNdKrhsTGU72TA==", + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, "dependencies": { - "abortcontroller-polyfill": "^1.7.5", - "cross-fetch": "^4.0.0", - "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.2" + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" }, - "engines": { - "node": ">=8.0.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/web3-providers-http/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-providers-http/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/undici": { + "version": "5.26.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.2.tgz", + "integrity": "sha512-a4PDLQgLTPHVzOK+x3F79/M4GtyYPl+aX9AAK7aQxpwxDwCqkeZCScy7Gk5kWT3JtdFq1uhO3uZJdLtHI4dK9A==", "dev": true, "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" + "@fastify/busboy": "^2.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=14.0" } }, - "node_modules/web3-providers-http/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, - "node_modules/web3-providers-ipc": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.2.tgz", - "integrity": "sha512-lWbn6c+SgvhLymU8u4Ea/WOVC0Gqs7OJUvauejWz+iLycxeF0xFNyXnHVAi42ZJDPVI3vnfZotafoxcNNL7Sug==", + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, - "dependencies": { - "oboe": "2.1.5", - "web3-core-helpers": "1.10.2" - }, "engines": { - "node": ">=8.0.0" + "node": ">= 4.0.0" } }, - "node_modules/web3-providers-ipc/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-providers-ipc/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.8" } }, - "node_modules/web3-providers-ipc/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" + "punycode": "^2.1.0" } }, - "node_modules/web3-providers-ws": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.2.tgz", - "integrity": "sha512-3nYSiP6grI5GvpkSoehctSywfCTodU21VY8bUtXyFHK/IVfDooNtMpd5lVIMvXVAlaxwwrCfjebokaJtKH2Iag==", + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "dev": true, + "hasInstallScript": true, + "optional": true, + "peer": true, "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.2", - "websocket": "^1.0.32" + "node-gyp-build": "^4.3.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=6.14.2" } }, - "node_modules/web3-providers-ws/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", "dev": true }, - "node_modules/web3-providers-ws/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/web3-providers-ws/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "peer": true + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, - "node_modules/web3-shh": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.2.tgz", - "integrity": "sha512-UP0Kc3pHv9uULFu0+LOVfPwKBSJ6B+sJ5KflF7NyBk6TvNRxlpF3hUhuaVDCjjB/dDUR6T0EQeg25FA2uzJbag==", + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "dev": true, - "hasInstallScript": true, "dependencies": { - "web3-core": "1.10.2", - "web3-core-method": "1.10.2", - "web3-core-subscriptions": "1.10.2", - "web3-net": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" + "defaults": "^1.0.3" } }, "node_modules/web3-utils": { @@ -17015,38 +11782,6 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, - "node_modules/websocket": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", - "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", - "dev": true, - "dependencies": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/websocket/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/websocket/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", @@ -17126,18 +11861,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/window-size": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw==", - "dev": true, - "bin": { - "window-size": "cli.js" - }, - "engines": { - "node": ">= 0.10.0" - } - }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -17399,60 +12122,6 @@ } } }, - "node_modules/xhr": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", - "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", - "dev": true, - "dependencies": { - "global": "~4.4.0", - "is-function": "^1.0.1", - "parse-headers": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "node_modules/xhr-request": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", - "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", - "dev": true, - "dependencies": { - "buffer-to-arraybuffer": "^0.0.5", - "object-assign": "^4.1.1", - "query-string": "^5.0.1", - "simple-get": "^2.7.0", - "timed-out": "^4.0.1", - "url-set-query": "^1.0.0", - "xhr": "^2.0.4" - } - }, - "node_modules/xhr-request-promise": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", - "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", - "dev": true, - "dependencies": { - "xhr-request": "^1.1.0" - } - }, - "node_modules/xmlhttprequest": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -17462,15 +12131,6 @@ "node": ">=10" } }, - "node_modules/yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", - "dev": true, - "engines": { - "node": ">=0.10.32" - } - }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", diff --git a/package.json b/package.json index 644de03b9..f4076433b 100644 --- a/package.json +++ b/package.json @@ -53,24 +53,18 @@ "@changesets/cli": "^2.26.0", "@changesets/pre": "^2.0.0", "@changesets/read": "^0.6.0", - "@nomicfoundation/hardhat-chai-matchers": "^2.0.2", + "@nomicfoundation/hardhat-chai-matchers": "^2.0.3", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@nomicfoundation/hardhat-toolbox": "^4.0.0", - "@nomiclabs/hardhat-truffle5": "^2.0.5", - "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.5", "@openzeppelin/merkle-tree": "^1.0.5", - "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", "chai": "^4.2.0", "eslint": "^8.30.0", "eslint-config-prettier": "^9.0.0", - "eth-sig-util": "^3.0.0", - "ethereumjs-util": "^7.0.7", - "ethereumjs-wallet": "^1.0.1", "ethers": "^6.7.1", "glob": "^10.3.5", "graphlib": "^2.1.8", @@ -91,7 +85,6 @@ "solidity-coverage": "^0.8.5", "solidity-docgen": "^0.6.0-beta.29", "undici": "^5.22.1", - "web3": "^1.3.0", "yargs": "^17.0.0" } } diff --git a/scripts/generate/templates/Checkpoints.js b/scripts/generate/templates/Checkpoints.js index 321a77489..ed935f17e 100644 --- a/scripts/generate/templates/Checkpoints.js +++ b/scripts/generate/templates/Checkpoints.js @@ -1,5 +1,5 @@ const format = require('../format-lines'); -const { OPTS } = require('./Checkpoints.opts.js'); +const { OPTS } = require('./Checkpoints.opts'); // TEMPLATE const header = `\ diff --git a/scripts/upgradeable/upgradeable.patch b/scripts/upgradeable/upgradeable.patch index c2a5732d9..46893d7d2 100644 --- a/scripts/upgradeable/upgradeable.patch +++ b/scripts/upgradeable/upgradeable.patch @@ -1,6 +1,6 @@ diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 -index 2797a0889..000000000 +index 35ad097ff..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,21 +0,0 @@ @@ -16,7 +16,7 @@ index 2797a0889..000000000 - -**💻 Environment** - -- +- - -**📝 Details** - @@ -59,7 +59,7 @@ index ff596b0c3..000000000 - - diff --git a/README.md b/README.md -index 9ca41573f..57d6e3b5b 100644 +index 35083bc6e..05cf4fc27 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,9 @@ @@ -73,7 +73,7 @@ index 9ca41573f..57d6e3b5b 100644 ### Installation @@ -26,7 +29,7 @@ - #### Hardhat, Truffle (npm) + #### Hardhat (npm) ``` -$ npm install @openzeppelin/contracts @@ -110,7 +110,7 @@ index 9ca41573f..57d6e3b5b 100644 } ``` diff --git a/contracts/package.json b/contracts/package.json -index be3e741e3..877e942c2 100644 +index 6ab89138a..ece834a44 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,5 +1,5 @@ @@ -118,7 +118,7 @@ index be3e741e3..877e942c2 100644 - "name": "@openzeppelin/contracts", + "name": "@openzeppelin/contracts-upgradeable", "description": "Secure Smart Contract library for Solidity", - "version": "5.0.0", + "version": "5.0.1", "files": [ @@ -13,7 +13,7 @@ }, @@ -140,7 +140,7 @@ index be3e741e3..877e942c2 100644 + } } diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol -index 8e548cdd8..a60ee74fd 100644 +index 77c4c8990..602467f40 100644 --- a/contracts/utils/cryptography/EIP712.sol +++ b/contracts/utils/cryptography/EIP712.sol @@ -4,7 +4,6 @@ @@ -307,7 +307,7 @@ index 8e548cdd8..a60ee74fd 100644 } } diff --git a/package.json b/package.json -index c2c3a2675..3301b213d 100644 +index ec2c44ced..46eedc98f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ @@ -328,10 +328,10 @@ index 304d1386a..a1cd63bee 100644 +@openzeppelin/contracts-upgradeable/=contracts/ +@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js -index 75ca00b12..265e6c909 100644 +index 166038b36..268e0d29d 100644 --- a/test/utils/cryptography/EIP712.test.js +++ b/test/utils/cryptography/EIP712.test.js -@@ -40,27 +40,6 @@ describe('EIP712', function () { +@@ -47,27 +47,6 @@ describe('EIP712', function () { const rebuildDomain = await getDomain(this.eip712); expect(rebuildDomain).to.be.deep.equal(this.domain); }); diff --git a/test/access/AccessControl.behavior.js b/test/access/AccessControl.behavior.js index e9027cd65..7a0e292bd 100644 --- a/test/access/AccessControl.behavior.js +++ b/test/access/AccessControl.behavior.js @@ -1,7 +1,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { bigint: time } = require('../helpers/time'); +const time = require('../helpers/time'); const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior'); @@ -38,7 +38,7 @@ function shouldBehaveLikeAccessControl() { it('non-admin cannot grant role to other accounts', async function () { await expect(this.mock.connect(this.other).grantRole(ROLE, this.authorized)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); it('accounts can be granted a role multiple times', async function () { @@ -68,7 +68,7 @@ function shouldBehaveLikeAccessControl() { it('admin can revoke role', async function () { await expect(this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.authorized)) .to.emit(this.mock, 'RoleRevoked') - .withArgs(ROLE, this.authorized.address, this.defaultAdmin.address); + .withArgs(ROLE, this.authorized, this.defaultAdmin); expect(await this.mock.hasRole(ROLE, this.authorized)).to.equal(false); }); @@ -76,7 +76,7 @@ function shouldBehaveLikeAccessControl() { it('non-admin cannot revoke role', async function () { await expect(this.mock.connect(this.other).revokeRole(ROLE, this.authorized)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); it('a role can be revoked multiple times', async function () { @@ -106,7 +106,7 @@ function shouldBehaveLikeAccessControl() { it('bearer can renounce role', async function () { await expect(this.mock.connect(this.authorized).renounceRole(ROLE, this.authorized)) .to.emit(this.mock, 'RoleRevoked') - .withArgs(ROLE, this.authorized.address, this.authorized.address); + .withArgs(ROLE, this.authorized, this.authorized); expect(await this.mock.hasRole(ROLE, this.authorized)).to.equal(false); }); @@ -145,26 +145,26 @@ function shouldBehaveLikeAccessControl() { it('the new admin can grant roles', async function () { await expect(this.mock.connect(this.otherAdmin).grantRole(ROLE, this.authorized)) .to.emit(this.mock, 'RoleGranted') - .withArgs(ROLE, this.authorized.address, this.otherAdmin.address); + .withArgs(ROLE, this.authorized, this.otherAdmin); }); it('the new admin can revoke roles', async function () { await this.mock.connect(this.otherAdmin).grantRole(ROLE, this.authorized); await expect(this.mock.connect(this.otherAdmin).revokeRole(ROLE, this.authorized)) .to.emit(this.mock, 'RoleRevoked') - .withArgs(ROLE, this.authorized.address, this.otherAdmin.address); + .withArgs(ROLE, this.authorized, this.otherAdmin); }); it("a role's previous admins no longer grant roles", async function () { await expect(this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.defaultAdmin.address, OTHER_ROLE); + .withArgs(this.defaultAdmin, OTHER_ROLE); }); it("a role's previous admins no longer revoke roles", async function () { await expect(this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.authorized)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.defaultAdmin.address, OTHER_ROLE); + .withArgs(this.defaultAdmin, OTHER_ROLE); }); }); @@ -180,13 +180,13 @@ function shouldBehaveLikeAccessControl() { it("revert if sender doesn't have role #1", async function () { await expect(this.mock.connect(this.other).$_checkRole(ROLE)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, ROLE); + .withArgs(this.other, ROLE); }); it("revert if sender doesn't have role #2", async function () { await expect(this.mock.connect(this.authorized).$_checkRole(OTHER_ROLE)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.authorized.address, OTHER_ROLE); + .withArgs(this.authorized, OTHER_ROLE); }); }); @@ -271,7 +271,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { describe(`${getter}()`, function () { it('has a default set to the initial default admin', async function () { const value = await this.mock[getter](); - expect(value).to.equal(this.defaultAdmin.address); + expect(value).to.equal(this.defaultAdmin); expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, value)).to.be.true; }); @@ -284,7 +284,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer(); const value = await this.mock[getter](); - expect(value).to.equal(this.newDefaultAdmin.address); + expect(value).to.equal(this.newDefaultAdmin); }); }); } @@ -312,7 +312,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await time.increaseTo.timestamp(firstSchedule + fromSchedule); const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); - expect(newAdmin).to.equal(this.newDefaultAdmin.address); + expect(newAdmin).to.equal(this.newDefaultAdmin); expect(schedule).to.equal(firstSchedule); }); } @@ -429,7 +429,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it('reverts if called by non default admin accounts', async function () { await expect(this.mock.connect(this.other).beginDefaultAdminTransfer(this.newDefaultAdmin)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); describe('when there is no pending delay nor pending admin transfer', function () { @@ -440,10 +440,10 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await time.increaseTo.timestamp(nextBlockTimestamp, false); // set timestamp but don't mine the block yet await expect(this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin)) .to.emit(this.mock, 'DefaultAdminTransferScheduled') - .withArgs(this.newDefaultAdmin.address, acceptSchedule); + .withArgs(this.newDefaultAdmin, acceptSchedule); const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); - expect(newAdmin).to.equal(this.newDefaultAdmin.address); + expect(newAdmin).to.equal(this.newDefaultAdmin); expect(schedule).to.equal(acceptSchedule); }); }); @@ -470,7 +470,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { ); const newSchedule = (await time.clock.timestamp()) + this.delay; const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); - expect(newAdmin).to.equal(this.other.address); + expect(newAdmin).to.equal(this.other); expect(schedule).to.equal(newSchedule); }); } @@ -513,11 +513,11 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { const expectedAcceptSchedule = nextBlockTimestamp + expectedDelay; await expect(this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin)) .to.emit(this.mock, 'DefaultAdminTransferScheduled') - .withArgs(this.newDefaultAdmin.address, expectedAcceptSchedule); + .withArgs(this.newDefaultAdmin, expectedAcceptSchedule); // Check that the schedule corresponds with the new delay const { newAdmin, schedule: transferSchedule } = await this.mock.pendingDefaultAdmin(); - expect(newAdmin).to.equal(this.newDefaultAdmin.address); + expect(newAdmin).to.equal(this.newDefaultAdmin); expect(transferSchedule).to.equal(expectedAcceptSchedule); }); } @@ -534,7 +534,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await time.increaseTo.timestamp(this.acceptSchedule + 1n, false); await expect(this.mock.connect(this.other).acceptDefaultAdminTransfer()) .to.be.revertedWithCustomError(this.mock, 'AccessControlInvalidDefaultAdmin') - .withArgs(this.other.address); + .withArgs(this.other); }); describe('when caller is pending default admin and delay has passed', function () { @@ -546,14 +546,14 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { // Emit events await expect(this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer()) .to.emit(this.mock, 'RoleRevoked') - .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin.address, this.newDefaultAdmin.address) + .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin, this.newDefaultAdmin) .to.emit(this.mock, 'RoleGranted') - .withArgs(DEFAULT_ADMIN_ROLE, this.newDefaultAdmin.address, this.newDefaultAdmin.address); + .withArgs(DEFAULT_ADMIN_ROLE, this.newDefaultAdmin, this.newDefaultAdmin); // Storage changes expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.false; expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.newDefaultAdmin)).to.be.true; - expect(await this.mock.owner()).to.equal(this.newDefaultAdmin.address); + expect(await this.mock.owner()).to.equal(this.newDefaultAdmin); // Resets pending default admin and schedule const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); @@ -581,7 +581,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it('reverts if called by non default admin accounts', async function () { await expect(this.mock.connect(this.other).cancelDefaultAdminTransfer()) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); describe('when there is a pending default admin transfer', function () { @@ -619,7 +619,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { // Previous pending default admin should not be able to accept after cancellation. await expect(this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer()) .to.be.revertedWithCustomError(this.mock, 'AccessControlInvalidDefaultAdmin') - .withArgs(this.newDefaultAdmin.address); + .withArgs(this.newDefaultAdmin); }); }); @@ -666,14 +666,14 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await this.mock.connect(this.other).renounceRole(DEFAULT_ADMIN_ROLE, this.other); expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.true; - expect(await this.mock.defaultAdmin()).to.be.equal(this.defaultAdmin.address); + expect(await this.mock.defaultAdmin()).to.be.equal(this.defaultAdmin); }); it('renounces role', async function () { await time.increaseBy.timestamp(this.delay + 1n, false); await expect(this.mock.connect(this.defaultAdmin).renounceRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)) .to.emit(this.mock, 'RoleRevoked') - .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin.address, this.defaultAdmin.address); + .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin, this.defaultAdmin); expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.false; expect(await this.mock.defaultAdmin()).to.be.equal(ethers.ZeroAddress); @@ -690,7 +690,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await expect(this.mock.connect(this.defaultAdmin).$_grantRole(DEFAULT_ADMIN_ROLE, this.other)) .to.emit(this.mock, 'RoleGranted') - .withArgs(DEFAULT_ADMIN_ROLE, this.other.address, this.defaultAdmin.address); + .withArgs(DEFAULT_ADMIN_ROLE, this.other, this.defaultAdmin); }); describe('schedule not passed', function () { @@ -712,7 +712,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it('reverts if called by non default admin accounts', async function () { await expect(this.mock.connect(this.other).changeDefaultAdminDelay(time.duration.hours(4))) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); for (const [delayDifference, delayChangeType] of [ @@ -810,7 +810,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it('reverts if called by non default admin accounts', async function () { await expect(this.mock.connect(this.other).rollbackDefaultAdminDelay()) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); describe('when there is a pending delay', function () { diff --git a/test/access/AccessControl.test.js b/test/access/AccessControl.test.js index 6a78e54c2..5c70cdc6d 100644 --- a/test/access/AccessControl.test.js +++ b/test/access/AccessControl.test.js @@ -1,7 +1,7 @@ const { ethers } = require('hardhat'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl } = require('./AccessControl.behavior.js'); +const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl } = require('./AccessControl.behavior'); async function fixture() { const [defaultAdmin, ...accounts] = await ethers.getSigners(); diff --git a/test/access/Ownable.test.js b/test/access/Ownable.test.js index d565fc382..2d9b561a1 100644 --- a/test/access/Ownable.test.js +++ b/test/access/Ownable.test.js @@ -16,7 +16,7 @@ describe('Ownable', function () { it('emits ownership transfer events during construction', async function () { await expect(this.ownable.deploymentTransaction()) .to.emit(this.ownable, 'OwnershipTransferred') - .withArgs(ethers.ZeroAddress, this.owner.address); + .withArgs(ethers.ZeroAddress, this.owner); }); it('rejects zero address for initialOwner', async function () { @@ -26,22 +26,22 @@ describe('Ownable', function () { }); it('has an owner', async function () { - expect(await this.ownable.owner()).to.equal(this.owner.address); + expect(await this.ownable.owner()).to.equal(this.owner); }); describe('transfer ownership', function () { it('changes owner after transfer', async function () { await expect(this.ownable.connect(this.owner).transferOwnership(this.other)) .to.emit(this.ownable, 'OwnershipTransferred') - .withArgs(this.owner.address, this.other.address); + .withArgs(this.owner, this.other); - expect(await this.ownable.owner()).to.equal(this.other.address); + expect(await this.ownable.owner()).to.equal(this.other); }); it('prevents non-owners from transferring', async function () { await expect(this.ownable.connect(this.other).transferOwnership(this.other)) .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') - .withArgs(this.other.address); + .withArgs(this.other); }); it('guards ownership against stuck state', async function () { @@ -55,7 +55,7 @@ describe('Ownable', function () { it('loses ownership after renouncement', async function () { await expect(this.ownable.connect(this.owner).renounceOwnership()) .to.emit(this.ownable, 'OwnershipTransferred') - .withArgs(this.owner.address, ethers.ZeroAddress); + .withArgs(this.owner, ethers.ZeroAddress); expect(await this.ownable.owner()).to.equal(ethers.ZeroAddress); }); @@ -63,7 +63,7 @@ describe('Ownable', function () { it('prevents non-owners from renouncement', async function () { await expect(this.ownable.connect(this.other).renounceOwnership()) .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') - .withArgs(this.other.address); + .withArgs(this.other); }); it('allows to recover access using the internal _transferOwnership', async function () { @@ -71,9 +71,9 @@ describe('Ownable', function () { await expect(this.ownable.$_transferOwnership(this.other)) .to.emit(this.ownable, 'OwnershipTransferred') - .withArgs(ethers.ZeroAddress, this.other.address); + .withArgs(ethers.ZeroAddress, this.other); - expect(await this.ownable.owner()).to.equal(this.other.address); + expect(await this.ownable.owner()).to.equal(this.other); }); }); }); diff --git a/test/access/Ownable2Step.test.js b/test/access/Ownable2Step.test.js index e77307d98..06a3a2299 100644 --- a/test/access/Ownable2Step.test.js +++ b/test/access/Ownable2Step.test.js @@ -22,10 +22,10 @@ describe('Ownable2Step', function () { it('starting a transfer does not change owner', async function () { await expect(this.ownable2Step.connect(this.owner).transferOwnership(this.accountA)) .to.emit(this.ownable2Step, 'OwnershipTransferStarted') - .withArgs(this.owner.address, this.accountA.address); + .withArgs(this.owner, this.accountA); - expect(await this.ownable2Step.owner()).to.equal(this.owner.address); - expect(await this.ownable2Step.pendingOwner()).to.equal(this.accountA.address); + expect(await this.ownable2Step.owner()).to.equal(this.owner); + expect(await this.ownable2Step.pendingOwner()).to.equal(this.accountA); }); it('changes owner after transfer', async function () { @@ -33,9 +33,9 @@ describe('Ownable2Step', function () { await expect(this.ownable2Step.connect(this.accountA).acceptOwnership()) .to.emit(this.ownable2Step, 'OwnershipTransferred') - .withArgs(this.owner.address, this.accountA.address); + .withArgs(this.owner, this.accountA); - expect(await this.ownable2Step.owner()).to.equal(this.accountA.address); + expect(await this.ownable2Step.owner()).to.equal(this.accountA); expect(await this.ownable2Step.pendingOwner()).to.equal(ethers.ZeroAddress); }); @@ -44,7 +44,7 @@ describe('Ownable2Step', function () { await expect(this.ownable2Step.connect(this.accountB).acceptOwnership()) .to.be.revertedWithCustomError(this.ownable2Step, 'OwnableUnauthorizedAccount') - .withArgs(this.accountB.address); + .withArgs(this.accountB); }); }); @@ -52,7 +52,7 @@ describe('Ownable2Step', function () { it('changes owner after renouncing ownership', async function () { await expect(this.ownable2Step.connect(this.owner).renounceOwnership()) .to.emit(this.ownable2Step, 'OwnershipTransferred') - .withArgs(this.owner.address, ethers.ZeroAddress); + .withArgs(this.owner, ethers.ZeroAddress); // If renounceOwnership is removed from parent an alternative is needed ... // without it is difficult to cleanly renounce with the two step process @@ -62,14 +62,14 @@ describe('Ownable2Step', function () { it('pending owner resets after renouncing ownership', async function () { await this.ownable2Step.connect(this.owner).transferOwnership(this.accountA); - expect(await this.ownable2Step.pendingOwner()).to.equal(this.accountA.address); + expect(await this.ownable2Step.pendingOwner()).to.equal(this.accountA); await this.ownable2Step.connect(this.owner).renounceOwnership(); expect(await this.ownable2Step.pendingOwner()).to.equal(ethers.ZeroAddress); await expect(this.ownable2Step.connect(this.accountA).acceptOwnership()) .to.be.revertedWithCustomError(this.ownable2Step, 'OwnableUnauthorizedAccount') - .withArgs(this.accountA.address); + .withArgs(this.accountA); }); it('allows to recover access using the internal _transferOwnership', async function () { @@ -77,9 +77,9 @@ describe('Ownable2Step', function () { await expect(this.ownable2Step.$_transferOwnership(this.accountA)) .to.emit(this.ownable2Step, 'OwnershipTransferred') - .withArgs(ethers.ZeroAddress, this.accountA.address); + .withArgs(ethers.ZeroAddress, this.accountA); - expect(await this.ownable2Step.owner()).to.equal(this.accountA.address); + expect(await this.ownable2Step.owner()).to.equal(this.accountA); }); }); }); diff --git a/test/access/extensions/AccessControlDefaultAdminRules.test.js b/test/access/extensions/AccessControlDefaultAdminRules.test.js index 5b030a3f9..48036fd9b 100644 --- a/test/access/extensions/AccessControlDefaultAdminRules.test.js +++ b/test/access/extensions/AccessControlDefaultAdminRules.test.js @@ -1,11 +1,13 @@ const { ethers } = require('hardhat'); +const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { bigint: time } = require('../../helpers/time'); + +const time = require('../../helpers/time'); const { shouldBehaveLikeAccessControl, shouldBehaveLikeAccessControlDefaultAdminRules, -} = require('../AccessControl.behavior.js'); +} = require('../AccessControl.behavior'); async function fixture() { const delay = time.duration.hours(10); diff --git a/test/access/extensions/AccessControlEnumerable.test.js b/test/access/extensions/AccessControlEnumerable.test.js index a4ad372d5..ea1a8c46f 100644 --- a/test/access/extensions/AccessControlEnumerable.test.js +++ b/test/access/extensions/AccessControlEnumerable.test.js @@ -5,7 +5,7 @@ const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl, shouldBehaveLikeAccessControlEnumerable, -} = require('../AccessControl.behavior.js'); +} = require('../AccessControl.behavior'); async function fixture() { const [defaultAdmin, ...accounts] = await ethers.getSigners(); diff --git a/test/access/manager/AccessManaged.test.js b/test/access/manager/AccessManaged.test.js index 8af07a7dd..d666b5e6d 100644 --- a/test/access/manager/AccessManaged.test.js +++ b/test/access/manager/AccessManaged.test.js @@ -1,8 +1,9 @@ const { ethers } = require('hardhat'); - +const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { impersonate } = require('../../helpers/account'); -const { bigint: time } = require('../../helpers/time'); +const time = require('../../helpers/time'); async function fixture() { const [admin, roleMember, other] = await ethers.getSigners(); @@ -35,7 +36,7 @@ describe('AccessManaged', function () { it('sets authority and emits AuthorityUpdated event during construction', async function () { await expect(this.managed.deploymentTransaction()) .to.emit(this.managed, 'AuthorityUpdated') - .withArgs(this.authority.target); + .withArgs(this.authority); }); describe('restricted modifier', function () { @@ -53,7 +54,7 @@ describe('AccessManaged', function () { it('reverts when role is not granted', async function () { await expect(this.managed.connect(this.other)[this.selector]()) .to.be.revertedWithCustomError(this.managed, 'AccessManagedUnauthorized') - .withArgs(this.other.address); + .withArgs(this.other); }); it('panics in short calldata', async function () { @@ -103,21 +104,21 @@ describe('AccessManaged', function () { it('reverts if the caller is not the authority', async function () { await expect(this.managed.connect(this.other).setAuthority(this.other)) .to.be.revertedWithCustomError(this.managed, 'AccessManagedUnauthorized') - .withArgs(this.other.address); + .withArgs(this.other); }); it('reverts if the new authority is not a valid authority', async function () { await expect(this.managed.connect(this.authorityAsSigner).setAuthority(this.other)) .to.be.revertedWithCustomError(this.managed, 'AccessManagedInvalidAuthority') - .withArgs(this.other.address); + .withArgs(this.other); }); it('sets authority and emits AuthorityUpdated event', async function () { await expect(this.managed.connect(this.authorityAsSigner).setAuthority(this.anotherAuthority)) .to.emit(this.managed, 'AuthorityUpdated') - .withArgs(this.anotherAuthority.target); + .withArgs(this.anotherAuthority); - expect(await this.managed.authority()).to.equal(this.anotherAuthority.target); + expect(await this.managed.authority()).to.equal(this.anotherAuthority); }); }); @@ -136,7 +137,7 @@ describe('AccessManaged', function () { await expect(this.managed.connect(this.other).fnRestricted()) .to.emit(this.authorityObserveIsConsuming, 'ConsumeScheduledOpCalled') .withArgs( - this.other.address, + this.other, this.managed.interface.encodeFunctionData(fnRestricted, []), isConsumingScheduledOp.selector, ); diff --git a/test/access/manager/AccessManager.behavior.js b/test/access/manager/AccessManager.behavior.js index eb26b9a48..c9e236eb0 100644 --- a/test/access/manager/AccessManager.behavior.js +++ b/test/access/manager/AccessManager.behavior.js @@ -1,3 +1,5 @@ +const { expect } = require('chai'); + const { LIKE_COMMON_IS_EXECUTING, LIKE_COMMON_GET_ACCESS, @@ -39,7 +41,7 @@ function shouldBehaveLikeDelayedAdminOperation() { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.target, 'AccessManagerUnauthorizedAccount') .withArgs( - this.caller.address, + this.caller, this.roles.ADMIN.id, // Although PUBLIC is required, target function role doesn't apply to admin ops ); }); @@ -83,7 +85,7 @@ function shouldBehaveLikeNotDelayedAdminOperation() { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.target, 'AccessManagerUnauthorizedAccount') .withArgs( - this.caller.address, + this.caller, this.roles.ADMIN.id, // Although PUBLIC_ROLE is required, admin ops are not subject to target function roles ); }); @@ -123,7 +125,7 @@ function shouldBehaveLikeRoleAdminOperation(roleAdmin) { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.target, 'AccessManagerUnauthorizedAccount') - .withArgs(this.caller.address, roleAdmin); + .withArgs(this.caller, roleAdmin); }); }, specificRoleIsRequired: getAccessPath, @@ -142,7 +144,7 @@ function shouldBehaveLikeAManagedRestrictedOperation() { it('reverts as AccessManagedUnauthorized', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.target, 'AccessManagedUnauthorized') - .withArgs(this.caller.address); + .withArgs(this.caller); }); } diff --git a/test/access/manager/AccessManager.predicate.js b/test/access/manager/AccessManager.predicate.js index 5bf40a3d7..8b4c5f4b6 100644 --- a/test/access/manager/AccessManager.predicate.js +++ b/test/access/manager/AccessManager.predicate.js @@ -1,9 +1,10 @@ const { ethers } = require('hardhat'); +const { expect } = require('chai'); const { setStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); const { EXECUTION_ID_STORAGE_SLOT, EXPIRATION, prepareOperation } = require('../../helpers/access-manager'); const { impersonate } = require('../../helpers/account'); -const { bigint: time } = require('../../helpers/time'); +const time = require('../../helpers/time'); // ============ COMMON PREDICATES ============ @@ -17,7 +18,7 @@ const LIKE_COMMON_IS_EXECUTING = { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') - .withArgs(this.caller.address, this.role.id); + .withArgs(this.caller, this.role.id); }); }, }; @@ -30,7 +31,7 @@ const LIKE_COMMON_GET_ACCESS = { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') - .withArgs(this.caller.address, this.role.id); + .withArgs(this.caller, this.role.id); }); }, afterGrantDelay: undefined, // Diverges if there's an operation delay or not @@ -40,7 +41,7 @@ const LIKE_COMMON_GET_ACCESS = { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') - .withArgs(this.caller.address, this.role.id); + .withArgs(this.caller, this.role.id); }); }, afterGrantDelay() { @@ -71,7 +72,7 @@ const LIKE_COMMON_GET_ACCESS = { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') - .withArgs(this.caller.address, this.role.id); + .withArgs(this.caller, this.role.id); }); }, }; diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index ed16dd007..959fd7cda 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -1,11 +1,11 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { loadFixture, getStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { impersonate } = require('../../helpers/account'); const { MAX_UINT48 } = require('../../helpers/constants'); -const { bigint: time } = require('../../helpers/time'); const { selector } = require('../../helpers/methods'); +const time = require('../../helpers/time'); const { buildBaseRoles, @@ -17,12 +17,14 @@ const { prepareOperation, hashOperation, } = require('../../helpers/access-manager'); + const { shouldBehaveLikeDelayedAdminOperation, shouldBehaveLikeNotDelayedAdminOperation, shouldBehaveLikeRoleAdminOperation, shouldBehaveLikeAManagedRestrictedOperation, } = require('./AccessManager.behavior'); + const { LIKE_COMMON_SCHEDULABLE, testAsClosable, @@ -33,8 +35,6 @@ const { testAsGetAccess, } = require('./AccessManager.predicate'); -const { address: someAddress } = ethers.Wallet.createRandom(); - async function fixture() { const [admin, roleAdmin, roleGuardian, member, user, other] = await ethers.getSigners(); @@ -72,11 +72,8 @@ async function fixture() { } return { - // TODO: Check if all signers are actually used admin, roleAdmin, - roleGuardian, - member, user, other, roles, @@ -99,9 +96,7 @@ async function fixture() { // The predicates can be identified by the `testAs*` prefix while the behaviors // are prefixed with `shouldBehave*`. The common assertions for predicates are // defined as constants. -contract('AccessManager', function () { - // const [admin, manager, guardian, member, user, other] = accounts; - +describe('AccessManager', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); @@ -144,7 +139,7 @@ contract('AccessManager', function () { closed() { it('should return false and no delay', async function () { const { immediate, delay } = await this.manager.canCall( - someAddress, + this.other, this.target, this.calldata.substring(0, 10), ); @@ -763,11 +758,7 @@ contract('AccessManager', function () { describe('#hashOperation', function () { it('returns an operationId', async function () { - const calldata = '0x123543'; - const address = someAddress; - - const args = [this.user.address, address, calldata]; - + const args = [this.user, this.other, '0x123543']; expect(await this.manager.hashOperation(...args)).to.equal(hashOperation(...args)); }); }); @@ -980,7 +971,7 @@ contract('AccessManager', function () { describe('#setTargetAdminDelay', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const args = [someAddress, time.duration.days(3)]; + const args = [this.other.address, time.duration.days(3)]; const method = this.manager.interface.getFunction('setTargetAdminDelay(address,uint32)'); this.calldata = this.manager.interface.encodeFunctionData(method, args); }); @@ -991,50 +982,48 @@ contract('AccessManager', function () { describe('when increasing the delay', function () { const oldDelay = time.duration.days(10); const newDelay = time.duration.days(11); - const target = someAddress; beforeEach('sets old delay', async function () { - await this.manager.$_setTargetAdminDelay(target, oldDelay); + await this.manager.$_setTargetAdminDelay(this.other, oldDelay); await time.increaseBy.timestamp(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(oldDelay); }); it('increases the delay after minsetback', async function () { - const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(target, newDelay); + const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(this.other, newDelay); const setTargetAdminDelayAt = await time.clockFromReceipt.timestamp(txResponse); expect(txResponse) .to.emit(this.manager, 'TargetAdminDelayUpdated') - .withArgs(target, newDelay, setTargetAdminDelayAt + MINSETBACK); + .withArgs(this.other, newDelay, setTargetAdminDelayAt + MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(oldDelay); await time.increaseBy.timestamp(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(newDelay); }); }); describe('when reducing the delay', function () { const oldDelay = time.duration.days(10); - const target = someAddress; beforeEach('sets old delay', async function () { - await this.manager.$_setTargetAdminDelay(target, oldDelay); + await this.manager.$_setTargetAdminDelay(this.other, oldDelay); await time.increaseBy.timestamp(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(oldDelay); }); describe('when the delay difference is shorter than minimum setback', function () { const newDelay = oldDelay - 1n; it('increases the delay after minsetback', async function () { - const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(target, newDelay); + const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(this.other, newDelay); const setTargetAdminDelayAt = await time.clockFromReceipt.timestamp(txResponse); expect(txResponse) .to.emit(this.manager, 'TargetAdminDelayUpdated') - .withArgs(target, newDelay, setTargetAdminDelayAt + MINSETBACK); + .withArgs(this.other, newDelay, setTargetAdminDelayAt + MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(oldDelay); await time.increaseBy.timestamp(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(newDelay); }); }); @@ -1048,16 +1037,16 @@ contract('AccessManager', function () { it('increases the delay after delay difference', async function () { const setback = oldDelay - newDelay; - const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(target, newDelay); + const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(this.other, newDelay); const setTargetAdminDelayAt = await time.clockFromReceipt.timestamp(txResponse); expect(txResponse) .to.emit(this.manager, 'TargetAdminDelayUpdated') - .withArgs(target, newDelay, setTargetAdminDelayAt + setback); + .withArgs(this.other, newDelay, setTargetAdminDelayAt + setback); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(oldDelay); await time.increaseBy.timestamp(setback); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(newDelay); }); }); }); @@ -1083,20 +1072,20 @@ contract('AccessManager', function () { }); it('changes the authority', async function () { - expect(await this.newManagedTarget.authority()).to.be.equal(this.manager.target); + expect(await this.newManagedTarget.authority()).to.be.equal(this.manager); await expect(this.manager.connect(this.admin).updateAuthority(this.newManagedTarget, this.newAuthority)) .to.emit(this.newManagedTarget, 'AuthorityUpdated') // Managed contract is responsible of notifying the change through an event - .withArgs(this.newAuthority.target); + .withArgs(this.newAuthority); - expect(await this.newManagedTarget.authority()).to.be.equal(this.newAuthority.target); + expect(await this.newManagedTarget.authority()).to.be.equal(this.newAuthority); }); }); describe('#setTargetClosed', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const args = [someAddress, true]; + const args = [this.other.address, true]; const method = this.manager.interface.getFunction('setTargetClosed(address,bool)'); this.calldata = this.manager.interface.encodeFunctionData(method, args); }); @@ -1107,26 +1096,26 @@ contract('AccessManager', function () { it('closes and opens a target', async function () { await expect(this.manager.connect(this.admin).setTargetClosed(this.target, true)) .to.emit(this.manager, 'TargetClosed') - .withArgs(this.target.target, true); + .withArgs(this.target, true); expect(await this.manager.isTargetClosed(this.target)).to.be.true; await expect(this.manager.connect(this.admin).setTargetClosed(this.target, false)) .to.emit(this.manager, 'TargetClosed') - .withArgs(this.target.target, false); + .withArgs(this.target, false); expect(await this.manager.isTargetClosed(this.target)).to.be.false; }); it('reverts if closing the manager', async function () { await expect(this.manager.connect(this.admin).setTargetClosed(this.manager, true)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedAccount') - .withArgs(this.manager.target); + .withArgs(this.manager); }); }); describe('#setTargetFunctionRole', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const args = [someAddress, ['0x12345678'], 443342]; + const args = [this.other.address, ['0x12345678'], 443342]; const method = this.manager.interface.getFunction('setTargetFunctionRole(address,bytes4[],uint64)'); this.calldata = this.manager.interface.encodeFunctionData(method, args); }); @@ -1148,7 +1137,7 @@ contract('AccessManager', function () { for (const sig of sigs) { expect(allowRole) .to.emit(this.manager, 'TargetFunctionRoleUpdated') - .withArgs(this.target.target, sig, this.roles.SOME.id); + .withArgs(this.target, sig, this.roles.SOME.id); expect(await this.manager.getTargetFunctionRole(this.target, sig)).to.equal(this.roles.SOME.id); } @@ -1156,7 +1145,7 @@ contract('AccessManager', function () { this.manager.connect(this.admin).setTargetFunctionRole(this.target, [sigs[1]], this.roles.SOME_ADMIN.id), ) .to.emit(this.manager, 'TargetFunctionRoleUpdated') - .withArgs(this.target.target, sigs[1], this.roles.SOME_ADMIN.id); + .withArgs(this.target, sigs[1], this.roles.SOME_ADMIN.id); for (const sig of sigs) { expect(await this.manager.getTargetFunctionRole(this.target, sig)).to.equal( @@ -1182,7 +1171,7 @@ contract('AccessManager', function () { describe('#grantRole', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const args = [ANOTHER_ROLE, someAddress, 0]; + const args = [ANOTHER_ROLE, this.other.address, 0]; const method = this.manager.interface.getFunction('grantRole(uint64,address,uint32)'); this.calldata = this.manager.interface.encodeFunctionData(method, args); }); @@ -1291,7 +1280,7 @@ contract('AccessManager', function () { const grantedAt = await time.clockFromReceipt.timestamp(txResponse); expect(txResponse) .to.emit(this.manager, 'RoleGranted') - .withArgs(ANOTHER_ROLE, this.user.address, executionDelay, grantedAt, true); + .withArgs(ANOTHER_ROLE, this.user, executionDelay, grantedAt, true); // Access is correctly stored const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); @@ -1348,7 +1337,7 @@ contract('AccessManager', function () { expect(txResponse) .to.emit(this.manager, 'RoleGranted') - .withArgs(ANOTHER_ROLE, this.user.address, timestamp, this.newExecutionDelay, false); + .withArgs(ANOTHER_ROLE, this.user, timestamp, this.newExecutionDelay, false); // Access is correctly stored const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); @@ -1384,13 +1373,7 @@ contract('AccessManager', function () { it('emits event', function () { expect(this.txResponse) .to.emit(this.manager, 'RoleGranted') - .withArgs( - ANOTHER_ROLE, - this.user.address, - this.grantTimestamp + this.delay, - this.newExecutionDelay, - false, - ); + .withArgs(ANOTHER_ROLE, this.user, this.grantTimestamp + this.delay, this.newExecutionDelay, false); }); testAsDelay('execution delay effect', { @@ -1465,7 +1448,7 @@ contract('AccessManager', function () { expect(txResponse) .to.emit(this.manager, 'RoleGranted') - .withArgs(ANOTHER_ROLE, this.user.address, timestamp, this.newExecutionDelay, false); + .withArgs(ANOTHER_ROLE, this.user, timestamp, this.newExecutionDelay, false); // Access is correctly stored const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); @@ -1501,13 +1484,7 @@ contract('AccessManager', function () { it('emits event', function () { expect(this.txResponse) .to.emit(this.manager, 'RoleGranted') - .withArgs( - ANOTHER_ROLE, - this.user.address, - this.grantTimestamp + this.delay, - this.newExecutionDelay, - false, - ); + .withArgs(ANOTHER_ROLE, this.user, this.grantTimestamp + this.delay, this.newExecutionDelay, false); }); testAsDelay('execution delay effect', { @@ -1557,7 +1534,7 @@ contract('AccessManager', function () { describe('#revokeRole', function () { describe('restrictions', function () { beforeEach('set method and args', async function () { - const args = [ANOTHER_ROLE, someAddress]; + const args = [ANOTHER_ROLE, this.other.address]; const method = this.manager.interface.getFunction('revokeRole(uint64,address)'); this.calldata = this.manager.interface.encodeFunctionData(method, args); @@ -1588,7 +1565,7 @@ contract('AccessManager', function () { await expect(this.manager.connect(this.admin).revokeRole(ANOTHER_ROLE, this.user)) .to.emit(this.manager, 'RoleRevoked') - .withArgs(ANOTHER_ROLE, this.user.address); + .withArgs(ANOTHER_ROLE, this.user); expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ false, @@ -1613,7 +1590,7 @@ contract('AccessManager', function () { await expect(this.manager.connect(this.admin).revokeRole(ANOTHER_ROLE, this.user)) .to.emit(this.manager, 'RoleRevoked') - .withArgs(ANOTHER_ROLE, this.user.address); + .withArgs(ANOTHER_ROLE, this.user); expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ false, @@ -1670,7 +1647,7 @@ contract('AccessManager', function () { ]); await expect(this.manager.connect(this.caller).renounceRole(this.role.id, this.caller)) .to.emit(this.manager, 'RoleRevoked') - .withArgs(this.role.id, this.caller.address); + .withArgs(this.role.id, this.caller); expect(await this.manager.hasRole(this.role.id, this.caller).then(formatAccess)).to.be.deep.equal([ false, '0', @@ -1685,7 +1662,7 @@ contract('AccessManager', function () { it('reverts if renouncing with bad caller confirmation', async function () { await expect( - this.manager.connect(this.caller).renounceRole(this.role.id, someAddress), + this.manager.connect(this.caller).renounceRole(this.role.id, this.other), ).to.be.revertedWithCustomError(this.manager, 'AccessManagerBadConfirmation'); }); }); @@ -1719,7 +1696,7 @@ contract('AccessManager', function () { }), ) .to.emit(this.target, 'CalledRestricted') - .withArgs(this.user.address); + .withArgs(this.user); }); }); @@ -1742,7 +1719,7 @@ contract('AccessManager', function () { }), ) .to.emit(this.target, 'CalledUnrestricted') - .withArgs(this.user.address); + .withArgs(this.user); }); }); }); @@ -1772,7 +1749,7 @@ contract('AccessManager', function () { }); await expect(schedule()) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, open: { @@ -1790,7 +1767,7 @@ contract('AccessManager', function () { }); await expect(schedule()) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -1800,7 +1777,7 @@ contract('AccessManager', function () { // prepareOperation is not used here because it alters the next block timestamp await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, specificRoleIsRequired: { @@ -1812,7 +1789,7 @@ contract('AccessManager', function () { // prepareOperation is not used here because it alters the next block timestamp await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, afterGrantDelay() { @@ -1828,7 +1805,7 @@ contract('AccessManager', function () { // prepareOperation is not used here because it alters the next block timestamp await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, afterGrantDelay() { @@ -1836,7 +1813,7 @@ contract('AccessManager', function () { // prepareOperation is not used here because it alters the next block timestamp await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -1859,7 +1836,7 @@ contract('AccessManager', function () { // prepareOperation is not used here because it alters the next block timestamp await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -1874,7 +1851,7 @@ contract('AccessManager', function () { }); await expect(schedule()) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -1896,7 +1873,7 @@ contract('AccessManager', function () { expect(await this.manager.getSchedule(operationId)).to.equal(scheduledAt + this.delay); expect(txResponse) .to.emit(this.manager, 'OperationScheduled') - .withArgs(operationId, '1', scheduledAt + this.delay, this.target.target, this.calldata); + .withArgs(operationId, '1', scheduledAt + this.delay, this.target, this.calldata); }); it('schedules an operation at the minimum execution date if no specified execution date (when == 0)', async function () { @@ -1911,7 +1888,7 @@ contract('AccessManager', function () { expect(await this.manager.getSchedule(operationId)).to.equal(scheduledAt + executionDelay); expect(txResponse) .to.emit(this.manager, 'OperationScheduled') - .withArgs(operationId, '1', scheduledAt + executionDelay, this.target.target, this.calldata); + .withArgs(operationId, '1', scheduledAt + executionDelay, this.target, this.calldata); }); it('increases the nonce of an operation scheduled more than once', async function () { @@ -1928,14 +1905,7 @@ contract('AccessManager', function () { }); await expect(op1.schedule()) .to.emit(this.manager, 'OperationScheduled') - .withArgs( - op1.operationId, - 1n, - op1.scheduledAt + this.delay, - this.caller.address, - this.target.target, - this.calldata, - ); + .withArgs(op1.operationId, 1n, op1.scheduledAt + this.delay, this.caller, this.target, this.calldata); expect(expectedOperationId).to.equal(op1.operationId); // Consume @@ -1954,14 +1924,7 @@ contract('AccessManager', function () { }); await expect(op2.schedule()) .to.emit(this.manager, 'OperationScheduled') - .withArgs( - op2.operationId, - 2n, - op2.scheduledAt + this.delay, - this.caller.address, - this.target.target, - this.calldata, - ); + .withArgs(op2.operationId, 2n, op2.scheduledAt + this.delay, this.caller, this.target, this.calldata); expect(expectedOperationId).to.equal(op2.operationId); // Check final nonce @@ -1981,7 +1944,7 @@ contract('AccessManager', function () { await expect(schedule()) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); it('reverts if an operation is already schedule', async function () { @@ -2040,7 +2003,7 @@ contract('AccessManager', function () { await expect(schedule()) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.manager.target, calldata); + .withArgs(this.caller, this.manager, calldata); }); }); @@ -2062,7 +2025,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCall', async function () { await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, open: { @@ -2076,7 +2039,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCall', async function () { await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -2094,7 +2057,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCall', async function () { await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, afterGrantDelay: function self() { @@ -2112,7 +2075,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCall', async function () { await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, afterGrantDelay: function self() { @@ -2143,7 +2106,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCall', async function () { await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -2197,9 +2160,9 @@ contract('AccessManager', function () { }); it('keeps the original _executionId after finishing the call', async function () { - const executionIdBefore = await getStorageAt(this.manager.target, EXECUTION_ID_STORAGE_SLOT); + const executionIdBefore = await ethers.provider.getStorage(this.manager, EXECUTION_ID_STORAGE_SLOT); await this.manager.connect(this.caller).execute(this.target, this.calldata); - const executionIdAfter = await getStorageAt(this.manager.target, EXECUTION_ID_STORAGE_SLOT); + const executionIdAfter = await ethers.provider.getStorage(this.manager, EXECUTION_ID_STORAGE_SLOT); expect(executionIdBefore).to.equal(executionIdAfter); }); @@ -2244,7 +2207,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedConsume', async function () { await expect(this.manager.connect(this.caller).consumeScheduledOp(this.caller, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedConsume') - .withArgs(this.caller.address); + .withArgs(this.caller); }); }); @@ -2329,7 +2292,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCancel', async function () { await expect(this.manager.connect(this.other).cancel(this.caller, this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCancel') - .withArgs(this.other.address, this.caller.address, this.target.target, this.method.selector); + .withArgs(this.other, this.caller, this.target, this.method.selector); }); }); }, @@ -2379,7 +2342,7 @@ contract('AccessManager', function () { }); it('initial state', async function () { - expect(await this.ownable.owner()).to.be.equal(this.manager.target); + expect(await this.ownable.owner()).to.be.equal(this.manager); }); describe('Contract is closed', function () { @@ -2390,7 +2353,7 @@ contract('AccessManager', function () { it('directly call: reverts', async function () { await expect(this.ownable.connect(this.user).$_checkOwner()) .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') - .withArgs(this.user.address); + .withArgs(this.user); }); it('relayed call (with role): reverts', async function () { @@ -2398,7 +2361,7 @@ contract('AccessManager', function () { this.manager.connect(this.user).execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector), ) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.user.address, this.ownable.target, this.ownable.$_checkOwner.getFragment().selector); + .withArgs(this.user, this.ownable, this.ownable.$_checkOwner.getFragment().selector); }); it('relayed call (without role): reverts', async function () { @@ -2406,7 +2369,7 @@ contract('AccessManager', function () { this.manager.connect(this.other).execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector), ) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.other.address, this.ownable.target, this.ownable.$_checkOwner.getFragment().selector); + .withArgs(this.other, this.ownable, this.ownable.$_checkOwner.getFragment().selector); }); }); @@ -2423,7 +2386,7 @@ contract('AccessManager', function () { it('directly call: reverts', async function () { await expect(this.ownable.connect(this.user).$_checkOwner()) .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') - .withArgs(this.user.address); + .withArgs(this.user); }); it('relayed call (with role): success', async function () { @@ -2435,7 +2398,7 @@ contract('AccessManager', function () { this.manager.connect(this.other).execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector), ) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.other.address, this.ownable.target, this.ownable.$_checkOwner.getFragment().selector); + .withArgs(this.other, this.ownable, this.ownable.$_checkOwner.getFragment().selector); }); }); @@ -2451,7 +2414,7 @@ contract('AccessManager', function () { it('directly call: reverts', async function () { await expect(this.ownable.connect(this.user).$_checkOwner()) .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') - .withArgs(this.user.address); + .withArgs(this.user); }); it('relayed call (with role): success', async function () { diff --git a/test/access/manager/AuthorityUtils.test.js b/test/access/manager/AuthorityUtils.test.js index c17220541..44fa10712 100644 --- a/test/access/manager/AuthorityUtils.test.js +++ b/test/access/manager/AuthorityUtils.test.js @@ -1,4 +1,5 @@ const { ethers } = require('hardhat'); +const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); async function fixture() { diff --git a/test/finance/VestingWallet.behavior.js b/test/finance/VestingWallet.behavior.js index 53c8c565c..a934dc4b0 100644 --- a/test/finance/VestingWallet.behavior.js +++ b/test/finance/VestingWallet.behavior.js @@ -1,5 +1,5 @@ const { expect } = require('chai'); -const { bigint: time } = require('../helpers/time'); +const time = require('../helpers/time'); function shouldBehaveLikeVesting() { it('check vesting schedule', async function () { diff --git a/test/finance/VestingWallet.test.js b/test/finance/VestingWallet.test.js index 843918fee..eee9041dc 100644 --- a/test/finance/VestingWallet.test.js +++ b/test/finance/VestingWallet.test.js @@ -3,7 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { min } = require('../helpers/math'); -const { bigint: time } = require('../helpers/time'); +const time = require('../helpers/time'); const { shouldBehaveLikeVesting } = require('./VestingWallet.behavior'); @@ -39,7 +39,7 @@ async function fixture() { }, token: { checkRelease: async (tx, amount) => { - await expect(tx).to.emit(token, 'Transfer').withArgs(mock.target, beneficiary.address, amount); + await expect(tx).to.emit(token, 'Transfer').withArgs(mock, beneficiary, amount); await expect(tx).to.changeTokenBalances(token, [mock, beneficiary], [-amount, amount]); }, setupFailure: async () => { @@ -50,8 +50,8 @@ async function fixture() { }; }, releasedEvent: 'ERC20Released', - argsVerify: [token.target], - args: [ethers.Typed.address(token.target)], + argsVerify: [token], + args: [ethers.Typed.address(token)], }, }; @@ -76,7 +76,7 @@ describe('VestingWallet', function () { }); it('check vesting contract', async function () { - expect(await this.mock.owner()).to.be.equal(this.beneficiary.address); + expect(await this.mock.owner()).to.be.equal(this.beneficiary); expect(await this.mock.start()).to.be.equal(this.start); expect(await this.mock.duration()).to.be.equal(this.duration); expect(await this.mock.end()).to.be.equal(this.start + this.duration); diff --git a/test/governance/Governor.test.js b/test/governance/Governor.test.js index f27e0d9f2..4668e33d5 100644 --- a/test/governance/Governor.test.js +++ b/test/governance/Governor.test.js @@ -4,8 +4,8 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { GovernorHelper } = require('../helpers/governance'); const { getDomain, Ballot } = require('../helpers/eip712'); -const { bigint: Enums } = require('../helpers/enums'); -const { bigint: time } = require('../helpers/time'); +const { ProposalState, VoteType } = require('../helpers/enums'); +const time = require('../helpers/time'); const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior'); const { shouldBehaveLikeERC6372 } = require('./utils/ERC6372.behavior'); @@ -101,7 +101,7 @@ describe('Governor', function () { it('deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0)).to.equal(0n); @@ -128,7 +128,7 @@ describe('Governor', function () { .to.emit(this.mock, 'ProposalCreated') .withArgs( this.proposal.id, - this.proposer.address, + this.proposer, this.proposal.targets, this.proposal.values, this.proposal.signatures, @@ -140,21 +140,21 @@ describe('Governor', function () { await this.helper.waitForSnapshot(); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For, reason: 'This is nice' })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For, reason: 'This is nice' })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter1.address, this.proposal.id, Enums.VoteType.For, ethers.parseEther('10'), 'This is nice'); + .withArgs(this.voter1, this.proposal.id, VoteType.For, ethers.parseEther('10'), 'This is nice'); - await expect(this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter2).vote({ support: VoteType.For })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter2.address, this.proposal.id, Enums.VoteType.For, ethers.parseEther('7'), ''); + .withArgs(this.voter2, this.proposal.id, VoteType.For, ethers.parseEther('7'), ''); - await expect(this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against })) + await expect(this.helper.connect(this.voter3).vote({ support: VoteType.Against })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter3.address, this.proposal.id, Enums.VoteType.Against, ethers.parseEther('5'), ''); + .withArgs(this.voter3, this.proposal.id, VoteType.Against, ethers.parseEther('5'), ''); - await expect(this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain })) + await expect(this.helper.connect(this.voter4).vote({ support: VoteType.Abstain })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter4.address, this.proposal.id, Enums.VoteType.Abstain, ethers.parseEther('2'), ''); + .withArgs(this.voter4, this.proposal.id, VoteType.Abstain, ethers.parseEther('2'), ''); await this.helper.waitForDeadline(); @@ -165,7 +165,7 @@ describe('Governor', function () { await expect(txExecute).to.emit(this.receiver, 'MockFunctionCalled'); // After - expect(await this.mock.proposalProposer(this.proposal.id)).to.equal(this.proposer.address); + expect(await this.mock.proposalProposer(this.proposal.id)).to.equal(this.proposer); expect(await this.mock.hasVoted(this.proposal.id, this.owner)).to.be.false; expect(await this.mock.hasVoted(this.proposal.id, this.voter1)).to.be.true; expect(await this.mock.hasVoted(this.proposal.id, this.voter2)).to.be.true; @@ -191,7 +191,7 @@ describe('Governor', function () { await expect(async () => { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); return this.helper.execute(); }).to.changeEtherBalances([this.mock, this.userEOA], [-value, value]); @@ -208,14 +208,14 @@ describe('Governor', function () { await this.helper.waitForSnapshot(); await expect( this.helper.vote({ - support: Enums.VoteType.For, + support: VoteType.For, voter: this.userEOA.address, nonce, signature: signBallot(this.userEOA), }), ) .to.emit(this.mock, 'VoteCast') - .withArgs(this.userEOA.address, this.proposal.id, Enums.VoteType.For, ethers.parseEther('10'), ''); + .withArgs(this.userEOA, this.proposal.id, VoteType.For, ethers.parseEther('10'), ''); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -237,14 +237,14 @@ describe('Governor', function () { await this.helper.waitForSnapshot(); await expect( this.helper.vote({ - support: Enums.VoteType.For, + support: VoteType.For, voter: wallet.target, nonce, signature: signBallot(this.userEOA), }), ) .to.emit(this.mock, 'VoteCast') - .withArgs(wallet.target, this.proposal.id, Enums.VoteType.For, ethers.parseEther('10'), ''); + .withArgs(wallet, this.proposal.id, VoteType.For, ethers.parseEther('10'), ''); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -266,7 +266,7 @@ describe('Governor', function () { await this.helper.propose(); await expect(this.helper.propose()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') - .withArgs(this.proposal.id, Enums.ProposalState.Pending, ethers.ZeroHash); + .withArgs(this.proposal.id, ProposalState.Pending, ethers.ZeroHash); }); it('if proposer has below threshold votes', async function () { @@ -275,25 +275,25 @@ describe('Governor', function () { await this.mock.$_setProposalThreshold(threshold); await expect(this.helper.connect(this.voter1).propose()) .to.be.revertedWithCustomError(this.mock, 'GovernorInsufficientProposerVotes') - .withArgs(this.voter1.address, votes, threshold); + .withArgs(this.voter1, votes, threshold); }); }); describe('on vote', function () { it('if proposal does not exist', async function () { - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.be.revertedWithCustomError(this.mock, 'GovernorNonexistentProposal') .withArgs(this.proposal.id); }); it('if voting has not started', async function () { await this.helper.propose(); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Pending, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Active]), + ProposalState.Pending, + GovernorHelper.proposalStatesToBitMap([ProposalState.Active]), ); }); @@ -309,21 +309,21 @@ describe('Governor', function () { it('if vote was already casted', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.be.revertedWithCustomError(this.mock, 'GovernorAlreadyCastVote') - .withArgs(this.voter1.address); + .withArgs(this.voter1); }); it('if voting is over', async function () { await this.helper.propose(); await this.helper.waitForDeadline(); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Defeated, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Active]), + ProposalState.Defeated, + GovernorHelper.proposalStatesToBitMap([ProposalState.Active]), ); }); }); @@ -341,13 +341,13 @@ describe('Governor', function () { const nonce = await this.mock.nonces(this.userEOA); function tamper(str, index, mask) { - const arrayStr = ethers.toBeArray(BigInt(str)); + const arrayStr = ethers.getBytes(str); arrayStr[index] ^= mask; return ethers.hexlify(arrayStr); } const voteParams = { - support: Enums.VoteType.For, + support: VoteType.For, voter: this.userEOA.address, nonce, signature: (...args) => signBallot(this.userEOA)(...args).then(sig => tamper(sig, 42, 0xff)), @@ -362,7 +362,7 @@ describe('Governor', function () { const nonce = await this.mock.nonces(this.userEOA); const voteParams = { - support: Enums.VoteType.For, + support: VoteType.For, voter: this.userEOA.address, nonce: nonce + 1n, signature: signBallot(this.userEOA), @@ -378,7 +378,7 @@ describe('Governor', function () { it('always', async function () { await this.helper.connect(this.proposer).propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.queue()).to.be.revertedWithCustomError(this.mock, 'GovernorQueueNotImplemented'); }); @@ -394,39 +394,39 @@ describe('Governor', function () { it('if quorum is not reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.For }); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Active, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('if score not reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.Against }); + await this.helper.connect(this.voter1).vote({ support: VoteType.Against }); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Active, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('if voting is not over', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Active, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -443,7 +443,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.be.revertedWithCustomError(this.mock, 'FailedInnerCall'); }); @@ -461,7 +461,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.be.revertedWith('CallReceiverMock: reverting'); }); @@ -469,15 +469,15 @@ describe('Governor', function () { it('if proposal was already executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); }); @@ -492,38 +492,38 @@ describe('Governor', function () { it('Pending & Active', async function () { await this.helper.propose(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Pending); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Pending); await this.helper.waitForSnapshot(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Pending); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Pending); await this.helper.waitForSnapshot(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Active); }); it('Defeated', async function () { await this.helper.propose(); await this.helper.waitForDeadline(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Active); await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Defeated); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Defeated); }); it('Succeeded', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Active); await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Succeeded); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Succeeded); }); it('Executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Executed); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Executed); }); }); @@ -539,58 +539,58 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.cancel('internal'); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await this.helper.waitForSnapshot(); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Active]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Active]), ); }); it('after vote', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.cancel('internal'); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await this.helper.waitForDeadline(); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('after deadline', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.cancel('internal'); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('after execution', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -598,9 +598,9 @@ describe('Governor', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, + ProposalState.Executed, GovernorHelper.proposalStatesToBitMap( - [Enums.ProposalState.Canceled, Enums.ProposalState.Expired, Enums.ProposalState.Executed], + [ProposalState.Canceled, ProposalState.Expired, ProposalState.Executed], { inverted: true }, ), ); @@ -625,7 +625,7 @@ describe('Governor', function () { await expect(this.helper.connect(this.owner).cancel('external')) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyProposer') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('after vote started', async function () { @@ -636,44 +636,44 @@ describe('Governor', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Active, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([ProposalState.Pending]), ); }); it('after vote', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await expect(this.helper.cancel('external')) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Active, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([ProposalState.Pending]), ); }); it('after deadline', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.cancel('external')) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Succeeded, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ProposalState.Succeeded, + GovernorHelper.proposalStatesToBitMap([ProposalState.Pending]), ); }); it('after execution', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -681,8 +681,8 @@ describe('Governor', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([ProposalState.Pending]), ); }); }); @@ -749,7 +749,7 @@ describe('Governor', function () { .to.emit(this.mock, 'ProposalCreated') .withArgs( this.proposal.id, - this.proposer.address, + this.proposer, this.proposal.targets, this.proposal.values, this.proposal.signatures, @@ -767,7 +767,7 @@ describe('Governor', function () { .to.emit(this.mock, 'ProposalCreated') .withArgs( this.proposal.id, - this.voter1.address, + this.voter1, this.proposal.targets, this.proposal.values, this.proposal.signatures, @@ -841,19 +841,19 @@ describe('Governor', function () { it('setVotingDelay is protected', async function () { await expect(this.mock.connect(this.owner).setVotingDelay(0n)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('setVotingPeriod is protected', async function () { await expect(this.mock.connect(this.owner).setVotingPeriod(32n)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('setProposalThreshold is protected', async function () { await expect(this.mock.connect(this.owner).setProposalThreshold(1_000_000_000_000_000_000n)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can setVotingDelay through governance', async function () { @@ -869,7 +869,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.emit(this.mock, 'VotingDelaySet').withArgs(4n, 0n); @@ -890,7 +890,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.emit(this.mock, 'VotingPeriodSet').withArgs(16n, 32n); @@ -913,7 +913,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()) @@ -934,7 +934,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()) @@ -955,7 +955,7 @@ describe('Governor', function () { }); it('can receive an ERC721 safeTransfer', async function () { - await this.token.connect(this.owner).safeTransferFrom(this.owner, this.mock.target, tokenId); + await this.token.connect(this.owner).safeTransferFrom(this.owner, this.mock, tokenId); }); }); @@ -974,7 +974,7 @@ describe('Governor', function () { it('can receive ERC1155 safeTransfer', async function () { await this.token.connect(this.owner).safeTransferFrom( this.owner, - this.mock.target, + this.mock, ...Object.entries(tokenIds)[0], // id + amount '0x', ); @@ -983,13 +983,7 @@ describe('Governor', function () { it('can receive ERC1155 safeBatchTransfer', async function () { await this.token .connect(this.owner) - .safeBatchTransferFrom( - this.owner, - this.mock.target, - Object.keys(tokenIds), - Object.values(tokenIds), - '0x', - ); + .safeBatchTransferFrom(this.owner, this.mock, Object.keys(tokenIds), Object.values(tokenIds), '0x'); }); }); }); diff --git a/test/governance/TimelockController.test.js b/test/governance/TimelockController.test.js index 709104743..f7ba96c82 100644 --- a/test/governance/TimelockController.test.js +++ b/test/governance/TimelockController.test.js @@ -4,10 +4,8 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); const { GovernorHelper } = require('../helpers/governance'); -const { bigint: time } = require('../helpers/time'); -const { - bigint: { OperationState }, -} = require('../helpers/enums'); +const { OperationState } = require('../helpers/enums'); +const time = require('../helpers/time'); const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior'); @@ -234,7 +232,7 @@ describe('TimelockController', function () { ), ) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, PROPOSER_ROLE); + .withArgs(this.other, PROPOSER_ROLE); }); it('enforce minimum delay', async function () { @@ -380,7 +378,7 @@ describe('TimelockController', function () { ), ) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, EXECUTOR_ROLE); + .withArgs(this.other, EXECUTOR_ROLE); }); it('prevents reentrancy execution', async function () { @@ -457,7 +455,7 @@ describe('TimelockController', function () { .withArgs( nonReentrantOperation.id, 0n, - getAddress(nonReentrantOperation.target), + getAddress(nonReentrantOperation), nonReentrantOperation.value, nonReentrantOperation.data, ); @@ -587,7 +585,7 @@ describe('TimelockController', function () { ), ) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, PROPOSER_ROLE); + .withArgs(this.other, PROPOSER_ROLE); }); it('enforce minimum delay', async function () { @@ -725,7 +723,7 @@ describe('TimelockController', function () { ), ) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, EXECUTOR_ROLE); + .withArgs(this.other, EXECUTOR_ROLE); }); it('length mismatch #1', async function () { @@ -939,7 +937,7 @@ describe('TimelockController', function () { it('prevent non-canceller from canceling', async function () { await expect(this.mock.connect(this.other).cancel(this.operation.id)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, CANCELLER_ROLE); + .withArgs(this.other, CANCELLER_ROLE); }); }); }); @@ -948,7 +946,7 @@ describe('TimelockController', function () { it('prevent unauthorized maintenance', async function () { await expect(this.mock.connect(this.other).updateDelay(0n)) .to.be.revertedWithCustomError(this.mock, 'TimelockUnauthorizedCaller') - .withArgs(this.other.address); + .withArgs(this.other); }); it('timelock scheduled maintenance', async function () { diff --git a/test/governance/extensions/GovernorERC721.test.js b/test/governance/extensions/GovernorERC721.test.js index 0d2a33c73..1ae5508d7 100644 --- a/test/governance/extensions/GovernorERC721.test.js +++ b/test/governance/extensions/GovernorERC721.test.js @@ -3,7 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); +const { VoteType } = require('../../helpers/enums'); const TOKENS = [ { Token: '$ERC721Votes', mode: 'blocknumber' }, @@ -80,7 +80,7 @@ describe('GovernorERC721', function () { it('deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0n)).to.equal(0n); @@ -95,21 +95,21 @@ describe('GovernorERC721', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter1.address, this.proposal.id, Enums.VoteType.For, 1n, ''); + .withArgs(this.voter1, this.proposal.id, VoteType.For, 1n, ''); - await expect(this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter2).vote({ support: VoteType.For })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter2.address, this.proposal.id, Enums.VoteType.For, 2n, ''); + .withArgs(this.voter2, this.proposal.id, VoteType.For, 2n, ''); - await expect(this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against })) + await expect(this.helper.connect(this.voter3).vote({ support: VoteType.Against })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter3.address, this.proposal.id, Enums.VoteType.Against, 1n, ''); + .withArgs(this.voter3, this.proposal.id, VoteType.Against, 1n, ''); - await expect(this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain })) + await expect(this.helper.connect(this.voter4).vote({ support: VoteType.Abstain })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter4.address, this.proposal.id, Enums.VoteType.Abstain, 1n, ''); + .withArgs(this.voter4, this.proposal.id, VoteType.Abstain, 1n, ''); await this.helper.waitForDeadline(); await this.helper.execute(); diff --git a/test/governance/extensions/GovernorPreventLateQuorum.test.js b/test/governance/extensions/GovernorPreventLateQuorum.test.js index 8defa7014..aac0e6898 100644 --- a/test/governance/extensions/GovernorPreventLateQuorum.test.js +++ b/test/governance/extensions/GovernorPreventLateQuorum.test.js @@ -3,8 +3,8 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); -const { bigint: time } = require('../../helpers/time'); +const { ProposalState, VoteType } = require('../../helpers/enums'); +const time = require('../../helpers/time'); const TOKENS = [ { Token: '$ERC20Votes', mode: 'blocknumber' }, @@ -69,7 +69,7 @@ describe('GovernorPreventLateQuorum', function () { it('deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0)).to.equal(quorum); @@ -79,10 +79,10 @@ describe('GovernorPreventLateQuorum', function () { it('nominal workflow unaffected', async function () { const txPropose = await this.helper.connect(this.proposer).propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); - await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: VoteType.Abstain }); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -107,7 +107,7 @@ describe('GovernorPreventLateQuorum', function () { .to.emit(this.mock, 'ProposalCreated') .withArgs( this.proposal.id, - this.proposer.address, + this.proposer, this.proposal.targets, this.proposal.values, this.proposal.signatures, @@ -128,10 +128,10 @@ describe('GovernorPreventLateQuorum', function () { expect(await this.mock.proposalDeadline(this.proposal.id)).to.equal(deadlineTimepoint); // wait for the last minute to vote await this.helper.waitForDeadline(-1n); - const txVote = await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); + const txVote = await this.helper.connect(this.voter2).vote({ support: VoteType.For }); // cannot execute yet - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Active); // compute new extended schedule const extendedDeadline = (await time.clockFromReceipt[mode](txVote)) + lateQuorumVoteExtension; @@ -139,12 +139,12 @@ describe('GovernorPreventLateQuorum', function () { expect(await this.mock.proposalDeadline(this.proposal.id)).to.equal(extendedDeadline); // still possible to vote - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.Against }); + await this.helper.connect(this.voter1).vote({ support: VoteType.Against }); await this.helper.waitForDeadline(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Active); await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Defeated); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Defeated); // check extension event await expect(txVote).to.emit(this.mock, 'ProposalExtended').withArgs(this.proposal.id, extendedDeadline); @@ -154,7 +154,7 @@ describe('GovernorPreventLateQuorum', function () { it('setLateQuorumVoteExtension is protected', async function () { await expect(this.mock.connect(this.owner).setLateQuorumVoteExtension(0n)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can setLateQuorumVoteExtension through governance', async function () { @@ -170,7 +170,7 @@ describe('GovernorPreventLateQuorum', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()) diff --git a/test/governance/extensions/GovernorStorage.test.js b/test/governance/extensions/GovernorStorage.test.js index 911c32440..ef56fa53e 100644 --- a/test/governance/extensions/GovernorStorage.test.js +++ b/test/governance/extensions/GovernorStorage.test.js @@ -5,7 +5,7 @@ const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); const { GovernorHelper, timelockSalt } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); +const { VoteType } = require('../../helpers/enums'); const TOKENS = [ { Token: '$ERC20Votes', mode: 'blocknumber' }, @@ -120,10 +120,10 @@ describe('GovernorStorage', function () { it('queue and execute by id', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); - await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: VoteType.Abstain }); await this.helper.waitForDeadline(); await expect(this.mock.queue(this.proposal.id)) diff --git a/test/governance/extensions/GovernorTimelockAccess.test.js b/test/governance/extensions/GovernorTimelockAccess.test.js index a984a7f5e..f3300c726 100644 --- a/test/governance/extensions/GovernorTimelockAccess.test.js +++ b/test/governance/extensions/GovernorTimelockAccess.test.js @@ -4,11 +4,11 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); -const { bigint: time } = require('../../helpers/time'); +const { hashOperation } = require('../../helpers/access-manager'); const { max } = require('../../helpers/math'); const { selector } = require('../../helpers/methods'); -const { hashOperation } = require('../../helpers/access-manager'); +const { ProposalState, VoteType } = require('../../helpers/enums'); +const time = require('../../helpers/time'); function prepareOperation({ sender, target, value = 0n, data = '0x' }) { return { @@ -94,12 +94,12 @@ describe('GovernorTimelockAccess', function () { it('post deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0n)).to.equal(0n); - expect(await this.mock.accessManager()).to.equal(this.manager.target); + expect(await this.mock.accessManager()).to.equal(this.manager); }); it('sets base delay (seconds)', async function () { @@ -108,7 +108,7 @@ describe('GovernorTimelockAccess', function () { // Only through governance await expect(this.mock.connect(this.voter1).setBaseDelaySeconds(baseDelay)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.voter1.address); + .withArgs(this.voter1); this.proposal = await this.helper.setProposal( [ @@ -122,7 +122,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.emit(this.mock, 'BaseDelaySet').withArgs(0n, baseDelay); @@ -136,7 +136,7 @@ describe('GovernorTimelockAccess', function () { // Only through governance await expect(this.mock.connect(this.voter1).setAccessManagerIgnored(this.other, selectors, true)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.voter1.address); + .withArgs(this.voter1); // Ignore await this.helper.setProposal( @@ -154,14 +154,14 @@ describe('GovernorTimelockAccess', function () { ); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const ignoreReceipt = this.helper.execute(); for (const selector of selectors) { await expect(ignoreReceipt) .to.emit(this.mock, 'AccessManagerIgnoredSet') - .withArgs(this.other.address, selector, true); + .withArgs(this.other, selector, true); expect(await this.mock.isAccessManagerIgnored(this.other, selector)).to.be.true; } @@ -182,14 +182,14 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const unignoreReceipt = this.helper.execute(); for (const selector of selectors) { await expect(unignoreReceipt) .to.emit(this.mock, 'AccessManagerIgnoredSet') - .withArgs(this.other.address, selector, false); + .withArgs(this.other, selector, false); expect(await this.mock.isAccessManagerIgnored(this.other, selector)).to.be.false; } }); @@ -213,12 +213,12 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const tx = this.helper.execute(); for (const selector of selectors) { - await expect(tx).to.emit(this.mock, 'AccessManagerIgnoredSet').withArgs(this.mock.target, selector, true); + await expect(tx).to.emit(this.mock, 'AccessManagerIgnoredSet').withArgs(this.mock, selector, true); expect(await this.mock.isAccessManagerIgnored(this.mock, selector)).to.be.true; } }); @@ -365,7 +365,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); if (await this.mock.proposalNeedsQueuing(this.proposal.id)) { expect(await this.helper.queue()) @@ -391,7 +391,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await expect(this.helper.execute()) @@ -413,7 +413,7 @@ describe('GovernorTimelockAccess', function () { // Go through all the governance process await original.propose(); await original.waitForSnapshot(); - await original.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await original.connect(this.voter1).vote({ support: VoteType.For }); await original.waitForDeadline(); await original.queue(); await original.waitForEta(); @@ -428,7 +428,7 @@ describe('GovernorTimelockAccess', function () { await rescheduled.setProposal([this.restricted.operation], 'descr'); await rescheduled.propose(); await rescheduled.waitForSnapshot(); - await rescheduled.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await rescheduled.connect(this.voter1).vote({ support: VoteType.For }); await rescheduled.waitForDeadline(); await rescheduled.queue(); // This will schedule it again in the manager await rescheduled.waitForEta(); @@ -450,7 +450,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const txQueue = await this.helper.queue(); await this.helper.waitForEta(); @@ -494,7 +494,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const txQueue = await this.helper.queue(); await this.helper.waitForEta(); @@ -539,7 +539,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); @@ -555,8 +555,8 @@ describe('GovernorTimelockAccess', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -568,7 +568,7 @@ describe('GovernorTimelockAccess', function () { // Go through all the governance process await original.propose(); await original.waitForSnapshot(); - await original.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await original.connect(this.voter1).vote({ support: VoteType.For }); await original.waitForDeadline(); await original.queue(); @@ -584,7 +584,7 @@ describe('GovernorTimelockAccess', function () { // Queue the new proposal await rescheduled.propose(); await rescheduled.waitForSnapshot(); - await rescheduled.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await rescheduled.connect(this.voter1).vote({ support: VoteType.For }); await rescheduled.waitForDeadline(); await rescheduled.queue(); // This will schedule it again in the manager @@ -601,8 +601,8 @@ describe('GovernorTimelockAccess', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( original.currentProposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -611,7 +611,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); @@ -627,8 +627,8 @@ describe('GovernorTimelockAccess', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -637,7 +637,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.cancel('internal')) @@ -648,8 +648,8 @@ describe('GovernorTimelockAccess', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -668,7 +668,7 @@ describe('GovernorTimelockAccess', function () { for (const p of [proposal1, proposal2]) { await p.propose(); await p.waitForSnapshot(); - await p.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await p.connect(this.voter1).vote({ support: VoteType.For }); await p.waitForDeadline(); } @@ -717,13 +717,13 @@ describe('GovernorTimelockAccess', function () { it('internal setter', async function () { await expect(this.mock.$_setAccessManagerIgnored(this.receiver, this.restricted.selector, true)) .to.emit(this.mock, 'AccessManagerIgnoredSet') - .withArgs(this.receiver.target, this.restricted.selector, true); + .withArgs(this.receiver, this.restricted.selector, true); expect(await this.mock.isAccessManagerIgnored(this.receiver, this.restricted.selector)).to.be.true; await expect(this.mock.$_setAccessManagerIgnored(this.mock, '0x12341234', false)) .to.emit(this.mock, 'AccessManagerIgnoredSet') - .withArgs(this.mock.target, '0x12341234', false); + .withArgs(this.mock, '0x12341234', false); expect(await this.mock.isAccessManagerIgnored(this.mock, '0x12341234')).to.be.false; }); @@ -752,7 +752,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.emit(this.mock, 'AccessManagerIgnoredSet'); @@ -787,24 +787,22 @@ describe('GovernorTimelockAccess', function () { await this.helper.setProposal([{ target, data }], 'descr #1'); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.manager.target, 0n, amount); + .withArgs(this.manager, 0n, amount); await this.mock.$_setAccessManagerIgnored(target, selector, true); await this.helper.setProposal([{ target, data }], 'descr #2'); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); - await expect(this.helper.execute()) - .to.emit(this.token, 'Transfer') - .withArgs(this.mock.target, this.voter4.address, amount); + await expect(this.helper.execute()).to.emit(this.token, 'Transfer').withArgs(this.mock, this.voter4, amount); }); }); @@ -834,7 +832,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.setProposal([this.operation], `descr`); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -856,7 +854,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.setProposal([this.operation], `descr`); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); // Don't revert }); diff --git a/test/governance/extensions/GovernorTimelockCompound.test.js b/test/governance/extensions/GovernorTimelockCompound.test.js index ecc71dc09..545bf359d 100644 --- a/test/governance/extensions/GovernorTimelockCompound.test.js +++ b/test/governance/extensions/GovernorTimelockCompound.test.js @@ -4,8 +4,8 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); -const { bigint: time } = require('../../helpers/time'); +const { ProposalState, VoteType } = require('../../helpers/enums'); +const time = require('../../helpers/time'); const TOKENS = [ { Token: '$ERC20Votes', mode: 'blocknumber' }, @@ -81,13 +81,13 @@ describe('GovernorTimelockCompound', function () { it('post deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0n)).to.equal(0n); - expect(await this.mock.timelock()).to.equal(this.timelock.target); - expect(await this.timelock.admin()).to.equal(this.mock.target); + expect(await this.mock.timelock()).to.equal(this.timelock); + expect(await this.timelock.admin()).to.equal(this.mock); }); it('nominal', async function () { @@ -96,10 +96,10 @@ describe('GovernorTimelockCompound', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); - await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: VoteType.Abstain }); await this.helper.waitForDeadline(); const txQueue = await this.helper.queue(); @@ -129,15 +129,15 @@ describe('GovernorTimelockCompound', function () { it('if already queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await expect(this.helper.queue()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Queued, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ProposalState.Queued, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded]), ); }); @@ -150,7 +150,7 @@ describe('GovernorTimelockCompound', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.queue()) .to.be.revertedWithCustomError(this.mock, 'GovernorAlreadyQueuedProposal') @@ -165,10 +165,10 @@ describe('GovernorTimelockCompound', function () { it('if not queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Succeeded); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Succeeded); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorNotQueuedProposal') @@ -178,11 +178,11 @@ describe('GovernorTimelockCompound', function () { it('if too early', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Queued); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Queued); await expect(this.helper.execute()).to.be.rejectedWith( "Timelock::executeTransaction: Transaction hasn't surpassed time lock", @@ -192,26 +192,26 @@ describe('GovernorTimelockCompound', function () { it('if too late', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(time.duration.days(30)); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Expired); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Expired); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Expired, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Expired, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('if already executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -221,8 +221,8 @@ describe('GovernorTimelockCompound', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); }); @@ -281,28 +281,28 @@ describe('GovernorTimelockCompound', function () { it('cancel before queue prevents scheduling', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.cancel('internal')) .to.emit(this.mock, 'ProposalCanceled') .withArgs(this.proposal.id); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await expect(this.helper.queue()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded]), ); }); it('cancel after queue prevents executing', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); @@ -310,14 +310,14 @@ describe('GovernorTimelockCompound', function () { .to.emit(this.mock, 'ProposalCanceled') .withArgs(this.proposal.id); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); }); @@ -335,7 +335,7 @@ describe('GovernorTimelockCompound', function () { .relay(this.token, 0, this.token.interface.encodeFunctionData('transfer', [this.other.address, 1n])), ) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can be executed through governance', async function () { @@ -355,7 +355,7 @@ describe('GovernorTimelockCompound', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -364,7 +364,7 @@ describe('GovernorTimelockCompound', function () { await expect(txExecute).to.changeTokenBalances(this.token, [this.mock, this.other], [-1n, 1n]); - await expect(txExecute).to.emit(this.token, 'Transfer').withArgs(this.mock.target, this.other.address, 1n); + await expect(txExecute).to.emit(this.token, 'Transfer').withArgs(this.mock, this.other, 1n); }); }); @@ -376,7 +376,7 @@ describe('GovernorTimelockCompound', function () { it('is protected', async function () { await expect(this.mock.connect(this.owner).updateTimelock(this.newTimelock)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can be executed through governance to', async function () { @@ -396,16 +396,16 @@ describe('GovernorTimelockCompound', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); await expect(this.helper.execute()) .to.emit(this.mock, 'TimelockChange') - .withArgs(this.timelock.target, this.newTimelock.target); + .withArgs(this.timelock, this.newTimelock); - expect(await this.mock.timelock()).to.equal(this.newTimelock.target); + expect(await this.mock.timelock()).to.equal(this.newTimelock); }); }); @@ -432,15 +432,15 @@ describe('GovernorTimelockCompound', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); - await expect(this.helper.execute()).to.emit(this.timelock, 'NewPendingAdmin').withArgs(newGovernor.target); + await expect(this.helper.execute()).to.emit(this.timelock, 'NewPendingAdmin').withArgs(newGovernor); await newGovernor.__acceptAdmin(); - expect(await this.timelock.admin()).to.equal(newGovernor.target); + expect(await this.timelock.admin()).to.equal(newGovernor); }); }); }); diff --git a/test/governance/extensions/GovernorTimelockControl.test.js b/test/governance/extensions/GovernorTimelockControl.test.js index 71c2b188c..e492d854c 100644 --- a/test/governance/extensions/GovernorTimelockControl.test.js +++ b/test/governance/extensions/GovernorTimelockControl.test.js @@ -4,8 +4,8 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { GovernorHelper, timelockSalt } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); -const { bigint: time } = require('../../helpers/time'); +const { OperationState, ProposalState, VoteType } = require('../../helpers/enums'); +const time = require('../../helpers/time'); const TOKENS = [ { Token: '$ERC20Votes', mode: 'blocknumber' }, @@ -95,12 +95,12 @@ describe('GovernorTimelockControl', function () { it('post deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0n)).to.equal(0n); - expect(await this.mock.timelock()).to.equal(this.timelock.target); + expect(await this.mock.timelock()).to.equal(this.timelock); }); it('nominal', async function () { @@ -109,10 +109,10 @@ describe('GovernorTimelockControl', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); - await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: VoteType.Abstain }); await this.helper.waitForDeadline(); expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.true; @@ -145,15 +145,15 @@ describe('GovernorTimelockControl', function () { it('if already queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await expect(this.helper.queue()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Queued, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ProposalState.Queued, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded]), ); }); }); @@ -162,34 +162,34 @@ describe('GovernorTimelockControl', function () { it('if not queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Succeeded); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Succeeded); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.timelock, 'TimelockUnexpectedOperationState') - .withArgs(this.proposal.timelockid, GovernorHelper.proposalStatesToBitMap(Enums.OperationState.Ready)); + .withArgs(this.proposal.timelockid, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); }); it('if too early', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Queued); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Queued); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.timelock, 'TimelockUnexpectedOperationState') - .withArgs(this.proposal.timelockid, GovernorHelper.proposalStatesToBitMap(Enums.OperationState.Ready)); + .withArgs(this.proposal.timelockid, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); }); it('if already executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -199,15 +199,15 @@ describe('GovernorTimelockControl', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('if already executed by another proposer', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -222,8 +222,8 @@ describe('GovernorTimelockControl', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); }); @@ -233,28 +233,28 @@ describe('GovernorTimelockControl', function () { it('cancel before queue prevents scheduling', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.cancel('internal')) .to.emit(this.mock, 'ProposalCanceled') .withArgs(this.proposal.id); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await expect(this.helper.queue()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded]), ); }); it('cancel after queue prevents executing', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); @@ -262,31 +262,31 @@ describe('GovernorTimelockControl', function () { .to.emit(this.mock, 'ProposalCanceled') .withArgs(this.proposal.id); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('cancel on timelock is reflected on governor', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Queued); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Queued); await expect(this.timelock.connect(this.owner).cancel(this.proposal.timelockid)) .to.emit(this.timelock, 'Cancelled') .withArgs(this.proposal.timelockid); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); }); }); @@ -303,7 +303,7 @@ describe('GovernorTimelockControl', function () { .relay(this.token, 0n, this.token.interface.encodeFunctionData('transfer', [this.other.address, 1n])), ) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can be executed through governance', async function () { @@ -323,7 +323,7 @@ describe('GovernorTimelockControl', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -332,7 +332,7 @@ describe('GovernorTimelockControl', function () { await expect(txExecute).to.changeTokenBalances(this.token, [this.mock, this.other], [-1n, 1n]); - await expect(txExecute).to.emit(this.token, 'Transfer').withArgs(this.mock.target, this.other.address, 1n); + await expect(txExecute).to.emit(this.token, 'Transfer').withArgs(this.mock, this.other, 1n); }); it('is payable and can transfer eth to EOA', async function () { @@ -352,7 +352,7 @@ describe('GovernorTimelockControl', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -397,7 +397,7 @@ describe('GovernorTimelockControl', function () { it('is protected', async function () { await expect(this.mock.connect(this.owner).updateTimelock(this.newTimelock)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can be executed through governance to', async function () { @@ -413,16 +413,16 @@ describe('GovernorTimelockControl', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); await expect(this.helper.execute()) .to.emit(this.mock, 'TimelockChange') - .withArgs(this.timelock.target, this.newTimelock.target); + .withArgs(this.timelock, this.newTimelock); - expect(await this.mock.timelock()).to.equal(this.newTimelock.target); + expect(await this.mock.timelock()).to.equal(this.newTimelock); }); }); @@ -489,7 +489,7 @@ describe('GovernorTimelockControl', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); diff --git a/test/governance/extensions/GovernorVotesQuorumFraction.test.js b/test/governance/extensions/GovernorVotesQuorumFraction.test.js index cae4c76f0..db728f0a6 100644 --- a/test/governance/extensions/GovernorVotesQuorumFraction.test.js +++ b/test/governance/extensions/GovernorVotesQuorumFraction.test.js @@ -3,8 +3,8 @@ const { expect } = require('chai'); const { loadFixture, mine } = require('@nomicfoundation/hardhat-network-helpers'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); -const { bigint: time } = require('../../helpers/time'); +const { ProposalState, VoteType } = require('../../helpers/enums'); +const time = require('../../helpers/time'); const TOKENS = [ { Token: '$ERC20Votes', mode: 'blocknumber' }, @@ -63,7 +63,7 @@ describe('GovernorVotesQuorumFraction', function () { it('deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0)).to.equal(0n); @@ -77,7 +77,7 @@ describe('GovernorVotesQuorumFraction', function () { it('quroum reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); }); @@ -85,14 +85,14 @@ describe('GovernorVotesQuorumFraction', function () { it('quroum not reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Defeated, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Defeated, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -100,7 +100,7 @@ describe('GovernorVotesQuorumFraction', function () { it('updateQuorumNumerator is protected', async function () { await expect(this.mock.connect(this.owner).updateQuorumNumerator(newRatio)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can updateQuorumNumerator through governance', async function () { @@ -116,7 +116,7 @@ describe('GovernorVotesQuorumFraction', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.emit(this.mock, 'QuorumNumeratorUpdated').withArgs(ratio, newRatio); @@ -150,7 +150,7 @@ describe('GovernorVotesQuorumFraction', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const quorumDenominator = await this.mock.quorumDenominator(); diff --git a/test/governance/extensions/GovernorWithParams.test.js b/test/governance/extensions/GovernorWithParams.test.js index 194a8aa6f..37e15f5c2 100644 --- a/test/governance/extensions/GovernorWithParams.test.js +++ b/test/governance/extensions/GovernorWithParams.test.js @@ -3,7 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); +const { VoteType } = require('../../helpers/enums'); const { getDomain, ExtendedBallot } = require('../../helpers/eip712'); const TOKENS = [ @@ -65,7 +65,7 @@ describe('GovernorWithParams', function () { it('deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); }); @@ -73,10 +73,10 @@ describe('GovernorWithParams', function () { it('nominal is unaffected', async function () { await this.helper.connect(this.proposer).propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For, reason: 'This is nice' }); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); - await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For, reason: 'This is nice' }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: VoteType.Abstain }); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -95,7 +95,7 @@ describe('GovernorWithParams', function () { await expect( this.helper.connect(this.voter2).vote({ - support: Enums.VoteType.For, + support: VoteType.For, reason: 'no particular reason', params: params.encoded, }), @@ -106,7 +106,7 @@ describe('GovernorWithParams', function () { .withArgs( this.voter2.address, this.proposal.id, - Enums.VoteType.For, + VoteType.For, weight, 'no particular reason', params.encoded, @@ -128,7 +128,7 @@ describe('GovernorWithParams', function () { const nonce = await this.mock.nonces(this.other); const data = { proposalId: this.proposal.id, - support: Enums.VoteType.For, + support: VoteType.For, voter: this.other.address, nonce, reason: 'no particular reason', @@ -161,7 +161,7 @@ describe('GovernorWithParams', function () { const nonce = await this.mock.nonces(this.other); const data = { proposalId: this.proposal.id, - support: Enums.VoteType.For, + support: VoteType.For, voter: wallet.target, nonce, reason: 'no particular reason', @@ -192,7 +192,7 @@ describe('GovernorWithParams', function () { const nonce = await this.mock.nonces(this.other); const data = { proposalId: this.proposal.id, - support: Enums.VoteType.For, + support: VoteType.For, voter: this.other.address, nonce, reason: 'no particular reason', @@ -225,7 +225,7 @@ describe('GovernorWithParams', function () { const nonce = await this.mock.nonces(this.other); const data = { proposalId: this.proposal.id, - support: Enums.VoteType.For, + support: VoteType.For, voter: this.other.address, nonce: nonce + 1n, reason: 'no particular reason', diff --git a/test/governance/utils/ERC6372.behavior.js b/test/governance/utils/ERC6372.behavior.js index b5a6cb13c..abcae43c7 100644 --- a/test/governance/utils/ERC6372.behavior.js +++ b/test/governance/utils/ERC6372.behavior.js @@ -1,4 +1,6 @@ -const { bigint: time } = require('../../helpers/time'); +const { expect } = require('chai'); + +const time = require('../../helpers/time'); function shouldBehaveLikeERC6372(mode = 'blocknumber') { describe('should implement ERC-6372', function () { diff --git a/test/governance/utils/Votes.behavior.js b/test/governance/utils/Votes.behavior.js index be3a87db5..099770132 100644 --- a/test/governance/utils/Votes.behavior.js +++ b/test/governance/utils/Votes.behavior.js @@ -3,7 +3,7 @@ const { expect } = require('chai'); const { mine } = require('@nomicfoundation/hardhat-network-helpers'); const { getDomain, Delegation } = require('../../helpers/eip712'); -const { bigint: time } = require('../../helpers/time'); +const time = require('../../helpers/time'); const { shouldBehaveLikeERC6372 } = require('./ERC6372.behavior'); @@ -30,10 +30,10 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await expect(this.votes.connect(this.alice).delegate(this.alice)) .to.emit(this.votes, 'DelegateChanged') - .withArgs(this.alice.address, ethers.ZeroAddress, this.alice.address) + .withArgs(this.alice, ethers.ZeroAddress, this.alice) .to.not.emit(this.votes, 'DelegateVotesChanged'); - expect(await this.votes.delegates(this.alice)).to.equal(this.alice.address); + expect(await this.votes.delegates(this.alice)).to.equal(this.alice); }); it('delegation with tokens', async function () { @@ -47,11 +47,11 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await expect(tx) .to.emit(this.votes, 'DelegateChanged') - .withArgs(this.alice.address, ethers.ZeroAddress, this.alice.address) + .withArgs(this.alice, ethers.ZeroAddress, this.alice) .to.emit(this.votes, 'DelegateVotesChanged') - .withArgs(this.alice.address, 0n, weight); + .withArgs(this.alice, 0n, weight); - expect(await this.votes.delegates(this.alice)).to.equal(this.alice.address); + expect(await this.votes.delegates(this.alice)).to.equal(this.alice); expect(await this.votes.getVotes(this.alice)).to.equal(weight); expect(await this.votes.getPastVotes(this.alice, timepoint - 1n)).to.equal(0n); await mine(); @@ -63,7 +63,7 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await this.votes.$_mint(this.alice, token); const weight = getWeight(token); - expect(await this.votes.delegates(this.alice)).to.equal(this.alice.address); + expect(await this.votes.delegates(this.alice)).to.equal(this.alice); expect(await this.votes.getVotes(this.alice)).to.equal(weight); expect(await this.votes.getVotes(this.bob)).to.equal(0); @@ -72,13 +72,13 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await expect(tx) .to.emit(this.votes, 'DelegateChanged') - .withArgs(this.alice.address, this.alice.address, this.bob.address) + .withArgs(this.alice, this.alice, this.bob) .to.emit(this.votes, 'DelegateVotesChanged') - .withArgs(this.alice.address, weight, 0) + .withArgs(this.alice, weight, 0) .to.emit(this.votes, 'DelegateVotesChanged') - .withArgs(this.bob.address, 0, weight); + .withArgs(this.bob, 0, weight); - expect(await this.votes.delegates(this.alice)).to.equal(this.bob.address); + expect(await this.votes.delegates(this.alice)).to.equal(this.bob); expect(await this.votes.getVotes(this.alice)).to.equal(0n); expect(await this.votes.getVotes(this.bob)).to.equal(weight); @@ -93,7 +93,7 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } const nonce = 0n; it('accept signed delegation', async function () { - await this.votes.$_mint(this.delegator.address, token); + await this.votes.$_mint(this.delegator, token); const weight = getWeight(token); const { r, s, v } = await this.delegator @@ -108,18 +108,18 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } ) .then(ethers.Signature.from); - expect(await this.votes.delegates(this.delegator.address)).to.equal(ethers.ZeroAddress); + expect(await this.votes.delegates(this.delegator)).to.equal(ethers.ZeroAddress); const tx = await this.votes.delegateBySig(this.delegatee, nonce, ethers.MaxUint256, v, r, s); const timepoint = await time.clockFromReceipt[mode](tx); await expect(tx) .to.emit(this.votes, 'DelegateChanged') - .withArgs(this.delegator.address, ethers.ZeroAddress, this.delegatee.address) + .withArgs(this.delegator, ethers.ZeroAddress, this.delegatee) .to.emit(this.votes, 'DelegateVotesChanged') - .withArgs(this.delegatee.address, 0, weight); + .withArgs(this.delegatee, 0, weight); - expect(await this.votes.delegates(this.delegator.address)).to.equal(this.delegatee.address); + expect(await this.votes.delegates(this.delegator.address)).to.equal(this.delegatee); expect(await this.votes.getVotes(this.delegator.address)).to.equal(0n); expect(await this.votes.getVotes(this.delegatee)).to.equal(weight); expect(await this.votes.getPastVotes(this.delegatee, timepoint - 1n)).to.equal(0n); @@ -144,7 +144,7 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await expect(this.votes.delegateBySig(this.delegatee, nonce, ethers.MaxUint256, v, r, s)) .to.be.revertedWithCustomError(this.votes, 'InvalidAccountNonce') - .withArgs(this.delegator.address, nonce + 1n); + .withArgs(this.delegator, nonce + 1n); }); it('rejects bad delegatee', async function () { @@ -167,9 +167,9 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } log => this.votes.interface.parseLog(log)?.name === 'DelegateChanged', ); const { args } = this.votes.interface.parseLog(delegateChanged); - expect(args.delegator).to.not.be.equal(this.delegator.address); + expect(args.delegator).to.not.be.equal(this.delegator); expect(args.fromDelegate).to.equal(ethers.ZeroAddress); - expect(args.toDelegate).to.equal(this.other.address); + expect(args.toDelegate).to.equal(this.other); }); it('rejects bad nonce', async function () { @@ -187,7 +187,7 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await expect(this.votes.delegateBySig(this.delegatee, nonce + 1n, ethers.MaxUint256, v, r, s)) .to.be.revertedWithCustomError(this.votes, 'InvalidAccountNonce') - .withArgs(this.delegator.address, 0); + .withArgs(this.delegator, 0); }); it('rejects expired permit', async function () { diff --git a/test/governance/utils/Votes.test.js b/test/governance/utils/Votes.test.js index c133609bc..7acacfc66 100644 --- a/test/governance/utils/Votes.test.js +++ b/test/governance/utils/Votes.test.js @@ -4,7 +4,7 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { sum } = require('../../helpers/math'); const { zip } = require('../../helpers/iterate'); -const { bigint: time } = require('../../helpers/time'); +const time = require('../../helpers/time'); const { shouldBehaveLikeVotes } = require('./Votes.behavior'); @@ -71,7 +71,7 @@ describe('Votes', function () { expect(await this.votes.getVotes(this.accounts[0])).to.equal(this.amounts[this.accounts[0].address]); expect(await this.votes.getVotes(this.accounts[1])).to.equal(0n); - expect(await this.votes.delegates(this.accounts[0])).to.equal(this.accounts[0].address); + expect(await this.votes.delegates(this.accounts[0])).to.equal(this.accounts[0]); expect(await this.votes.delegates(this.accounts[1])).to.equal(ethers.ZeroAddress); await this.votes.delegate(this.accounts[1], ethers.Typed.address(this.accounts[0])); @@ -80,13 +80,13 @@ describe('Votes', function () { this.amounts[this.accounts[0].address] + this.amounts[this.accounts[1].address], ); expect(await this.votes.getVotes(this.accounts[1])).to.equal(0n); - expect(await this.votes.delegates(this.accounts[0])).to.equal(this.accounts[0].address); - expect(await this.votes.delegates(this.accounts[1])).to.equal(this.accounts[0].address); + expect(await this.votes.delegates(this.accounts[0])).to.equal(this.accounts[0]); + expect(await this.votes.delegates(this.accounts[1])).to.equal(this.accounts[0]); }); it('cross delegates', async function () { - await this.votes.delegate(this.accounts[0], ethers.Typed.address(this.accounts[1].address)); - await this.votes.delegate(this.accounts[1], ethers.Typed.address(this.accounts[0].address)); + await this.votes.delegate(this.accounts[0], ethers.Typed.address(this.accounts[1])); + await this.votes.delegate(this.accounts[1], ethers.Typed.address(this.accounts[0])); expect(await this.votes.getVotes(this.accounts[0])).to.equal(this.amounts[this.accounts[1].address]); expect(await this.votes.getVotes(this.accounts[1])).to.equal(this.amounts[this.accounts[0].address]); diff --git a/test/helpers/access-manager.js b/test/helpers/access-manager.js index e08b48d4e..3b8343059 100644 --- a/test/helpers/access-manager.js +++ b/test/helpers/access-manager.js @@ -1,7 +1,8 @@ const { ethers } = require('hardhat'); + const { MAX_UINT64 } = require('./constants'); -const { namespaceSlot } = require('./namespaced-storage'); -const { bigint: time } = require('./time'); +const time = require('./time'); +const { upgradeableSlot } = require('./storage'); function buildBaseRoles() { const roles = { @@ -45,8 +46,8 @@ const formatAccess = access => [access[0], access[1].toString()]; const MINSETBACK = time.duration.days(5); const EXPIRATION = time.duration.weeks(1); -const EXECUTION_ID_STORAGE_SLOT = namespaceSlot('AccessManager', 3n); -const CONSUMING_SCHEDULE_STORAGE_SLOT = namespaceSlot('AccessManaged', 0n); +const EXECUTION_ID_STORAGE_SLOT = upgradeableSlot('AccessManager', 3n); +const CONSUMING_SCHEDULE_STORAGE_SLOT = upgradeableSlot('AccessManaged', 0n); /** * @requires this.{manager, caller, target, calldata} diff --git a/test/helpers/chainid.js b/test/helpers/chainid.js deleted file mode 100644 index e8181d55c..000000000 --- a/test/helpers/chainid.js +++ /dev/null @@ -1,6 +0,0 @@ -const { ethers } = require('hardhat'); - -module.exports = { - // TODO: remove conversion toNumber() when bigint are supported - getChainId: () => ethers.provider.getNetwork().then(network => ethers.toNumber(network.chainId)), -}; diff --git a/test/helpers/eip712.js b/test/helpers/eip712.js index 278e86cce..3843ac026 100644 --- a/test/helpers/eip712.js +++ b/test/helpers/eip712.js @@ -1,4 +1,4 @@ -const { ethers } = require('ethers'); +const { ethers } = require('hardhat'); const types = require('./eip712-types'); async function getDomain(contract) { @@ -11,8 +11,7 @@ async function getDomain(contract) { const domain = { name, version, - // TODO: remove check when contracts are all migrated to ethers - chainId: web3.utils.isBN(chainId) ? chainId.toNumber() : chainId, + chainId, verifyingContract, salt, }; diff --git a/test/helpers/enums.js b/test/helpers/enums.js index 9a5d6b263..bb237796a 100644 --- a/test/helpers/enums.js +++ b/test/helpers/enums.js @@ -1,22 +1,12 @@ function Enum(...options) { - return Object.fromEntries(options.map((key, i) => [key, web3.utils.toBN(i)])); -} - -function EnumBigInt(...options) { return Object.fromEntries(options.map((key, i) => [key, BigInt(i)])); } -// TODO: remove web3, simplify code -function createExport(Enum) { - return { - Enum, - ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), - VoteType: Enum('Against', 'For', 'Abstain'), - Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), - OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), - RevertType: Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'), - }; -} - -module.exports = createExport(Enum); -module.exports.bigint = createExport(EnumBigInt); +module.exports = { + Enum, + ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), + VoteType: Enum('Against', 'For', 'Abstain'), + Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), + OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), + RevertType: Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'), +}; diff --git a/test/helpers/governance.js b/test/helpers/governance.js index 0efb3da5c..cc219323b 100644 --- a/test/helpers/governance.js +++ b/test/helpers/governance.js @@ -172,7 +172,7 @@ class GovernorHelper { if (!Array.isArray(proposalStates)) { proposalStates = [proposalStates]; } - const statesCount = BigInt(Object.keys(ProposalState).length); + const statesCount = ethers.toBigInt(Object.keys(ProposalState).length); let result = 0n; for (const state of unique(...proposalStates)) { diff --git a/test/helpers/math.js b/test/helpers/math.js index 708990519..f8a1520ee 100644 --- a/test/helpers/math.js +++ b/test/helpers/math.js @@ -4,10 +4,7 @@ const min = (...values) => values.slice(1).reduce((x, y) => (x < y ? x : y), val const sum = (...values) => values.slice(1).reduce((x, y) => x + y, values.at(0)); module.exports = { - // re-export min, max & sum of integer / bignumber min, max, sum, - // deprecated: BN version of sum - BNsum: (...args) => args.slice(1).reduce((x, y) => x.add(y), args.at(0)), }; diff --git a/test/helpers/namespaced-storage.js b/test/helpers/namespaced-storage.js deleted file mode 100644 index eccec3b52..000000000 --- a/test/helpers/namespaced-storage.js +++ /dev/null @@ -1,22 +0,0 @@ -const { ethers, artifacts } = require('hardhat'); -const { erc7201slot } = require('./erc1967'); - -function namespaceId(contractName) { - return `openzeppelin.storage.${contractName}`; -} - -function namespaceSlot(contractName, offset) { - try { - // Try to get the artifact paths, will throw if it doesn't exist - artifacts._getArtifactPathSync(`${contractName}Upgradeable`); - return offset + ethers.toBigInt(erc7201slot(namespaceId(contractName))); - } catch (_) { - return offset; - } -} - -module.exports = { - namespaceSlot, - namespaceLocation: erc7201slot, - namespaceId, -}; diff --git a/test/helpers/erc1967.js b/test/helpers/storage.js similarity index 66% rename from test/helpers/erc1967.js rename to test/helpers/storage.js index 88a87d661..2b6882002 100644 --- a/test/helpers/erc1967.js +++ b/test/helpers/storage.js @@ -1,5 +1,5 @@ const { ethers } = require('hardhat'); -const { getStorageAt, setStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); +const { setStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); const ImplementationLabel = 'eip1967.proxy.implementation'; const AdminLabel = 'eip1967.proxy.admin'; @@ -7,11 +7,10 @@ const BeaconLabel = 'eip1967.proxy.beacon'; const erc1967slot = label => ethers.toBeHex(ethers.toBigInt(ethers.id(label)) - 1n); const erc7201slot = label => ethers.toBeHex(ethers.toBigInt(ethers.keccak256(erc1967slot(label))) & ~0xffn); +const erc7201format = contractName => `openzeppelin.storage.${contractName}`; const getSlot = (address, slot) => - (ethers.isAddressable(address) ? address.getAddress() : Promise.resolve(address)).then(address => - getStorageAt(address, ethers.isBytesLike(slot) ? slot : erc1967slot(slot)), - ); + ethers.provider.getStorage(address, ethers.isBytesLike(slot) ? slot : erc1967slot(slot)); const setSlot = (address, slot, value) => Promise.all([ @@ -22,6 +21,16 @@ const setSlot = (address, slot, value) => const getAddressInSlot = (address, slot) => getSlot(address, slot).then(slotValue => ethers.AbiCoder.defaultAbiCoder().decode(['address'], slotValue)[0]); +const upgradeableSlot = (contractName, offset) => { + try { + // Try to get the artifact paths, will throw if it doesn't exist + artifacts._getArtifactPathSync(`${contractName}Upgradeable`); + return offset + ethers.toBigInt(erc7201slot(erc7201format(contractName))); + } catch (_) { + return offset; + } +}; + module.exports = { ImplementationLabel, AdminLabel, @@ -31,7 +40,9 @@ module.exports = { BeaconSlot: erc1967slot(BeaconLabel), erc1967slot, erc7201slot, + erc7201format, setSlot, getSlot, getAddressInSlot, + upgradeableSlot, }; diff --git a/test/helpers/time.js b/test/helpers/time.js index db72f2063..f6ccc3cab 100644 --- a/test/helpers/time.js +++ b/test/helpers/time.js @@ -3,12 +3,12 @@ const { time, mine, mineUpTo } = require('@nomicfoundation/hardhat-network-helpe const { mapValues } = require('./iterate'); const clock = { - blocknumber: () => time.latestBlock(), - timestamp: () => time.latest(), + blocknumber: () => time.latestBlock().then(ethers.toBigInt), + timestamp: () => time.latest().then(ethers.toBigInt), }; const clockFromReceipt = { - blocknumber: receipt => Promise.resolve(receipt.blockNumber), - timestamp: receipt => ethers.provider.getBlock(receipt.blockNumber).then(block => block.timestamp), + blocknumber: receipt => Promise.resolve(ethers.toBigInt(receipt.blockNumber)), + timestamp: receipt => ethers.provider.getBlock(receipt.blockNumber).then(block => ethers.toBigInt(block.timestamp)), }; const increaseBy = { blockNumber: mine, @@ -19,7 +19,7 @@ const increaseTo = { blocknumber: mineUpTo, timestamp: (to, mine = true) => (mine ? time.increaseTo(to) : time.setNextBlockTimestamp(to)), }; -const duration = time.duration; +const duration = mapValues(time.duration, fn => n => ethers.toBigInt(fn(ethers.toNumber(n)))); module.exports = { clock, @@ -28,12 +28,3 @@ module.exports = { increaseTo, duration, }; - -// TODO: deprecate the old version in favor of this one -module.exports.bigint = { - clock: mapValues(clock, fn => () => fn().then(ethers.toBigInt)), - clockFromReceipt: mapValues(clockFromReceipt, fn => receipt => fn(receipt).then(ethers.toBigInt)), - increaseBy: increaseBy, - increaseTo: increaseTo, - duration: mapValues(duration, fn => n => ethers.toBigInt(fn(ethers.toNumber(n)))), -}; diff --git a/test/helpers/txpool.js b/test/helpers/txpool.js index b6e960c10..f01327b22 100644 --- a/test/helpers/txpool.js +++ b/test/helpers/txpool.js @@ -1,5 +1,7 @@ const { network } = require('hardhat'); +const { expect } = require('chai'); const { mine } = require('@nomicfoundation/hardhat-network-helpers'); + const { unique } = require('./iterate'); async function batchInBlock(txs) { diff --git a/test/metatx/ERC2771Context.test.js b/test/metatx/ERC2771Context.test.js index 07c4ff335..2b69a486c 100644 --- a/test/metatx/ERC2771Context.test.js +++ b/test/metatx/ERC2771Context.test.js @@ -30,7 +30,7 @@ describe('ERC2771Context', function () { }); it('returns the trusted forwarder', async function () { - expect(await this.context.trustedForwarder()).to.equal(this.forwarder.target); + expect(await this.context.trustedForwarder()).to.equal(this.forwarder); }); describe('when called directly', function () { @@ -57,14 +57,14 @@ describe('ERC2771Context', function () { expect(await this.forwarder.verify(req)).to.equal(true); - await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender.address); + await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender); }); it('returns the original sender when calldata length is less than 20 bytes (address length)', async function () { // The forwarder doesn't produce calls with calldata length less than 20 bytes so `this.forwarderAsSigner` is used instead. await expect(this.context.connect(this.forwarderAsSigner).msgSender()) .to.emit(this.context, 'Sender') - .withArgs(this.forwarder.target); + .withArgs(this.forwarder); }); }); @@ -128,6 +128,6 @@ describe('ERC2771Context', function () { expect(await this.forwarder.verify(req)).to.equal(true); - await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender.address); + await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender); }); }); diff --git a/test/metatx/ERC2771Forwarder.test.js b/test/metatx/ERC2771Forwarder.test.js index 3bf264530..5bd0bf404 100644 --- a/test/metatx/ERC2771Forwarder.test.js +++ b/test/metatx/ERC2771Forwarder.test.js @@ -3,8 +3,8 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { getDomain, ForwardRequest } = require('../helpers/eip712'); -const { bigint: time } = require('../helpers/time'); const { sum } = require('../helpers/math'); +const time = require('../helpers/time'); async function fixture() { const [sender, refundReceiver, another, ...accounts] = await ethers.getSigners(); @@ -140,7 +140,7 @@ describe('ERC2771Forwarder', function () { } else { await expect(promise) .to.be.revertedWithCustomError(this.forwarder, 'ERC2771UntrustfulTarget') - .withArgs(request.to, this.forwarder.target); + .withArgs(request.to, this.forwarder); } }); } @@ -299,7 +299,7 @@ describe('ERC2771Forwarder', function () { } else { await expect(promise) .to.be.revertedWithCustomError(this.forwarder, 'ERC2771UntrustfulTarget') - .withArgs(this.requests[idx].to, this.forwarder.target); + .withArgs(this.requests[idx].to, this.forwarder); } }); } diff --git a/test/proxy/ERC1967/ERC1967Utils.test.js b/test/proxy/ERC1967/ERC1967Utils.test.js index f733e297f..089032498 100644 --- a/test/proxy/ERC1967/ERC1967Utils.test.js +++ b/test/proxy/ERC1967/ERC1967Utils.test.js @@ -2,7 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { getAddressInSlot, setSlot, ImplementationSlot, AdminSlot, BeaconSlot } = require('../../helpers/erc1967'); +const { getAddressInSlot, setSlot, ImplementationSlot, AdminSlot, BeaconSlot } = require('../../helpers/storage'); async function fixture() { const [, admin, anotherAccount] = await ethers.getSigners(); @@ -26,8 +26,8 @@ describe('ERC1967Utils', function () { describe('getImplementation', function () { it('returns current implementation and matches implementation slot value', async function () { - expect(await this.utils.$getImplementation()).to.equal(this.v1.target); - expect(await getAddressInSlot(this.utils, ImplementationSlot)).to.equal(this.v1.target); + expect(await this.utils.$getImplementation()).to.equal(this.v1); + expect(await getAddressInSlot(this.utils, ImplementationSlot)).to.equal(this.v1); }); }); @@ -36,14 +36,14 @@ describe('ERC1967Utils', function () { const newImplementation = this.v2; const tx = await this.utils.$upgradeToAndCall(newImplementation, '0x'); - expect(await getAddressInSlot(this.utils, ImplementationSlot)).to.equal(newImplementation.target); - await expect(tx).to.emit(this.utils, 'Upgraded').withArgs(newImplementation.target); + expect(await getAddressInSlot(this.utils, ImplementationSlot)).to.equal(newImplementation); + await expect(tx).to.emit(this.utils, 'Upgraded').withArgs(newImplementation); }); it('reverts when implementation does not contain code', async function () { await expect(this.utils.$upgradeToAndCall(this.anotherAccount, '0x')) .to.be.revertedWithCustomError(this.utils, 'ERC1967InvalidImplementation') - .withArgs(this.anotherAccount.address); + .withArgs(this.anotherAccount); }); describe('when data is empty', function () { @@ -72,8 +72,8 @@ describe('ERC1967Utils', function () { describe('getAdmin', function () { it('returns current admin and matches admin slot value', async function () { - expect(await this.utils.$getAdmin()).to.equal(this.admin.address); - expect(await getAddressInSlot(this.utils, AdminSlot)).to.equal(this.admin.address); + expect(await this.utils.$getAdmin()).to.equal(this.admin); + expect(await getAddressInSlot(this.utils, AdminSlot)).to.equal(this.admin); }); }); @@ -82,8 +82,8 @@ describe('ERC1967Utils', function () { const newAdmin = this.anotherAccount; const tx = await this.utils.$changeAdmin(newAdmin); - expect(await getAddressInSlot(this.utils, AdminSlot)).to.equal(newAdmin.address); - await expect(tx).to.emit(this.utils, 'AdminChanged').withArgs(this.admin.address, newAdmin.address); + expect(await getAddressInSlot(this.utils, AdminSlot)).to.equal(newAdmin); + await expect(tx).to.emit(this.utils, 'AdminChanged').withArgs(this.admin, newAdmin); }); it('reverts when setting the address zero as admin', async function () { @@ -102,8 +102,8 @@ describe('ERC1967Utils', function () { describe('getBeacon', function () { it('returns current beacon and matches beacon slot value', async function () { - expect(await this.utils.$getBeacon()).to.equal(this.beacon.target); - expect(await getAddressInSlot(this.utils, BeaconSlot)).to.equal(this.beacon.target); + expect(await this.utils.$getBeacon()).to.equal(this.beacon); + expect(await getAddressInSlot(this.utils, BeaconSlot)).to.equal(this.beacon); }); }); @@ -112,14 +112,14 @@ describe('ERC1967Utils', function () { const newBeacon = await ethers.deployContract('UpgradeableBeaconMock', [this.v2]); const tx = await this.utils.$upgradeBeaconToAndCall(newBeacon, '0x'); - expect(await getAddressInSlot(this.utils, BeaconSlot)).to.equal(newBeacon.target); - await expect(tx).to.emit(this.utils, 'BeaconUpgraded').withArgs(newBeacon.target); + expect(await getAddressInSlot(this.utils, BeaconSlot)).to.equal(newBeacon); + await expect(tx).to.emit(this.utils, 'BeaconUpgraded').withArgs(newBeacon); }); it('reverts when beacon does not contain code', async function () { await expect(this.utils.$upgradeBeaconToAndCall(this.anotherAccount, '0x')) .to.be.revertedWithCustomError(this.utils, 'ERC1967InvalidBeacon') - .withArgs(this.anotherAccount.address); + .withArgs(this.anotherAccount); }); it("reverts when beacon's implementation does not contain code", async function () { @@ -127,7 +127,7 @@ describe('ERC1967Utils', function () { await expect(this.utils.$upgradeBeaconToAndCall(newBeacon, '0x')) .to.be.revertedWithCustomError(this.utils, 'ERC1967InvalidImplementation') - .withArgs(this.anotherAccount.address); + .withArgs(this.anotherAccount); }); describe('when data is empty', function () { @@ -154,7 +154,7 @@ describe('ERC1967Utils', function () { const newBeacon = await ethers.deployContract('UpgradeableBeaconReentrantMock'); await expect(this.utils.$upgradeBeaconToAndCall(newBeacon, '0x')) .to.be.revertedWithCustomError(newBeacon, 'BeaconProxyBeaconSlotAddress') - .withArgs(newBeacon.target); + .withArgs(newBeacon); }); }); }); diff --git a/test/proxy/Proxy.behaviour.js b/test/proxy/Proxy.behaviour.js index 84cd93b51..e81d7a518 100644 --- a/test/proxy/Proxy.behaviour.js +++ b/test/proxy/Proxy.behaviour.js @@ -1,19 +1,19 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { getAddressInSlot, ImplementationSlot } = require('../helpers/erc1967'); +const { getAddressInSlot, ImplementationSlot } = require('../helpers/storage'); module.exports = function shouldBehaveLikeProxy() { it('cannot be initialized with a non-contract address', async function () { const initializeData = '0x'; await expect(this.createProxy(this.nonContractAddress, initializeData)) .to.be.revertedWithCustomError(await ethers.getContractFactory('ERC1967Proxy'), 'ERC1967InvalidImplementation') - .withArgs(this.nonContractAddress.address); + .withArgs(this.nonContractAddress); }); const assertProxyInitialization = function ({ value, balance }) { it('sets the implementation address', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.implementation.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.implementation); }); it('initializes the proxy', async function () { diff --git a/test/proxy/beacon/BeaconProxy.test.js b/test/proxy/beacon/BeaconProxy.test.js index 66856ac08..68387d1f6 100644 --- a/test/proxy/beacon/BeaconProxy.test.js +++ b/test/proxy/beacon/BeaconProxy.test.js @@ -1,7 +1,8 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { getAddressInSlot, BeaconSlot } = require('../../helpers/erc1967'); + +const { getAddressInSlot, BeaconSlot } = require('../../helpers/storage'); async function fixture() { const [admin, other] = await ethers.getSigners(); @@ -27,7 +28,7 @@ describe('BeaconProxy', function () { await expect(this.newBeaconProxy(notBeacon, '0x')) .to.be.revertedWithCustomError(this.factory, 'ERC1967InvalidBeacon') - .withArgs(notBeacon.address); + .withArgs(notBeacon); }); it('non-compliant beacon', async function () { @@ -48,7 +49,7 @@ describe('BeaconProxy', function () { describe('initialization', function () { async function assertInitialized({ value, balance }) { const beaconAddress = await getAddressInSlot(this.proxy, BeaconSlot); - expect(beaconAddress).to.equal(this.beacon.target); + expect(beaconAddress).to.equal(this.beacon); const dummy = this.v1.attach(this.proxy); expect(await dummy.value()).to.equal(value); diff --git a/test/proxy/beacon/UpgradeableBeacon.test.js b/test/proxy/beacon/UpgradeableBeacon.test.js index be6aca754..1a7224f00 100644 --- a/test/proxy/beacon/UpgradeableBeacon.test.js +++ b/test/proxy/beacon/UpgradeableBeacon.test.js @@ -20,36 +20,36 @@ describe('UpgradeableBeacon', function () { it('cannot be created with non-contract implementation', async function () { await expect(ethers.deployContract('UpgradeableBeacon', [this.other, this.admin])) .to.be.revertedWithCustomError(this.beacon, 'BeaconInvalidImplementation') - .withArgs(this.other.address); + .withArgs(this.other); }); describe('once deployed', async function () { it('emits Upgraded event to the first implementation', async function () { - await expect(this.beacon.deploymentTransaction()).to.emit(this.beacon, 'Upgraded').withArgs(this.v1.target); + await expect(this.beacon.deploymentTransaction()).to.emit(this.beacon, 'Upgraded').withArgs(this.v1); }); it('returns implementation', async function () { - expect(await this.beacon.implementation()).to.equal(this.v1.target); + expect(await this.beacon.implementation()).to.equal(this.v1); }); it('can be upgraded by the admin', async function () { await expect(this.beacon.connect(this.admin).upgradeTo(this.v2)) .to.emit(this.beacon, 'Upgraded') - .withArgs(this.v2.target); + .withArgs(this.v2); - expect(await this.beacon.implementation()).to.equal(this.v2.target); + expect(await this.beacon.implementation()).to.equal(this.v2); }); it('cannot be upgraded to a non-contract', async function () { await expect(this.beacon.connect(this.admin).upgradeTo(this.other)) .to.be.revertedWithCustomError(this.beacon, 'BeaconInvalidImplementation') - .withArgs(this.other.address); + .withArgs(this.other); }); it('cannot be upgraded by other account', async function () { await expect(this.beacon.connect(this.other).upgradeTo(this.v2)) .to.be.revertedWithCustomError(this.beacon, 'OwnableUnauthorizedAccount') - .withArgs(this.other.address); + .withArgs(this.other); }); }); }); diff --git a/test/proxy/transparent/ProxyAdmin.test.js b/test/proxy/transparent/ProxyAdmin.test.js index 9f137536a..d70075d04 100644 --- a/test/proxy/transparent/ProxyAdmin.test.js +++ b/test/proxy/transparent/ProxyAdmin.test.js @@ -1,7 +1,8 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { getAddressInSlot, ImplementationSlot } = require('../../helpers/erc1967'); + +const { getAddressInSlot, ImplementationSlot } = require('../../helpers/storage'); async function fixture() { const [admin, other] = await ethers.getSigners(); @@ -27,7 +28,7 @@ describe('ProxyAdmin', function () { }); it('has an owner', async function () { - expect(await this.proxyAdmin.owner()).to.equal(this.admin.address); + expect(await this.proxyAdmin.owner()).to.equal(this.admin); }); it('has an interface version', async function () { @@ -39,14 +40,14 @@ describe('ProxyAdmin', function () { it('fails to upgrade', async function () { await expect(this.proxyAdmin.connect(this.other).upgradeAndCall(this.proxy, this.v2, '0x')) .to.be.revertedWithCustomError(this.proxyAdmin, 'OwnableUnauthorizedAccount') - .withArgs(this.other.address); + .withArgs(this.other); }); }); context('with authorized account', function () { it('upgrades implementation', async function () { await this.proxyAdmin.connect(this.admin).upgradeAndCall(this.proxy, this.v2, '0x'); - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2); }); }); }); @@ -57,7 +58,7 @@ describe('ProxyAdmin', function () { const data = this.v1.interface.encodeFunctionData('initializeNonPayableWithValue', [1337n]); await expect(this.proxyAdmin.connect(this.other).upgradeAndCall(this.proxy, this.v2, data)) .to.be.revertedWithCustomError(this.proxyAdmin, 'OwnableUnauthorizedAccount') - .withArgs(this.other.address); + .withArgs(this.other); }); }); @@ -73,7 +74,7 @@ describe('ProxyAdmin', function () { it('upgrades implementation', async function () { const data = this.v2.interface.encodeFunctionData('initializeNonPayableWithValue', [1337n]); await this.proxyAdmin.connect(this.admin).upgradeAndCall(this.proxy, this.v2, data); - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2); }); }); }); diff --git a/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js b/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js index 021228199..d90bd56e2 100644 --- a/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js +++ b/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js @@ -1,8 +1,8 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { getAddressInSlot, ImplementationSlot, AdminSlot } = require('../../helpers/erc1967'); const { impersonate } = require('../../helpers/account'); +const { getAddressInSlot, ImplementationSlot, AdminSlot } = require('../../helpers/storage'); // createProxy, initialOwner, accounts module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { @@ -43,7 +43,7 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { describe('implementation', function () { it('returns the current implementation address', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.implementationV0.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.implementationV0); }); it('delegates to the implementation', async function () { @@ -53,26 +53,26 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { describe('proxy admin', function () { it('emits AdminChanged event during construction', async function () { - await expect(this.tx).to.emit(this.proxy, 'AdminChanged').withArgs(ethers.ZeroAddress, this.proxyAdmin.target); + await expect(this.tx).to.emit(this.proxy, 'AdminChanged').withArgs(ethers.ZeroAddress, this.proxyAdmin); }); it('sets the proxy admin in storage with the correct initial owner', async function () { - expect(await getAddressInSlot(this.proxy, AdminSlot)).to.equal(this.proxyAdmin.target); + expect(await getAddressInSlot(this.proxy, AdminSlot)).to.equal(this.proxyAdmin); - expect(await this.proxyAdmin.owner()).to.equal(this.owner.address); + expect(await this.proxyAdmin.owner()).to.equal(this.owner); }); it('can overwrite the admin by the implementation', async function () { await this.instance.unsafeOverrideAdmin(this.other); const ERC1967AdminSlotValue = await getAddressInSlot(this.proxy, AdminSlot); - expect(ERC1967AdminSlotValue).to.equal(this.other.address); - expect(ERC1967AdminSlotValue).to.not.equal(this.proxyAdmin.address); + expect(ERC1967AdminSlotValue).to.equal(this.other); + expect(ERC1967AdminSlotValue).to.not.equal(this.proxyAdmin); // Still allows previous admin to execute admin operations await expect(this.proxy.connect(this.proxyAdminAsSigner).upgradeToAndCall(this.implementationV1, '0x')) .to.emit(this.proxy, 'Upgraded') - .withArgs(this.implementationV1.target); + .withArgs(this.implementationV1); }); }); @@ -99,11 +99,11 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { }); it('upgrades to the requested implementation', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behavior.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behavior); }); it('emits an event', async function () { - await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behavior.target); + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behavior); }); it('calls the initializer function', async function () { @@ -160,9 +160,9 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { }); it('upgrades to the requested version and emits an event', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV1.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV1); - await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV1.target); + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV1); }); it("calls the 'initialize' function and sends given value to the proxy", async function () { @@ -184,9 +184,9 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { }); it('upgrades to the requested version and emits an event', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV2.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV2); - await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV2.target); + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV2); }); it("calls the 'migrate' function and sends given value to the proxy", async function () { @@ -209,9 +209,9 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { }); it('upgrades to the requested version and emits an event', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV3.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV3); - await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV3.target); + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV3); }); it("calls the 'migrate' function and sends given value to the proxy", async function () { @@ -255,7 +255,7 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { it('executes the proxy function if the sender is the admin', async function () { await expect(this.proxy.connect(this.proxyAdminAsSigner).upgradeToAndCall(this.clashingImplV1, '0x')) .to.emit(this.proxy, 'Upgraded') - .withArgs(this.clashingImplV1.target); + .withArgs(this.clashingImplV1); }); it('delegates the call to implementation when sender is not the admin', async function () { diff --git a/test/proxy/utils/UUPSUpgradeable.test.js b/test/proxy/utils/UUPSUpgradeable.test.js index 876a64cf9..17f865761 100644 --- a/test/proxy/utils/UUPSUpgradeable.test.js +++ b/test/proxy/utils/UUPSUpgradeable.test.js @@ -2,7 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { getAddressInSlot, ImplementationSlot } = require('../../helpers/erc1967'); +const { getAddressInSlot, ImplementationSlot } = require('../../helpers/storage'); async function fixture() { const implInitial = await ethers.deployContract('UUPSUpgradeableMock'); @@ -40,9 +40,9 @@ describe('UUPSUpgradeable', function () { it('upgrade to upgradeable implementation', async function () { await expect(this.instance.upgradeToAndCall(this.implUpgradeOk, '0x')) .to.emit(this.instance, 'Upgraded') - .withArgs(this.implUpgradeOk.target); + .withArgs(this.implUpgradeOk); - expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeOk.target); + expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeOk); }); it('upgrade to upgradeable implementation with call', async function () { @@ -52,9 +52,9 @@ describe('UUPSUpgradeable', function () { this.instance.upgradeToAndCall(this.implUpgradeOk, this.implUpgradeOk.interface.encodeFunctionData('increment')), ) .to.emit(this.instance, 'Upgraded') - .withArgs(this.implUpgradeOk.target); + .withArgs(this.implUpgradeOk); - expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeOk.target); + expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeOk); expect(await this.instance.current()).to.equal(1n); }); @@ -96,16 +96,16 @@ describe('UUPSUpgradeable', function () { it('upgrade to and unsafe upgradeable implementation', async function () { await expect(this.instance.upgradeToAndCall(this.implUpgradeUnsafe, '0x')) .to.emit(this.instance, 'Upgraded') - .withArgs(this.implUpgradeUnsafe.target); + .withArgs(this.implUpgradeUnsafe); - expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeUnsafe.target); + expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeUnsafe); }); // delegate to a non existing upgradeTo function causes a low level revert it('reject upgrade to non uups implementation', async function () { await expect(this.instance.upgradeToAndCall(this.implUpgradeNonUUPS, '0x')) .to.be.revertedWithCustomError(this.instance, 'ERC1967InvalidImplementation') - .withArgs(this.implUpgradeNonUUPS.target); + .withArgs(this.implUpgradeNonUUPS); }); it('reject proxy address as implementation', async function () { @@ -115,6 +115,6 @@ describe('UUPSUpgradeable', function () { await expect(this.instance.upgradeToAndCall(otherInstance, '0x')) .to.be.revertedWithCustomError(this.instance, 'ERC1967InvalidImplementation') - .withArgs(otherInstance.target); + .withArgs(otherInstance); }); }); diff --git a/test/sanity.test.js b/test/sanity.test.js index 9728b14e4..1fe2fa9c9 100644 --- a/test/sanity.test.js +++ b/test/sanity.test.js @@ -8,16 +8,12 @@ async function fixture() { return { signers, addresses }; } -contract('Environment sanity', function (accounts) { +describe('Environment sanity', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); describe('[skip-on-coverage] signers', function () { - it('match accounts', async function () { - expect(this.addresses).to.deep.equal(accounts); - }); - it('signer #0 is skipped', async function () { const signer = await ethers.provider.getSigner(0); expect(this.addresses).to.not.include(await signer.getAddress()); diff --git a/test/token/ERC1155/ERC1155.behavior.js b/test/token/ERC1155/ERC1155.behavior.js index 9ae706f84..cdf62b50d 100644 --- a/test/token/ERC1155/ERC1155.behavior.js +++ b/test/token/ERC1155/ERC1155.behavior.js @@ -2,9 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); -const { - bigint: { RevertType }, -} = require('../../helpers/enums'); +const { RevertType } = require('../../helpers/enums'); const { shouldSupportInterfaces } = require('../../utils/introspection/SupportsInterface.behavior'); function shouldBehaveLikeERC1155() { @@ -118,9 +116,7 @@ function shouldBehaveLikeERC1155() { }); it('emits an ApprovalForAll log', async function () { - await expect(this.tx) - .to.emit(this.token, 'ApprovalForAll') - .withArgs(this.holder.address, this.proxy.address, true); + await expect(this.tx).to.emit(this.token, 'ApprovalForAll').withArgs(this.holder, this.proxy, true); }); it('can unset approval for an operator', async function () { @@ -148,7 +144,7 @@ function shouldBehaveLikeERC1155() { .safeTransferFrom(this.holder, this.recipient, firstTokenId, firstTokenValue + 1n, '0x'), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') - .withArgs(this.holder.address, firstTokenValue, firstTokenValue + 1n, firstTokenId); + .withArgs(this.holder, firstTokenValue, firstTokenValue + 1n, firstTokenId); }); it('reverts when transferring to zero address', async function () { @@ -173,13 +169,7 @@ function shouldBehaveLikeERC1155() { it('emits a TransferSingle log', async function () { await expect(this.tx) .to.emit(this.token, 'TransferSingle') - .withArgs( - this.args.operator.address ?? this.args.operator.target ?? this.args.operator, - this.args.from.address ?? this.args.from.target ?? this.args.from, - this.args.to.address ?? this.args.to.target ?? this.args.to, - this.args.id, - this.args.value, - ); + .withArgs(this.args.operator, this.args.from, this.args.to, this.args.id, this.args.value); }); } @@ -219,7 +209,7 @@ function shouldBehaveLikeERC1155() { .safeTransferFrom(this.holder, this.recipient, firstTokenId, firstTokenValue, '0x'), ) .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') - .withArgs(this.proxy.address, this.holder.address); + .withArgs(this.proxy, this.holder); }); }); @@ -278,14 +268,7 @@ function shouldBehaveLikeERC1155() { it('calls onERC1155Received', async function () { await expect(this.tx) .to.emit(this.receiver, 'Received') - .withArgs( - this.args.operator.address, - this.args.from.address, - this.args.id, - this.args.value, - this.args.data, - anyValue, - ); + .withArgs(this.args.operator, this.args.from, this.args.id, this.args.value, this.args.data, anyValue); }); }); @@ -309,14 +292,7 @@ function shouldBehaveLikeERC1155() { it('calls onERC1155Received', async function () { await expect(this.tx) .to.emit(this.receiver, 'Received') - .withArgs( - this.args.operator.address, - this.args.from.address, - this.args.id, - this.args.value, - this.args.data, - anyValue, - ); + .withArgs(this.args.operator, this.args.from, this.args.id, this.args.value, this.args.data, anyValue); }); }); }); @@ -335,7 +311,7 @@ function shouldBehaveLikeERC1155() { .safeTransferFrom(this.holder, receiver, firstTokenId, firstTokenValue, '0x'), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') - .withArgs(receiver.target); + .withArgs(receiver); }); }); @@ -370,7 +346,7 @@ function shouldBehaveLikeERC1155() { .safeTransferFrom(this.holder, receiver, firstTokenId, firstTokenValue, '0x'), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') - .withArgs(receiver.target); + .withArgs(receiver); }); }); @@ -411,7 +387,7 @@ function shouldBehaveLikeERC1155() { describe('to a contract that does not implement the required function', function () { it('reverts', async function () { - const invalidReceiver = this.token.target; + const invalidReceiver = this.token; await expect( this.token @@ -443,7 +419,7 @@ function shouldBehaveLikeERC1155() { ), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') - .withArgs(this.holder.address, secondTokenValue, secondTokenValue + 1n, secondTokenId); + .withArgs(this.holder, secondTokenValue, secondTokenValue + 1n, secondTokenId); }); it("reverts when ids array length doesn't match values array length", async function () { @@ -510,13 +486,7 @@ function shouldBehaveLikeERC1155() { it('emits a TransferBatch log', async function () { await expect(this.tx) .to.emit(this.token, 'TransferBatch') - .withArgs( - this.args.operator.address ?? this.args.operator.target ?? this.args.operator, - this.args.from.address ?? this.args.from.target ?? this.args.from, - this.args.to.address ?? this.args.to.target ?? this.args.to, - this.args.ids, - this.args.values, - ); + .withArgs(this.args.operator, this.args.from, this.args.to, this.args.ids, this.args.values); }); } @@ -557,7 +527,7 @@ function shouldBehaveLikeERC1155() { ), ) .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') - .withArgs(this.proxy.address, this.holder.address); + .withArgs(this.proxy, this.holder); }); }); @@ -616,14 +586,7 @@ function shouldBehaveLikeERC1155() { it('calls onERC1155BatchReceived', async function () { await expect(this.tx) .to.emit(this.receiver, 'BatchReceived') - .withArgs( - this.holder.address, - this.holder.address, - this.args.ids, - this.args.values, - this.args.data, - anyValue, - ); + .withArgs(this.holder, this.holder, this.args.ids, this.args.values, this.args.data, anyValue); }); }); @@ -647,14 +610,7 @@ function shouldBehaveLikeERC1155() { it('calls onERC1155Received', async function () { await expect(this.tx) .to.emit(this.receiver, 'BatchReceived') - .withArgs( - this.holder.address, - this.holder.address, - this.args.ids, - this.args.values, - this.args.data, - anyValue, - ); + .withArgs(this.holder, this.holder, this.args.ids, this.args.values, this.args.data, anyValue); }); }); }); @@ -679,7 +635,7 @@ function shouldBehaveLikeERC1155() { ), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') - .withArgs(receiver.target); + .withArgs(receiver); }); }); @@ -726,7 +682,7 @@ function shouldBehaveLikeERC1155() { ), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') - .withArgs(receiver.target); + .withArgs(receiver); }); }); @@ -779,7 +735,7 @@ function shouldBehaveLikeERC1155() { describe('to a contract that does not implement the required function', function () { it('reverts', async function () { - const invalidReceiver = this.token.target; + const invalidReceiver = this.token; await expect( this.token diff --git a/test/token/ERC1155/ERC1155.test.js b/test/token/ERC1155/ERC1155.test.js index 486d1aec9..8b0a672b2 100644 --- a/test/token/ERC1155/ERC1155.test.js +++ b/test/token/ERC1155/ERC1155.test.js @@ -46,7 +46,7 @@ describe('ERC1155', function () { it('emits a TransferSingle event', async function () { await expect(this.tx) .to.emit(this.token, 'TransferSingle') - .withArgs(this.operator.address, ethers.ZeroAddress, this.holder.address, tokenId, mintValue); + .withArgs(this.operator, ethers.ZeroAddress, this.holder, tokenId, mintValue); }); it('credits the minted token value', async function () { @@ -80,7 +80,7 @@ describe('ERC1155', function () { it('emits a TransferBatch event', async function () { await expect(this.tx) .to.emit(this.token, 'TransferBatch') - .withArgs(this.operator.address, ethers.ZeroAddress, this.holder.address, tokenBatchIds, mintValues); + .withArgs(this.operator, ethers.ZeroAddress, this.holder, tokenBatchIds, mintValues); }); it('credits the minted batch of tokens', async function () { @@ -104,7 +104,7 @@ describe('ERC1155', function () { it('reverts when burning a non-existent token id', async function () { await expect(this.token.$_burn(this.holder, tokenId, mintValue)) .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') - .withArgs(this.holder.address, 0, mintValue, tokenId); + .withArgs(this.holder, 0, mintValue, tokenId); }); it('reverts when burning more than available tokens', async function () { @@ -112,7 +112,7 @@ describe('ERC1155', function () { await expect(this.token.$_burn(this.holder, tokenId, mintValue + 1n)) .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') - .withArgs(this.holder.address, mintValue, mintValue + 1n, tokenId); + .withArgs(this.holder, mintValue, mintValue + 1n, tokenId); }); describe('with minted-then-burnt tokens', function () { @@ -124,7 +124,7 @@ describe('ERC1155', function () { it('emits a TransferSingle event', async function () { await expect(this.tx) .to.emit(this.token, 'TransferSingle') - .withArgs(this.operator.address, this.holder.address, ethers.ZeroAddress, tokenId, burnValue); + .withArgs(this.operator, this.holder, ethers.ZeroAddress, tokenId, burnValue); }); it('accounts for both minting and burning', async function () { @@ -153,7 +153,7 @@ describe('ERC1155', function () { it('reverts when burning a non-existent token id', async function () { await expect(this.token.$_burnBatch(this.holder, tokenBatchIds, burnValues)) .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') - .withArgs(this.holder.address, 0, burnValues[0], tokenBatchIds[0]); + .withArgs(this.holder, 0, burnValues[0], tokenBatchIds[0]); }); describe('with minted-then-burnt tokens', function () { @@ -165,7 +165,7 @@ describe('ERC1155', function () { it('emits a TransferBatch event', async function () { await expect(this.tx) .to.emit(this.token, 'TransferBatch') - .withArgs(this.operator.address, this.holder.address, ethers.ZeroAddress, tokenBatchIds, burnValues); + .withArgs(this.operator, this.holder, ethers.ZeroAddress, tokenBatchIds, burnValues); }); it('accounts for both minting and burning', async function () { diff --git a/test/token/ERC1155/extensions/ERC1155Burnable.test.js b/test/token/ERC1155/extensions/ERC1155Burnable.test.js index 6a75dc223..01e7ee2ed 100644 --- a/test/token/ERC1155/extensions/ERC1155Burnable.test.js +++ b/test/token/ERC1155/extensions/ERC1155Burnable.test.js @@ -37,7 +37,7 @@ describe('ERC1155Burnable', function () { it("unapproved accounts cannot burn the holder's tokens", async function () { await expect(this.token.connect(this.other).burn(this.holder, ids[0], values[0] - 1n)) .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') - .withArgs(this.other.address, this.holder.address); + .withArgs(this.other, this.holder); }); }); @@ -60,7 +60,7 @@ describe('ERC1155Burnable', function () { it("unapproved accounts cannot burn the holder's tokens", async function () { await expect(this.token.connect(this.other).burnBatch(this.holder, ids, [values[0] - 1n, values[1] - 2n])) .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') - .withArgs(this.other.address, this.holder.address); + .withArgs(this.other, this.holder); }); }); }); diff --git a/test/token/ERC1155/extensions/ERC1155Pausable.test.js b/test/token/ERC1155/extensions/ERC1155Pausable.test.js index 7038180bb..21a2e0bca 100644 --- a/test/token/ERC1155/extensions/ERC1155Pausable.test.js +++ b/test/token/ERC1155/extensions/ERC1155Pausable.test.js @@ -8,7 +8,7 @@ async function fixture() { return { token, holder, operator, receiver, other }; } -contract('ERC1155Pausable', function () { +describe('ERC1155Pausable', function () { const firstTokenId = 37n; const firstTokenValue = 42n; const secondTokenId = 19842n; diff --git a/test/token/ERC20/ERC20.behavior.js b/test/token/ERC20/ERC20.behavior.js index 522df3fcf..2e77f32a1 100644 --- a/test/token/ERC20/ERC20.behavior.js +++ b/test/token/ERC20/ERC20.behavior.js @@ -58,7 +58,7 @@ function shouldBehaveLikeERC20(initialSupply, opts = {}) { it('emits a transfer event', async function () { await expect(this.tx) .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, this.anotherAccount.address, value); + .withArgs(this.initialHolder, this.anotherAccount, value); }); if (forcedApproval) { @@ -85,7 +85,7 @@ function shouldBehaveLikeERC20(initialSupply, opts = {}) { this.token.connect(this.recipient).transferFrom(this.initialHolder, this.anotherAccount, value), ) .to.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, value - 1n, value); + .withArgs(this.initialHolder, value - 1n, value); }); }); @@ -102,7 +102,7 @@ function shouldBehaveLikeERC20(initialSupply, opts = {}) { this.token.connect(this.recipient).transferFrom(this.initialHolder, this.anotherAccount, value), ) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientAllowance') - .withArgs(this.recipient.address, allowance, value); + .withArgs(this.recipient, allowance, value); }); it('reverts when the token owner does not have enough balance', async function () { @@ -112,7 +112,7 @@ function shouldBehaveLikeERC20(initialSupply, opts = {}) { this.token.connect(this.recipient).transferFrom(this.initialHolder, this.anotherAccount, value), ) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, value - 1n, value); + .withArgs(this.initialHolder, value - 1n, value); }); }); @@ -166,7 +166,7 @@ function shouldBehaveLikeERC20Transfer(balance) { const value = balance + 1n; await expect(this.transfer(this.initialHolder, this.recipient, value)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, balance, value); + .withArgs(this.initialHolder, balance, value); }); describe('when the sender transfers all balance', function () { @@ -181,9 +181,7 @@ function shouldBehaveLikeERC20Transfer(balance) { }); it('emits a transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, this.recipient.address, value); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(this.initialHolder, this.recipient, value); }); }); @@ -199,9 +197,7 @@ function shouldBehaveLikeERC20Transfer(balance) { }); it('emits a transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, this.recipient.address, value); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(this.initialHolder, this.recipient, value); }); }); }); @@ -221,7 +217,7 @@ function shouldBehaveLikeERC20Approve(supply) { it('emits an approval event', async function () { await expect(this.approve(this.initialHolder, this.recipient, value)) .to.emit(this.token, 'Approval') - .withArgs(this.initialHolder.address, this.recipient.address, value); + .withArgs(this.initialHolder, this.recipient, value); }); it('approves the requested value when there was no approved value before', async function () { @@ -244,7 +240,7 @@ function shouldBehaveLikeERC20Approve(supply) { it('emits an approval event', async function () { await expect(this.approve(this.initialHolder, this.recipient, value)) .to.emit(this.token, 'Approval') - .withArgs(this.initialHolder.address, this.recipient.address, value); + .withArgs(this.initialHolder, this.recipient, value); }); it('approves the requested value when there was no approved value before', async function () { diff --git a/test/token/ERC20/ERC20.test.js b/test/token/ERC20/ERC20.test.js index 97037a697..7d584ce7b 100644 --- a/test/token/ERC20/ERC20.test.js +++ b/test/token/ERC20/ERC20.test.js @@ -73,9 +73,7 @@ describe('ERC20', function () { }); it('emits Transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, value); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.recipient, value); }); }); }); @@ -91,7 +89,7 @@ describe('ERC20', function () { it('rejects burning more than balance', async function () { await expect(this.token.$_burn(this.initialHolder, initialSupply + 1n)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, initialSupply, initialSupply + 1n); + .withArgs(this.initialHolder, initialSupply, initialSupply + 1n); }); const describeBurn = function (description, value) { @@ -111,7 +109,7 @@ describe('ERC20', function () { it('emits Transfer event', async function () { await expect(this.tx) .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, ethers.ZeroAddress, value); + .withArgs(this.initialHolder, ethers.ZeroAddress, value); }); }); }; @@ -130,9 +128,7 @@ describe('ERC20', function () { it('from is the zero address', async function () { const tx = await this.token.$_update(ethers.ZeroAddress, this.initialHolder, value); - await expect(tx) - .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.initialHolder.address, value); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.initialHolder, value); expect(await this.token.totalSupply()).to.equal(this.totalSupply + value); await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, value); @@ -140,9 +136,7 @@ describe('ERC20', function () { it('to is the zero address', async function () { const tx = await this.token.$_update(this.initialHolder, ethers.ZeroAddress, value); - await expect(tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, ethers.ZeroAddress, value); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(this.initialHolder, ethers.ZeroAddress, value); expect(await this.token.totalSupply()).to.equal(this.totalSupply - value); await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, -value); @@ -161,15 +155,13 @@ describe('ERC20', function () { it('reverts without balance', async function () { await expect(this.token.$_update(this.recipient, this.recipient, value)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.recipient.address, 0n, value); + .withArgs(this.recipient, 0n, value); }); it('executes with balance', async function () { const tx = await this.token.$_update(this.initialHolder, this.initialHolder, value); await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, 0n); - await expect(tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, this.initialHolder.address, value); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(this.initialHolder, this.initialHolder, value); }); }); }); diff --git a/test/token/ERC20/extensions/ERC20Burnable.test.js b/test/token/ERC20/extensions/ERC20Burnable.test.js index 9fa02e44f..dc40c7917 100644 --- a/test/token/ERC20/extensions/ERC20Burnable.test.js +++ b/test/token/ERC20/extensions/ERC20Burnable.test.js @@ -26,7 +26,7 @@ describe('ERC20Burnable', function () { await expect(this.token.connect(this.owner).burn(value)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.owner.address, this.initialBalance, value); + .withArgs(this.owner, this.initialBalance, value); }); describe('on success', function () { @@ -44,9 +44,7 @@ describe('ERC20Burnable', function () { }); it('emits a transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, value); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(this.owner, ethers.ZeroAddress, value); }); }); } @@ -62,7 +60,7 @@ describe('ERC20Burnable', function () { await expect(this.token.connect(this.burner).burnFrom(this.owner, value)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.owner.address, this.initialBalance, value); + .withArgs(this.owner, this.initialBalance, value); }); it('if not enough allowance', async function () { @@ -72,7 +70,7 @@ describe('ERC20Burnable', function () { await expect(this.token.connect(this.burner).burnFrom(this.owner, allowance + 1n)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientAllowance') - .withArgs(this.burner.address, allowance, allowance + 1n); + .withArgs(this.burner, allowance, allowance + 1n); }); }); @@ -98,9 +96,7 @@ describe('ERC20Burnable', function () { }); it('emits a transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, value); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(this.owner, ethers.ZeroAddress, value); }); }); } diff --git a/test/token/ERC20/extensions/ERC20FlashMint.test.js b/test/token/ERC20/extensions/ERC20FlashMint.test.js index cee00db0f..745cd11a9 100644 --- a/test/token/ERC20/extensions/ERC20FlashMint.test.js +++ b/test/token/ERC20/extensions/ERC20FlashMint.test.js @@ -56,13 +56,13 @@ describe('ERC20FlashMint', function () { const tx = await this.token.flashLoan(receiver, this.token, loanValue, '0x'); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, receiver.target, loanValue) + .withArgs(ethers.ZeroAddress, receiver, loanValue) .to.emit(this.token, 'Transfer') - .withArgs(receiver.target, ethers.ZeroAddress, loanValue) + .withArgs(receiver, ethers.ZeroAddress, loanValue) .to.emit(receiver, 'BalanceOf') - .withArgs(this.token.target, receiver.target, loanValue) + .withArgs(this.token, receiver, loanValue) .to.emit(receiver, 'TotalSupply') - .withArgs(this.token.target, initialSupply + loanValue); + .withArgs(this.token, initialSupply + loanValue); await expect(tx).to.changeTokenBalance(this.token, receiver, 0); expect(await this.token.totalSupply()).to.equal(initialSupply); @@ -73,14 +73,14 @@ describe('ERC20FlashMint', function () { const receiver = await ethers.deployContract('ERC3156FlashBorrowerMock', [false, true]); await expect(this.token.flashLoan(receiver, this.token, loanValue, '0x')) .to.be.revertedWithCustomError(this.token, 'ERC3156InvalidReceiver') - .withArgs(receiver.target); + .withArgs(receiver); }); it('missing approval', async function () { const receiver = await ethers.deployContract('ERC3156FlashBorrowerMock', [true, false]); await expect(this.token.flashLoan(receiver, this.token, loanValue, '0x')) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientAllowance') - .withArgs(this.token.target, 0, loanValue); + .withArgs(this.token, 0, loanValue); }); it('unavailable funds', async function () { @@ -88,7 +88,7 @@ describe('ERC20FlashMint', function () { const data = this.token.interface.encodeFunctionData('transfer', [this.other.address, 10]); await expect(this.token.flashLoan(receiver, this.token, loanValue, data)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(receiver.target, loanValue - 10n, loanValue); + .withArgs(receiver, loanValue - 10n, loanValue); }); it('more than maxFlashLoan', async function () { @@ -109,7 +109,7 @@ describe('ERC20FlashMint', function () { const tx = await this.token.$_mint(this.receiver, receiverInitialBalance); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.receiver.target, receiverInitialBalance); + .withArgs(ethers.ZeroAddress, this.receiver, receiverInitialBalance); await expect(tx).to.changeTokenBalance(this.token, this.receiver, receiverInitialBalance); await this.token.setFlashFee(flashFee); @@ -120,13 +120,13 @@ describe('ERC20FlashMint', function () { const tx = await this.token.flashLoan(this.receiver, this.token, loanValue, '0x'); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.receiver.target, loanValue) + .withArgs(ethers.ZeroAddress, this.receiver, loanValue) .to.emit(this.token, 'Transfer') - .withArgs(this.receiver.target, ethers.ZeroAddress, loanValue + flashFee) + .withArgs(this.receiver, ethers.ZeroAddress, loanValue + flashFee) .to.emit(this.receiver, 'BalanceOf') - .withArgs(this.token.target, this.receiver.target, receiverInitialBalance + loanValue) + .withArgs(this.token, this.receiver, receiverInitialBalance + loanValue) .to.emit(this.receiver, 'TotalSupply') - .withArgs(this.token.target, initialSupply + receiverInitialBalance + loanValue); + .withArgs(this.token, initialSupply + receiverInitialBalance + loanValue); await expect(tx).to.changeTokenBalances(this.token, [this.receiver, ethers.ZeroAddress], [-flashFee, 0]); expect(await this.token.totalSupply()).to.equal(initialSupply + receiverInitialBalance - flashFee); @@ -136,20 +136,20 @@ describe('ERC20FlashMint', function () { it('custom flash fee receiver', async function () { const flashFeeReceiverAddress = this.anotherAccount; await this.token.setFlashFeeReceiver(flashFeeReceiverAddress); - expect(await this.token.$_flashFeeReceiver()).to.equal(flashFeeReceiverAddress.address); + expect(await this.token.$_flashFeeReceiver()).to.equal(flashFeeReceiverAddress); const tx = await this.token.flashLoan(this.receiver, this.token, loanValue, '0x'); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.receiver.target, loanValue) + .withArgs(ethers.ZeroAddress, this.receiver, loanValue) .to.emit(this.token, 'Transfer') - .withArgs(this.receiver.target, ethers.ZeroAddress, loanValue) + .withArgs(this.receiver, ethers.ZeroAddress, loanValue) .to.emit(this.token, 'Transfer') - .withArgs(this.receiver.target, flashFeeReceiverAddress.address, flashFee) + .withArgs(this.receiver, flashFeeReceiverAddress, flashFee) .to.emit(this.receiver, 'BalanceOf') - .withArgs(this.token.target, this.receiver.target, receiverInitialBalance + loanValue) + .withArgs(this.token, this.receiver, receiverInitialBalance + loanValue) .to.emit(this.receiver, 'TotalSupply') - .withArgs(this.token.target, initialSupply + receiverInitialBalance + loanValue); + .withArgs(this.token, initialSupply + receiverInitialBalance + loanValue); await expect(tx).to.changeTokenBalances( this.token, [this.receiver, flashFeeReceiverAddress], diff --git a/test/token/ERC20/extensions/ERC20Permit.test.js b/test/token/ERC20/extensions/ERC20Permit.test.js index 538fa7d7f..8336af2d9 100644 --- a/test/token/ERC20/extensions/ERC20Permit.test.js +++ b/test/token/ERC20/extensions/ERC20Permit.test.js @@ -3,7 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { getDomain, domainSeparator, Permit } = require('../../../helpers/eip712'); -const { bigint: time } = require('../../../helpers/time'); +const time = require('../../../helpers/time'); const name = 'My Token'; const symbol = 'MTKN'; @@ -81,7 +81,7 @@ describe('ERC20Permit', function () { await expect(this.token.permit(this.owner, this.spender, value, maxDeadline, v, r, s)) .to.be.revertedWithCustomError(this.token, 'ERC2612InvalidSigner') - .withArgs(recovered, this.owner.address); + .withArgs(recovered, this.owner); }); it('rejects other signature', async function () { @@ -91,7 +91,7 @@ describe('ERC20Permit', function () { await expect(this.token.permit(this.owner, this.spender, value, maxDeadline, v, r, s)) .to.be.revertedWithCustomError(this.token, 'ERC2612InvalidSigner') - .withArgs(this.other.address, this.owner.address); + .withArgs(this.other, this.owner); }); it('rejects expired permit', async function () { diff --git a/test/token/ERC20/extensions/ERC20Votes.test.js b/test/token/ERC20/extensions/ERC20Votes.test.js index 165d08a18..3c595c919 100644 --- a/test/token/ERC20/extensions/ERC20Votes.test.js +++ b/test/token/ERC20/extensions/ERC20Votes.test.js @@ -4,7 +4,7 @@ const { loadFixture, mine } = require('@nomicfoundation/hardhat-network-helpers' const { getDomain, Delegation } = require('../../../helpers/eip712'); const { batchInBlock } = require('../../../helpers/txpool'); -const { bigint: time } = require('../../../helpers/time'); +const time = require('../../../helpers/time'); const { shouldBehaveLikeVotes } = require('../../../governance/utils/Votes.behavior'); @@ -75,11 +75,11 @@ describe('ERC20Votes', function () { await expect(tx) .to.emit(this.token, 'DelegateChanged') - .withArgs(this.holder.address, ethers.ZeroAddress, this.holder.address) + .withArgs(this.holder, ethers.ZeroAddress, this.holder) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, 0n, supply); + .withArgs(this.holder, 0n, supply); - expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); + expect(await this.token.delegates(this.holder)).to.equal(this.holder); expect(await this.token.getVotes(this.holder)).to.equal(supply); expect(await this.token.getPastVotes(this.holder, timepoint - 1n)).to.equal(0n); await mine(); @@ -91,10 +91,10 @@ describe('ERC20Votes', function () { await expect(this.token.connect(this.holder).delegate(this.holder)) .to.emit(this.token, 'DelegateChanged') - .withArgs(this.holder.address, ethers.ZeroAddress, this.holder.address) + .withArgs(this.holder, ethers.ZeroAddress, this.holder) .to.not.emit(this.token, 'DelegateVotesChanged'); - expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); + expect(await this.token.delegates(this.holder)).to.equal(this.holder); }); }); @@ -125,11 +125,11 @@ describe('ERC20Votes', function () { await expect(tx) .to.emit(this.token, 'DelegateChanged') - .withArgs(this.holder.address, ethers.ZeroAddress, this.holder.address) + .withArgs(this.holder, ethers.ZeroAddress, this.holder) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, 0n, supply); + .withArgs(this.holder, 0n, supply); - expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); + expect(await this.token.delegates(this.holder)).to.equal(this.holder); expect(await this.token.getVotes(this.holder)).to.equal(supply); expect(await this.token.getPastVotes(this.holder, timepoint - 1n)).to.equal(0n); @@ -154,7 +154,7 @@ describe('ERC20Votes', function () { await expect(this.token.delegateBySig(this.holder, nonce, ethers.MaxUint256, v, r, s)) .to.be.revertedWithCustomError(this.token, 'InvalidAccountNonce') - .withArgs(this.holder.address, nonce + 1n); + .withArgs(this.holder, nonce + 1n); }); it('rejects bad delegatee', async function () { @@ -175,9 +175,9 @@ describe('ERC20Votes', function () { const { args } = await tx .wait() .then(receipt => receipt.logs.find(event => event.fragment.name == 'DelegateChanged')); - expect(args[0]).to.not.equal(this.holder.address); + expect(args[0]).to.not.equal(this.holder); expect(args[1]).to.equal(ethers.ZeroAddress); - expect(args[2]).to.equal(this.delegatee.address); + expect(args[2]).to.equal(this.delegatee); }); it('rejects bad nonce', async function () { @@ -238,20 +238,20 @@ describe('ERC20Votes', function () { }); it('call', async function () { - expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); + expect(await this.token.delegates(this.holder)).to.equal(this.holder); const tx = await this.token.connect(this.holder).delegate(this.delegatee); const timepoint = await time.clockFromReceipt[mode](tx); await expect(tx) .to.emit(this.token, 'DelegateChanged') - .withArgs(this.holder.address, this.holder.address, this.delegatee.address) + .withArgs(this.holder, this.holder, this.delegatee) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, supply, 0n) + .withArgs(this.holder, supply, 0n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.delegatee.address, 0n, supply); + .withArgs(this.delegatee, 0n, supply); - expect(await this.token.delegates(this.holder)).to.equal(this.delegatee.address); + expect(await this.token.delegates(this.holder)).to.equal(this.delegatee); expect(await this.token.getVotes(this.holder)).to.equal(0n); expect(await this.token.getVotes(this.delegatee)).to.equal(supply); @@ -271,7 +271,7 @@ describe('ERC20Votes', function () { it('no delegation', async function () { await expect(this.token.connect(this.holder).transfer(this.recipient, 1n)) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, 1n) + .withArgs(this.holder, this.recipient, 1n) .to.not.emit(this.token, 'DelegateVotesChanged'); this.holderVotes = 0n; @@ -284,9 +284,9 @@ describe('ERC20Votes', function () { const tx = await this.token.connect(this.holder).transfer(this.recipient, 1n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, 1n) + .withArgs(this.holder, this.recipient, 1n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, supply, supply - 1n); + .withArgs(this.holder, supply, supply - 1n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); @@ -304,9 +304,9 @@ describe('ERC20Votes', function () { const tx = await this.token.connect(this.holder).transfer(this.recipient, 1n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, 1n) + .withArgs(this.holder, this.recipient, 1n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.recipient.address, 0n, 1n); + .withArgs(this.recipient, 0n, 1n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); @@ -325,11 +325,11 @@ describe('ERC20Votes', function () { const tx = await this.token.connect(this.holder).transfer(this.recipient, 1n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, 1n) + .withArgs(this.holder, this.recipient, 1n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, supply, supply - 1n) + .withArgs(this.holder, supply, supply - 1n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.recipient.address, 0n, 1n); + .withArgs(this.recipient, 0n, 1n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); diff --git a/test/token/ERC20/extensions/ERC20Wrapper.test.js b/test/token/ERC20/extensions/ERC20Wrapper.test.js index af746d65a..697bfe523 100644 --- a/test/token/ERC20/extensions/ERC20Wrapper.test.js +++ b/test/token/ERC20/extensions/ERC20Wrapper.test.js @@ -48,7 +48,7 @@ describe('ERC20Wrapper', function () { }); it('has underlying', async function () { - expect(await this.token.underlying()).to.be.equal(this.underlying.target); + expect(await this.token.underlying()).to.be.equal(this.underlying); }); describe('deposit', function () { @@ -58,9 +58,9 @@ describe('ERC20Wrapper', function () { const tx = await this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply); await expect(tx) .to.emit(this.underlying, 'Transfer') - .withArgs(this.initialHolder.address, this.token.target, initialSupply) + .withArgs(this.initialHolder, this.token, initialSupply) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.initialHolder.address, initialSupply); + .withArgs(ethers.ZeroAddress, this.initialHolder, initialSupply); await expect(tx).to.changeTokenBalances( this.underlying, [this.initialHolder, this.token], @@ -72,7 +72,7 @@ describe('ERC20Wrapper', function () { it('reverts when missing approval', async function () { await expect(this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply)) .to.be.revertedWithCustomError(this.underlying, 'ERC20InsufficientAllowance') - .withArgs(this.token.target, 0, initialSupply); + .withArgs(this.token, 0, initialSupply); }); it('reverts when inssuficient balance', async function () { @@ -80,7 +80,7 @@ describe('ERC20Wrapper', function () { await expect(this.token.connect(this.initialHolder).depositFor(this.initialHolder, ethers.MaxUint256)) .to.be.revertedWithCustomError(this.underlying, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, initialSupply, ethers.MaxUint256); + .withArgs(this.initialHolder, initialSupply, ethers.MaxUint256); }); it('deposits to other account', async function () { @@ -89,9 +89,9 @@ describe('ERC20Wrapper', function () { const tx = await this.token.connect(this.initialHolder).depositFor(this.recipient, initialSupply); await expect(tx) .to.emit(this.underlying, 'Transfer') - .withArgs(this.initialHolder.address, this.token.target, initialSupply) + .withArgs(this.initialHolder, this.token, initialSupply) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, initialSupply); + .withArgs(ethers.ZeroAddress, this.recipient, initialSupply); await expect(tx).to.changeTokenBalances( this.underlying, [this.initialHolder, this.token], @@ -105,7 +105,7 @@ describe('ERC20Wrapper', function () { await expect(this.token.connect(this.initialHolder).depositFor(this.token, ethers.MaxUint256)) .to.be.revertedWithCustomError(this.token, 'ERC20InvalidReceiver') - .withArgs(this.token.target); + .withArgs(this.token); }); }); @@ -118,7 +118,7 @@ describe('ERC20Wrapper', function () { it('reverts when inssuficient balance', async function () { await expect(this.token.connect(this.initialHolder).withdrawTo(this.initialHolder, ethers.MaxInt256)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, initialSupply, ethers.MaxInt256); + .withArgs(this.initialHolder, initialSupply, ethers.MaxInt256); }); it('executes when operation is valid', async function () { @@ -127,9 +127,9 @@ describe('ERC20Wrapper', function () { const tx = await this.token.connect(this.initialHolder).withdrawTo(this.initialHolder, value); await expect(tx) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.initialHolder.address, value) + .withArgs(this.token, this.initialHolder, value) .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, ethers.ZeroAddress, value); + .withArgs(this.initialHolder, ethers.ZeroAddress, value); await expect(tx).to.changeTokenBalances(this.underlying, [this.token, this.initialHolder], [-value, value]); await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, -value); }); @@ -138,9 +138,9 @@ describe('ERC20Wrapper', function () { const tx = await this.token.connect(this.initialHolder).withdrawTo(this.initialHolder, initialSupply); await expect(tx) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.initialHolder.address, initialSupply) + .withArgs(this.token, this.initialHolder, initialSupply) .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, ethers.ZeroAddress, initialSupply); + .withArgs(this.initialHolder, ethers.ZeroAddress, initialSupply); await expect(tx).to.changeTokenBalances( this.underlying, [this.token, this.initialHolder], @@ -153,9 +153,9 @@ describe('ERC20Wrapper', function () { const tx = await this.token.connect(this.initialHolder).withdrawTo(this.recipient, initialSupply); await expect(tx) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.recipient.address, initialSupply) + .withArgs(this.token, this.recipient, initialSupply) .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, ethers.ZeroAddress, initialSupply); + .withArgs(this.initialHolder, ethers.ZeroAddress, initialSupply); await expect(tx).to.changeTokenBalances( this.underlying, [this.token, this.initialHolder, this.recipient], @@ -167,7 +167,7 @@ describe('ERC20Wrapper', function () { it('reverts withdrawing to the wrapper contract', async function () { await expect(this.token.connect(this.initialHolder).withdrawTo(this.token, initialSupply)) .to.be.revertedWithCustomError(this.token, 'ERC20InvalidReceiver') - .withArgs(this.token.target); + .withArgs(this.token); }); }); @@ -177,7 +177,7 @@ describe('ERC20Wrapper', function () { await this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply); const tx = await this.token.$_recover(this.recipient); - await expect(tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.recipient.address, 0n); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.recipient, 0n); await expect(tx).to.changeTokenBalance(this.token, this.recipient, 0); }); @@ -185,9 +185,7 @@ describe('ERC20Wrapper', function () { await this.underlying.connect(this.initialHolder).transfer(this.token, initialSupply); const tx = await this.token.$_recover(this.recipient); - await expect(tx) - .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, initialSupply); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.recipient, initialSupply); await expect(tx).to.changeTokenBalance(this.token, this.recipient, initialSupply); }); }); diff --git a/test/token/ERC20/extensions/ERC4626.test.js b/test/token/ERC20/extensions/ERC4626.test.js index 907855efe..6e6508c68 100644 --- a/test/token/ERC20/extensions/ERC4626.test.js +++ b/test/token/ERC20/extensions/ERC4626.test.js @@ -3,9 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); -const { - bigint: { Enum }, -} = require('../../../helpers/enums'); +const { Enum } = require('../../../helpers/enums'); const name = 'My Token'; const symbol = 'MTKN'; @@ -90,10 +88,10 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).deposit(value, this.holder)) // Deposit normally, reentering before the internal `_update` .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.holder.address, value, sharesForDeposit) + .withArgs(this.holder, this.holder, value, sharesForDeposit) // Reentrant deposit event → uses the same price .to.emit(this.vault, 'Deposit') - .withArgs(this.token.target, this.holder.address, reenterValue, sharesForReenter); + .withArgs(this.token, this.holder, reenterValue, sharesForReenter); // Assert prices is kept expect(await this.vault.previewDeposit(value)).to.equal(sharesForDeposit); @@ -123,10 +121,10 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).withdraw(value, this.holder, this.holder)) // Main withdraw event .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.holder.address, this.holder.address, value, sharesForWithdraw) + .withArgs(this.holder, this.holder, this.holder, value, sharesForWithdraw) // Reentrant withdraw event → uses the same price .to.emit(this.vault, 'Withdraw') - .withArgs(this.token.target, this.holder.address, this.token.target, reenterValue, sharesForReenter); + .withArgs(this.token, this.holder, this.token, reenterValue, sharesForReenter); // Assert price is kept expect(await this.vault.previewWithdraw(value)).to.equal(sharesForWithdraw); @@ -150,7 +148,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).deposit(value, this.holder)) // Price is as previewed .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.holder.address, value, sharesBefore); + .withArgs(this.holder, this.holder, value, sharesBefore); // Price was modified during reentrancy expect(await this.vault.previewDeposit(value)).to.lt(sharesBefore); @@ -177,7 +175,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).withdraw(value, this.holder, this.holder)) // Price is as previewed .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.holder.address, this.holder.address, value, sharesBefore); + .withArgs(this.holder, this.holder, this.holder, value, sharesBefore); // Price was modified during reentrancy expect(await this.vault.previewWithdraw(value)).to.gt(sharesBefore); @@ -196,7 +194,7 @@ describe('ERC4626', function () { const maxDeposit = await this.vault.maxDeposit(this.holder); await expect(this.vault.connect(this.holder).deposit(maxDeposit + 1n, this.recipient)) .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxDeposit') - .withArgs(this.recipient.address, maxDeposit + 1n, maxDeposit); + .withArgs(this.recipient, maxDeposit + 1n, maxDeposit); }); it('reverts on mint() above max mint', async function () { @@ -204,7 +202,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).mint(maxMint + 1n, this.recipient)) .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxMint') - .withArgs(this.recipient.address, maxMint + 1n, maxMint); + .withArgs(this.recipient, maxMint + 1n, maxMint); }); it('reverts on withdraw() above max withdraw', async function () { @@ -212,7 +210,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).withdraw(maxWithdraw + 1n, this.recipient, this.holder)) .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxWithdraw') - .withArgs(this.holder.address, maxWithdraw + 1n, maxWithdraw); + .withArgs(this.holder, maxWithdraw + 1n, maxWithdraw); }); it('reverts on redeem() above max redeem', async function () { @@ -220,7 +218,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).redeem(maxRedeem + 1n, this.recipient, this.holder)) .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxRedeem') - .withArgs(this.holder.address, maxRedeem + 1n, maxRedeem); + .withArgs(this.holder, maxRedeem + 1n, maxRedeem); }); }); @@ -247,7 +245,7 @@ describe('ERC4626', function () { expect(await this.vault.name()).to.equal(name + ' Vault'); expect(await this.vault.symbol()).to.equal(symbol + 'V'); expect(await this.vault.decimals()).to.equal(decimals + offset); - expect(await this.vault.asset()).to.equal(this.token.target); + expect(await this.vault.asset()).to.equal(this.token); }); describe('empty vault: no assets & no shares', function () { @@ -269,11 +267,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, parseShare(1n)); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, parseToken(1n)) + .withArgs(this.holder, this.vault, parseToken(1n)) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, parseShare(1n)) + .withArgs(ethers.ZeroAddress, this.recipient, parseShare(1n)) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, parseToken(1n), parseShare(1n)); + .withArgs(this.holder, this.recipient, parseToken(1n), parseShare(1n)); }); it('mint', async function () { @@ -290,11 +288,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, parseShare(1n)); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, parseToken(1n)) + .withArgs(this.holder, this.vault, parseToken(1n)) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, parseShare(1n)) + .withArgs(ethers.ZeroAddress, this.recipient, parseShare(1n)) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, parseToken(1n), parseShare(1n)); + .withArgs(this.holder, this.recipient, parseToken(1n), parseShare(1n)); }); it('withdraw', async function () { @@ -307,11 +305,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, 0n) + .withArgs(this.vault, this.recipient, 0n) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .withArgs(this.holder, ethers.ZeroAddress, 0n) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); + .withArgs(this.holder, this.recipient, this.holder, 0n, 0n); }); it('redeem', async function () { @@ -324,11 +322,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, 0n) + .withArgs(this.vault, this.recipient, 0n) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .withArgs(this.holder, ethers.ZeroAddress, 0n) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); + .withArgs(this.holder, this.recipient, this.holder, 0n, 0n); }); }); @@ -374,11 +372,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, expectedShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, depositAssets) + .withArgs(this.holder, this.vault, depositAssets) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, expectedShares) + .withArgs(ethers.ZeroAddress, this.recipient, expectedShares) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, depositAssets, expectedShares); + .withArgs(this.holder, this.recipient, depositAssets, expectedShares); }); /** @@ -412,11 +410,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, mintShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, expectedAssets) + .withArgs(this.holder, this.vault, expectedAssets) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, mintShares) + .withArgs(ethers.ZeroAddress, this.recipient, mintShares) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, expectedAssets, mintShares); + .withArgs(this.holder, this.recipient, expectedAssets, mintShares); }); it('withdraw', async function () { @@ -429,11 +427,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, 0n) + .withArgs(this.vault, this.recipient, 0n) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .withArgs(this.holder, ethers.ZeroAddress, 0n) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); + .withArgs(this.holder, this.recipient, this.holder, 0n, 0n); }); it('redeem', async function () { @@ -446,11 +444,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, 0n) + .withArgs(this.vault, this.recipient, 0n) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .withArgs(this.holder, ethers.ZeroAddress, 0n) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); + .withArgs(this.holder, this.recipient, this.holder, 0n, 0n); }); }); @@ -495,11 +493,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, expectedShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, depositAssets) + .withArgs(this.holder, this.vault, depositAssets) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, expectedShares) + .withArgs(ethers.ZeroAddress, this.recipient, expectedShares) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, depositAssets, expectedShares); + .withArgs(this.holder, this.recipient, depositAssets, expectedShares); }); /** @@ -531,11 +529,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, mintShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, expectedAssets) + .withArgs(this.holder, this.vault, expectedAssets) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, mintShares) + .withArgs(ethers.ZeroAddress, this.recipient, mintShares) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, expectedAssets, mintShares); + .withArgs(this.holder, this.recipient, expectedAssets, mintShares); }); it('withdraw', async function () { @@ -558,11 +556,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, -expectedShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, withdrawAssets) + .withArgs(this.vault, this.recipient, withdrawAssets) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, expectedShares) + .withArgs(this.holder, ethers.ZeroAddress, expectedShares) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, withdrawAssets, expectedShares); + .withArgs(this.holder, this.recipient, this.holder, withdrawAssets, expectedShares); }); it('withdraw with approval', async function () { @@ -570,7 +568,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.other).withdraw(parseToken(1n), this.recipient, this.holder)) .to.be.revertedWithCustomError(this.vault, 'ERC20InsufficientAllowance') - .withArgs(this.other.address, 0n, assets); + .withArgs(this.other, 0n, assets); await expect(this.vault.connect(this.spender).withdraw(parseToken(1n), this.recipient, this.holder)).to.not.be .reverted; @@ -596,17 +594,17 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, -redeemShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, expectedAssets) + .withArgs(this.vault, this.recipient, expectedAssets) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, redeemShares) + .withArgs(this.holder, ethers.ZeroAddress, redeemShares) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, expectedAssets, redeemShares); + .withArgs(this.holder, this.recipient, this.holder, expectedAssets, redeemShares); }); it('redeem with approval', async function () { await expect(this.vault.connect(this.other).redeem(parseShare(100n), this.recipient, this.holder)) .to.be.revertedWithCustomError(this.vault, 'ERC20InsufficientAllowance') - .withArgs(this.other.address, 0n, parseShare(100n)); + .withArgs(this.other, 0n, parseShare(100n)); await expect(this.vault.connect(this.spender).redeem(parseShare(100n), this.recipient, this.holder)).to.not.be .reverted; @@ -660,16 +658,16 @@ describe('ERC4626', function () { await expect(this.tx) // get total .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, valueWithFees) + .withArgs(this.holder, this.vault, valueWithFees) // redirect fees .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.other.address, fees) + .withArgs(this.vault, this.other, fees) // mint shares .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, valueWithoutFees) + .withArgs(ethers.ZeroAddress, this.recipient, valueWithoutFees) // deposit event .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, valueWithFees, valueWithoutFees); + .withArgs(this.holder, this.recipient, valueWithFees, valueWithoutFees); }); }); @@ -712,16 +710,16 @@ describe('ERC4626', function () { await expect(this.tx) // withdraw principal .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, valueWithoutFees) + .withArgs(this.vault, this.recipient, valueWithoutFees) // redirect fees .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.other.address, fees) + .withArgs(this.vault, this.other, fees) // mint shares .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, valueWithFees) + .withArgs(this.holder, ethers.ZeroAddress, valueWithFees) // withdraw event .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, valueWithoutFees, valueWithFees); + .withArgs(this.holder, this.recipient, this.holder, valueWithoutFees, valueWithFees); }); }); }); @@ -742,9 +740,9 @@ describe('ERC4626', function () { // 1. Alice mints 2000 shares (costs 2000 tokens) await expect(vault.connect(alice).mint(2000n, alice)) .to.emit(token, 'Transfer') - .withArgs(alice.address, vault.target, 2000n) + .withArgs(alice, vault, 2000n) .to.emit(vault, 'Transfer') - .withArgs(ethers.ZeroAddress, alice.address, 2000n); + .withArgs(ethers.ZeroAddress, alice, 2000n); expect(await vault.previewDeposit(2000n)).to.equal(2000n); expect(await vault.balanceOf(alice)).to.equal(2000n); @@ -758,9 +756,9 @@ describe('ERC4626', function () { // 2. Bruce deposits 4000 tokens (mints 4000 shares) await expect(vault.connect(bruce).mint(4000n, bruce)) .to.emit(token, 'Transfer') - .withArgs(bruce.address, vault.target, 4000n) + .withArgs(bruce, vault, 4000n) .to.emit(vault, 'Transfer') - .withArgs(ethers.ZeroAddress, bruce.address, 4000n); + .withArgs(ethers.ZeroAddress, bruce, 4000n); expect(await vault.previewDeposit(4000n)).to.equal(4000n); expect(await vault.balanceOf(alice)).to.equal(2000n); @@ -785,9 +783,9 @@ describe('ERC4626', function () { // 4. Alice deposits 2000 tokens (mints 1333 shares) await expect(vault.connect(alice).deposit(2000n, alice)) .to.emit(token, 'Transfer') - .withArgs(alice.address, vault.target, 2000n) + .withArgs(alice, vault, 2000n) .to.emit(vault, 'Transfer') - .withArgs(ethers.ZeroAddress, alice.address, 1333n); + .withArgs(ethers.ZeroAddress, alice, 1333n); expect(await vault.balanceOf(alice)).to.equal(3333n); expect(await vault.balanceOf(bruce)).to.equal(4000n); @@ -802,9 +800,9 @@ describe('ERC4626', function () { // NOTE: Alices's vault assets got rounded towards infinity await expect(vault.connect(bruce).mint(2000n, bruce)) .to.emit(token, 'Transfer') - .withArgs(bruce.address, vault.target, 3000n) + .withArgs(bruce, vault, 3000n) .to.emit(vault, 'Transfer') - .withArgs(ethers.ZeroAddress, bruce.address, 2000n); + .withArgs(ethers.ZeroAddress, bruce, 2000n); expect(await vault.balanceOf(alice)).to.equal(3333n); expect(await vault.balanceOf(bruce)).to.equal(6000n); @@ -829,9 +827,9 @@ describe('ERC4626', function () { // 7. Alice redeem 1333 shares (2428 assets) await expect(vault.connect(alice).redeem(1333n, alice, alice)) .to.emit(vault, 'Transfer') - .withArgs(alice.address, ethers.ZeroAddress, 1333n) + .withArgs(alice, ethers.ZeroAddress, 1333n) .to.emit(token, 'Transfer') - .withArgs(vault.target, alice.address, 2427n); // used to be 2428 + .withArgs(vault, alice, 2427n); // used to be 2428 expect(await vault.balanceOf(alice)).to.equal(2000n); expect(await vault.balanceOf(bruce)).to.equal(6000n); @@ -844,9 +842,9 @@ describe('ERC4626', function () { // 8. Bruce withdraws 2929 assets (1608 shares) await expect(vault.connect(bruce).withdraw(2929n, bruce, bruce)) .to.emit(vault, 'Transfer') - .withArgs(bruce.address, ethers.ZeroAddress, 1608n) + .withArgs(bruce, ethers.ZeroAddress, 1608n) .to.emit(token, 'Transfer') - .withArgs(vault.target, bruce.address, 2929n); + .withArgs(vault, bruce, 2929n); expect(await vault.balanceOf(alice)).to.equal(2000n); expect(await vault.balanceOf(bruce)).to.equal(4392n); @@ -860,9 +858,9 @@ describe('ERC4626', function () { // NOTE: Bruce's assets have been rounded back towards infinity await expect(vault.connect(alice).withdraw(3643n, alice, alice)) .to.emit(vault, 'Transfer') - .withArgs(alice.address, ethers.ZeroAddress, 2000n) + .withArgs(alice, ethers.ZeroAddress, 2000n) .to.emit(token, 'Transfer') - .withArgs(vault.target, alice.address, 3643n); + .withArgs(vault, alice, 3643n); expect(await vault.balanceOf(alice)).to.equal(0n); expect(await vault.balanceOf(bruce)).to.equal(4392n); @@ -875,9 +873,9 @@ describe('ERC4626', function () { // 10. Bruce redeem 4392 shares (8001 tokens) await expect(vault.connect(bruce).redeem(4392n, bruce, bruce)) .to.emit(vault, 'Transfer') - .withArgs(bruce.address, ethers.ZeroAddress, 4392n) + .withArgs(bruce, ethers.ZeroAddress, 4392n) .to.emit(token, 'Transfer') - .withArgs(vault.target, bruce.address, 8000n); // used to be 8001 + .withArgs(vault, bruce, 8000n); // used to be 8001 expect(await vault.balanceOf(alice)).to.equal(0n); expect(await vault.balanceOf(bruce)).to.equal(0n); diff --git a/test/token/ERC20/utils/SafeERC20.test.js b/test/token/ERC20/utils/SafeERC20.test.js index e710a3241..80d394edd 100644 --- a/test/token/ERC20/utils/SafeERC20.test.js +++ b/test/token/ERC20/utils/SafeERC20.test.js @@ -40,13 +40,13 @@ describe('SafeERC20', function () { it('reverts on transfer', async function () { await expect(this.mock.$safeTransfer(this.token, this.receiver, 0n)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.token.address); + .withArgs(this.token); }); it('reverts on transferFrom', async function () { await expect(this.mock.$safeTransferFrom(this.token, this.mock, this.receiver, 0n)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.token.address); + .withArgs(this.token); }); it('reverts on increaseAllowance', async function () { @@ -62,7 +62,7 @@ describe('SafeERC20', function () { it('reverts on forceApprove', async function () { await expect(this.mock.$forceApprove(this.token, this.spender, 0n)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.token.address); + .withArgs(this.token); }); }); @@ -74,31 +74,31 @@ describe('SafeERC20', function () { it('reverts on transfer', async function () { await expect(this.mock.$safeTransfer(this.token, this.receiver, 0n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') - .withArgs(this.token.target); + .withArgs(this.token); }); it('reverts on transferFrom', async function () { await expect(this.mock.$safeTransferFrom(this.token, this.mock, this.receiver, 0n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') - .withArgs(this.token.target); + .withArgs(this.token); }); it('reverts on increaseAllowance', async function () { await expect(this.mock.$safeIncreaseAllowance(this.token, this.spender, 0n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') - .withArgs(this.token.target); + .withArgs(this.token); }); it('reverts on decreaseAllowance', async function () { await expect(this.mock.$safeDecreaseAllowance(this.token, this.spender, 0n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') - .withArgs(this.token.target); + .withArgs(this.token); }); it('reverts on forceApprove', async function () { await expect(this.mock.$forceApprove(this.token, this.spender, 0n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') - .withArgs(this.token.target); + .withArgs(this.token); }); }); @@ -157,13 +157,13 @@ function shouldOnlyRevertOnErrors() { it("doesn't revert on transfer", async function () { await expect(this.mock.$safeTransfer(this.token, this.receiver, 10n)) .to.emit(this.token, 'Transfer') - .withArgs(this.mock.target, this.receiver.address, 10n); + .withArgs(this.mock, this.receiver, 10n); }); it("doesn't revert on transferFrom", async function () { await expect(this.mock.$safeTransferFrom(this.token, this.owner, this.receiver, 10n)) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, this.receiver.address, 10n); + .withArgs(this.owner, this.receiver, 10n); }); }); @@ -191,7 +191,7 @@ function shouldOnlyRevertOnErrors() { it('reverts when decreasing the allowance', async function () { await expect(this.mock.$safeDecreaseAllowance(this.token, this.spender, 10n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedDecreaseAllowance') - .withArgs(this.spender.address, 0n, 10n); + .withArgs(this.spender, 0n, 10n); }); }); @@ -223,7 +223,7 @@ function shouldOnlyRevertOnErrors() { it('reverts when decreasing the allowance to a negative value', async function () { await expect(this.mock.$safeDecreaseAllowance(this.token, this.spender, 200n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedDecreaseAllowance') - .withArgs(this.spender.address, 100n, 200n); + .withArgs(this.spender, 100n, 200n); }); }); }); diff --git a/test/token/ERC721/ERC721.behavior.js b/test/token/ERC721/ERC721.behavior.js index ff441f5e6..b9fd56f06 100644 --- a/test/token/ERC721/ERC721.behavior.js +++ b/test/token/ERC721/ERC721.behavior.js @@ -4,9 +4,7 @@ const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { shouldSupportInterfaces } = require('../../utils/introspection/SupportsInterface.behavior'); -const { - bigint: { RevertType }, -} = require('../../helpers/enums'); +const { RevertType } = require('../../helpers/enums'); const firstTokenId = 5042n; const secondTokenId = 79217n; @@ -58,7 +56,7 @@ function shouldBehaveLikeERC721() { const tokenId = firstTokenId; it('returns the owner of the given token ID', async function () { - expect(await this.token.ownerOf(tokenId)).to.equal(this.owner.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.owner); }); }); @@ -85,13 +83,11 @@ function shouldBehaveLikeERC721() { const transferWasSuccessful = () => { it('transfers the ownership of the given token ID to the given address', async function () { await this.tx(); - expect(await this.token.ownerOf(tokenId)).to.equal(this.to.address ?? this.to.target); + expect(await this.token.ownerOf(tokenId)).to.equal(this.to); }); it('emits a Transfer event', async function () { - await expect(this.tx()) - .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, this.to.address ?? this.to.target, tokenId); + await expect(this.tx()).to.emit(this.token, 'Transfer').withArgs(this.owner, this.to, tokenId); }); it('clears the approval for the token ID with no event', async function () { @@ -157,7 +153,7 @@ function shouldBehaveLikeERC721() { it('keeps ownership of the token', async function () { await this.tx(); - expect(await this.token.ownerOf(tokenId)).to.equal(this.owner.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.owner); }); it('clears the approval for the token ID', async function () { @@ -166,9 +162,7 @@ function shouldBehaveLikeERC721() { }); it('emits only a transfer event', async function () { - await expect(this.tx()) - .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, this.owner.address, tokenId); + await expect(this.tx()).to.emit(this.token, 'Transfer').withArgs(this.owner, this.owner, tokenId); }); it('keeps the owner balance', async function () { @@ -192,7 +186,7 @@ function shouldBehaveLikeERC721() { this.token.connect(this.owner)[fragment](this.other, this.other, tokenId, ...(opts.extra ?? [])), ) .to.be.revertedWithCustomError(this.token, 'ERC721IncorrectOwner') - .withArgs(this.other.address, tokenId, this.owner.address); + .withArgs(this.other, tokenId, this.owner); }); }); @@ -207,7 +201,7 @@ function shouldBehaveLikeERC721() { this.token.connect(this.other)[fragment](this.owner, this.other, tokenId, ...(opts.extra ?? [])), ) .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') - .withArgs(this.other.address, tokenId); + .withArgs(this.other, tokenId); }); } }); @@ -255,7 +249,7 @@ function shouldBehaveLikeERC721() { it('calls onERC721Received', async function () { await expect(this.token.connect(this.owner)[fragment](this.owner, this.to, tokenId, ...(opts.extra ?? []))) .to.emit(this.to, 'Received') - .withArgs(this.owner.address, this.owner.address, tokenId, data, anyValue); + .withArgs(this.owner, this.owner, tokenId, data, anyValue); }); it('calls onERC721Received from approved', async function () { @@ -263,7 +257,7 @@ function shouldBehaveLikeERC721() { this.token.connect(this.approved)[fragment](this.owner, this.to, tokenId, ...(opts.extra ?? [])), ) .to.emit(this.to, 'Received') - .withArgs(this.approved.address, this.owner.address, tokenId, data, anyValue); + .withArgs(this.approved, this.owner, tokenId, data, anyValue); }); describe('with an invalid token id', function () { @@ -311,7 +305,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.connect(this.owner)[fnName](this.owner, invalidReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(invalidReceiver.target); + .withArgs(invalidReceiver); }); }); @@ -337,7 +331,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.connect(this.owner)[fnName](this.owner, revertingReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(revertingReceiver.target); + .withArgs(revertingReceiver); }); }); @@ -373,7 +367,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.connect(this.owner)[fnName](this.owner, nonReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(nonReceiver.target); + .withArgs(nonReceiver); }); }); }); @@ -408,7 +402,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.$_safeMint(invalidReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(invalidReceiver.target); + .withArgs(invalidReceiver); }); }); @@ -434,7 +428,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.$_safeMint(revertingReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(revertingReceiver.target); + .withArgs(revertingReceiver); }); }); @@ -470,7 +464,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.$_safeMint(nonReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(nonReceiver.target); + .withArgs(nonReceiver); }); }); }); @@ -487,7 +481,7 @@ function shouldBehaveLikeERC721() { const itApproves = function () { it('sets the approval for the target address', async function () { - expect(await this.token.getApproved(tokenId)).to.equal(this.approved.address ?? this.approved); + expect(await this.token.getApproved(tokenId)).to.equal(this.approved ?? this.approved); }); }; @@ -495,7 +489,7 @@ function shouldBehaveLikeERC721() { it('emits an approval event', async function () { await expect(this.tx) .to.emit(this.token, 'Approval') - .withArgs(this.owner.address, this.approved.address ?? this.approved, tokenId); + .withArgs(this.owner, this.approved ?? this.approved, tokenId); }); }; @@ -557,7 +551,7 @@ function shouldBehaveLikeERC721() { it('reverts', async function () { await expect(this.token.connect(this.other).approve(this.approved, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidApprover') - .withArgs(this.other.address); + .withArgs(this.other); }); }); @@ -567,7 +561,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.connect(this.approved).approve(this.other, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidApprover') - .withArgs(this.approved.address); + .withArgs(this.approved); }); }); @@ -603,7 +597,7 @@ function shouldBehaveLikeERC721() { it('emits an approval event', async function () { await expect(this.token.connect(this.owner).setApprovalForAll(this.operator, true)) .to.emit(this.token, 'ApprovalForAll') - .withArgs(this.owner.address, this.operator.address, true); + .withArgs(this.owner, this.operator, true); }); }); @@ -621,7 +615,7 @@ function shouldBehaveLikeERC721() { it('emits an approval event', async function () { await expect(this.token.connect(this.owner).setApprovalForAll(this.operator, true)) .to.emit(this.token, 'ApprovalForAll') - .withArgs(this.owner.address, this.operator.address, true); + .withArgs(this.owner, this.operator, true); }); it('can unset the operator approval', async function () { @@ -645,7 +639,7 @@ function shouldBehaveLikeERC721() { it('emits an approval event', async function () { await expect(this.token.connect(this.owner).setApprovalForAll(this.operator, true)) .to.emit(this.token, 'ApprovalForAll') - .withArgs(this.owner.address, this.operator.address, true); + .withArgs(this.owner, this.operator, true); }); }); }); @@ -679,7 +673,7 @@ function shouldBehaveLikeERC721() { }); it('returns approved account', async function () { - expect(await this.token.getApproved(firstTokenId)).to.equal(this.approved.address); + expect(await this.token.getApproved(firstTokenId)).to.equal(this.approved); }); }); }); @@ -699,14 +693,12 @@ function shouldBehaveLikeERC721() { }); it('emits a Transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, firstTokenId); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.owner, firstTokenId); }); it('creates the token', async function () { expect(await this.token.balanceOf(this.owner)).to.equal(1n); - expect(await this.token.ownerOf(firstTokenId)).to.equal(this.owner.address); + expect(await this.token.ownerOf(firstTokenId)).to.equal(this.owner); }); it('reverts when adding a token id that already exists', async function () { @@ -736,9 +728,7 @@ function shouldBehaveLikeERC721() { }); it('emits a Transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, firstTokenId); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(this.owner, ethers.ZeroAddress, firstTokenId); }); it('deletes the token', async function () { @@ -790,7 +780,7 @@ function shouldBehaveLikeERC721Enumerable() { it('reverts', async function () { await expect(this.token.tokenOfOwnerByIndex(this.owner, 2n)) .to.be.revertedWithCustomError(this.token, 'ERC721OutOfBoundsIndex') - .withArgs(this.owner.address, 2n); + .withArgs(this.owner, 2n); }); }); @@ -798,7 +788,7 @@ function shouldBehaveLikeERC721Enumerable() { it('reverts', async function () { await expect(this.token.tokenOfOwnerByIndex(this.other, 0n)) .to.be.revertedWithCustomError(this.token, 'ERC721OutOfBoundsIndex') - .withArgs(this.other.address, 0n); + .withArgs(this.other, 0n); }); }); @@ -821,7 +811,7 @@ function shouldBehaveLikeERC721Enumerable() { expect(await this.token.balanceOf(this.owner)).to.equal(0n); await expect(this.token.tokenOfOwnerByIndex(this.owner, 0n)) .to.be.revertedWithCustomError(this.token, 'ERC721OutOfBoundsIndex') - .withArgs(this.owner.address, 0n); + .withArgs(this.owner, 0n); }); }); }); diff --git a/test/token/ERC721/extensions/ERC721Burnable.test.js b/test/token/ERC721/extensions/ERC721Burnable.test.js index 0a5e838fe..95504d3f5 100644 --- a/test/token/ERC721/extensions/ERC721Burnable.test.js +++ b/test/token/ERC721/extensions/ERC721Burnable.test.js @@ -32,7 +32,7 @@ describe('ERC721Burnable', function () { await expect(this.token.connect(this.owner).burn(tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); await expect(this.token.ownerOf(tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') @@ -61,7 +61,7 @@ describe('ERC721Burnable', function () { it('reverts', async function () { await expect(this.token.connect(this.another).burn(tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') - .withArgs(this.another.address, tokenId); + .withArgs(this.another, tokenId); }); }); diff --git a/test/token/ERC721/extensions/ERC721Consecutive.test.js b/test/token/ERC721/extensions/ERC721Consecutive.test.js index b83e2feb4..d2eda944c 100644 --- a/test/token/ERC721/extensions/ERC721Consecutive.test.js +++ b/test/token/ERC721/extensions/ERC721Consecutive.test.js @@ -51,7 +51,7 @@ describe('ERC721Consecutive', function () { first /* fromTokenId */, first + batch.amount - 1n /* toTokenId */, ethers.ZeroAddress /* fromAddress */, - batch.receiver.address /* toAddress */, + batch.receiver /* toAddress */, ); } else { // ".to.not.emit" only looks at event name, and doesn't check the parameters @@ -125,7 +125,7 @@ describe('ERC721Consecutive', function () { await expect(this.token.$_mint(this.alice, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.alice.address, tokenId); + .withArgs(ethers.ZeroAddress, this.alice, tokenId); }); it('cannot mint a token that has been batched minted', async function () { @@ -145,13 +145,13 @@ describe('ERC721Consecutive', function () { it('core takes over ownership on transfer', async function () { await this.token.connect(this.alice).transferFrom(this.alice, this.receiver, tokenId); - expect(await this.token.ownerOf(tokenId)).to.equal(this.receiver.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.receiver); }); it('tokens can be burned and re-minted #1', async function () { await expect(this.token.connect(this.alice).$_burn(tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(this.alice.address, ethers.ZeroAddress, tokenId); + .withArgs(this.alice, ethers.ZeroAddress, tokenId); await expect(this.token.ownerOf(tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') @@ -159,9 +159,9 @@ describe('ERC721Consecutive', function () { await expect(this.token.$_mint(this.bruce, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.bruce.address, tokenId); + .withArgs(ethers.ZeroAddress, this.bruce, tokenId); - expect(await this.token.ownerOf(tokenId)).to.equal(this.bruce.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.bruce); }); it('tokens can be burned and re-minted #2', async function () { @@ -174,14 +174,14 @@ describe('ERC721Consecutive', function () { // mint await expect(this.token.$_mint(this.alice, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.alice.address, tokenId); + .withArgs(ethers.ZeroAddress, this.alice, tokenId); - expect(await this.token.ownerOf(tokenId)).to.equal(this.alice.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.alice); // burn await expect(await this.token.$_burn(tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(this.alice.address, ethers.ZeroAddress, tokenId); + .withArgs(this.alice, ethers.ZeroAddress, tokenId); await expect(this.token.ownerOf(tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') @@ -190,9 +190,9 @@ describe('ERC721Consecutive', function () { // re-mint await expect(this.token.$_mint(this.bruce, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.bruce.address, tokenId); + .withArgs(ethers.ZeroAddress, this.bruce, tokenId); - expect(await this.token.ownerOf(tokenId)).to.equal(this.bruce.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.bruce); }); }); }); diff --git a/test/token/ERC721/extensions/ERC721Pausable.test.js b/test/token/ERC721/extensions/ERC721Pausable.test.js index 2be0c902d..56585e744 100644 --- a/test/token/ERC721/extensions/ERC721Pausable.test.js +++ b/test/token/ERC721/extensions/ERC721Pausable.test.js @@ -68,7 +68,7 @@ describe('ERC721Pausable', function () { describe('ownerOf', function () { it('returns the amount of tokens owned by the given address', async function () { - expect(await this.token.ownerOf(tokenId)).to.equal(this.owner.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.owner); }); }); diff --git a/test/token/ERC721/extensions/ERC721URIStorage.test.js b/test/token/ERC721/extensions/ERC721URIStorage.test.js index 3a74f55ca..830c13a73 100644 --- a/test/token/ERC721/extensions/ERC721URIStorage.test.js +++ b/test/token/ERC721/extensions/ERC721URIStorage.test.js @@ -18,7 +18,7 @@ async function fixture() { return { owner, token }; } -contract('ERC721URIStorage', function () { +describe('ERC721URIStorage', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); diff --git a/test/token/ERC721/extensions/ERC721Votes.test.js b/test/token/ERC721/extensions/ERC721Votes.test.js index f52e9ca95..dcae1b8d2 100644 --- a/test/token/ERC721/extensions/ERC721Votes.test.js +++ b/test/token/ERC721/extensions/ERC721Votes.test.js @@ -2,7 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture, mine } = require('@nomicfoundation/hardhat-network-helpers'); -const { bigint: time } = require('../../../helpers/time'); +const time = require('../../../helpers/time'); const { shouldBehaveLikeVotes } = require('../../../governance/utils/Votes.behavior'); @@ -58,7 +58,7 @@ describe('ERC721Votes', function () { it('no delegation', async function () { await expect(this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0])) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .withArgs(this.holder, this.recipient, tokens[0]) .to.not.emit(this.token, 'DelegateVotesChanged'); this.holderVotes = 0n; @@ -71,9 +71,9 @@ describe('ERC721Votes', function () { const tx = await this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0]); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .withArgs(this.holder, this.recipient, tokens[0]) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, 1n, 0n); + .withArgs(this.holder, 1n, 0n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); @@ -91,9 +91,9 @@ describe('ERC721Votes', function () { const tx = await this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0]); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .withArgs(this.holder, this.recipient, tokens[0]) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.recipient.address, 0n, 1n); + .withArgs(this.recipient, 0n, 1n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); @@ -112,11 +112,11 @@ describe('ERC721Votes', function () { const tx = await this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0]); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .withArgs(this.holder, this.recipient, tokens[0]) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, 1n, 0n) + .withArgs(this.holder, 1n, 0n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.recipient.address, 0n, 1n); + .withArgs(this.recipient, 0n, 1n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); diff --git a/test/token/ERC721/extensions/ERC721Wrapper.test.js b/test/token/ERC721/extensions/ERC721Wrapper.test.js index 2c093a087..eeead4c1f 100644 --- a/test/token/ERC721/extensions/ERC721Wrapper.test.js +++ b/test/token/ERC721/extensions/ERC721Wrapper.test.js @@ -35,7 +35,7 @@ describe('ERC721Wrapper', function () { }); it('has underlying', async function () { - expect(await this.token.underlying()).to.equal(this.underlying.target); + expect(await this.token.underlying()).to.equal(this.underlying); }); describe('depositFor', function () { @@ -44,9 +44,9 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.owner.address, this.token.target, tokenId) + .withArgs(this.owner, this.token, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, tokenId); + .withArgs(ethers.ZeroAddress, this.owner, tokenId); }); it('works with approval for all', async function () { @@ -54,9 +54,9 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.owner.address, this.token.target, tokenId) + .withArgs(this.owner, this.token, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, tokenId); + .withArgs(ethers.ZeroAddress, this.owner, tokenId); }); it('works sending to another account', async function () { @@ -64,9 +64,9 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.owner).depositFor(this.other, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.owner.address, this.token.target, tokenId) + .withArgs(this.owner, this.token, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.other.address, tokenId); + .withArgs(ethers.ZeroAddress, this.other, tokenId); }); it('works with multiple tokens', async function () { @@ -75,19 +75,19 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId, otherTokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.owner.address, this.token.target, tokenId) + .withArgs(this.owner, this.token, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, tokenId) + .withArgs(ethers.ZeroAddress, this.owner, tokenId) .to.emit(this.underlying, 'Transfer') - .withArgs(this.owner.address, this.token.target, otherTokenId) + .withArgs(this.owner, this.token, otherTokenId) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, otherTokenId); + .withArgs(ethers.ZeroAddress, this.owner, otherTokenId); }); it('reverts with missing approval', async function () { await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId])) .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') - .withArgs(this.token.target, tokenId); + .withArgs(this.token, tokenId); }); }); @@ -100,9 +100,9 @@ describe('ERC721Wrapper', function () { it('works for an owner', async function () { await expect(this.token.connect(this.owner).withdrawTo(this.owner, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.owner.address, tokenId) + .withArgs(this.token, this.owner, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); }); it('works for an approved', async function () { @@ -110,9 +110,9 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.approved).withdrawTo(this.owner, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.owner.address, tokenId) + .withArgs(this.token, this.owner, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); }); it('works for an approved for all', async function () { @@ -120,15 +120,15 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.approved).withdrawTo(this.owner, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.owner.address, tokenId) + .withArgs(this.token, this.owner, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); }); it("doesn't work for a non-owner nor approved", async function () { await expect(this.token.connect(this.other).withdrawTo(this.owner, [tokenId])) .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') - .withArgs(this.other.address, tokenId); + .withArgs(this.other, tokenId); }); it('works with multiple tokens', async function () { @@ -137,21 +137,21 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.owner).withdrawTo(this.owner, [tokenId, otherTokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.owner.address, tokenId) + .withArgs(this.token, this.owner, tokenId) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.owner.address, tokenId) + .withArgs(this.token, this.owner, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId) + .withArgs(this.owner, ethers.ZeroAddress, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); }); it('works to another account', async function () { await expect(this.token.connect(this.owner).withdrawTo(this.other, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.other.address, tokenId) + .withArgs(this.token, this.other, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); }); }); @@ -166,13 +166,13 @@ describe('ERC721Wrapper', function () { ), ) .to.be.revertedWithCustomError(this.token, 'ERC721UnsupportedToken') - .withArgs(this.other.address); + .withArgs(this.other); }); it('mints a token to from', async function () { await expect(this.underlying.connect(this.owner).safeTransferFrom(this.owner, this.token, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, tokenId); + .withArgs(ethers.ZeroAddress, this.owner, tokenId); }); }); @@ -183,7 +183,7 @@ describe('ERC721Wrapper', function () { await expect(this.token.$_recover(this.other, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.other.address, tokenId); + .withArgs(ethers.ZeroAddress, this.other, tokenId); }); it('reverts if there is nothing to recover', async function () { @@ -191,7 +191,7 @@ describe('ERC721Wrapper', function () { await expect(this.token.$_recover(holder, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721IncorrectOwner') - .withArgs(this.token.target, tokenId, holder); + .withArgs(this.token, tokenId, holder); }); }); diff --git a/test/token/ERC721/utils/ERC721Holder.test.js b/test/token/ERC721/utils/ERC721Holder.test.js index 01b774930..31dd2fd20 100644 --- a/test/token/ERC721/utils/ERC721Holder.test.js +++ b/test/token/ERC721/utils/ERC721Holder.test.js @@ -15,6 +15,6 @@ describe('ERC721Holder', function () { const receiver = await ethers.deployContract('$ERC721Holder'); await token.connect(owner).safeTransferFrom(owner, receiver, tokenId); - expect(await token.ownerOf(tokenId)).to.equal(receiver.target); + expect(await token.ownerOf(tokenId)).to.equal(receiver); }); }); diff --git a/test/utils/Address.test.js b/test/utils/Address.test.js index 6186d18a7..bdfd64bf9 100644 --- a/test/utils/Address.test.js +++ b/test/utils/Address.test.js @@ -29,7 +29,7 @@ describe('Address', function () { it('reverts when sending non-zero amounts', async function () { await expect(this.mock.$sendValue(this.other, 1)) .to.be.revertedWithCustomError(this.mock, 'AddressInsufficientBalance') - .withArgs(this.mock.target); + .withArgs(this.mock); }); }); @@ -42,7 +42,7 @@ describe('Address', function () { describe('with EOA recipient', function () { it('sends 0 wei', async function () { - await expect(this.mock.$sendValue(this.recipient, 0)).to.changeEtherBalance(this.recipient.address, 0); + await expect(this.mock.$sendValue(this.recipient, 0)).to.changeEtherBalance(this.recipient, 0); }); it('sends non-zero amounts', async function () { @@ -60,7 +60,7 @@ describe('Address', function () { it('reverts when sending more than the balance', async function () { await expect(this.mock.$sendValue(this.recipient, funds + 1n)) .to.be.revertedWithCustomError(this.mock, 'AddressInsufficientBalance') - .withArgs(this.mock.target); + .withArgs(this.mock); }); }); @@ -145,7 +145,7 @@ describe('Address', function () { await expect(this.mock.$functionCall(this.recipient, call)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.recipient.address); + .withArgs(this.recipient); }); }); }); @@ -170,7 +170,7 @@ describe('Address', function () { await expect(this.mock.$functionCallWithValue(this.target, call, value)) .to.be.revertedWithCustomError(this.mock, 'AddressInsufficientBalance') - .withArgs(this.mock.target); + .withArgs(this.mock); }); it('calls the requested function with existing value', async function () { @@ -240,7 +240,7 @@ describe('Address', function () { await expect(this.mock.$functionStaticCall(this.recipient, call)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.recipient.address); + .withArgs(this.recipient); }); }); @@ -273,7 +273,7 @@ describe('Address', function () { await expect(this.mock.$functionDelegateCall(this.recipient, call)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.recipient.address); + .withArgs(this.recipient); }); }); diff --git a/test/utils/Context.behavior.js b/test/utils/Context.behavior.js index 9e986db7a..adb140fc1 100644 --- a/test/utils/Context.behavior.js +++ b/test/utils/Context.behavior.js @@ -12,15 +12,13 @@ function shouldBehaveLikeRegularContext() { describe('msgSender', function () { it('returns the transaction sender when called from an EOA', async function () { - await expect(this.context.connect(this.sender).msgSender()) - .to.emit(this.context, 'Sender') - .withArgs(this.sender.address); + await expect(this.context.connect(this.sender).msgSender()).to.emit(this.context, 'Sender').withArgs(this.sender); }); it('returns the transaction sender when called from another contract', async function () { await expect(this.contextHelper.connect(this.sender).callSender(this.context)) .to.emit(this.context, 'Sender') - .withArgs(this.contextHelper.target); + .withArgs(this.contextHelper); }); }); diff --git a/test/utils/Create2.test.js b/test/utils/Create2.test.js index df807e757..86d00e131 100644 --- a/test/utils/Create2.test.js +++ b/test/utils/Create2.test.js @@ -68,7 +68,7 @@ describe('Create2', function () { .to.emit(this.factory, 'return$deploy') .withArgs(offChainComputed); - expect(this.constructorLessBytecode).to.include((await web3.eth.getCode(offChainComputed)).slice(2)); + expect(this.constructorLessBytecode).to.include((await ethers.provider.getCode(offChainComputed)).slice(2)); }); it('deploys a contract with constructor arguments', async function () { @@ -84,7 +84,7 @@ describe('Create2', function () { const instance = await ethers.getContractAt('VestingWallet', offChainComputed); - expect(await instance.owner()).to.equal(this.other.address); + expect(await instance.owner()).to.equal(this.other); }); it('deploys a contract with funds deposited in the factory', async function () { diff --git a/test/utils/Multicall.test.js b/test/utils/Multicall.test.js index 7ec7e20ce..9c84e443a 100644 --- a/test/utils/Multicall.test.js +++ b/test/utils/Multicall.test.js @@ -29,9 +29,9 @@ describe('Multicall', function () { ]), ) .to.emit(this.mock, 'Transfer') - .withArgs(this.holder.address, this.alice.address, this.amount / 2n) + .withArgs(this.holder, this.alice, this.amount / 2n) .to.emit(this.mock, 'Transfer') - .withArgs(this.holder.address, this.bruce.address, this.amount / 3n); + .withArgs(this.holder, this.bruce, this.amount / 3n); expect(await this.mock.balanceOf(this.alice)).to.equal(this.amount / 2n); expect(await this.mock.balanceOf(this.bruce)).to.equal(this.amount / 3n); @@ -54,7 +54,7 @@ describe('Multicall', function () { ]), ) .to.be.revertedWithCustomError(this.mock, 'ERC20InsufficientBalance') - .withArgs(this.holder.address, 0, this.amount); + .withArgs(this.holder, 0, this.amount); expect(await this.mock.balanceOf(this.alice)).to.equal(0n); }); @@ -67,6 +67,6 @@ describe('Multicall', function () { ]), ) .to.be.revertedWithCustomError(this.mock, 'ERC20InsufficientBalance') - .withArgs(this.holder.address, 0, this.amount); + .withArgs(this.holder, 0, this.amount); }); }); diff --git a/test/utils/Nonces.test.js b/test/utils/Nonces.test.js index 18d20defb..2cb4798de 100644 --- a/test/utils/Nonces.test.js +++ b/test/utils/Nonces.test.js @@ -69,7 +69,7 @@ describe('Nonces', function () { await expect(this.mock.$_useCheckedNonce(this.sender, currentNonce + 1n)) .to.be.revertedWithCustomError(this.mock, 'InvalidAccountNonce') - .withArgs(this.sender.address, currentNonce); + .withArgs(this.sender, currentNonce); }); }); }); diff --git a/test/utils/Pausable.test.js b/test/utils/Pausable.test.js index de46bc46b..67d74a0d8 100644 --- a/test/utils/Pausable.test.js +++ b/test/utils/Pausable.test.js @@ -39,7 +39,7 @@ describe('Pausable', function () { }); it('emits a Paused event', async function () { - await expect(this.tx).to.emit(this.mock, 'Paused').withArgs(this.pauser.address); + await expect(this.tx).to.emit(this.mock, 'Paused').withArgs(this.pauser); }); it('cannot perform normal process in pause', async function () { @@ -67,7 +67,7 @@ describe('Pausable', function () { }); it('emits an Unpaused event', async function () { - await expect(this.tx).to.emit(this.mock, 'Unpaused').withArgs(this.pauser.address); + await expect(this.tx).to.emit(this.mock, 'Unpaused').withArgs(this.pauser); }); it('should resume allowing normal process', async function () { diff --git a/test/utils/cryptography/ECDSA.test.js b/test/utils/cryptography/ECDSA.test.js index 3c0ce76c6..6b24bdbce 100644 --- a/test/utils/cryptography/ECDSA.test.js +++ b/test/utils/cryptography/ECDSA.test.js @@ -6,10 +6,6 @@ const TEST_MESSAGE = ethers.id('OpenZeppelin'); const WRONG_MESSAGE = ethers.id('Nope'); const NON_HASH_MESSAGE = '0xabcd'; -function toSignature(signature) { - return ethers.Signature.from(signature); -} - async function fixture() { const [signer] = await ethers.getSigners(); const mock = await ethers.deployContract('$ECDSA'); @@ -48,7 +44,7 @@ describe('ECDSA', function () { const signature = await this.signer.signMessage(TEST_MESSAGE); // Recover the signer address from the generated message and signature. - expect(await this.mock.$recover(ethers.hashMessage(TEST_MESSAGE), signature)).to.equal(this.signer.address); + expect(await this.mock.$recover(ethers.hashMessage(TEST_MESSAGE), signature)).to.equal(this.signer); }); it('returns signer address with correct signature for arbitrary length message', async function () { @@ -56,12 +52,12 @@ describe('ECDSA', function () { const signature = await this.signer.signMessage(NON_HASH_MESSAGE); // Recover the signer address from the generated message and signature. - expect(await this.mock.$recover(ethers.hashMessage(NON_HASH_MESSAGE), signature)).to.equal(this.signer.address); + expect(await this.mock.$recover(ethers.hashMessage(NON_HASH_MESSAGE), signature)).to.equal(this.signer); }); it('returns a different address', async function () { const signature = await this.signer.signMessage(TEST_MESSAGE); - expect(await this.mock.$recover(WRONG_MESSAGE, signature)).to.not.be.equal(this.signer.address); + expect(await this.mock.$recover(WRONG_MESSAGE, signature)).to.not.be.equal(this.signer); }); it('reverts with invalid signature', async function () { @@ -76,7 +72,6 @@ describe('ECDSA', function () { }); describe('with v=27 signature', function () { - // Signature generated outside ganache with method web3.eth.sign(signer, message) const signer = '0x2cc1166f6212628A0deEf2B33BEFB2187D35b86c'; // eslint-disable-next-line max-len const signatureWithoutV = @@ -87,7 +82,7 @@ describe('ECDSA', function () { const signature = ethers.concat([signatureWithoutV, v]); expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.equal(signer); - const { r, s, yParityAndS: vs } = toSignature(signature); + const { r, s, yParityAndS: vs } = ethers.Signature.from(signature); expect(await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s)).to.equal( signer, ); @@ -100,7 +95,7 @@ describe('ECDSA', function () { const signature = ethers.concat([signatureWithoutV, v]); expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.not.equal(signer); - const { r, s, yParityAndS: vs } = toSignature(signature); + const { r, s, yParityAndS: vs } = ethers.Signature.from(signature); expect( await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), ).to.not.equal(signer); @@ -118,7 +113,7 @@ describe('ECDSA', function () { 'ECDSAInvalidSignature', ); - const { r, s } = toSignature(signature); + const { r, s } = ethers.Signature.from(signature); await expect( this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), ).to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignature'); @@ -128,7 +123,9 @@ describe('ECDSA', function () { it('rejects short EIP2098 format', async function () { const v = '0x1b'; // 27 = 1b. const signature = ethers.concat([signatureWithoutV, v]); - await expect(this.mock.$recover(TEST_MESSAGE, toSignature(signature).compactSerialized)) + + const { compactSerialized } = ethers.Signature.from(signature); + await expect(this.mock.$recover(TEST_MESSAGE, compactSerialized)) .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureLength') .withArgs(64); }); @@ -145,7 +142,7 @@ describe('ECDSA', function () { const signature = ethers.concat([signatureWithoutV, v]); expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.equal(signer); - const { r, s, yParityAndS: vs } = toSignature(signature); + const { r, s, yParityAndS: vs } = ethers.Signature.from(signature); expect(await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s)).to.equal( signer, ); @@ -158,7 +155,7 @@ describe('ECDSA', function () { const signature = ethers.concat([signatureWithoutV, v]); expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.not.equal(signer); - const { r, s, yParityAndS: vs } = toSignature(signature); + const { r, s, yParityAndS: vs } = ethers.Signature.from(signature); expect( await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), ).to.not.equal(signer); @@ -176,7 +173,7 @@ describe('ECDSA', function () { 'ECDSAInvalidSignature', ); - const { r, s } = toSignature(signature); + const { r, s } = ethers.Signature.from(signature); await expect( this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), ).to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignature'); @@ -184,9 +181,11 @@ describe('ECDSA', function () { }); it('rejects short EIP2098 format', async function () { - const v = '0x1c'; // 27 = 1b. + const v = '0x1b'; // 28 = 1b. const signature = ethers.concat([signatureWithoutV, v]); - await expect(this.mock.$recover(TEST_MESSAGE, toSignature(signature).compactSerialized)) + + const { compactSerialized } = ethers.Signature.from(signature); + await expect(this.mock.$recover(TEST_MESSAGE, compactSerialized)) .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureLength') .withArgs(64); }); @@ -208,7 +207,7 @@ describe('ECDSA', function () { await expect(this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s)) .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureS') .withArgs(s); - expect(() => toSignature(highSSignature)).to.throw('non-canonical s'); + expect(() => ethers.Signature.from(highSSignature)).to.throw('non-canonical s'); }); }); }); diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js index 03a5b7cca..166038b36 100644 --- a/test/utils/cryptography/EIP712.test.js +++ b/test/utils/cryptography/EIP712.test.js @@ -4,7 +4,6 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { getDomain, domainSeparator, hashTypedData } = require('../../helpers/eip712'); const { formatType } = require('../../helpers/eip712-types'); -const { getChainId } = require('../../helpers/chainid'); const LENGTHS = { short: ['A Name', '1'], @@ -21,7 +20,7 @@ const fixture = async () => { lengths[shortOrLong].domain = { name, version, - chainId: await getChainId(), + chainId: await ethers.provider.getNetwork().then(({ chainId }) => chainId), verifyingContract: lengths[shortOrLong].eip712.target, }; } diff --git a/test/utils/introspection/ERC165.test.js b/test/utils/introspection/ERC165.test.js index d72791218..83d861ba1 100644 --- a/test/utils/introspection/ERC165.test.js +++ b/test/utils/introspection/ERC165.test.js @@ -9,7 +9,7 @@ async function fixture() { }; } -contract('ERC165', function () { +describe('ERC165', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); diff --git a/test/utils/introspection/SupportsInterface.behavior.js b/test/utils/introspection/SupportsInterface.behavior.js index 83b264592..27d153170 100644 --- a/test/utils/introspection/SupportsInterface.behavior.js +++ b/test/utils/introspection/SupportsInterface.behavior.js @@ -1,5 +1,5 @@ const { expect } = require('chai'); -const { selector, interfaceId } = require('../../helpers/methods'); +const { interfaceId } = require('../../helpers/methods'); const { mapValues } = require('../../helpers/iterate'); const INVALID_ID = '0xffffffff'; @@ -123,15 +123,6 @@ function shouldSupportInterfaces(interfaces = []) { // Check the presence of each function in the contract's interface for (const fnSig of SIGNATURES[k]) { - // TODO: Remove Truffle case when ethersjs migration is done - if (this.contractUnderTest.abi) { - const fnSelector = selector(fnSig); - return expect(this.contractUnderTest.abi.filter(fn => fn.signature === fnSelector).length).to.equal( - 1, - `did not find ${fnSig}`, - ); - } - expect(this.contractUnderTest.interface.hasFunction(fnSig), `did not find ${fnSig}`).to.be.true; } } diff --git a/test/utils/math/Math.test.js b/test/utils/math/Math.test.js index dda94f8d3..cb25db67c 100644 --- a/test/utils/math/Math.test.js +++ b/test/utils/math/Math.test.js @@ -3,10 +3,8 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); +const { Rounding } = require('../../helpers/enums'); const { min, max } = require('../../helpers/math'); -const { - bigint: { Rounding }, -} = require('../../helpers/enums.js'); const RoundingDown = [Rounding.Floor, Rounding.Trunc]; const RoundingUp = [Rounding.Ceil, Rounding.Expand]; diff --git a/test/utils/math/SafeCast.test.js b/test/utils/math/SafeCast.test.js index a69e75c99..ecf55dc35 100644 --- a/test/utils/math/SafeCast.test.js +++ b/test/utils/math/SafeCast.test.js @@ -9,7 +9,7 @@ async function fixture() { return { mock }; } -contract('SafeCast', function () { +describe('SafeCast', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); diff --git a/test/utils/math/SignedMath.test.js b/test/utils/math/SignedMath.test.js index 51aa5d8fb..877f3b480 100644 --- a/test/utils/math/SignedMath.test.js +++ b/test/utils/math/SignedMath.test.js @@ -14,7 +14,7 @@ async function fixture() { return { mock }; } -contract('SignedMath', function () { +describe('SignedMath', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); diff --git a/test/utils/structs/Checkpoints.test.js b/test/utils/structs/Checkpoints.test.js index 2c15e082d..9458c486a 100644 --- a/test/utils/structs/Checkpoints.test.js +++ b/test/utils/structs/Checkpoints.test.js @@ -2,7 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { VALUE_SIZES } = require('../../../scripts/generate/templates/Checkpoints.opts.js'); +const { VALUE_SIZES } = require('../../../scripts/generate/templates/Checkpoints.opts'); const last = array => (array.length ? array[array.length - 1] : undefined); diff --git a/test/utils/types/Time.test.js b/test/utils/types/Time.test.js index 171a84526..3ab6fefa8 100644 --- a/test/utils/types/Time.test.js +++ b/test/utils/types/Time.test.js @@ -4,9 +4,7 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { product } = require('../../helpers/iterate'); const { max } = require('../../helpers/math'); -const { - bigint: { clock }, -} = require('../../helpers/time'); +const time = require('../../helpers/time'); const MAX_UINT32 = 1n << (32n - 1n); const MAX_UINT48 = 1n << (48n - 1n); @@ -43,18 +41,18 @@ async function fixture() { return { mock }; } -contract('Time', function () { +describe('Time', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); describe('clocks', function () { it('timestamp', async function () { - expect(await this.mock.$timestamp()).to.equal(await clock.timestamp()); + expect(await this.mock.$timestamp()).to.equal(await time.clock.timestamp()); }); it('block number', async function () { - expect(await this.mock.$blockNumber()).to.equal(await clock.blocknumber()); + expect(await this.mock.$blockNumber()).to.equal(await time.clock.blocknumber()); }); }); @@ -92,7 +90,7 @@ contract('Time', function () { }); it('get & getFull', async function () { - const timepoint = await clock.timestamp().then(BigInt); + const timepoint = await time.clock.timestamp(); const valueBefore = 24194n; const valueAfter = 4214143n; @@ -110,7 +108,7 @@ contract('Time', function () { }); it('withUpdate', async function () { - const timepoint = await clock.timestamp().then(BigInt); + const timepoint = await time.clock.timestamp(); const valueBefore = 24194n; const valueAfter = 4214143n; const newvalueAfter = 94716n; From 04cb0141442074f321a7983c9472dd79d5a5cc76 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Tue, 2 Jan 2024 13:31:33 -0300 Subject: [PATCH 149/167] Make tests style more uniform (#4812) --- test/access/AccessControl.behavior.js | 16 ++--- test/access/manager/AccessManager.test.js | 10 +-- test/access/manager/AuthorityUtils.test.js | 12 ++-- test/finance/VestingWallet.behavior.js | 4 +- test/finance/VestingWallet.test.js | 8 +-- test/metatx/ERC2771Context.test.js | 8 +-- test/metatx/ERC2771Forwarder.test.js | 30 ++++---- test/proxy/transparent/ProxyAdmin.test.js | 16 ++--- test/sanity.test.js | 4 +- .../extensions/ERC1155Pausable.test.js | 2 +- .../ERC20/extensions/ERC20Wrapper.test.js | 8 +-- test/token/ERC20/utils/SafeERC20.test.js | 4 +- .../ERC721/extensions/ERC721Burnable.test.js | 2 +- .../ERC721/extensions/ERC721Pausable.test.js | 2 +- test/utils/Arrays.test.js | 4 +- test/utils/cryptography/MerkleProof.test.js | 32 ++++----- test/utils/structs/BitMap.test.js | 72 +++++++++---------- test/utils/structs/EnumerableMap.behavior.js | 2 +- 18 files changed, 118 insertions(+), 118 deletions(-) diff --git a/test/access/AccessControl.behavior.js b/test/access/AccessControl.behavior.js index 7a0e292bd..1b4e27a61 100644 --- a/test/access/AccessControl.behavior.js +++ b/test/access/AccessControl.behavior.js @@ -18,7 +18,7 @@ function shouldBehaveLikeAccessControl() { describe('default admin', function () { it('deployer has default admin role', async function () { - expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.equal(true); + expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.true; }); it("other roles's admin is the default admin role", async function () { @@ -52,7 +52,7 @@ function shouldBehaveLikeAccessControl() { describe('revoking', function () { it('roles that are not had can be revoked', async function () { - expect(await this.mock.hasRole(ROLE, this.authorized)).to.equal(false); + expect(await this.mock.hasRole(ROLE, this.authorized)).to.be.false; await expect(this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.authorized)).to.not.emit( this.mock, @@ -60,7 +60,7 @@ function shouldBehaveLikeAccessControl() { ); }); - context('with granted role', function () { + describe('with granted role', function () { beforeEach(async function () { await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized); }); @@ -70,7 +70,7 @@ function shouldBehaveLikeAccessControl() { .to.emit(this.mock, 'RoleRevoked') .withArgs(ROLE, this.authorized, this.defaultAdmin); - expect(await this.mock.hasRole(ROLE, this.authorized)).to.equal(false); + expect(await this.mock.hasRole(ROLE, this.authorized)).to.be.false; }); it('non-admin cannot revoke role', async function () { @@ -98,7 +98,7 @@ function shouldBehaveLikeAccessControl() { ); }); - context('with granted role', function () { + describe('with granted role', function () { beforeEach(async function () { await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized); }); @@ -108,7 +108,7 @@ function shouldBehaveLikeAccessControl() { .to.emit(this.mock, 'RoleRevoked') .withArgs(ROLE, this.authorized, this.authorized); - expect(await this.mock.hasRole(ROLE, this.authorized)).to.equal(false); + expect(await this.mock.hasRole(ROLE, this.authorized)).to.be.false; }); it('only the sender can renounce their roles', async function () { @@ -666,7 +666,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await this.mock.connect(this.other).renounceRole(DEFAULT_ADMIN_ROLE, this.other); expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.true; - expect(await this.mock.defaultAdmin()).to.be.equal(this.defaultAdmin); + expect(await this.mock.defaultAdmin()).to.equal(this.defaultAdmin); }); it('renounces role', async function () { @@ -676,7 +676,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin, this.defaultAdmin); expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.false; - expect(await this.mock.defaultAdmin()).to.be.equal(ethers.ZeroAddress); + expect(await this.mock.defaultAdmin()).to.equal(ethers.ZeroAddress); expect(await this.mock.owner()).to.equal(ethers.ZeroAddress); const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index 959fd7cda..108795dff 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -1072,13 +1072,13 @@ describe('AccessManager', function () { }); it('changes the authority', async function () { - expect(await this.newManagedTarget.authority()).to.be.equal(this.manager); + expect(await this.newManagedTarget.authority()).to.equal(this.manager); await expect(this.manager.connect(this.admin).updateAuthority(this.newManagedTarget, this.newAuthority)) .to.emit(this.newManagedTarget, 'AuthorityUpdated') // Managed contract is responsible of notifying the change through an event .withArgs(this.newAuthority); - expect(await this.newManagedTarget.authority()).to.be.equal(this.newAuthority); + expect(await this.newManagedTarget.authority()).to.equal(this.newAuthority); }); }); @@ -1250,7 +1250,7 @@ describe('AccessManager', function () { // Already in effect const currentTimestamp = await time.clock.timestamp(); - expect(currentTimestamp).to.be.equal(access[0]); + expect(currentTimestamp).to.equal(access[0]); expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ true, this.executionDelay.toString(), @@ -1291,7 +1291,7 @@ describe('AccessManager', function () { // Already in effect const currentTimestamp = await time.clock.timestamp(); - expect(currentTimestamp).to.be.equal(access[0]); + expect(currentTimestamp).to.equal(access[0]); expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ true, executionDelay.toString(), @@ -2342,7 +2342,7 @@ describe('AccessManager', function () { }); it('initial state', async function () { - expect(await this.ownable.owner()).to.be.equal(this.manager); + expect(await this.ownable.owner()).to.equal(this.manager); }); describe('Contract is closed', function () { diff --git a/test/access/manager/AuthorityUtils.test.js b/test/access/manager/AuthorityUtils.test.js index 44fa10712..905913f14 100644 --- a/test/access/manager/AuthorityUtils.test.js +++ b/test/access/manager/AuthorityUtils.test.js @@ -40,8 +40,8 @@ describe('AuthorityUtils', function () { this.other, '0x12345678', ); - expect(immediate).to.equal(false); - expect(delay).to.be.equal(0n); + expect(immediate).to.be.false; + expect(delay).to.equal(0n); }); }); @@ -60,7 +60,7 @@ describe('AuthorityUtils', function () { '0x12345678', ); expect(immediate).to.equal(this.immediate); - expect(delay).to.be.equal(0n); + expect(delay).to.equal(0n); }); }); @@ -76,7 +76,7 @@ describe('AuthorityUtils', function () { await this.authority._setDelay(delay); const result = await this.mock.$canCallWithDelay(this.authority, this.user, this.other, '0x12345678'); expect(result.immediate).to.equal(immediate); - expect(result.delay).to.be.equal(delay); + expect(result.delay).to.equal(delay); }); } } @@ -94,8 +94,8 @@ describe('AuthorityUtils', function () { this.other, '0x12345678', ); - expect(immediate).to.equal(false); - expect(delay).to.be.equal(0n); + expect(immediate).to.be.false; + expect(delay).to.equal(0n); }); }); }); diff --git a/test/finance/VestingWallet.behavior.js b/test/finance/VestingWallet.behavior.js index a934dc4b0..4b4804ac5 100644 --- a/test/finance/VestingWallet.behavior.js +++ b/test/finance/VestingWallet.behavior.js @@ -7,8 +7,8 @@ function shouldBehaveLikeVesting() { await time.increaseTo.timestamp(timestamp); const vesting = this.vestingFn(timestamp); - expect(await this.mock.vestedAmount(...this.args, timestamp)).to.be.equal(vesting); - expect(await this.mock.releasable(...this.args)).to.be.equal(vesting); + expect(await this.mock.vestedAmount(...this.args, timestamp)).to.equal(vesting); + expect(await this.mock.releasable(...this.args)).to.equal(vesting); } }); diff --git a/test/finance/VestingWallet.test.js b/test/finance/VestingWallet.test.js index eee9041dc..8ea87b035 100644 --- a/test/finance/VestingWallet.test.js +++ b/test/finance/VestingWallet.test.js @@ -76,10 +76,10 @@ describe('VestingWallet', function () { }); it('check vesting contract', async function () { - expect(await this.mock.owner()).to.be.equal(this.beneficiary); - expect(await this.mock.start()).to.be.equal(this.start); - expect(await this.mock.duration()).to.be.equal(this.duration); - expect(await this.mock.end()).to.be.equal(this.start + this.duration); + expect(await this.mock.owner()).to.equal(this.beneficiary); + expect(await this.mock.start()).to.equal(this.start); + expect(await this.mock.duration()).to.equal(this.duration); + expect(await this.mock.end()).to.equal(this.start + this.duration); }); describe('vesting schedule', function () { diff --git a/test/metatx/ERC2771Context.test.js b/test/metatx/ERC2771Context.test.js index 2b69a486c..15da61dad 100644 --- a/test/metatx/ERC2771Context.test.js +++ b/test/metatx/ERC2771Context.test.js @@ -26,7 +26,7 @@ describe('ERC2771Context', function () { }); it('recognize trusted forwarder', async function () { - expect(await this.context.isTrustedForwarder(this.forwarder)).to.equal(true); + expect(await this.context.isTrustedForwarder(this.forwarder)).to.be.true; }); it('returns the trusted forwarder', async function () { @@ -55,7 +55,7 @@ describe('ERC2771Context', function () { req.signature = await this.sender.signTypedData(this.domain, this.types, req); - expect(await this.forwarder.verify(req)).to.equal(true); + expect(await this.forwarder.verify(req)).to.be.true; await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender); }); @@ -87,7 +87,7 @@ describe('ERC2771Context', function () { req.signature = this.sender.signTypedData(this.domain, this.types, req); - expect(await this.forwarder.verify(req)).to.equal(true); + expect(await this.forwarder.verify(req)).to.be.true; await expect(this.forwarder.execute(req)) .to.emit(this.context, 'Data') @@ -126,7 +126,7 @@ describe('ERC2771Context', function () { req.signature = await this.sender.signTypedData(this.domain, this.types, req); - expect(await this.forwarder.verify(req)).to.equal(true); + expect(await this.forwarder.verify(req)).to.be.true; await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender); }); diff --git a/test/metatx/ERC2771Forwarder.test.js b/test/metatx/ERC2771Forwarder.test.js index 5bd0bf404..8a2a09233 100644 --- a/test/metatx/ERC2771Forwarder.test.js +++ b/test/metatx/ERC2771Forwarder.test.js @@ -74,9 +74,9 @@ describe('ERC2771Forwarder', function () { describe('with valid signature', function () { it('returns true without altering the nonce', async function () { const request = await this.forgeRequest(); - expect(await this.forwarder.nonces(request.from)).to.be.equal(request.nonce); - expect(await this.forwarder.verify(request)).to.be.equal(true); - expect(await this.forwarder.nonces(request.from)).to.be.equal(request.nonce); + expect(await this.forwarder.nonces(request.from)).to.equal(request.nonce); + expect(await this.forwarder.verify(request)).to.be.true; + expect(await this.forwarder.nonces(request.from)).to.equal(request.nonce); }); }); @@ -86,18 +86,18 @@ describe('ERC2771Forwarder', function () { const request = await this.forgeRequest(); request[key] = typeof value == 'function' ? value(request[key]) : value; - expect(await this.forwarder.verify(request)).to.be.equal(false); + expect(await this.forwarder.verify(request)).to.be.false; }); } it('returns false with valid signature for non-current nonce', async function () { const request = await this.forgeRequest({ nonce: 1337n }); - expect(await this.forwarder.verify(request)).to.be.equal(false); + expect(await this.forwarder.verify(request)).to.be.false; }); it('returns false with valid signature for expired deadline', async function () { const request = await this.forgeRequest({ deadline: (await time.clock.timestamp()) - 1n }); - expect(await this.forwarder.verify(request)).to.be.equal(false); + expect(await this.forwarder.verify(request)).to.be.false; }); }); }); @@ -114,7 +114,7 @@ describe('ERC2771Forwarder', function () { .to.emit(this.forwarder, 'ExecutedForwardRequest') .withArgs(request.from, request.nonce, true); - expect(await this.forwarder.nonces(request.from)).to.be.equal(request.nonce + 1n); + expect(await this.forwarder.nonces(request.from)).to.equal(request.nonce + 1n); }); it('reverts with an unsuccessful request', async function () { @@ -196,7 +196,7 @@ describe('ERC2771Forwarder', function () { .then(block => block.getTransaction(0)) .then(tx => ethers.provider.getTransactionReceipt(tx.hash)); - expect(gasUsed).to.be.equal(gasLimit); + expect(gasUsed).to.equal(gasLimit); }); it('bubbles out of gas forced by the relayer', async function () { @@ -226,7 +226,7 @@ describe('ERC2771Forwarder', function () { .then(tx => ethers.provider.getTransactionReceipt(tx.hash)); // We assert that indeed the gas was totally consumed. - expect(gasUsed).to.be.equal(gasLimit); + expect(gasUsed).to.equal(gasLimit); }); }); @@ -245,7 +245,7 @@ describe('ERC2771Forwarder', function () { describe('with valid requests', function () { it('sanity', async function () { for (const request of this.requests) { - expect(await this.forwarder.verify(request)).to.be.equal(true); + expect(await this.forwarder.verify(request)).to.be.true; } }); @@ -264,7 +264,7 @@ describe('ERC2771Forwarder', function () { await this.forwarder.executeBatch(this.requests, this.another, { value: this.value }); for (const request of this.requests) { - expect(await this.forwarder.nonces(request.from)).to.be.equal(request.nonce + 1n); + expect(await this.forwarder.nonces(request.from)).to.equal(request.nonce + 1n); } }); }); @@ -395,12 +395,12 @@ describe('ERC2771Forwarder', function () { afterEach(async function () { // The invalid request value was refunded - expect(await ethers.provider.getBalance(this.refundReceiver)).to.be.equal( + expect(await ethers.provider.getBalance(this.refundReceiver)).to.equal( this.initialRefundReceiverBalance + this.requests[idx].value, ); // The invalid request from's nonce was not incremented - expect(await this.forwarder.nonces(this.requests[idx].from)).to.be.equal(this.initialTamperedRequestNonce); + expect(await this.forwarder.nonces(this.requests[idx].from)).to.equal(this.initialTamperedRequestNonce); }); }); @@ -423,7 +423,7 @@ describe('ERC2771Forwarder', function () { .then(block => block.getTransaction(0)) .then(tx => ethers.provider.getTransactionReceipt(tx.hash)); - expect(gasUsed).to.be.equal(gasLimit); + expect(gasUsed).to.equal(gasLimit); }); it('bubbles out of gas forced by the relayer', async function () { @@ -454,7 +454,7 @@ describe('ERC2771Forwarder', function () { .then(tx => ethers.provider.getTransactionReceipt(tx.hash)); // We assert that indeed the gas was totally consumed. - expect(gasUsed).to.be.equal(gasLimit); + expect(gasUsed).to.equal(gasLimit); }); }); }); diff --git a/test/proxy/transparent/ProxyAdmin.test.js b/test/proxy/transparent/ProxyAdmin.test.js index d70075d04..df430d46a 100644 --- a/test/proxy/transparent/ProxyAdmin.test.js +++ b/test/proxy/transparent/ProxyAdmin.test.js @@ -36,7 +36,7 @@ describe('ProxyAdmin', function () { }); describe('without data', function () { - context('with unauthorized account', function () { + describe('with unauthorized account', function () { it('fails to upgrade', async function () { await expect(this.proxyAdmin.connect(this.other).upgradeAndCall(this.proxy, this.v2, '0x')) .to.be.revertedWithCustomError(this.proxyAdmin, 'OwnableUnauthorizedAccount') @@ -44,16 +44,16 @@ describe('ProxyAdmin', function () { }); }); - context('with authorized account', function () { + describe('with authorized account', function () { it('upgrades implementation', async function () { await this.proxyAdmin.connect(this.admin).upgradeAndCall(this.proxy, this.v2, '0x'); - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.v2); }); }); }); describe('with data', function () { - context('with unauthorized account', function () { + describe('with unauthorized account', function () { it('fails to upgrade', async function () { const data = this.v1.interface.encodeFunctionData('initializeNonPayableWithValue', [1337n]); await expect(this.proxyAdmin.connect(this.other).upgradeAndCall(this.proxy, this.v2, data)) @@ -62,19 +62,19 @@ describe('ProxyAdmin', function () { }); }); - context('with authorized account', function () { - context('with invalid callData', function () { + describe('with authorized account', function () { + describe('with invalid callData', function () { it('fails to upgrade', async function () { const data = '0x12345678'; await expect(this.proxyAdmin.connect(this.admin).upgradeAndCall(this.proxy, this.v2, data)).to.be.reverted; }); }); - context('with valid callData', function () { + describe('with valid callData', function () { it('upgrades implementation', async function () { const data = this.v2.interface.encodeFunctionData('initializeNonPayableWithValue', [1337n]); await this.proxyAdmin.connect(this.admin).upgradeAndCall(this.proxy, this.v2, data); - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.v2); }); }); }); diff --git a/test/sanity.test.js b/test/sanity.test.js index 1fe2fa9c9..1733c9654 100644 --- a/test/sanity.test.js +++ b/test/sanity.test.js @@ -26,11 +26,11 @@ describe('Environment sanity', function () { it('cache and mine', async function () { blockNumberBefore = await ethers.provider.getBlockNumber(); await mine(); - expect(await ethers.provider.getBlockNumber()).to.be.equal(blockNumberBefore + 1); + expect(await ethers.provider.getBlockNumber()).to.equal(blockNumberBefore + 1); }); it('check snapshot', async function () { - expect(await ethers.provider.getBlockNumber()).to.be.equal(blockNumberBefore); + expect(await ethers.provider.getBlockNumber()).to.equal(blockNumberBefore); }); }); }); diff --git a/test/token/ERC1155/extensions/ERC1155Pausable.test.js b/test/token/ERC1155/extensions/ERC1155Pausable.test.js index 21a2e0bca..81c4f69bc 100644 --- a/test/token/ERC1155/extensions/ERC1155Pausable.test.js +++ b/test/token/ERC1155/extensions/ERC1155Pausable.test.js @@ -18,7 +18,7 @@ describe('ERC1155Pausable', function () { Object.assign(this, await loadFixture(fixture)); }); - context('when token is paused', function () { + describe('when token is paused', function () { beforeEach(async function () { await this.token.connect(this.holder).setApprovalForAll(this.operator, true); await this.token.$_mint(this.holder, firstTokenId, firstTokenValue, '0x'); diff --git a/test/token/ERC20/extensions/ERC20Wrapper.test.js b/test/token/ERC20/extensions/ERC20Wrapper.test.js index 697bfe523..14d8d9a64 100644 --- a/test/token/ERC20/extensions/ERC20Wrapper.test.js +++ b/test/token/ERC20/extensions/ERC20Wrapper.test.js @@ -26,7 +26,7 @@ describe('ERC20Wrapper', function () { }); afterEach('Underlying balance', async function () { - expect(await this.underlying.balanceOf(this.token)).to.be.equal(await this.token.totalSupply()); + expect(await this.underlying.balanceOf(this.token)).to.equal(await this.token.totalSupply()); }); it('has a name', async function () { @@ -38,17 +38,17 @@ describe('ERC20Wrapper', function () { }); it('has the same decimals as the underlying token', async function () { - expect(await this.token.decimals()).to.be.equal(decimals); + expect(await this.token.decimals()).to.equal(decimals); }); it('decimals default back to 18 if token has no metadata', async function () { const noDecimals = await ethers.deployContract('CallReceiverMock'); const token = await ethers.deployContract('$ERC20Wrapper', [`Wrapped ${name}`, `W${symbol}`, noDecimals]); - expect(await token.decimals()).to.be.equal(18n); + expect(await token.decimals()).to.equal(18n); }); it('has underlying', async function () { - expect(await this.token.underlying()).to.be.equal(this.underlying); + expect(await this.token.underlying()).to.equal(this.underlying); }); describe('deposit', function () { diff --git a/test/token/ERC20/utils/SafeERC20.test.js b/test/token/ERC20/utils/SafeERC20.test.js index 80d394edd..703fcd57b 100644 --- a/test/token/ERC20/utils/SafeERC20.test.js +++ b/test/token/ERC20/utils/SafeERC20.test.js @@ -168,7 +168,7 @@ function shouldOnlyRevertOnErrors() { }); describe('approvals', function () { - context('with zero allowance', function () { + describe('with zero allowance', function () { beforeEach(async function () { await this.token.$_approve(this.mock, this.spender, 0n); }); @@ -195,7 +195,7 @@ function shouldOnlyRevertOnErrors() { }); }); - context('with non-zero allowance', function () { + describe('with non-zero allowance', function () { beforeEach(async function () { await this.token.$_approve(this.mock, this.spender, 100n); }); diff --git a/test/token/ERC721/extensions/ERC721Burnable.test.js b/test/token/ERC721/extensions/ERC721Burnable.test.js index 95504d3f5..d6f0b80c4 100644 --- a/test/token/ERC721/extensions/ERC721Burnable.test.js +++ b/test/token/ERC721/extensions/ERC721Burnable.test.js @@ -48,7 +48,7 @@ describe('ERC721Burnable', function () { await this.token.connect(this.owner).burn(tokenId); }); - context('getApproved', function () { + describe('getApproved', function () { it('reverts', async function () { await expect(this.token.getApproved(tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') diff --git a/test/token/ERC721/extensions/ERC721Pausable.test.js b/test/token/ERC721/extensions/ERC721Pausable.test.js index 56585e744..acf731a45 100644 --- a/test/token/ERC721/extensions/ERC721Pausable.test.js +++ b/test/token/ERC721/extensions/ERC721Pausable.test.js @@ -19,7 +19,7 @@ describe('ERC721Pausable', function () { Object.assign(this, await loadFixture(fixture)); }); - context('when token is paused', function () { + describe('when token is paused', function () { beforeEach(async function () { await this.token.$_mint(this.owner, tokenId); await this.token.$_pause(); diff --git a/test/utils/Arrays.test.js b/test/utils/Arrays.test.js index 375b9422f..c585fee58 100644 --- a/test/utils/Arrays.test.js +++ b/test/utils/Arrays.test.js @@ -85,7 +85,7 @@ describe('Arrays', function () { it(name, async function () { // findUpperBound does not support duplicated if (hasDuplicates(array)) this.skip(); - expect(await this.mock.findUpperBound(input)).to.be.equal(lowerBound(array, input)); + expect(await this.mock.findUpperBound(input)).to.equal(lowerBound(array, input)); }); } }); @@ -114,7 +114,7 @@ describe('Arrays', function () { for (const [name, { elements }] of Object.entries(contractCases)) { it(name, async function () { for (const i in elements) { - expect(await this.contracts[name].unsafeAccess(i)).to.be.equal(elements[i]); + expect(await this.contracts[name].unsafeAccess(i)).to.equal(elements[i]); } }); } diff --git a/test/utils/cryptography/MerkleProof.test.js b/test/utils/cryptography/MerkleProof.test.js index 73e1ada95..9b0b34d3f 100644 --- a/test/utils/cryptography/MerkleProof.test.js +++ b/test/utils/cryptography/MerkleProof.test.js @@ -27,16 +27,16 @@ describe('MerkleProof', function () { const hash = merkleTree.leafHash(['A']); const proof = merkleTree.getProof(['A']); - expect(await this.mock.$verify(proof, root, hash)).to.equal(true); - expect(await this.mock.$verifyCalldata(proof, root, hash)).to.equal(true); + expect(await this.mock.$verify(proof, root, hash)).to.be.true; + expect(await this.mock.$verifyCalldata(proof, root, hash)).to.be.true; // For demonstration, it is also possible to create valid proofs for certain 64-byte values *not* in elements: const noSuchLeaf = hashPair( ethers.toBeArray(merkleTree.leafHash(['A'])), ethers.toBeArray(merkleTree.leafHash(['B'])), ); - expect(await this.mock.$verify(proof.slice(1), root, noSuchLeaf)).to.equal(true); - expect(await this.mock.$verifyCalldata(proof.slice(1), root, noSuchLeaf)).to.equal(true); + expect(await this.mock.$verify(proof.slice(1), root, noSuchLeaf)).to.be.true; + expect(await this.mock.$verifyCalldata(proof.slice(1), root, noSuchLeaf)).to.be.true; }); it('returns false for an invalid Merkle proof', async function () { @@ -47,8 +47,8 @@ describe('MerkleProof', function () { const hash = correctMerkleTree.leafHash(['a']); const proof = otherMerkleTree.getProof(['d']); - expect(await this.mock.$verify(proof, root, hash)).to.equal(false); - expect(await this.mock.$verifyCalldata(proof, root, hash)).to.equal(false); + expect(await this.mock.$verify(proof, root, hash)).to.be.false; + expect(await this.mock.$verifyCalldata(proof, root, hash)).to.be.false; }); it('returns false for a Merkle proof of invalid length', async function () { @@ -59,8 +59,8 @@ describe('MerkleProof', function () { const proof = merkleTree.getProof(['a']); const badProof = proof.slice(0, proof.length - 5); - expect(await this.mock.$verify(badProof, root, leaf)).to.equal(false); - expect(await this.mock.$verifyCalldata(badProof, root, leaf)).to.equal(false); + expect(await this.mock.$verify(badProof, root, leaf)).to.be.false; + expect(await this.mock.$verifyCalldata(badProof, root, leaf)).to.be.false; }); }); @@ -72,8 +72,8 @@ describe('MerkleProof', function () { const { proof, proofFlags, leaves } = merkleTree.getMultiProof(toElements('bdf')); const hashes = leaves.map(e => merkleTree.leafHash(e)); - expect(await this.mock.$multiProofVerify(proof, proofFlags, root, hashes)).to.equal(true); - expect(await this.mock.$multiProofVerifyCalldata(proof, proofFlags, root, hashes)).to.equal(true); + expect(await this.mock.$multiProofVerify(proof, proofFlags, root, hashes)).to.be.true; + expect(await this.mock.$multiProofVerifyCalldata(proof, proofFlags, root, hashes)).to.be.true; }); it('returns false for an invalid Merkle multi proof', async function () { @@ -84,8 +84,8 @@ describe('MerkleProof', function () { const { proof, proofFlags, leaves } = otherMerkleTree.getMultiProof(toElements('ghi')); const hashes = leaves.map(e => merkleTree.leafHash(e)); - expect(await this.mock.$multiProofVerify(proof, proofFlags, root, hashes)).to.equal(false); - expect(await this.mock.$multiProofVerifyCalldata(proof, proofFlags, root, hashes)).to.equal(false); + expect(await this.mock.$multiProofVerify(proof, proofFlags, root, hashes)).to.be.false; + expect(await this.mock.$multiProofVerifyCalldata(proof, proofFlags, root, hashes)).to.be.false; }); it('revert with invalid multi proof #1', async function () { @@ -139,16 +139,16 @@ describe('MerkleProof', function () { const { proof, proofFlags, leaves } = merkleTree.getMultiProof(toElements('a')); const hashes = leaves.map(e => merkleTree.leafHash(e)); - expect(await this.mock.$multiProofVerify(proof, proofFlags, root, hashes)).to.equal(true); - expect(await this.mock.$multiProofVerifyCalldata(proof, proofFlags, root, hashes)).to.equal(true); + expect(await this.mock.$multiProofVerify(proof, proofFlags, root, hashes)).to.be.true; + expect(await this.mock.$multiProofVerifyCalldata(proof, proofFlags, root, hashes)).to.be.true; }); it('limit case: can prove empty leaves', async function () { const merkleTree = StandardMerkleTree.of(toElements('abcd'), ['string']); const root = merkleTree.root; - expect(await this.mock.$multiProofVerify([root], [], root, [])).to.equal(true); - expect(await this.mock.$multiProofVerifyCalldata([root], [], root, [])).to.equal(true); + expect(await this.mock.$multiProofVerify([root], [], root, [])).to.be.true; + expect(await this.mock.$multiProofVerifyCalldata([root], [], root, [])).to.be.true; }); it('reverts processing manipulated proofs with a zero-value node at depth 1', async function () { diff --git a/test/utils/structs/BitMap.test.js b/test/utils/structs/BitMap.test.js index a7685414e..5662ab13f 100644 --- a/test/utils/structs/BitMap.test.js +++ b/test/utils/structs/BitMap.test.js @@ -17,25 +17,25 @@ describe('BitMap', function () { }); it('starts empty', async function () { - expect(await this.bitmap.$get(0, keyA)).to.equal(false); - expect(await this.bitmap.$get(0, keyB)).to.equal(false); - expect(await this.bitmap.$get(0, keyC)).to.equal(false); + expect(await this.bitmap.$get(0, keyA)).to.be.false; + expect(await this.bitmap.$get(0, keyB)).to.be.false; + expect(await this.bitmap.$get(0, keyC)).to.be.false; }); describe('setTo', function () { it('set a key to true', async function () { await this.bitmap.$setTo(0, keyA, true); - expect(await this.bitmap.$get(0, keyA)).to.equal(true); - expect(await this.bitmap.$get(0, keyB)).to.equal(false); - expect(await this.bitmap.$get(0, keyC)).to.equal(false); + expect(await this.bitmap.$get(0, keyA)).to.be.true; + expect(await this.bitmap.$get(0, keyB)).to.be.false; + expect(await this.bitmap.$get(0, keyC)).to.be.false; }); it('set a key to false', async function () { await this.bitmap.$setTo(0, keyA, true); await this.bitmap.$setTo(0, keyA, false); - expect(await this.bitmap.$get(0, keyA)).to.equal(false); - expect(await this.bitmap.$get(0, keyB)).to.equal(false); - expect(await this.bitmap.$get(0, keyC)).to.equal(false); + expect(await this.bitmap.$get(0, keyA)).to.be.false; + expect(await this.bitmap.$get(0, keyB)).to.be.false; + expect(await this.bitmap.$get(0, keyC)).to.be.false; }); it('set several consecutive keys', async function () { @@ -46,39 +46,39 @@ describe('BitMap', function () { await this.bitmap.$setTo(0, keyA + 4n, true); await this.bitmap.$setTo(0, keyA + 2n, false); await this.bitmap.$setTo(0, keyA + 4n, false); - expect(await this.bitmap.$get(0, keyA + 0n)).to.equal(true); - expect(await this.bitmap.$get(0, keyA + 1n)).to.equal(true); - expect(await this.bitmap.$get(0, keyA + 2n)).to.equal(false); - expect(await this.bitmap.$get(0, keyA + 3n)).to.equal(true); - expect(await this.bitmap.$get(0, keyA + 4n)).to.equal(false); + expect(await this.bitmap.$get(0, keyA + 0n)).to.be.true; + expect(await this.bitmap.$get(0, keyA + 1n)).to.be.true; + expect(await this.bitmap.$get(0, keyA + 2n)).to.be.false; + expect(await this.bitmap.$get(0, keyA + 3n)).to.be.true; + expect(await this.bitmap.$get(0, keyA + 4n)).to.be.false; }); }); describe('set', function () { it('adds a key', async function () { await this.bitmap.$set(0, keyA); - expect(await this.bitmap.$get(0, keyA)).to.equal(true); - expect(await this.bitmap.$get(0, keyB)).to.equal(false); - expect(await this.bitmap.$get(0, keyC)).to.equal(false); + expect(await this.bitmap.$get(0, keyA)).to.be.true; + expect(await this.bitmap.$get(0, keyB)).to.be.false; + expect(await this.bitmap.$get(0, keyC)).to.be.false; }); it('adds several keys', async function () { await this.bitmap.$set(0, keyA); await this.bitmap.$set(0, keyB); - expect(await this.bitmap.$get(0, keyA)).to.equal(true); - expect(await this.bitmap.$get(0, keyB)).to.equal(true); - expect(await this.bitmap.$get(0, keyC)).to.equal(false); + expect(await this.bitmap.$get(0, keyA)).to.be.true; + expect(await this.bitmap.$get(0, keyB)).to.be.true; + expect(await this.bitmap.$get(0, keyC)).to.be.false; }); it('adds several consecutive keys', async function () { await this.bitmap.$set(0, keyA + 0n); await this.bitmap.$set(0, keyA + 1n); await this.bitmap.$set(0, keyA + 3n); - expect(await this.bitmap.$get(0, keyA + 0n)).to.equal(true); - expect(await this.bitmap.$get(0, keyA + 1n)).to.equal(true); - expect(await this.bitmap.$get(0, keyA + 2n)).to.equal(false); - expect(await this.bitmap.$get(0, keyA + 3n)).to.equal(true); - expect(await this.bitmap.$get(0, keyA + 4n)).to.equal(false); + expect(await this.bitmap.$get(0, keyA + 0n)).to.be.true; + expect(await this.bitmap.$get(0, keyA + 1n)).to.be.true; + expect(await this.bitmap.$get(0, keyA + 2n)).to.be.false; + expect(await this.bitmap.$get(0, keyA + 3n)).to.be.true; + expect(await this.bitmap.$get(0, keyA + 4n)).to.be.false; }); }); @@ -87,9 +87,9 @@ describe('BitMap', function () { await this.bitmap.$set(0, keyA); await this.bitmap.$set(0, keyB); await this.bitmap.$unset(0, keyA); - expect(await this.bitmap.$get(0, keyA)).to.equal(false); - expect(await this.bitmap.$get(0, keyB)).to.equal(true); - expect(await this.bitmap.$get(0, keyC)).to.equal(false); + expect(await this.bitmap.$get(0, keyA)).to.be.false; + expect(await this.bitmap.$get(0, keyB)).to.be.true; + expect(await this.bitmap.$get(0, keyC)).to.be.false; }); it('removes consecutive added keys', async function () { @@ -97,11 +97,11 @@ describe('BitMap', function () { await this.bitmap.$set(0, keyA + 1n); await this.bitmap.$set(0, keyA + 3n); await this.bitmap.$unset(0, keyA + 1n); - expect(await this.bitmap.$get(0, keyA + 0n)).to.equal(true); - expect(await this.bitmap.$get(0, keyA + 1n)).to.equal(false); - expect(await this.bitmap.$get(0, keyA + 2n)).to.equal(false); - expect(await this.bitmap.$get(0, keyA + 3n)).to.equal(true); - expect(await this.bitmap.$get(0, keyA + 4n)).to.equal(false); + expect(await this.bitmap.$get(0, keyA + 0n)).to.be.true; + expect(await this.bitmap.$get(0, keyA + 1n)).to.be.false; + expect(await this.bitmap.$get(0, keyA + 2n)).to.be.false; + expect(await this.bitmap.$get(0, keyA + 3n)).to.be.true; + expect(await this.bitmap.$get(0, keyA + 4n)).to.be.false; }); it('adds and removes multiple keys', async function () { @@ -141,9 +141,9 @@ describe('BitMap', function () { // [A, C] - expect(await this.bitmap.$get(0, keyA)).to.equal(true); - expect(await this.bitmap.$get(0, keyB)).to.equal(false); - expect(await this.bitmap.$get(0, keyC)).to.equal(true); + expect(await this.bitmap.$get(0, keyA)).to.be.true; + expect(await this.bitmap.$get(0, keyB)).to.be.false; + expect(await this.bitmap.$get(0, keyC)).to.be.true; }); }); }); diff --git a/test/utils/structs/EnumerableMap.behavior.js b/test/utils/structs/EnumerableMap.behavior.js index 39e74a68e..37da41795 100644 --- a/test/utils/structs/EnumerableMap.behavior.js +++ b/test/utils/structs/EnumerableMap.behavior.js @@ -124,7 +124,7 @@ function shouldBehaveLikeMap() { describe('get', function () { it('existing value', async function () { - expect(await this.methods.get(this.keyA)).to.be.equal(this.valueA); + expect(await this.methods.get(this.keyA)).to.equal(this.valueA); }); it('missing value', async function () { From b4ceb054deba24681aeb50483ccbd4622f37c7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Tue, 2 Jan 2024 17:18:22 -0600 Subject: [PATCH 150/167] Fix documentation inaccuracies in Governor (#4815) --- contracts/governance/extensions/GovernorTimelockAccess.sol | 3 +++ contracts/governance/extensions/GovernorTimelockCompound.sol | 2 +- contracts/governance/extensions/GovernorTimelockControl.sol | 5 +---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contracts/governance/extensions/GovernorTimelockAccess.sol b/contracts/governance/extensions/GovernorTimelockAccess.sol index a2373a4ff..6e2c5b84e 100644 --- a/contracts/governance/extensions/GovernorTimelockAccess.sol +++ b/contracts/governance/extensions/GovernorTimelockAccess.sol @@ -35,6 +35,9 @@ import {Time} from "../../utils/types/Time.sol"; * mitigate this attack vector, the governor is able to ignore the restrictions claimed by the `AccessManager` using * {setAccessManagerIgnored}. While permanent denial of service is mitigated, temporary DoS may still be technically * possible. All of the governor's own functions (e.g., {setBaseDelaySeconds}) ignore the `AccessManager` by default. + * + * NOTE: `AccessManager` does not support scheduling more than one operation with the same target and calldata at + * the same time. See {AccessManager-schedule} for a workaround. */ abstract contract GovernorTimelockAccess is Governor { // An execution plan is produced at the moment a proposal is created, in order to fix at that point the exact diff --git a/contracts/governance/extensions/GovernorTimelockCompound.sol b/contracts/governance/extensions/GovernorTimelockCompound.sol index 117df01ad..77cf369ff 100644 --- a/contracts/governance/extensions/GovernorTimelockCompound.sol +++ b/contracts/governance/extensions/GovernorTimelockCompound.sol @@ -16,7 +16,7 @@ import {SafeCast} from "../../utils/math/SafeCast.sol"; * * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be - * inaccessible. + * inaccessible from a proposal, unless executed via {Governor-relay}. */ abstract contract GovernorTimelockCompound is Governor { ICompoundTimelock private _timelock; diff --git a/contracts/governance/extensions/GovernorTimelockControl.sol b/contracts/governance/extensions/GovernorTimelockControl.sol index 53503cc66..52d4b4295 100644 --- a/contracts/governance/extensions/GovernorTimelockControl.sol +++ b/contracts/governance/extensions/GovernorTimelockControl.sol @@ -11,7 +11,7 @@ import {SafeCast} from "../../utils/math/SafeCast.sol"; /** * @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a * delay, enforced by the {TimelockController} to all successful proposal (in addition to the voting duration). The - * {Governor} needs the proposer (and ideally the executor) roles for the {Governor} to work properly. + * {Governor} needs the proposer (and ideally the executor and canceller) roles for the {Governor} to work properly. * * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be @@ -21,9 +21,6 @@ import {SafeCast} from "../../utils/math/SafeCast.sol"; * risky, as it grants them the ability to: 1) execute operations as the timelock, and thus possibly performing * operations or accessing funds that are expected to only be accessible through a vote, and 2) block governance * proposals that have been approved by the voters, effectively executing a Denial of Service attack. - * - * NOTE: `AccessManager` does not support scheduling more than one operation with the same target and calldata at - * the same time. See {AccessManager-schedule} for a workaround. */ abstract contract GovernorTimelockControl is Governor { TimelockController private _timelock; From ef68ac3ed83f85e4ce078b26170280c468ffeabb Mon Sep 17 00:00:00 2001 From: Vladimir Khramov Date: Thu, 4 Jan 2024 18:07:53 +0400 Subject: [PATCH 151/167] Add getRoleMembers method to return all accounts that have role (#4546) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hadrien Croubois Co-authored-by: Ernesto García --- .changeset/violet-moons-tell.md | 5 +++++ .../access/extensions/AccessControlEnumerable.sol | 12 ++++++++++++ test/access/AccessControl.behavior.js | 12 +++++++----- 3 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 .changeset/violet-moons-tell.md diff --git a/.changeset/violet-moons-tell.md b/.changeset/violet-moons-tell.md new file mode 100644 index 000000000..be215e193 --- /dev/null +++ b/.changeset/violet-moons-tell.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': minor +--- + +`AccessControlEnumerable`: Add a `getRoleMembers` method to return all accounts that have `role`. diff --git a/contracts/access/extensions/AccessControlEnumerable.sol b/contracts/access/extensions/AccessControlEnumerable.sol index 151de05c4..222490c9b 100644 --- a/contracts/access/extensions/AccessControlEnumerable.sol +++ b/contracts/access/extensions/AccessControlEnumerable.sol @@ -46,6 +46,18 @@ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessCon return _roleMembers[role].length(); } + /** + * @dev Return all accounts that have `role` + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function getRoleMembers(bytes32 role) public view virtual returns (address[] memory) { + return _roleMembers[role].values(); + } + /** * @dev Overload {AccessControl-_grantRole} to track enumerable memberships */ diff --git a/test/access/AccessControl.behavior.js b/test/access/AccessControl.behavior.js index 1b4e27a61..56290c0c1 100644 --- a/test/access/AccessControl.behavior.js +++ b/test/access/AccessControl.behavior.js @@ -239,15 +239,17 @@ function shouldBehaveLikeAccessControlEnumerable() { await this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.otherAuthorized); await this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.other); - const memberCount = await this.mock.getRoleMemberCount(ROLE); - expect(memberCount).to.equal(2); + const expectedMembers = [this.authorized.address, this.otherAuthorized.address]; - const bearers = []; + const memberCount = await this.mock.getRoleMemberCount(ROLE); + const members = []; for (let i = 0; i < memberCount; ++i) { - bearers.push(await this.mock.getRoleMember(ROLE, i)); + members.push(await this.mock.getRoleMember(ROLE, i)); } - expect(bearers).to.have.members([this.authorized.address, this.otherAuthorized.address]); + expect(memberCount).to.equal(expectedMembers.length); + expect(members).to.deep.equal(expectedMembers); + expect(await this.mock.getRoleMembers(ROLE)).to.deep.equal(expectedMembers); }); it('role enumeration should be in sync after renounceRole call', async function () { From fa87080d108e960fe3ee72da0686e1d415e30223 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jan 2024 22:01:30 -0600 Subject: [PATCH 152/167] Bump follow-redirects from 1.15.3 to 1.15.4 (#4823) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1e5382369..400d4afd2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5813,9 +5813,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "dev": true, "funding": [ { From a80563c008b0ed8bc8ab574a8334ec321f7eb743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 11 Jan 2024 10:13:21 -0600 Subject: [PATCH 153/167] Migrate to Node 20 (#4756) --- .github/actions/setup/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index cab1188ac..ea3301209 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -3,9 +3,9 @@ name: Setup runs: using: composite steps: - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: 16.x + node-version: 20.x - uses: actions/cache@v3 id: cache with: From a4b98bc79f8be3d1143e4a1423e811c354032a0d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 11:33:39 -0600 Subject: [PATCH 154/167] Update actions/download-artifact digest to v3 (#4795) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ernestognw --- .github/workflows/release-cycle.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-cycle.yml b/.github/workflows/release-cycle.yml index 12da449f9..85fe70b6d 100644 --- a/.github/workflows/release-cycle.yml +++ b/.github/workflows/release-cycle.yml @@ -143,7 +143,7 @@ jobs: env: PRERELEASE: ${{ needs.state.outputs.is_prerelease }} - name: Upload tarball artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ github.ref_name }} path: ${{ steps.pack.outputs.tarball }} @@ -170,9 +170,7 @@ jobs: - uses: actions/checkout@v4 - name: Download tarball artifact id: artifact - # Replace with actions/upload-artifact@v3 when - # https://github.com/actions/download-artifact/pull/194 gets released - uses: actions/download-artifact@e9ef242655d12993efdcda9058dee2db83a2cb9b + uses: actions/download-artifact@v4 with: name: ${{ github.ref_name }} - name: Check integrity From 920225a1c7e6e749ba23b10ed076b04f454290e8 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Fri, 12 Jan 2024 01:01:48 +0100 Subject: [PATCH 155/167] Add missing return value names in IAccessManager (#4829) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto García --- contracts/access/manager/IAccessManager.sol | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/contracts/access/manager/IAccessManager.sol b/contracts/access/manager/IAccessManager.sol index 3a6dc7311..d420e1125 100644 --- a/contracts/access/manager/IAccessManager.sol +++ b/contracts/access/manager/IAccessManager.sol @@ -181,13 +181,16 @@ interface IAccessManager { * [2] Pending execution delay for the account. * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled. */ - function getAccess(uint64 roleId, address account) external view returns (uint48, uint32, uint32, uint48); + function getAccess( + uint64 roleId, + address account + ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect); /** * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this * permission might be associated with an execution delay. {getAccess} can provide more details. */ - function hasRole(uint64 roleId, address account) external view returns (bool, uint32); + function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay); /** * @dev Give a label to a role, for improved role discoverability by UIs. @@ -340,7 +343,11 @@ interface IAccessManager { * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target * contract if it is using standard Solidity ABI encoding. */ - function schedule(address target, bytes calldata data, uint48 when) external returns (bytes32, uint32); + function schedule( + address target, + bytes calldata data, + uint48 when + ) external returns (bytes32 operationId, uint32 nonce); /** * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the From e68720efb6eb964f709e0b5d62c1921e871d6296 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Fri, 12 Jan 2024 19:45:49 -0300 Subject: [PATCH 156/167] Refactor supports interface (#4817) --- test/governance/Governor.test.js | 2 +- test/token/ERC1155/ERC1155.behavior.js | 2 +- test/token/ERC1155/utils/ERC1155Holder.test.js | 2 +- test/token/ERC721/ERC721.behavior.js | 2 +- test/utils/introspection/ERC165.test.js | 2 +- test/utils/introspection/SupportsInterface.behavior.js | 4 +++- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/test/governance/Governor.test.js b/test/governance/Governor.test.js index 4668e33d5..e097ef0ef 100644 --- a/test/governance/Governor.test.js +++ b/test/governance/Governor.test.js @@ -96,7 +96,7 @@ describe('Governor', function () { ); }); - shouldSupportInterfaces(['ERC165', 'ERC1155Receiver', 'Governor']); + shouldSupportInterfaces(['ERC1155Receiver', 'Governor']); shouldBehaveLikeERC6372(mode); it('deployment check', async function () { diff --git a/test/token/ERC1155/ERC1155.behavior.js b/test/token/ERC1155/ERC1155.behavior.js index cdf62b50d..ebcfc602a 100644 --- a/test/token/ERC1155/ERC1155.behavior.js +++ b/test/token/ERC1155/ERC1155.behavior.js @@ -754,7 +754,7 @@ function shouldBehaveLikeERC1155() { }); }); - shouldSupportInterfaces(['ERC165', 'ERC1155', 'ERC1155MetadataURI']); + shouldSupportInterfaces(['ERC1155', 'ERC1155MetadataURI']); }); } diff --git a/test/token/ERC1155/utils/ERC1155Holder.test.js b/test/token/ERC1155/utils/ERC1155Holder.test.js index 52705fc45..9bff487ad 100644 --- a/test/token/ERC1155/utils/ERC1155Holder.test.js +++ b/test/token/ERC1155/utils/ERC1155Holder.test.js @@ -24,7 +24,7 @@ describe('ERC1155Holder', function () { Object.assign(this, await loadFixture(fixture)); }); - shouldSupportInterfaces(['ERC165', 'ERC1155Receiver']); + shouldSupportInterfaces(['ERC1155Receiver']); it('receives ERC1155 tokens from a single ID', async function () { await this.token.connect(this.owner).safeTransferFrom(this.owner, this.mock, ids[0], values[0], data); diff --git a/test/token/ERC721/ERC721.behavior.js b/test/token/ERC721/ERC721.behavior.js index b9fd56f06..594a52fb9 100644 --- a/test/token/ERC721/ERC721.behavior.js +++ b/test/token/ERC721/ERC721.behavior.js @@ -20,7 +20,7 @@ function shouldBehaveLikeERC721() { Object.assign(this, { owner, newOwner, approved, operator, other }); }); - shouldSupportInterfaces(['ERC165', 'ERC721']); + shouldSupportInterfaces(['ERC721']); describe('with minted tokens', function () { beforeEach(async function () { diff --git a/test/utils/introspection/ERC165.test.js b/test/utils/introspection/ERC165.test.js index 83d861ba1..8117c695e 100644 --- a/test/utils/introspection/ERC165.test.js +++ b/test/utils/introspection/ERC165.test.js @@ -14,5 +14,5 @@ describe('ERC165', function () { Object.assign(this, await loadFixture(fixture)); }); - shouldSupportInterfaces(['ERC165']); + shouldSupportInterfaces(); }); diff --git a/test/utils/introspection/SupportsInterface.behavior.js b/test/utils/introspection/SupportsInterface.behavior.js index 27d153170..5b52a7946 100644 --- a/test/utils/introspection/SupportsInterface.behavior.js +++ b/test/utils/introspection/SupportsInterface.behavior.js @@ -85,9 +85,11 @@ const SIGNATURES = { const INTERFACE_IDS = mapValues(SIGNATURES, interfaceId); function shouldSupportInterfaces(interfaces = []) { + interfaces.unshift('ERC165'); + describe('ERC165', function () { beforeEach(function () { - this.contractUnderTest = this.mock || this.token || this.holder; + this.contractUnderTest = this.mock || this.token; }); describe('when the interfaceId is supported', function () { From efb8c1af6e97a5236fa65b62ef81dbbf67254c18 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Sat, 13 Jan 2024 00:24:17 +0100 Subject: [PATCH 157/167] Fix gas report generation (#4824) Co-authored-by: ernestognw --- .github/workflows/checks.yml | 3 + hardhat.config.js | 32 +- hardhat/env-contract.js | 18 -- package-lock.json | 545 ++--------------------------------- package.json | 1 - test/sanity.test.js | 11 +- 6 files changed, 31 insertions(+), 579 deletions(-) delete mode 100644 hardhat/env-contract.js diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 7a44045a1..7009c6c3c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -29,6 +29,9 @@ jobs: runs-on: ubuntu-latest env: FORCE_COLOR: 1 + # Needed for "eth-gas-reporter" to produce a "gasReporterOutput.json" as documented in + # https://github.com/cgewecke/eth-gas-reporter/blob/v0.2.27/docs/gasReporterOutput.md + CI: true GAS: true steps: - uses: actions/checkout@v4 diff --git a/hardhat.config.js b/hardhat.config.js index dac13f5e0..5a7d043ef 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -22,12 +22,6 @@ const argv = require('yargs/yargs')() type: 'boolean', default: false, }, - gasReport: { - alias: 'enableGasReportPath', - type: 'string', - implies: 'gas', - default: undefined, - }, mode: { alias: 'compileMode', type: 'string', @@ -55,10 +49,12 @@ const argv = require('yargs/yargs')() }, }).argv; -require('@nomicfoundation/hardhat-toolbox'); +require('@nomicfoundation/hardhat-chai-matchers'); require('@nomicfoundation/hardhat-ethers'); -require('hardhat-ignore-warnings'); require('hardhat-exposed'); +require('hardhat-gas-reporter'); +require('hardhat-ignore-warnings'); +require('solidity-coverage'); require('solidity-docgen'); argv.foundry && require('@nomicfoundation/hardhat-foundry'); @@ -101,6 +97,7 @@ module.exports = { networks: { hardhat: { allowUnlimitedContractSize: !withOptimizations, + initialBaseFeePerGas: argv.coverage ? 0 : undefined, }, }, exposed: { @@ -108,23 +105,14 @@ module.exports = { initializers: true, exclude: ['vendor/**/*'], }, - docgen: require('./docs/config'), -}; - -if (argv.gas) { - require('hardhat-gas-reporter'); - module.exports.gasReporter = { + gasReporter: { + enabled: argv.gas, showMethodSig: true, currency: 'USD', - outputFile: argv.gasReport, coinmarketcap: argv.coinmarketcap, - }; -} - -if (argv.coverage) { - require('solidity-coverage'); - module.exports.networks.hardhat.initialBaseFeePerGas = 0; -} + }, + docgen: require('./docs/config'), +}; function hasFoundry() { return proc.spawnSync('forge', ['-V'], { stdio: 'ignore' }).error === undefined; diff --git a/hardhat/env-contract.js b/hardhat/env-contract.js deleted file mode 100644 index fb01482f6..000000000 --- a/hardhat/env-contract.js +++ /dev/null @@ -1,18 +0,0 @@ -// Remove the default account from the accounts list used in tests, in order -// to protect tests against accidentally passing due to the contract -// deployer being used subsequently as function caller -// -// This operation affects: -// - the accounts (and signersAsPromise) parameters of `contract` blocks -// - the return of hre.ethers.getSigners() -extendEnvironment(hre => { - // TODO: replace with a mocha root hook. - // (see https://github.com/sc-forks/solidity-coverage/issues/819#issuecomment-1762963679) - if (!process.env.COVERAGE) { - // override hre.ethers.getSigner() - // note that we don't just discard the first signer, we also cache the value to improve speed. - const originalGetSigners = hre.ethers.getSigners; - const filteredSignersAsPromise = originalGetSigners().then(signers => signers.slice(1)); - hre.ethers.getSigners = () => filteredSignersAsPromise; - } -}); diff --git a/package-lock.json b/package-lock.json index 400d4afd2..6611672c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,6 @@ "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", - "@nomicfoundation/hardhat-toolbox": "^4.0.0", "@openzeppelin/docs-utils": "^0.1.5", "@openzeppelin/merkle-tree": "^1.0.5", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", @@ -564,6 +563,7 @@ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, + "optional": true, "peer": true, "dependencies": { "@jridgewell/trace-mapping": "0.3.9" @@ -1577,6 +1577,7 @@ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "dev": true, + "optional": true, "peer": true, "engines": { "node": ">=6.0.0" @@ -1587,6 +1588,7 @@ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true, + "optional": true, "peer": true }, "node_modules/@jridgewell/trace-mapping": { @@ -1594,6 +1596,7 @@ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, + "optional": true, "peer": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -2133,75 +2136,6 @@ "hardhat": "^2.9.5" } }, - "node_modules/@nomicfoundation/hardhat-toolbox": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-4.0.0.tgz", - "integrity": "sha512-jhcWHp0aHaL0aDYj8IJl80v4SZXWMS1A2XxXa1CA6pBiFfJKuZinCkO6wb+POAt0LIfXB3gA3AgdcOccrcwBwA==", - "dev": true, - "peerDependencies": { - "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", - "@nomicfoundation/hardhat-ethers": "^3.0.0", - "@nomicfoundation/hardhat-network-helpers": "^1.0.0", - "@nomicfoundation/hardhat-verify": "^2.0.0", - "@typechain/ethers-v6": "^0.5.0", - "@typechain/hardhat": "^9.0.0", - "@types/chai": "^4.2.0", - "@types/mocha": ">=9.1.0", - "@types/node": ">=16.0.0", - "chai": "^4.2.0", - "ethers": "^6.4.0", - "hardhat": "^2.11.0", - "hardhat-gas-reporter": "^1.0.8", - "solidity-coverage": "^0.8.1", - "ts-node": ">=8.0.0", - "typechain": "^8.3.0", - "typescript": ">=4.5.0" - } - }, - "node_modules/@nomicfoundation/hardhat-verify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.1.tgz", - "integrity": "sha512-TuJrhW5p9x92wDRiRhNkGQ/wzRmOkfCLkoRg8+IRxyeLigOALbayQEmkNiGWR03vGlxZS4znXhKI7y97JwZ6Og==", - "dev": true, - "peer": true, - "dependencies": { - "@ethersproject/abi": "^5.1.2", - "@ethersproject/address": "^5.0.2", - "cbor": "^8.1.0", - "chalk": "^2.4.2", - "debug": "^4.1.1", - "lodash.clonedeep": "^4.5.0", - "semver": "^6.3.0", - "table": "^6.8.0", - "undici": "^5.14.0" - }, - "peerDependencies": { - "hardhat": "^2.0.4" - } - }, - "node_modules/@nomicfoundation/hardhat-verify/node_modules/cbor": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", - "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", - "dev": true, - "peer": true, - "dependencies": { - "nofilter": "^3.1.0" - }, - "engines": { - "node": ">=12.19" - } - }, - "node_modules/@nomicfoundation/hardhat-verify/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@nomicfoundation/solidity-analyzer": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz", @@ -2873,6 +2807,7 @@ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", "dev": true, + "optional": true, "peer": true }, "node_modules/@tsconfig/node12": { @@ -2880,6 +2815,7 @@ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true, + "optional": true, "peer": true }, "node_modules/@tsconfig/node14": { @@ -2887,6 +2823,7 @@ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true, + "optional": true, "peer": true }, "node_modules/@tsconfig/node16": { @@ -2894,79 +2831,9 @@ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "dev": true, + "optional": true, "peer": true }, - "node_modules/@typechain/ethers-v6": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@typechain/ethers-v6/-/ethers-v6-0.5.1.tgz", - "integrity": "sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==", - "dev": true, - "peer": true, - "dependencies": { - "lodash": "^4.17.15", - "ts-essentials": "^7.0.1" - }, - "peerDependencies": { - "ethers": "6.x", - "typechain": "^8.3.2", - "typescript": ">=4.7.0" - } - }, - "node_modules/@typechain/hardhat": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-9.1.0.tgz", - "integrity": "sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==", - "dev": true, - "peer": true, - "dependencies": { - "fs-extra": "^9.1.0" - }, - "peerDependencies": { - "@typechain/ethers-v6": "^0.5.1", - "ethers": "^6.1.0", - "hardhat": "^2.9.9", - "typechain": "^8.3.2" - } - }, - "node_modules/@typechain/hardhat/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "peer": true, - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typechain/hardhat/node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "peer": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@typechain/hardhat/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@types/bn.js": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.2.tgz", @@ -3046,13 +2913,6 @@ "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", "dev": true }, - "node_modules/@types/mocha": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", - "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", - "dev": true, - "peer": true - }, "node_modules/@types/node": { "version": "20.9.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", @@ -3077,13 +2937,6 @@ "@types/node": "*" } }, - "node_modules/@types/prettier": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", - "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", - "dev": true, - "peer": true - }, "node_modules/@types/qs": { "version": "6.9.8", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.8.tgz", @@ -3195,6 +3048,7 @@ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true, + "optional": true, "peer": true, "engines": { "node": ">=0.4.0" @@ -3359,6 +3213,7 @@ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true, + "optional": true, "peer": true }, "node_modules/argparse": { @@ -3370,16 +3225,6 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/array-buffer-byte-length": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", @@ -3520,16 +3365,6 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", @@ -4130,58 +3965,6 @@ "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", "dev": true }, - "node_modules/command-line-args": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", - "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", - "dev": true, - "peer": true, - "dependencies": { - "array-back": "^3.1.0", - "find-replace": "^3.0.0", - "lodash.camelcase": "^4.3.0", - "typical": "^4.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/command-line-usage": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", - "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", - "dev": true, - "peer": true, - "dependencies": { - "array-back": "^4.0.2", - "chalk": "^2.4.2", - "table-layout": "^1.0.2", - "typical": "^5.2.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/command-line-usage/node_modules/array-back": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", - "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/command-line-usage/node_modules/typical": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", - "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", @@ -4357,6 +4140,7 @@ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true, + "optional": true, "peer": true }, "node_modules/cross-spawn": { @@ -4490,16 +4274,6 @@ "node": ">=6" } }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -5712,19 +5486,6 @@ "node": ">=8" } }, - "node_modules/find-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", - "dev": true, - "peer": true, - "dependencies": { - "array-back": "^3.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -7604,20 +7365,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "dev": true, - "peer": true - }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", - "dev": true, - "peer": true - }, "node_modules/lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", @@ -7757,6 +7504,7 @@ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true, + "optional": true, "peer": true }, "node_modules/map-obj": { @@ -9180,16 +8928,6 @@ "node": ">=8" } }, - "node_modules/reduce-flatten": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", - "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/regenerator-runtime": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", @@ -10675,13 +10413,6 @@ "safe-buffer": "~5.2.0" } }, - "node_modules/string-format": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz", - "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==", - "dev": true, - "peer": true - }, "node_modules/string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -10904,42 +10635,6 @@ "node": ">=10.0.0" } }, - "node_modules/table-layout": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", - "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", - "dev": true, - "peer": true, - "dependencies": { - "array-back": "^4.0.1", - "deep-extend": "~0.6.0", - "typical": "^5.2.0", - "wordwrapjs": "^4.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/table-layout/node_modules/array-back": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", - "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/table-layout/node_modules/typical": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", - "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/table/node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", @@ -11109,113 +10804,12 @@ "node": ">=8" } }, - "node_modules/ts-command-line-args": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", - "integrity": "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==", - "dev": true, - "peer": true, - "dependencies": { - "chalk": "^4.1.0", - "command-line-args": "^5.1.1", - "command-line-usage": "^6.1.0", - "string-format": "^2.0.0" - }, - "bin": { - "write-markdown": "dist/write-markdown.js" - } - }, - "node_modules/ts-command-line-args/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ts-command-line-args/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "peer": 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/ts-command-line-args/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/ts-command-line-args/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "peer": true - }, - "node_modules/ts-command-line-args/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ts-command-line-args/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ts-essentials": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", - "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", - "dev": true, - "peer": true, - "peerDependencies": { - "typescript": ">=3.7.0" - } - }, "node_modules/ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, + "optional": true, "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -11260,6 +10854,7 @@ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, + "optional": true, "peer": true, "engines": { "node": ">=0.3.1" @@ -11434,81 +11029,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/typechain": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.2.tgz", - "integrity": "sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==", - "dev": true, - "peer": true, - "dependencies": { - "@types/prettier": "^2.1.1", - "debug": "^4.3.1", - "fs-extra": "^7.0.0", - "glob": "7.1.7", - "js-sha3": "^0.8.0", - "lodash": "^4.17.15", - "mkdirp": "^1.0.4", - "prettier": "^2.3.1", - "ts-command-line-args": "^2.2.0", - "ts-essentials": "^7.0.1" - }, - "bin": { - "typechain": "dist/cli/cli.js" - }, - "peerDependencies": { - "typescript": ">=4.3.0" - } - }, - "node_modules/typechain/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "peer": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/typechain/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "peer": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/typechain/node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "peer": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/typed-array-buffer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", @@ -11585,6 +11105,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, + "optional": true, "peer": true, "bin": { "tsc": "bin/tsc", @@ -11594,16 +11115,6 @@ "node": ">=14.17" } }, - "node_modules/typical": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", - "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/uglify-js": { "version": "3.17.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", @@ -11718,6 +11229,7 @@ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true, + "optional": true, "peer": true }, "node_modules/validate-npm-package-license": { @@ -11876,30 +11388,6 @@ "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "dev": true }, - "node_modules/wordwrapjs": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", - "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", - "dev": true, - "peer": true, - "dependencies": { - "reduce-flatten": "^2.0.0", - "typical": "^5.2.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/wordwrapjs/node_modules/typical": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", - "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -12283,6 +11771,7 @@ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, + "optional": true, "peer": true, "engines": { "node": ">=6" diff --git a/package.json b/package.json index f4076433b..10b39ea8c 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", - "@nomicfoundation/hardhat-toolbox": "^4.0.0", "@openzeppelin/docs-utils": "^0.1.5", "@openzeppelin/merkle-tree": "^1.0.5", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", diff --git a/test/sanity.test.js b/test/sanity.test.js index 1733c9654..ea0175c48 100644 --- a/test/sanity.test.js +++ b/test/sanity.test.js @@ -3,9 +3,7 @@ const { expect } = require('chai'); const { loadFixture, mine } = require('@nomicfoundation/hardhat-network-helpers'); async function fixture() { - const signers = await ethers.getSigners(); - const addresses = await Promise.all(signers.map(s => s.getAddress())); - return { signers, addresses }; + return {}; } describe('Environment sanity', function () { @@ -13,13 +11,6 @@ describe('Environment sanity', function () { Object.assign(this, await loadFixture(fixture)); }); - describe('[skip-on-coverage] signers', function () { - it('signer #0 is skipped', async function () { - const signer = await ethers.provider.getSigner(0); - expect(this.addresses).to.not.include(await signer.getAddress()); - }); - }); - describe('snapshot', function () { let blockNumberBefore; From 2fb73e5004859889e8293134c70e6c13a186faf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Sun, 14 Jan 2024 11:13:02 -0600 Subject: [PATCH 158/167] Remove outdated `release` script (#4833) --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 10b39ea8c..fd02096ab 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "clean": "hardhat clean && rimraf build contracts/build", "prepack": "scripts/prepack.sh", "generate": "scripts/generate/run.js", - "release": "scripts/release/release.sh", "version": "scripts/release/version.sh", "test": "hardhat test", "test:inheritance": "scripts/checks/inheritance-ordering.js artifacts/build-info/*", From 281ab158866c4d7dcf31dcd90efd8fce1cdbb38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Tue, 16 Jan 2024 04:09:50 -0600 Subject: [PATCH 159/167] Run gas-compare action on push to master (#4834) --- .github/workflows/checks.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 7009c6c3c..96861e13a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -45,7 +45,6 @@ jobs: run: npm run test:generation - name: Compare gas costs uses: ./.github/actions/gas-compare - if: github.base_ref == 'master' with: token: ${{ github.token }} @@ -71,7 +70,6 @@ jobs: run: npm run test:inheritance - name: Check storage layout uses: ./.github/actions/storage-layout - if: github.base_ref == 'master' continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'breaking change') }} with: token: ${{ github.token }} From 692dbc560f48b2a5160e6e4f78302bb93314cd88 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Tue, 16 Jan 2024 23:12:50 +0100 Subject: [PATCH 160/167] Add Base64Url encoding (#4822) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto García --- .changeset/twenty-feet-grin.md | 5 ++++ .github/workflows/checks.yml | 3 +- contracts/utils/Base64.sol | 53 ++++++++++++++++++++++++---------- scripts/tests/base64.sh | 31 ++++++++++++++++++++ test/utils/Base64.t.sol | 32 ++++++++++++++++++++ test/utils/Base64.test.js | 31 ++++++++++++++++---- 6 files changed, 133 insertions(+), 22 deletions(-) create mode 100644 .changeset/twenty-feet-grin.md create mode 100644 scripts/tests/base64.sh create mode 100644 test/utils/Base64.t.sol diff --git a/.changeset/twenty-feet-grin.md b/.changeset/twenty-feet-grin.md new file mode 100644 index 000000000..69b4fe63b --- /dev/null +++ b/.changeset/twenty-feet-grin.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': minor +--- + +`Base64`: Add `encodeURL` following section 5 of RFC4648 for URL encoding diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 96861e13a..9a5779d51 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -83,7 +83,8 @@ jobs: - name: Set up environment uses: ./.github/actions/setup - name: Run tests - run: forge test -vv + # Base64Test requires `--ffi`. See test/utils/Base64.t.sol + run: forge test -vv --no-match-contract Base64Test coverage: runs-on: ubuntu-latest diff --git a/contracts/utils/Base64.sol b/contracts/utils/Base64.sol index f8547d1cc..3f2d7c134 100644 --- a/contracts/utils/Base64.sol +++ b/contracts/utils/Base64.sol @@ -9,29 +9,48 @@ pragma solidity ^0.8.20; library Base64 { /** * @dev Base64 Encoding/Decoding Table + * See sections 4 and 5 of https://datatracker.ietf.org/doc/html/rfc4648 */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + string internal constant _TABLE_URL = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { + return _encode(data, _TABLE, true); + } + + /** + * @dev Converts a `bytes` to its Bytes64Url `string` representation. + */ + function encodeURL(bytes memory data) internal pure returns (string memory) { + return _encode(data, _TABLE_URL, false); + } + + /** + * @dev Internal table-agnostic conversion + */ + function _encode(bytes memory data, string memory table, bool withPadding) private pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; - // Loads the table into memory - string memory table = _TABLE; - - // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter - // and split into 4 numbers of 6 bits. - // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up + // If padding is enabled, the final length should be `bytes` data length divided by 3 rounded up and then + // multiplied by 4 so that it leaves room for padding the last chunk // - `data.length + 2` -> Round up // - `/ 3` -> Number of 3-bytes chunks // - `4 *` -> 4 characters for each chunk - string memory result = new string(4 * ((data.length + 2) / 3)); + // If padding is disabled, the final length should be `bytes` data length multiplied by 4/3 rounded up as + // opposed to when padding is required to fill the last chunk. + // - `4 *` -> 4 characters for each chunk + // - `data.length + 2` -> Round up + // - `/ 3` -> Number of 3-bytes chunks + uint256 resultLength = withPadding ? 4 * ((data.length + 2) / 3) : (4 * data.length + 2) / 3; + + string memory result = new string(resultLength); /// @solidity memory-safe-assembly assembly { @@ -73,15 +92,17 @@ library Base64 { resultPtr := add(resultPtr, 1) // Advance } - // When data `bytes` is not exactly 3 bytes long - // it is padded with `=` characters at the end - switch mod(mload(data), 3) - case 1 { - mstore8(sub(resultPtr, 1), 0x3d) - mstore8(sub(resultPtr, 2), 0x3d) - } - case 2 { - mstore8(sub(resultPtr, 1), 0x3d) + if withPadding { + // When data `bytes` is not exactly 3 bytes long + // it is padded with `=` characters at the end + switch mod(mload(data), 3) + case 1 { + mstore8(sub(resultPtr, 1), 0x3d) + mstore8(sub(resultPtr, 2), 0x3d) + } + case 2 { + mstore8(sub(resultPtr, 1), 0x3d) + } } } diff --git a/scripts/tests/base64.sh b/scripts/tests/base64.sh new file mode 100644 index 000000000..f51cb4002 --- /dev/null +++ b/scripts/tests/base64.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +set -euo pipefail + +_encode() { + # - Print the input to stdout + # - Remove the first two characters + # - Convert from hex to binary + # - Convert from binary to base64 + # - Remove newlines from `base64` output + echo -n "$1" | cut -c 3- | xxd -r -p | base64 | tr -d \\n +} + +encode() { + # - Convert from base64 to hex + # - Remove newlines from `xxd` output + _encode "$1" | xxd -p | tr -d \\n +} + +encodeURL() { + # - Remove padding from `base64` output + # - Replace `+` with `-` + # - Replace `/` with `_` + # - Convert from base64 to hex + # - Remove newlines from `xxd` output + _encode "$1" | sed 's/=//g' | sed 's/+/-/g' | sed 's/\//_/g' | xxd -p | tr -d \\n +} + +# $1: function name +# $2: input +$1 $2 diff --git a/test/utils/Base64.t.sol b/test/utils/Base64.t.sol new file mode 100644 index 000000000..80e4f49df --- /dev/null +++ b/test/utils/Base64.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {Test} from "forge-std/Test.sol"; + +import {Base64} from "@openzeppelin/contracts/utils/Base64.sol"; + +/// NOTE: This test requires `ffi` to be enabled. It does not run in the CI +/// environment given `ffi` is not recommended. +/// See: https://github.com/foundry-rs/foundry/issues/6744 +contract Base64Test is Test { + function testEncode(bytes memory input) external { + string memory output = Base64.encode(input); + assertEq(output, _base64Ffi(input, "encode")); + } + + function testEncodeURL(bytes memory input) external { + string memory output = Base64.encodeURL(input); + assertEq(output, _base64Ffi(input, "encodeURL")); + } + + function _base64Ffi(bytes memory input, string memory fn) internal returns (string memory) { + string[] memory command = new string[](4); + command[0] = "bash"; + command[1] = "scripts/tests/base64.sh"; + command[2] = fn; + command[3] = vm.toString(input); + bytes memory retData = vm.ffi(command); + return string(retData); + } +} diff --git a/test/utils/Base64.test.js b/test/utils/Base64.test.js index 4707db0c3..3f3e9fc8b 100644 --- a/test/utils/Base64.test.js +++ b/test/utils/Base64.test.js @@ -2,6 +2,10 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +// Replace "+/" with "-_" in the char table, and remove the padding +// see https://datatracker.ietf.org/doc/html/rfc4648#section-5 +const base64toBase64Url = str => str.replaceAll('+', '-').replaceAll('/', '_').replaceAll('=', ''); + async function fixture() { const mock = await ethers.deployContract('$Base64'); return { mock }; @@ -12,18 +16,35 @@ describe('Strings', function () { Object.assign(this, await loadFixture(fixture)); }); - describe('from bytes - base64', function () { + describe('base64', function () { for (const { title, input, expected } of [ { title: 'converts to base64 encoded string with double padding', input: 'test', expected: 'dGVzdA==' }, { title: 'converts to base64 encoded string with single padding', input: 'test1', expected: 'dGVzdDE=' }, { title: 'converts to base64 encoded string without padding', input: 'test12', expected: 'dGVzdDEy' }, - { title: 'empty bytes', input: '0x', expected: '' }, + { title: 'converts to base64 encoded string (/ case)', input: 'où', expected: 'b/k=' }, + { title: 'converts to base64 encoded string (+ case)', input: 'zs~1t8', expected: 'enN+MXQ4' }, + { title: 'empty bytes', input: '', expected: '' }, ]) it(title, async function () { - const raw = ethers.isBytesLike(input) ? input : ethers.toUtf8Bytes(input); + const buffer = Buffer.from(input, 'ascii'); + expect(await this.mock.$encode(buffer)).to.equal(ethers.encodeBase64(buffer)); + expect(await this.mock.$encode(buffer)).to.equal(expected); + }); + }); - expect(await this.mock.$encode(raw)).to.equal(ethers.encodeBase64(raw)); - expect(await this.mock.$encode(raw)).to.equal(expected); + describe('base64url', function () { + for (const { title, input, expected } of [ + { title: 'converts to base64url encoded string with double padding', input: 'test', expected: 'dGVzdA' }, + { title: 'converts to base64url encoded string with single padding', input: 'test1', expected: 'dGVzdDE' }, + { title: 'converts to base64url encoded string without padding', input: 'test12', expected: 'dGVzdDEy' }, + { title: 'converts to base64url encoded string (_ case)', input: 'où', expected: 'b_k' }, + { title: 'converts to base64url encoded string (- case)', input: 'zs~1t8', expected: 'enN-MXQ4' }, + { title: 'empty bytes', input: '', expected: '' }, + ]) + it(title, async function () { + const buffer = Buffer.from(input, 'ascii'); + expect(await this.mock.$encodeURL(buffer)).to.equal(base64toBase64Url(ethers.encodeBase64(buffer))); + expect(await this.mock.$encodeURL(buffer)).to.equal(expected); }); }); }); From d2ba1f625151c5ee63d15ab3870c31e8bf6e2801 Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Wed, 17 Jan 2024 10:51:36 +0100 Subject: [PATCH 161/167] Remove redundant memory usage in Checkpoints (#4540) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto García --- .changeset/brown-cooks-dress.md | 5 +++ contracts/utils/structs/Checkpoints.sol | 39 ++++++++++++----------- scripts/generate/templates/Checkpoints.js | 13 ++++---- 3 files changed, 33 insertions(+), 24 deletions(-) create mode 100644 .changeset/brown-cooks-dress.md diff --git a/.changeset/brown-cooks-dress.md b/.changeset/brown-cooks-dress.md new file mode 100644 index 000000000..12076df6e --- /dev/null +++ b/.changeset/brown-cooks-dress.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': patch +--- + +`Checkpoints`: Optimized checkpoint access by removing redundant memory usage. diff --git a/contracts/utils/structs/Checkpoints.sol b/contracts/utils/structs/Checkpoints.sol index 6561b0d68..5ba6ad92d 100644 --- a/contracts/utils/structs/Checkpoints.sol +++ b/contracts/utils/structs/Checkpoints.sol @@ -104,7 +104,7 @@ library Checkpoints { if (pos == 0) { return (false, 0, 0); } else { - Checkpoint224 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); + Checkpoint224 storage ckpt = _unsafeAccess(self._checkpoints, pos - 1); return (true, ckpt._key, ckpt._value); } } @@ -131,21 +131,22 @@ library Checkpoints { uint256 pos = self.length; if (pos > 0) { - // Copying to memory is important here. - Checkpoint224 memory last = _unsafeAccess(self, pos - 1); + Checkpoint224 storage last = _unsafeAccess(self, pos - 1); + uint32 lastKey = last._key; + uint224 lastValue = last._value; // Checkpoint keys must be non-decreasing. - if (last._key > key) { + if (lastKey > key) { revert CheckpointUnorderedInsertion(); } // Update or push new checkpoint - if (last._key == key) { + if (lastKey == key) { _unsafeAccess(self, pos - 1)._value = value; } else { self.push(Checkpoint224({_key: key, _value: value})); } - return (last._value, value); + return (lastValue, value); } else { self.push(Checkpoint224({_key: key, _value: value})); return (0, value); @@ -298,7 +299,7 @@ library Checkpoints { if (pos == 0) { return (false, 0, 0); } else { - Checkpoint208 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); + Checkpoint208 storage ckpt = _unsafeAccess(self._checkpoints, pos - 1); return (true, ckpt._key, ckpt._value); } } @@ -325,21 +326,22 @@ library Checkpoints { uint256 pos = self.length; if (pos > 0) { - // Copying to memory is important here. - Checkpoint208 memory last = _unsafeAccess(self, pos - 1); + Checkpoint208 storage last = _unsafeAccess(self, pos - 1); + uint48 lastKey = last._key; + uint208 lastValue = last._value; // Checkpoint keys must be non-decreasing. - if (last._key > key) { + if (lastKey > key) { revert CheckpointUnorderedInsertion(); } // Update or push new checkpoint - if (last._key == key) { + if (lastKey == key) { _unsafeAccess(self, pos - 1)._value = value; } else { self.push(Checkpoint208({_key: key, _value: value})); } - return (last._value, value); + return (lastValue, value); } else { self.push(Checkpoint208({_key: key, _value: value})); return (0, value); @@ -492,7 +494,7 @@ library Checkpoints { if (pos == 0) { return (false, 0, 0); } else { - Checkpoint160 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); + Checkpoint160 storage ckpt = _unsafeAccess(self._checkpoints, pos - 1); return (true, ckpt._key, ckpt._value); } } @@ -519,21 +521,22 @@ library Checkpoints { uint256 pos = self.length; if (pos > 0) { - // Copying to memory is important here. - Checkpoint160 memory last = _unsafeAccess(self, pos - 1); + Checkpoint160 storage last = _unsafeAccess(self, pos - 1); + uint96 lastKey = last._key; + uint160 lastValue = last._value; // Checkpoint keys must be non-decreasing. - if (last._key > key) { + if (lastKey > key) { revert CheckpointUnorderedInsertion(); } // Update or push new checkpoint - if (last._key == key) { + if (lastKey == key) { _unsafeAccess(self, pos - 1)._value = value; } else { self.push(Checkpoint160({_key: key, _value: value})); } - return (last._value, value); + return (lastValue, value); } else { self.push(Checkpoint160({_key: key, _value: value})); return (0, value); diff --git a/scripts/generate/templates/Checkpoints.js b/scripts/generate/templates/Checkpoints.js index ed935f17e..0a677e27f 100644 --- a/scripts/generate/templates/Checkpoints.js +++ b/scripts/generate/templates/Checkpoints.js @@ -121,7 +121,7 @@ function latestCheckpoint(${opts.historyTypeName} storage self) if (pos == 0) { return (false, 0, 0); } else { - ${opts.checkpointTypeName} memory ckpt = _unsafeAccess(self.${opts.checkpointFieldName}, pos - 1); + ${opts.checkpointTypeName} storage ckpt = _unsafeAccess(self.${opts.checkpointFieldName}, pos - 1); return (true, ckpt.${opts.keyFieldName}, ckpt.${opts.valueFieldName}); } } @@ -152,21 +152,22 @@ function _insert( uint256 pos = self.length; if (pos > 0) { - // Copying to memory is important here. - ${opts.checkpointTypeName} memory last = _unsafeAccess(self, pos - 1); + ${opts.checkpointTypeName} storage last = _unsafeAccess(self, pos - 1); + ${opts.keyTypeName} lastKey = last.${opts.keyFieldName}; + ${opts.valueTypeName} lastValue = last.${opts.valueFieldName}; // Checkpoint keys must be non-decreasing. - if(last.${opts.keyFieldName} > key) { + if (lastKey > key) { revert CheckpointUnorderedInsertion(); } // Update or push new checkpoint - if (last.${opts.keyFieldName} == key) { + if (lastKey == key) { _unsafeAccess(self, pos - 1).${opts.valueFieldName} = value; } else { self.push(${opts.checkpointTypeName}({${opts.keyFieldName}: key, ${opts.valueFieldName}: value})); } - return (last.${opts.valueFieldName}, value); + return (lastValue, value); } else { self.push(${opts.checkpointTypeName}({${opts.keyFieldName}: key, ${opts.valueFieldName}: value})); return (0, value); From d7490e4f5962fd022ba46f7bbc2e46b460b9fbcc Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Wed, 17 Jan 2024 16:16:51 +0100 Subject: [PATCH 162/167] Fix gas report format (#4838) --- scripts/checks/compareGasReports.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checks/compareGasReports.js b/scripts/checks/compareGasReports.js index 160c8cc52..1afe1d368 100755 --- a/scripts/checks/compareGasReports.js +++ b/scripts/checks/compareGasReports.js @@ -176,7 +176,7 @@ function formatCellMarkdown(cell) { return [ !isFinite(cell?.value) ? '-' : cell.value.toString(), !isFinite(cell?.delta) ? '-' : plusSign(cell.delta) + cell.delta.toString(), - !isFinite(cell?.prcnt) ? '-' : plusSign(cell.prcnt) + cell.prcnt.toFixed(2) + '%' + trend(cell.delta), + !isFinite(cell?.prcnt) ? '-' : plusSign(cell.prcnt) + cell.prcnt.toFixed(2) + '% ' + trend(cell.delta), ]; } From 06eb785fcf2a854babe3d70e2e602917b3fbdbdf Mon Sep 17 00:00:00 2001 From: Dariusz Glowinski Date: Wed, 17 Jan 2024 16:20:28 +0100 Subject: [PATCH 163/167] Remove obsolete ERC4626 `mint` NatSpec (#4837) Co-authored-by: Hadrien Croubois --- contracts/token/ERC20/extensions/ERC4626.sol | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/contracts/token/ERC20/extensions/ERC4626.sol b/contracts/token/ERC20/extensions/ERC4626.sol index 76c14fc75..c71b14ad4 100644 --- a/contracts/token/ERC20/extensions/ERC4626.sol +++ b/contracts/token/ERC20/extensions/ERC4626.sol @@ -180,11 +180,7 @@ abstract contract ERC4626 is ERC20, IERC4626 { return shares; } - /** @dev See {IERC4626-mint}. - * - * As opposed to {deposit}, minting is allowed even if the vault is in a state where the price of a share is zero. - * In this case, the shares will be minted without requiring any assets to be deposited. - */ + /** @dev See {IERC4626-mint}. */ function mint(uint256 shares, address receiver) public virtual returns (uint256) { uint256 maxShares = maxMint(receiver); if (shares > maxShares) { From 0b343abcb5cecc42c40b95565cb7f5affb542727 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Wed, 17 Jan 2024 16:23:18 +0100 Subject: [PATCH 164/167] Enable more solhint rules (#4836) --- package-lock.json | 8 ++++---- package.json | 2 +- solhint.config.js | 12 +++++++++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6611672c5..80f4e2b07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "prettier-plugin-solidity": "^1.1.0", "rimraf": "^5.0.1", "semver": "^7.3.5", - "solhint": "^3.3.6", + "solhint": "^3.6.1", "solhint-plugin-openzeppelin": "file:scripts/solhint-custom", "solidity-ast": "^0.4.50", "solidity-coverage": "^0.8.5", @@ -9712,9 +9712,9 @@ } }, "node_modules/solhint": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.6.2.tgz", - "integrity": "sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.6.1.tgz", + "integrity": "sha512-pS7Pl11Ujiew9XWaLDH0U+AFc6iK1RtLV0YETSpjHZXjUaNYi32mY+pi8Ap9vqmNfWodWKtG0bVQpatq84mL4g==", "dev": true, "dependencies": { "@solidity-parser/parser": "^0.16.0", diff --git a/package.json b/package.json index fd02096ab..7f2187d85 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "prettier-plugin-solidity": "^1.1.0", "rimraf": "^5.0.1", "semver": "^7.3.5", - "solhint": "^3.3.6", + "solhint": "^3.6.1", "solhint-plugin-openzeppelin": "file:scripts/solhint-custom", "solidity-ast": "^0.4.50", "solidity-coverage": "^0.8.5", diff --git a/solhint.config.js b/solhint.config.js index 123ff91fa..f0bd7994f 100644 --- a/solhint.config.js +++ b/solhint.config.js @@ -1,16 +1,22 @@ const customRules = require('./scripts/solhint-custom'); const rules = [ - 'no-unused-vars', + 'avoid-tx-origin', 'const-name-snakecase', 'contract-name-camelcase', 'event-name-camelcase', + 'explicit-types', 'func-name-mixedcase', 'func-param-name-mixedcase', - 'modifier-name-mixedcase', - 'var-name-mixedcase', 'imports-on-top', + 'modifier-name-mixedcase', + 'no-console', 'no-global-import', + 'no-unused-vars', + 'quotes', + 'use-forbidden-name', + 'var-name-mixedcase', + 'visibility-modifier-order', ...customRules.map(r => `openzeppelin/${r.ruleId}`), ]; From ec7ee764948cbabaf6f640744a6b35d72203214d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:24:46 -0600 Subject: [PATCH 165/167] Update actions/cache action to v4 (#4841) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index ea3301209..2a439a6b2 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -6,7 +6,7 @@ runs: - uses: actions/setup-node@v4 with: node-version: 20.x - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: cache with: path: '**/node_modules' From b27cd83eba9f181f183c78ed85df62712d2852bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Wed, 17 Jan 2024 13:32:32 -0600 Subject: [PATCH 166/167] Remove `hardhat-foundry` and check harnesses compilation in CI (#4832) Co-authored-by: Hadrien Croubois --- .github/workflows/checks.yml | 11 ++++ certora/harnesses/EnumerableMapHarness.sol | 4 +- certora/harnesses/EnumerableSetHarness.sol | 4 +- certora/specs/EnumerableMap.spec | 20 ++++---- certora/specs/EnumerableSet.spec | 20 ++++---- hardhat.config.js | 58 +++++++++++----------- hardhat/remappings.js | 18 +++++++ package-lock.json | 13 ----- package.json | 4 +- 9 files changed, 83 insertions(+), 69 deletions(-) create mode 100644 hardhat/remappings.js diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 9a5779d51..61cb96594 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -98,6 +98,17 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} + harnesses: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up environment + uses: ./.github/actions/setup + - name: Compile harnesses + run: | + make -C certora apply + npm run compile:harnesses + slither: runs-on: ubuntu-latest steps: diff --git a/certora/harnesses/EnumerableMapHarness.sol b/certora/harnesses/EnumerableMapHarness.sol index 5c2f3229b..6155193e9 100644 --- a/certora/harnesses/EnumerableMapHarness.sol +++ b/certora/harnesses/EnumerableMapHarness.sol @@ -49,7 +49,7 @@ contract EnumerableMapHarness { return _map.get(key); } - function _indexOf(bytes32 key) public view returns (uint256) { - return _map._keys._inner._indexes[key]; + function _positionOf(bytes32 key) public view returns (uint256) { + return _map._keys._inner._positions[key]; } } diff --git a/certora/harnesses/EnumerableSetHarness.sol b/certora/harnesses/EnumerableSetHarness.sol index 3d18b183b..09246de6b 100644 --- a/certora/harnesses/EnumerableSetHarness.sol +++ b/certora/harnesses/EnumerableSetHarness.sol @@ -29,7 +29,7 @@ contract EnumerableSetHarness { return _set.at(index); } - function _indexOf(bytes32 value) public view returns (uint256) { - return _set._inner._indexes[value]; + function _positionOf(bytes32 value) public view returns (uint256) { + return _set._inner._positions[value]; } } diff --git a/certora/specs/EnumerableMap.spec b/certora/specs/EnumerableMap.spec index 7b503031f..1801d99f7 100644 --- a/certora/specs/EnumerableMap.spec +++ b/certora/specs/EnumerableMap.spec @@ -13,7 +13,7 @@ methods { function get(bytes32) external returns (bytes32) envfree; // FV - function _indexOf(bytes32) external returns (uint256) envfree; + function _positionOf(bytes32) external returns (uint256) envfree; } /* @@ -69,13 +69,13 @@ invariant atUniqueness(uint256 index1, uint256 index2) ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Invariant: index <> value relationship is consistent │ │ │ -│ Note that the two consistencyXxx invariants, put together, prove that at_ and _indexOf are inverse of one another. │ -│ This proves that we have a bijection between indices (the enumerability part) and keys (the entries that are set │ -│ and removed from the EnumerableMap). │ +│ Note that the two consistencyXxx invariants, put together, prove that at_ and _positionOf are inverse of one │ +│ another. This proves that we have a bijection between indices (the enumerability part) and keys (the entries that │ +│ are set and removed from the EnumerableMap). │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant consistencyIndex(uint256 index) - index < length() => to_mathint(_indexOf(key_at(index))) == index + 1 + index < length() => to_mathint(_positionOf(key_at(index))) == index + 1 { preserved remove(bytes32 key) { requireInvariant consistencyIndex(require_uint256(length() - 1)); @@ -84,16 +84,16 @@ invariant consistencyIndex(uint256 index) invariant consistencyKey(bytes32 key) contains(key) => ( - _indexOf(key) > 0 && - _indexOf(key) <= length() && - key_at(require_uint256(_indexOf(key) - 1)) == key + _positionOf(key) > 0 && + _positionOf(key) <= length() && + key_at(require_uint256(_positionOf(key) - 1)) == key ) { preserved remove(bytes32 otherKey) { requireInvariant consistencyKey(otherKey); requireInvariant atUniqueness( - require_uint256(_indexOf(key) - 1), - require_uint256(_indexOf(otherKey) - 1) + require_uint256(_positionOf(key) - 1), + require_uint256(_positionOf(otherKey) - 1) ); } } diff --git a/certora/specs/EnumerableSet.spec b/certora/specs/EnumerableSet.spec index 3db515838..94d0a918c 100644 --- a/certora/specs/EnumerableSet.spec +++ b/certora/specs/EnumerableSet.spec @@ -9,7 +9,7 @@ methods { function at_(uint256) external returns (bytes32) envfree; // FV - function _indexOf(bytes32) external returns (uint256) envfree; + function _positionOf(bytes32) external returns (uint256) envfree; } /* @@ -52,13 +52,13 @@ invariant atUniqueness(uint256 index1, uint256 index2) ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Invariant: index <> key relationship is consistent │ │ │ -│ Note that the two consistencyXxx invariants, put together, prove that at_ and _indexOf are inverse of one another. │ -│ This proves that we have a bijection between indices (the enumerability part) and keys (the entries that are added │ -│ and removed from the EnumerableSet). │ +│ Note that the two consistencyXxx invariants, put together, prove that at_ and _positionOf are inverse of one │ +│ another. This proves that we have a bijection between indices (the enumerability part) and keys (the entries that │ +│ are added and removed from the EnumerableSet). │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ */ invariant consistencyIndex(uint256 index) - index < length() => _indexOf(at_(index)) == require_uint256(index + 1) + index < length() => _positionOf(at_(index)) == require_uint256(index + 1) { preserved remove(bytes32 key) { requireInvariant consistencyIndex(require_uint256(length() - 1)); @@ -67,16 +67,16 @@ invariant consistencyIndex(uint256 index) invariant consistencyKey(bytes32 key) contains(key) => ( - _indexOf(key) > 0 && - _indexOf(key) <= length() && - at_(require_uint256(_indexOf(key) - 1)) == key + _positionOf(key) > 0 && + _positionOf(key) <= length() && + at_(require_uint256(_positionOf(key) - 1)) == key ) { preserved remove(bytes32 otherKey) { requireInvariant consistencyKey(otherKey); requireInvariant atUniqueness( - require_uint256(_indexOf(key) - 1), - require_uint256(_indexOf(otherKey) - 1) + require_uint256(_positionOf(key) - 1), + require_uint256(_positionOf(otherKey) - 1) ); } } diff --git a/hardhat.config.js b/hardhat.config.js index 5a7d043ef..230cca5e2 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -1,26 +1,29 @@ /// ENVVAR -// - CI: output gas report to file instead of stdout +// - COMPILE_VERSION: compiler version (default: 0.8.20) +// - SRC: contracts folder to compile (default: contracts) +// - COMPILE_MODE: production modes enables optimizations (default: development) +// - IR: enable IR compilation (default: false) // - COVERAGE: enable coverage report // - ENABLE_GAS_REPORT: enable gas report -// - COMPILE_MODE: production modes enables optimizations (default: development) -// - COMPILE_VERSION: compiler version (default: 0.8.20) // - COINMARKETCAP: coinmarkercat api key for USD value in gas report +// - CI: output gas report to file instead of stdout const fs = require('fs'); const path = require('path'); -const proc = require('child_process'); -const argv = require('yargs/yargs')() +const { argv } = require('yargs/yargs')() .env('') .options({ - coverage: { - type: 'boolean', - default: false, + // Compilation settings + compiler: { + alias: 'compileVersion', + type: 'string', + default: '0.8.20', }, - gas: { - alias: 'enableGasReport', - type: 'boolean', - default: false, + src: { + alias: 'source', + type: 'string', + default: 'contracts', }, mode: { alias: 'compileMode', @@ -33,21 +36,21 @@ const argv = require('yargs/yargs')() type: 'boolean', default: false, }, - foundry: { - alias: 'hasFoundry', + // Extra modules + coverage: { type: 'boolean', - default: hasFoundry(), + default: false, }, - compiler: { - alias: 'compileVersion', - type: 'string', - default: '0.8.20', + gas: { + alias: 'enableGasReport', + type: 'boolean', + default: false, }, coinmarketcap: { alias: 'coinmarketcapApiKey', type: 'string', }, - }).argv; + }); require('@nomicfoundation/hardhat-chai-matchers'); require('@nomicfoundation/hardhat-ethers'); @@ -56,17 +59,13 @@ require('hardhat-gas-reporter'); require('hardhat-ignore-warnings'); require('solidity-coverage'); require('solidity-docgen'); -argv.foundry && require('@nomicfoundation/hardhat-foundry'); - -if (argv.foundry && argv.coverage) { - throw Error('Coverage analysis is incompatible with Foundry. Disable with `FOUNDRY=false` in the environment'); -} for (const f of fs.readdirSync(path.join(__dirname, 'hardhat'))) { require(path.join(__dirname, 'hardhat', f)); } const withOptimizations = argv.gas || argv.coverage || argv.compileMode === 'production'; +const allowUnlimitedContractSize = argv.gas || argv.coverage || argv.compileMode === 'development'; /** * @type import('hardhat/config').HardhatUserConfig @@ -96,7 +95,7 @@ module.exports = { }, networks: { hardhat: { - allowUnlimitedContractSize: !withOptimizations, + allowUnlimitedContractSize, initialBaseFeePerGas: argv.coverage ? 0 : undefined, }, }, @@ -111,9 +110,8 @@ module.exports = { currency: 'USD', coinmarketcap: argv.coinmarketcap, }, + paths: { + sources: argv.src, + }, docgen: require('./docs/config'), }; - -function hasFoundry() { - return proc.spawnSync('forge', ['-V'], { stdio: 'ignore' }).error === undefined; -} diff --git a/hardhat/remappings.js b/hardhat/remappings.js new file mode 100644 index 000000000..cd9984d44 --- /dev/null +++ b/hardhat/remappings.js @@ -0,0 +1,18 @@ +const fs = require('fs'); +const { task } = require('hardhat/config'); +const { TASK_COMPILE_GET_REMAPPINGS } = require('hardhat/builtin-tasks/task-names'); + +task(TASK_COMPILE_GET_REMAPPINGS).setAction((taskArgs, env, runSuper) => + runSuper().then(remappings => + Object.assign( + remappings, + Object.fromEntries( + fs + .readFileSync('remappings.txt', 'utf-8') + .split('\n') + .filter(Boolean) + .map(line => line.trim().split('=')), + ), + ), + ), +); diff --git a/package-lock.json b/package-lock.json index 80f4e2b07..be38fefdd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,6 @@ "@changesets/read": "^0.6.0", "@nomicfoundation/hardhat-chai-matchers": "^2.0.3", "@nomicfoundation/hardhat-ethers": "^3.0.4", - "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@openzeppelin/docs-utils": "^0.1.5", "@openzeppelin/merkle-tree": "^1.0.5", @@ -2112,18 +2111,6 @@ "hardhat": "^2.0.0" } }, - "node_modules/@nomicfoundation/hardhat-foundry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-foundry/-/hardhat-foundry-1.1.1.tgz", - "integrity": "sha512-cXGCBHAiXas9Pg9MhMOpBVQCkWRYoRFG7GJJAph+sdQsfd22iRs5U5Vs9XmpGEQd1yEvYISQZMeE68Nxj65iUQ==", - "dev": true, - "dependencies": { - "chalk": "^2.4.2" - }, - "peerDependencies": { - "hardhat": "^2.17.2" - } - }, "node_modules/@nomicfoundation/hardhat-network-helpers": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.9.tgz", diff --git a/package.json b/package.json index 7f2187d85..888767017 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ ], "scripts": { "compile": "hardhat compile", - "coverage": "env COVERAGE=true FOUNDRY=false hardhat coverage", + "compile:harnesses": "env SRC=./certora/harnesses hardhat compile", + "coverage": "env COVERAGE=true hardhat coverage", "docs": "npm run prepare-docs && oz-docs", "docs:watch": "oz-docs watch contracts docs/templates docs/config.js", "prepare-docs": "scripts/prepare-docs.sh", @@ -54,7 +55,6 @@ "@changesets/read": "^0.6.0", "@nomicfoundation/hardhat-chai-matchers": "^2.0.3", "@nomicfoundation/hardhat-ethers": "^3.0.4", - "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@openzeppelin/docs-utils": "^0.1.5", "@openzeppelin/merkle-tree": "^1.0.5", From 72c642e13e4e8c36da56ebeeecf2ee3e4abe9781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 18 Jan 2024 03:03:07 -0600 Subject: [PATCH 167/167] Lower fuzz runs to 5000 (#4835) --- foundry.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundry.toml b/foundry.toml index 859f210cf..cf207ffe9 100644 --- a/foundry.toml +++ b/foundry.toml @@ -6,5 +6,5 @@ test = 'test' cache_path = 'cache_forge' [fuzz] -runs = 10000 +runs = 5000 max_test_rejects = 150000